/* ========================================================================== */
/* ETHNOS R117 — thème graphique Discord validé, appliqué à toute l'interface */
/* ========================================================================== */
/*
 * Objectif strict :
 * - aucune image d'arrière-plan générale ;
 * - aucune fresque claire, beige ou blanche derrière l'interface ;
 * - fonds bleu nuit et volumes bleus de la démonstration Discord R111 ;
 * - les images éditoriales restent uniquement DANS les cartes et les bandeaux ;
 * - aucune page particulière n'est imposée par ce correctif.
 */

:root{
  --r117-bg-deep:#03111b;
  --r117-bg:#04131f;
  --r117-surface-1:rgba(5,25,37,.98);
  --r117-surface-2:rgba(7,36,50,.96);
  --r117-line:rgba(190,226,231,.13);
}

html,
body,
html body .memberApp{
  background-color:var(--r117-bg) !important;
  background-image:none !important;
}

/* Suppression définitive des anciens fonds d'écran R96/R97/R102. */
html body .memberLayout,
html body .memberWelcome,
html body .memberWorkspace,
html body .memberWorkspace.hasSalonContent,
html body .memberWorkspace.hasBodyView,
html body .memberWorkspace.hasSalonContent.hasBodyView,
html body .memberWorkspace.memberWelcome.hasSalonContent.hasBodyView:not(.isSalonOpen){
  background-color:var(--r117-bg) !important;
  background-image:
    radial-gradient(circle at 82% 0%,rgba(245,138,75,.10),transparent 30%),
    radial-gradient(circle at 14% 18%,rgba(49,209,207,.07),transparent 25%),
    linear-gradient(135deg,rgba(3,16,27,.995),rgba(6,31,44,.98)) !important;
  background-position:center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
  background-attachment:scroll !important;
}

/* Aucune fresque ou trame héritée derrière les vues. */
html body .memberWorkspace.hasBodyView::before,
html body .memberWorkspace.hasSalonContent::before,
html body .memberWelcome::before{
  background-image:none !important;
}

/* Les contenus de la démo restent posés sur le volume bleu principal. */
html body .memberWorkspace.hasBodyView .bodyView,
html body .memberWorkspace.hasBodyView .bodyViewHeader,
html body .memberWorkspace.hasBodyView .bodyViewContent,
html body .memberWorkspace.hasBodyView .r111Home,
html body .memberWorkspace.hasBodyView .bodyCulture,
html body .memberWorkspace.hasBodyView .bodyView-houses,
html body .memberWorkspace.hasBodyView .bodyView-house,
html body .memberWorkspace.hasBodyView .bodyView-house-admin{
  background-color:transparent !important;
  background-image:none !important;
}

/* Volumes bleus de la démo Discord. */
html body .memberSidePanel,
html body .memberProfile,
html body .memberMapCard{
  background-image:linear-gradient(180deg,rgba(10,40,55,.97),rgba(3,19,30,.995)) !important;
  border-color:var(--r117-line) !important;
}

html body .r111Pillars > button,
html body .bodyCultureCard,
html body .bodySolidarityCard,
html body .bodyEventRow,
html body .bodyTwinCard,
html body .r111HouseCard,
html body .r111AdminPanel,
html body .r111AdminMetrics article,
html body .r111AdminActions button{
  border-color:var(--r117-line) !important;
  background-color:var(--r117-surface-1) !important;
}

/* Les images restent autorisées dans les éléments éditoriaux internes :
   héros, cartes cultures, bannières de Maisons et illustration créateur. */

/* Scroll central réparé et fin de contenu non masquée par le dock. */
html[data-ethnos-ui="discord-r111"] .memberLayout{
  bottom:calc(var(--footer-legal) + var(--r110-dock-height) + 17px) !important;
}
html[data-ethnos-ui="discord-r111"] .memberWorkspace.hasBodyView{
  overflow-y:auto !important;
  overflow-x:hidden !important;
  scrollbar-color:rgba(49,209,207,.28) transparent;
}
html[data-ethnos-ui="discord-r111"] .memberWorkspace.hasBodyView > *{
  position:relative;
  z-index:2;
}

/* Un salon ouvert conserve son environnement bleu nuit, sans fond écran. */
html body .memberWorkspace.isSalonOpen{
  background-color:var(--r117-bg) !important;
  background-image:linear-gradient(115deg,rgba(3,17,27,.998),rgba(6,31,44,.985)) !important;
}

@media(max-height:840px){
  html[data-ethnos-ui="discord-r111"] .memberExplorerBody{
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-right:4px !important;
    scrollbar-width:thin;
  }
}
@media(max-width:900px){
  html[data-ethnos-ui="discord-r111"] .memberLayout{
    bottom:calc(var(--footer-legal) + 62px) !important;
  }
}
