/* ========================================================================== */
/* ETHNOS R189 — largeur d’onglet, dégagement Maps et crème unifiée           */
/* Base stricte : R188.                                                        */
/* ========================================================================== */

:root{
  --r189-drawer-cream:#fffaf2;
  --r189-drawer-cream-soft:#f6eee2;
  --r189-drawer-line:#d8c8b3;
  --r189-map-tab-clearance:4px;
  --r172-directory-cream:var(--r189-drawer-cream);
}

/* Onglet Tchat : même largeur que Maps. Le volet reste indépendant. */
@media (min-width:901px){
  html body .r185TchatToggle.r188TchatTabFixed,
  html body.isTchatDrawerOpen .r185TchatToggle.r188TchatTabFixed{
    width:var(--ethnos-context-width) !important;
    min-width:var(--ethnos-context-width) !important;
    max-width:var(--ethnos-context-width) !important;
  }
  html body .memberExplorerPanel,
  html body.isTchatDrawerOpen .memberExplorerPanel{
    width:var(--ethnos-search-width) !important;
    min-width:var(--ethnos-search-width) !important;
    max-width:var(--ethnos-search-width) !important;
  }
}

/* Vue Maps : base de la grande carte à 4 px au-dessus des onglets latéraux. */
@media (min-width:901px){
  html[data-ethnos-ui="discord-r111"] body .memberWorkspace.hasBodyView > .bodyView-world{
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) !important;
    width:100% !important;
    height:calc(100vh - var(--topbar,54px) - var(--footer-legal,22px) - var(--ethnos-card-height) - 10px - var(--r189-map-tab-clearance)) !important;
    min-height:0 !important;
    max-height:none !important;
    padding-bottom:0 !important;
    overflow:hidden !important;
  }
  html[data-ethnos-ui="discord-r111"] body .bodyView-world > .bodyViewContent{
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
  }
  html[data-ethnos-ui="discord-r111"] body .bodyView-world .r182LegacyMapCard{
    height:100% !important;
    min-height:0 !important;
    max-height:100% !important;
    grid-template-rows:auto minmax(0,1fr) !important;
  }
  html[data-ethnos-ui="discord-r111"] body .bodyView-world .r182LegacyMapCard .mapStage,
  html[data-ethnos-ui="discord-r111"] body .bodyView-world .r182LegacyMapCard .mapStage > svg{
    height:100% !important;
    min-height:0 !important;
  }
}

/* Crème unique : référence exacte du volet de recherche Tchat R188. */
html body .memberNavDrawer,
html body .memberTodaySearchDrawer,
html body .memberTodaySearchShell,
html body .bodyDrawerShell,
html body .memberDirectoryDrawer,
html body .memberDirectoryShell,
html body .memberDirectoryContent,
html body .memberDirectoryResults,
html body .memberFavoritesShell,
html body .memberFavoritesList,
html body .memberMediaDrawer,
html body .memberMediaShell,
html body .memberMediaScroll,
html body .memberTrophiesDrawer,
html body .memberTrophiesShell,
html body .memberMessagesDrawer .memberMessageCenter{
  background-color:var(--r189-drawer-cream) !important;
  background-image:linear-gradient(180deg,var(--r189-drawer-cream) 0%,var(--r189-drawer-cream-soft) 100%) !important;
}

/* Profil : uniformisation des trois surfaces qui étaient réellement crème. */
html body .memberProfileDrawer{
  --profile-cream-description:var(--r189-drawer-cream) !important;
  --profile-cream-interests:var(--r189-drawer-cream) !important;
  --profile-cream-trophy:var(--r189-drawer-cream) !important;
  background-color:var(--r189-drawer-cream) !important;
  background-image:linear-gradient(180deg,var(--r189-drawer-cream),var(--r189-drawer-cream-soft)) !important;
}
html body .memberProfileDrawer > .memberDescription,
html body .memberProfileDrawer > .memberInterests,
html body .memberProfileDrawer > .memberTrophies{
  background-color:var(--r189-drawer-cream) !important;
  background-image:linear-gradient(180deg,var(--r189-drawer-cream),var(--r189-drawer-cream-soft)) !important;
}

/* Annuaire et contacts. */
html body .memberDirectoryDrawer,
html body .memberDirectoryShell,
html body .bodyContactsDrawer{
  --r172-directory-cream:var(--r189-drawer-cream) !important;
  --r153-cream:var(--r189-drawer-cream) !important;
  --r153-cream-alt:var(--r189-drawer-cream-soft) !important;
}

/* Favoris. */
html body .memberFavoritesShell{
  --favorites-cream-main:var(--r189-drawer-cream) !important;
  --favorites-cream-warm:var(--r189-drawer-cream-soft) !important;
}
html body .memberNavDrawer[data-member-drawer-panel="favorites"],
html body .memberFavoritesShell,
html body .memberFavoritesList{
  background-color:var(--r189-drawer-cream) !important;
  background-image:linear-gradient(180deg,var(--r189-drawer-cream),var(--r189-drawer-cream-soft)) !important;
}

/* Photos et documents : en-tête sombre conservé. */
html body .memberMediaPhotosSection,
html body .memberMediaDocumentsSection{
  background-color:var(--r189-drawer-cream) !important;
  background-image:linear-gradient(180deg,var(--r189-drawer-cream),var(--r189-drawer-cream-soft)) !important;
}

/* Trophées. */
html body .memberTrophiesDrawer{
  --r153-trophy-cream:var(--r189-drawer-cream) !important;
  --r153-trophy-cream-alt:var(--r189-drawer-cream-soft) !important;
}
html body .memberTrophyCategory{background-color:var(--r189-drawer-cream) !important}
html body .memberTrophyCategory:nth-child(even){background-color:var(--r189-drawer-cream-soft) !important}

/* Les volets salons restent la référence, sans changement de géométrie. */
html body .salonDrawerPanel,
html body .salonDrawerPanel--final{
  background:linear-gradient(180deg,var(--r189-drawer-cream) 0%,var(--r189-drawer-cream-soft) 100%) !important;
}
