/* ETHNOS R778 — harmonisation chromatique uniquement.
   Périmètre visuel strict : Vos univers, Solidarité, Cultures et peuples,
   Entraide, Événements et Jouer. Aucune géométrie ni logique modifiée. */
:root{
  --r778-charcoal:#1f1f1f;
  --r778-charcoal-soft:#252525;
  --r778-charcoal-raised:#2b2b2b;
  --r778-blue:#0b526d;
  --r778-blue-deep:#08263e;
  --r778-blue-line:rgba(46,128,160,.48);
  --r778-text:#f7f7f5;
  --r778-muted:#b8c5ca;
}

/* Surfaces de page : gris dominant, bleu ETHNOS conservé en accents. */
html.ethnosConnectedUnified body .memberWorkspace.hasBodyView[data-body-view="houses"],
html.ethnosConnectedUnified body .memberWorkspace.hasBodyView[data-body-view="culture"],
html.ethnosConnectedUnified body .memberWorkspace.hasBodyView[data-body-view="solidarity"],
html.ethnosConnectedUnified body .memberWorkspace.hasBodyView[data-body-view="help"],
html.ethnosConnectedUnified body .memberWorkspace.hasBodyView[data-body-view="events"],
html body .bodyView-houses.r554UniverseHub,
html body .bodyView-familyDiscovery.r556FamilyHub,
html body .bodyView-help.r562HelpHub,
html body .bodyView-events.r561EventsHub,
html body .bodyView-houses.r554UniverseHub > .bodyViewContent,
html body .bodyView-familyDiscovery.r556FamilyHub > .bodyViewContent,
html body .bodyView-help.r562HelpHub > .bodyViewContent.r562HelpContent,
html body .bodyView-events.r561EventsHub > .bodyViewContent.r561EventsContent{
  background-color:var(--r778-charcoal) !important;
  background-image:none !important;
}

