/* ========================================================================== */
/* ETHNOS R449 — DÉCOUVERTE : STABILISATION CIBLÉE                           */
/* Base figée : R448.                                                         */
/* Périmètre : texte Trajectoire, sélecteur de langue, Maps/Tchat découverte. */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* 1. Bloc droit : même sous-couche + même verre que le bloc gauche R442.     */
/* -------------------------------------------------------------------------- */
html.ethnosGuestDiscovery body.isEthnosHomeView .r180Trajectory{
  background-color:transparent !important;
  background-image:
    linear-gradient(rgba(255,251,244,.65),rgba(255,251,244,.65)),
    url("../assets/images/commercial-home-hero-r355.jpg") !important;
  background-position:center center,center center !important;
  background-size:auto,cover !important;
  background-repeat:no-repeat,no-repeat !important;
  background-attachment:scroll,fixed !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* R204 laisse text-align-last:left sur ce texte. R448 ne l'annulait pas :
   les lignes restaient donc visuellement alignées à gauche malgré text-align:center. */
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180TrajectoryHead{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
}
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180TrajectoryManifesto{
  position:relative !important;
  left:0 !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 auto !important;
  font-size:clamp(14px,1vw,19px) !important;
  line-height:1.12 !important;
  text-align:center !important;
  text-align-last:center !important;
  hyphens:none !important;
  -webkit-hyphens:none !important;
  text-wrap:balance !important;
}
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isEthnosHomeView .r180TrajectoryManifesto .guestTrajectoryLine{
  display:block !important;
  width:100% !important;
  text-align:center !important;
  text-align-last:center !important;
  hyphens:none !important;
  -webkit-hyphens:none !important;
}

/* -------------------------------------------------------------------------- */
/* 2. Langues : icône globe simple dans un carré + panneau hors topbar.       */
/*    Le panneau est porté par body afin qu'aucun contexte de pile/overflow   */
/*    historique de la barre ne puisse le masquer.                            */
/* -------------------------------------------------------------------------- */
html.ethnosGuestDiscovery .guestLanguageSwitcher{
  position:absolute !important;
  top:50% !important;
  z-index:88 !important;
  transform:translateY(-50%) !important;
}
html.ethnosGuestDiscovery .guestLanguageButton{
  width:34px !important;
  height:34px !important;
  min-width:34px !important;
  min-height:34px !important;
  display:grid !important;
  place-items:center !important;
  padding:0 !important;
  border:1px solid rgba(7,26,57,.22) !important;
  border-radius:8px !important;
  background:#fffdf9 !important;
  color:#071a39 !important;
  box-shadow:0 1px 0 rgba(7,26,57,.14),0 3px 5px rgba(0,0,0,.08) !important;
  cursor:pointer !important;
  transform:translateY(0) !important;
  transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease !important;
}
html.ethnosGuestDiscovery .guestLanguageButton svg{
  width:18px !important;
  height:18px !important;
  display:block !important;
  fill:none !important;
  stroke:currentColor !important;
  stroke-width:1.7 !important;
  stroke-linecap:round !important;
  stroke-linejoin:round !important;
  pointer-events:none !important;
}
html.ethnosGuestDiscovery .guestLanguageButton:hover,
html.ethnosGuestDiscovery .guestLanguageButton:focus-visible{
  border-color:rgba(7,26,57,.38) !important;
  background:#fffdf9 !important;
  color:#071a39 !important;
  transform:translateY(-1px) !important;
  box-shadow:0 2px 0 rgba(7,26,57,.15),0 4px 7px rgba(0,0,0,.10) !important;
}
html.ethnosGuestDiscovery .guestLanguageButton:active{
  transform:translateY(1px) !important;
  box-shadow:0 0 0 rgba(7,26,57,.12),0 2px 3px rgba(0,0,0,.07) !important;
}
html.ethnosGuestDiscovery .guestLanguagePanel.guestLanguagePanel--portal{
  position:fixed !important;
  z-index:400 !important;
  top:auto;
  left:auto;
  width:240px !important;
  margin:0 !important;
  transform:none !important;
}
html.ethnosGuestDiscovery .guestLanguagePanel.guestLanguagePanel--portal[hidden]{
  display:none !important;
}
html.ethnosGuestDiscovery .guestLanguagePanel.guestLanguagePanel--portal .guestLanguageSelect{
  display:block !important;
  width:100% !important;
  min-height:38px !important;
  cursor:pointer !important;
}

/* -------------------------------------------------------------------------- */
/* 3. Fond découverte : R117 possède un sélecteur plus spécifique que R448.   */
/*    On le dépasse volontairement UNIQUEMENT dans Maps/Tchat découverte.     */
/* -------------------------------------------------------------------------- */
html.ethnosGuestDiscovery{
  background-color:#071a39 !important;
  background-image:url("../assets/images/commercial-home-hero-r355.jpg") !important;
  background-position:center center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
  background-attachment:fixed !important;
}

html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen,
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen{
  background-color:transparent !important;
  background-image:url("../assets/images/commercial-home-hero-r355.jpg") !important;
  background-position:center center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
  background-attachment:fixed !important;
}

html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen .memberLayout::before,
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberLayout::before{
  content:"" !important;
  display:block !important;
  opacity:1 !important;
  background-color:transparent !important;
  background-image:url("../assets/images/commercial-home-hero-r355.jpg") !important;
  background-position:center center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
}

/* R117 : .memberWorkspace.memberWelcome.hasSalonContent.hasBodyView:not(.isSalonOpen)
   était plus spécifique que le correctif R448 et repeignait le centre en bleu. */
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen .memberLayout .memberWelcome.memberWorkspace.hasSalonContent.hasBodyView:not(.isSalonOpen),
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen .memberLayout .memberWelcome.memberWorkspace.hasSalonContent.hasBodyView,
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberLayout .memberWelcome.memberWorkspace.hasSalonContent.hasBodyView:not(.isSalonOpen),
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberLayout .memberWelcome.memberWorkspace.hasSalonContent.hasBodyView,
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen .memberLayout .memberWorkspace,
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberLayout .memberWorkspace{
  background-color:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
}
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen .memberWorkspace::before,
html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.isTchatDrawerOpen .memberWorkspace::before{
  content:none !important;
  display:none !important;
  background:none !important;
  background-image:none !important;
}

/* -------------------------------------------------------------------------- */
/* 4. Maps : position viewport explicite. Aucun calcul relatif au workspace.  */
/*    Marges gauche/droite strictement identiques = onglet Maps + 4 px.       */
/* -------------------------------------------------------------------------- */
@media (min-width:901px){
  html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen:not(.isTchatDrawerOpen) .memberWorkspace.hasBodyView > .bodyView-world{
    box-sizing:border-box !important;
    position:fixed !important;
    left:calc(var(--r190-map-tab-width,var(--ethnos-context-width)) + 4px) !important;
    right:calc(var(--r190-map-tab-width,var(--ethnos-context-width)) + 4px) !important;
    top:calc(var(--topbar,54px) + 10px) !important;
    bottom:calc(var(--r190-map-tab-bottom,var(--footer-legal,22px)) + var(--r190-map-tab-height,var(--ethnos-card-height)) + 4px) !important;
    width:auto !important;
    max-width:none !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:4px 0 0 !important;
    transform:none !important;
    overflow:hidden !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    z-index:3 !important;
  }

  html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen:not(.isTchatDrawerOpen) .bodyView-world > .bodyViewContent,
  html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen:not(.isTchatDrawerOpen) .bodyView-world .r182LegacyMapCard{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  /* La vue Monde reste dans le DOM pendant le Tchat. Elle ne doit jamais
     conserver une géométrie fixe ou une couche fantôme pendant cet état. */
  html.ethnosGuestDiscovery[data-ethnos-ui="discord-r111"] body.r190WorldViewOpen.isTchatDrawerOpen .memberWorkspace.hasBodyView > .bodyView-world{
    position:relative !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    margin:0 !important;
    transform:none !important;
  }
}

/* Les barres haute/basse et le footer sont volontairement hors périmètre. */
