/* ========================================================================== */
/* ETHNOS R455 — correction ciblée des barres en état Tchat découverte.       */
/* Base figée : R454.                                                         */
/* Périmètre : fond Tchat, barre haute, footer légal.                         */
/* Aucune modification Maps, Tchat, dock, accueil ou géométrie des onglets.  */
/* ========================================================================== */

@media (min-width:901px){
  /* Cause prouvée : le fond découverte R445 est position:fixed avec inset:-12,
     dans le contexte .memberLayout. En état Tchat il déborde de la zone utile.
     Le remettre en absolute le borne au layout réel (déjà overflow:hidden),
     donc il ne peut plus recouvrir la barre haute ni le footer. */
  html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberLayout::before{
    position:absolute !important;
    inset:0 !important;
    width:auto !important;
    height:auto !important;
  }

  /* Restaurer strictement l'apparence active du footer (R109) en Tchat. */
  html.ethnosGuestDiscovery body.isTchatDrawerOpen #memberFooter{
    background:#03111b !important;
    border-top:1px solid var(--line) !important;
  }

  /* Cause prouvée du décentrage : R450 force display:grid et R453 retire les
     paddings. On rétablit les valeurs normales actives de R188/R109. */
  html.ethnosGuestDiscovery body.isTchatDrawerOpen #memberFooter .memberFooterLegal{
    display:block !important;
    padding-left:calc(var(--ethnos-search-width) + 16px) !important;
    padding-right:calc(var(--ethnos-context-width) + 12px) !important;
  }
  html.ethnosGuestDiscovery body.isTchatDrawerOpen #memberFooter .memberFooterLegal nav{
    width:100% !important;
    height:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:0 !important;
    margin:0 auto !important;
  }
}
