/* ========================================================================== */
/* ETHNOS R746 — géométrie canonique des volets droits + territoires salons       */
/* Base : R745 canonique.                                                      */
/* Périmètre : Profil, Favoris, Trophées, Messages, Médias, Annuaire,         */
/* Signalements, Contacts + identité du salon dans le volet Tchat.                      */
/* ========================================================================== */

/* R745 — source de vérité géométrique :
   - haut = bord inférieur du bouton Profil intégré à la topbar ;
   - droite = bord du viewport ;
   - bas = bord supérieur du bouton Maps réellement mesuré par R190/R694 ;
   - largeur = largeur réelle du bouton Maps, identique au bouton Profil.
   Aucune largeur fixe et aucune extrapolation par "inset" historique. */
@media (min-width:901px){
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-profile.isOpen),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-favorites.isOpen),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-trophies.isOpen),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-media.isOpen),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-directory.isOpen),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-reports.isOpen),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-contacts-r588.isOpen),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-profile[aria-hidden="false"]),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-favorites[aria-hidden="false"]),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-trophies[aria-hidden="false"]),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-media[aria-hidden="false"]),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-directory[aria-hidden="false"]),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-reports[aria-hidden="false"]),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-contacts-r588[aria-hidden="false"]){
    top:var(--topbar,54px) !important;
    right:0 !important;
    bottom:calc(var(--r190-map-tab-bottom,var(--footer-legal,22px)) + var(--r190-map-tab-height,var(--ethnos-card-height,108px))) !important;
    left:auto !important;
    width:var(--r190-map-tab-width,var(--ethnos-context-width,330px)) !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:hidden !important;
    contain:paint !important;
  }

  /* Les sept volets standards, Contacts compris, remplissent exactement leur couche commune. */
  html.ethnosConnectedUnified body #memberDrawer-profile,
  html.ethnosConnectedUnified body #memberDrawer-favorites,
  html.ethnosConnectedUnified body #memberDrawer-trophies,
  html.ethnosConnectedUnified body #memberDrawer-media,
  html.ethnosConnectedUnified body #memberDrawer-directory,
  html.ethnosConnectedUnified body #memberDrawer-reports,
  html.ethnosConnectedUnified body #memberDrawer-contacts-r588{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    box-sizing:border-box !important;
  }

  /* Messages garde son moteur à deux surfaces : seul son cadre vertical et
     sa colonne droite sont alignés sur Profil/Maps. Le workspace peut encore
     s'étendre vers la gauche lorsqu'une conversation est ouverte. */
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-messages-r575.isOpen),
  html.ethnosConnectedUnified[data-ethnos-ui="discord-r111"] body
  .memberNavDrawerLayer:has(> #memberDrawer-messages-r575[aria-hidden="false"]){
    top:var(--topbar,54px) !important;
    right:0 !important;
    bottom:calc(var(--r190-map-tab-bottom,var(--footer-legal,22px)) + var(--r190-map-tab-height,var(--ethnos-card-height,108px))) !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
  html.ethnosConnectedUnified body .ethnosMessagesR575Dashboard{
    right:0 !important;
    width:var(--r190-map-tab-width,var(--ethnos-context-width,330px)) !important;
    min-width:0 !important;
    max-width:var(--r190-map-tab-width,var(--ethnos-context-width,330px)) !important;
  }
}

/* R745 — identité du salon : centrage typographique uniquement.
   La structure, le logo éventuel et les dimensions du volet ne changent pas. */
html body.ethnosSalonR573Active .ethnosSalonR573ContextHead > .ethnosSalonR573Eyebrow,
html body.ethnosSalonR573Active .ethnosSalonR573ContextHead > h2,
html body.ethnosSalonR573Active .ethnosSalonR573ContextHead > p{
  text-align:center !important;
}

:root{--R746_DRAWERS_CONTACTS_COUNTRY_SALONS:1;}