/* Bandeaux : photos inchangées, surfaces textuelles passées au gris. */
html body .bodyView-houses.r554UniverseHub .bodyViewHeader.r554UniverseHero,
html body .bodyView-familyDiscovery.r556FamilyHub .bodyViewHeader.r556FamilyHero,
html body .bodyView-familyDiscovery.r555FamilyHub .bodyViewHeader.r555FamilyHero,
html body .bodyView-help.r562HelpHub .bodyViewHeader.r562HelpHero,
html body .bodyView-events.r561EventsHub .bodyViewHeader.r561EventsHero,
html body .bodyView-houses.r554UniverseHub .bodyViewHeader.r554UniverseHero > div:first-child,
html body .bodyView-familyDiscovery.r556FamilyHub .bodyViewHeader.r556FamilyHero > div:first-child,
html body .bodyView-familyDiscovery.r555FamilyHub .bodyViewHeader.r555FamilyHero > div:first-child,
html body .bodyView-help.r562HelpHub .bodyViewHeader.r562HelpHero > div:first-child,
html body .bodyView-events.r561EventsHub .bodyViewHeader.r561EventsHero > div:first-child{
  background-color:var(--r778-charcoal) !important;
  background-image:linear-gradient(180deg,#292929 0%,var(--r778-charcoal) 100%) !important;
}
html body :is(.r554UniverseHeroAside,.r555FamilyHeroAside,.r556FamilyHeroAside,.r562HelpHeroAside),
html body :is(.r554UniversePhotoMosaic,.r555FamilyPhotoMosaic,.r556FamilyPhotoMosaic,.r562HelpPhotoMosaic){
  background-color:var(--r778-charcoal) !important;
}

/* Rails et flux Univers / Solidarité / Cultures. */
html body :is(.r554UniverseLayout,.r555FamilyLayout,.r556FamilyLayout),
html body :is(.r554UniverseFeed,.r555FamilyFeed,.r556FamilyFeed){
  background-color:var(--r778-charcoal) !important;
}
html body :is(.r554UniverseRail,.r555FamilyRail,.r556FamilyRail){
  background:linear-gradient(180deg,#292929 0%,#202020 100%) !important;
  border-color:var(--r778-blue-line) !important;
  color:var(--r778-text) !important;
}
html body :is(.r554UniverseRailNav,.r555FamilyRailNav,.r556FamilyRailNav) a{
  color:var(--r778-muted) !important;
}
html body :is(.r554UniverseRailNav,.r555FamilyRailNav,.r556FamilyRailNav) a.isActive{
  background:rgba(11,82,109,.32) !important;
  border-color:rgba(64,208,207,.42) !important;
  color:#fff !important;
}

/* Cartes et sections : gris surélevé, filet bleu. */
html body :is(.r492UniverseSection,.r497FamilyOfficialSection,.r556FamilySalonSection){
  background-color:transparent !important;
  border-color:var(--r778-blue-line) !important;
}
html body :is(.r554UniverseFeed,.r555FamilyFeed,.r556FamilyFeed) .r554UniverseCard,
html body .r497FamilySalonGrid > *,
html body .bodyView-help.r562HelpHub :is(.r508HelpCard,.bodySolidarityCard),
html body .bodyView-events.r561EventsHub .bodyEventRow{
  background:var(--r778-charcoal-soft) !important;
  border-color:var(--r778-blue-line) !important;
  color:var(--r778-text) !important;
}
html body :is(.r554UniverseFeed,.r555FamilyFeed,.r556FamilyFeed) .r551UniverseCardBody{
  background:var(--r778-charcoal-soft) !important;
  color:var(--r778-text) !important;
}
html body :is(.r554UniverseFeed,.r555FamilyFeed,.r556FamilyFeed) :is(h2,h3,strong),
html body .bodyView-help.r562HelpHub :is(h2,h3,strong),
html body .bodyView-events.r561EventsHub :is(h2,h3,strong){
  color:var(--r778-text) !important;
}
html body :is(.r554UniverseFeed,.r555FamilyFeed,.r556FamilyFeed) :is(p,small,.r492UniverseDescription),
html body .bodyView-help.r562HelpHub :is(p,small,.r508HelpMeta,.bodySolidarityLocation),
html body .bodyView-events.r561EventsHub :is(p,small,.r605EventLocation){
  color:var(--r778-muted) !important;
}

/* Filtres : gris, bordure bleue, texte clair. */
html body :is(.r554UniverseFilters,.r555FamilySalonFilters,.r608SolidarityUniverseFilters,.r562HelpFilters,.r612HelpFilters,.r605EventsFilters)
:is(input,select,.realFlagSelectButton){
  background-color:var(--r778-charcoal-raised) !important;
  color:var(--r778-text) !important;
  border-color:var(--r778-blue-line) !important;
}
html body :is(.r554UniverseFilters,.r555FamilySalonFilters,.r608SolidarityUniverseFilters,.r562HelpFilters,.r612HelpFilters,.r605EventsFilters) label > span{
  color:#9fb8c2 !important;
}

/* Événements / Entraide : panneaux de commande sans retour au bleu plein. */
html body .bodyView-events.r561EventsHub :is(.r605EventsControls,.r605EventsDiscovery,.r605EventsFilters),
html body .bodyView-help.r562HelpHub :is(.r612HelpControls,.r612HelpDiscovery,.r612HelpFilters){
  background-color:transparent !important;
}

/* Jouer : même vocabulaire gris + bleu, logique et géométrie inchangées. */
html body .ethnosGamesR649{
  background:linear-gradient(155deg,#1f1f1f 0%,#242424 58%,#0a3448 100%) !important;
  color:var(--r778-text) !important;
}
html body .ethnosGamesR649 :is(.ethnosGameCardR649,.ethnosGamesInviteR649,.ethnosGamesMatchRowR649,.ethnosGamesReadyCardR649,.ethnosGamesStatusR649){
  background:rgba(43,43,43,.94) !important;
  border-color:var(--r778-blue-line) !important;
  color:var(--r778-text) !important;
}
html body .ethnosGamesR649 .ethnosGameCardR649.isPlayable{
  background:#292929 !important;
  color:var(--r778-text) !important;
}
html body .ethnosGamesR649 :is(.ethnosGamesIntroR649,.ethnosGamesSectionTitleR649 p,.ethnosGameCardR649 p,.ethnosGamesInviteR649 small,.ethnosGamesMatchRowR649 small,.ethnosGamesReadyCardR649 small){
  color:var(--r778-muted) !important;
}
html body .ethnosGamesR649 .ethnosGamesTabsR649 button{
  background:#292929 !important;
  border-color:var(--r778-blue-line) !important;
  color:#dbe7eb !important;
}
html body .ethnosGamesR649 .ethnosGamesTabsR649 button.isActive,
html body .ethnosGamesR649 .ethnosGameActionsR649 button[data-game-rules]{
  background:var(--r778-blue) !important;
  border-color:var(--r778-blue) !important;
  color:#fff !important;
}
html body .ethnosGamesR649 .ethnosGamesLeaderboardR649{
  background:rgba(37,37,37,.96) !important;
}
html body .ethnosGamesR649 .ethnosGamesLeaderboardR649 :is(th,td){
  border-color:rgba(46,128,160,.28) !important;
}
