/* REL 1.9.49 — modes Clair/Sombre. Exclusivement les interfaces du plugin.
   Le mode "classic" n'a AUCUN override : retour exact au rendu de la 1.9.48. */

/* Choix de mode, indépendant du contenu chargé par AJAX. */
.rel-color-picker {
  position: relative; z-index: 4; display: flex; align-items: center; justify-content: flex-end;
  flex-wrap: wrap; gap: 9px; width: max-content; max-width: calc(100% - 16px);
  margin: 10px 4px 13px auto; padding: 6px 10px; border-radius: 5px;
  background: #241b15; border: 1px solid #977346; color: #f5deb4;
  font: 600 12px/1.4 Georgia, serif;
}
.rel-color-picker__label { color: inherit; }
.rel-color-picker__select {
  -webkit-appearance: auto; appearance: auto; width: auto; min-width: 106px; max-width: 100%;
  min-height: 34px; margin: 0; padding: 5px 8px; border: 1px solid #af8756;
  border-radius: 4px; background: #fffaf0; color: #291c15;
  font: 600 13px/1.35 system-ui, sans-serif; cursor: pointer;
}
.rel-color-picker__select:focus-visible { outline: 3px solid #4e90bc; outline-offset: 2px; }
@media(max-width:520px) {
  .rel-color-picker { width: auto; margin: 8px 0 12px; justify-content: center; padding: 6px; }
}

/* Couleurs nommées : surfaces, textes et contrastes sont pairés explicitement.
   Ne jamais appliquer une règle globale du genre "tous les textes blancs" :
   le catalogue, les badges et les images comprennent des sous-panneaux clairs. */
html[data-rel-color-mode="light"] :is(.rel-app, .rel-catalogue, .rel-univers, .relp, .rel-salle),
html[data-rel-color-mode="light"] .rel-stage {
  --rel-color-bg: #faf7ef;
  --rel-color-surface: #fffdfa;
  --rel-color-elevated: #f4ede1;
  --rel-color-text: #2d251d;
  --rel-color-muted: #5c4b3b;
  --rel-color-heading: #352519;
  --rel-color-border: #bca481;
  --rel-color-link: #74411d;
  color-scheme: light;
}
html[data-rel-color-mode="dark"] :is(.rel-app, .rel-catalogue, .rel-univers, .relp, .rel-salle),
html[data-rel-color-mode="dark"] .rel-stage {
  --rel-color-bg: #11151b;
  --rel-color-surface: #202630;
  --rel-color-elevated: #2a313d;
  --rel-color-text: #f5f1e9;
  --rel-color-muted: #c7c6c0;
  --rel-color-heading: #fff0d2;
  --rel-color-border: #8f9ba9;
  --rel-color-link: #ffe0a0;
  color-scheme: dark;
}

/* ================================================== CLAIR ================================================= */
html[data-rel-color-mode="light"] .rel-stage {
  background-color: #f4efe4;
  background-image: linear-gradient(160deg, rgba(232,220,195,.9), rgba(250,247,240,.9)), var(--rel-f-grain);
  color: #2d251d;
}
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin {
  --rel-z-bg: #faf5eb;
  --rel-z-raised: #fffaf1;
  --rel-z-ink: #2e241b;
  --rel-z-head: #302219;
  --rel-z-ink-2: #4d4031;
  --rel-z-ink-3: #64523e;
  --rel-z-gold: #76551d;
  --rel-z-gold-2: #98743c;
  --rel-z-link: #6b4119;
  --rel-z-line: rgba(70,48,23,.22);
  --rel-z-line-2: rgba(70,48,23,.45);
  --rel-z-field: #fffdf8;
  --rel-z-field-line: #a89173;
  --rel-field-bg: #fffdf8;
  --rel-field-ink: #2b2118;
  --rel-line: rgba(70,48,23,.18);
  --rel-line-strong: rgba(70,48,23,.4);
  color: var(--rel-color-text); color-scheme: light;
}
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav,
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-sidepanel:not(.rel-sidepanel--events),
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-sidepanel--club {
  --rel-z-bg: #fffaf1; --rel-z-raised: #f5ebda; --rel-z-ink: #30251d;
  --rel-z-ink-2: #594636; --rel-z-head: #32271d;
  --rel-z-gold: #70491a; --rel-z-link: #70461e;
  --rel-z-field: #fffdf8; --rel-z-field-line: #a78a5f;
  background: #fffaf1; color: #30251d; box-shadow: 0 5px 16px rgba(65,43,20,.12),inset 0 0 0 1px #bfa780;
}
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav :is(a,.rel-nav__link,.rel-user__name,.rel-user__out),
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-sidepanel:not(.rel-sidepanel--events) :is(.rel-sidepanel__title,.rel-agenda__name,.rel-agenda__meta,.rel-sidepanel__text) {
  color: #37271b;
}
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-sidepanel--events {
  /* Le panneau rouge est une décoration intentionnelle : texte ivoire, jamais sombre. */
  --rel-z-ink: #fff0d8; --rel-z-gold: #ffe6b2;
  color: #fff0d8;
}
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-board:not(.rel-board--custom-bg):not(.rel-board--tableau),
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-fiche__sheet {
  --rel-z-bg: #fffdf8; --rel-z-raised: #faf4e8; --rel-z-ink: #30251c;
  --rel-z-ink-2: #5b4936; --rel-z-ink-3: #685640;
  --rel-z-head: #2e2116; --rel-z-gold: #704b18; --rel-z-link: #70411e;
  --rel-z-field: #fffdf8; --rel-z-field-line: #b19a79;
  background-color: #fffdf8; color: #30251c;
}
/* Un panneau à image personnalisée conserve son voile sombre déjà calibré. */
html[data-rel-color-mode="light"] .rel-color-picker { background:#fffaf1; color:#45311f; }

/* Catalogue fusionné clair, ses cartes restent parchemin et ses images intactes. */
html[data-rel-color-mode="light"] .rel-catalogue {
  background: #faf6ec !important; color: #31271d; border-color: #b49d79;
}
html[data-rel-color-mode="light"] .rel-catalogue__heading { color:#3e2919 !important; }
html[data-rel-color-mode="light"] .rel-catalogue__filters,
html[data-rel-color-mode="light"] .rel-catalogue__related {
  background: #eee3d1; color: #372a1f; border-color: #c3a982;
}
html[data-rel-color-mode="light"] .rel-catalogue__filters label,
html[data-rel-color-mode="light"] .rel-catalogue__counts,
html[data-rel-color-mode="light"] .rel-catalogue__pager,
html[data-rel-color-mode="light"] .rel-catalogue__empty { color: #453626; }
html[data-rel-color-mode="light"] .rel-catalogue__pager a,
html[data-rel-color-mode="light"] .rel-catalogue__back a,
html[data-rel-color-mode="light"] .rel-catalogue__legacy a { color: #754419 !important; }
html[data-rel-color-mode="light"] .rel-catalogue__filters :is(input,select) { background:#fffdf8; color:#2e231a; }
html[data-rel-color-mode="light"] .rel-catalogue__card { background:#f5ead4; color:#30251c; }
html[data-rel-color-mode="light"] .rel-catalogue__body { background:linear-gradient(#fff7e7,#f0e1c5); color:#30251c; }
html[data-rel-color-mode="light"] .rel-catalogue__card .rel-univers__interest,
html[data-rel-color-mode="light"] .rel-catalogue__card .rel-interest-count { color:#503e2e!important; }
/* Le badge et les récapitulatifs volontairement sombres gardent leurs textes clairs. */
html[data-rel-color-mode="light"] .rel-catalogue :is(.rel-interest-people,.rel-mastery__roster,.rel-top10) { color:#f9e8ca; }

html[data-rel-color-mode="light"] .rel-univers { background:#f8f0e0; color:#34271d; border-color:#bd9c6f; }
html[data-rel-color-mode="light"] .rel-univers__header :is(h1,h2,p),
html[data-rel-color-mode="light"] .rel-univers__eyebrow,
html[data-rel-color-mode="light"] .rel-univers__count,
html[data-rel-color-mode="light"] .rel-univers__foot,
html[data-rel-color-mode="light"] .rel-univers__none { color:#38291d!important; }
html[data-rel-color-mode="light"] .rel-univers__filters { background:#eee2ce;color:#36271b; }
html[data-rel-color-mode="light"] .rel-univers__filters :is(label,input,select) { color:#37291d; }
html[data-rel-color-mode="light"] .rel-univers__reset { border-color:#a28358; color:#5e3a1d; }
html[data-rel-color-mode="light"] .rel-univers__return { color:#6c421f!important; }
html[data-rel-color-mode="light"] .relp { background:#f8f0de; color:#34281e; box-shadow:0 10px 24px rgba(52,33,16,.14); }
html[data-rel-color-mode="light"] .relp-hero { background:#eee0c8; color:#34281e; }
html[data-rel-color-mode="light"] .relp-hero :is(h1,p,.relp-eyebrow) { color:#3c2b1d; }
html[data-rel-color-mode="light"] .rel-salle { background:#f4ead8; color:#392c20; border-color:#a68758; }
html[data-rel-color-mode="light"] .rel-salle__hero,
html[data-rel-color-mode="light"] .rel-salle__side section { background:#ebdfcd; color:#3b2c1e; border-color:#b49666; }
html[data-rel-color-mode="light"] .rel-salle__hero :is(h2,p,.rel-salle__eyebrow),
html[data-rel-color-mode="light"] .rel-salle__side :is(h3,p,small),
html[data-rel-color-mode="light"] .rel-salle__breadcrumb { color:#3e2d20; }
html[data-rel-color-mode="light"] .rel-salle__members li,
html[data-rel-color-mode="light"] .rel-salle__members small { color:#3d2f21; }
html[data-rel-color-mode="light"] .rel-salle a { color:#70411f; }
html[data-rel-color-mode="light"] .rel-salle__dice output { color:#56331d; }

/* ================================================= SOMBRE ================================================ */
html[data-rel-color-mode="dark"] .rel-stage {
  background-color:#10141a; background-image:linear-gradient(150deg,#171d24ee,#0e1219ef),var(--rel-f-grain);
  color:#f0e9da;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin {
  --rel-z-bg:#171c23; --rel-z-raised:#252b34;
  --rel-z-line:rgba(212,210,194,.26); --rel-z-line-2:rgba(221,213,185,.52);
  --rel-z-ink:#f5f0e7; --rel-z-head:#fff0d1; --rel-z-ink-2:#d4d1c9;
  --rel-z-ink-3:#b5b5ad; --rel-z-gold:#f1ce85; --rel-z-gold-2:#c6a96a;
  --rel-z-link:#ffe0a2; --rel-z-when:#f4dba1;
  --rel-z-field:#20262e; --rel-z-field-line:#95a1ad;
  --rel-z-hover:rgba(255,224,163,.1); --rel-z-sel-bg:rgba(255,224,163,.15);
  --rel-field-bg:#20262e; --rel-field-ink:#fff4e0;
  --rel-line:rgba(220,220,211,.24); --rel-line-strong:rgba(220,220,211,.52);
  --rel-muted:#c7c4bc; --rel-danger:#ffa69a;
  color:#f5f0e7; color-scheme:dark;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin :is(.rel-board,.rel-fiche__sheet) {
  --rel-z-bg:#1b212a; --rel-z-raised:#272f3a;
  --rel-z-ink:#f5f0e7; --rel-z-head:#fff1d4;
  --rel-z-ink-2:#d7d0c4; --rel-z-ink-3:#c2bcaf;
  --rel-z-gold:#f4cd85; --rel-z-gold-2:#c8a86d; --rel-z-link:#ffe0a2;
  --rel-z-field:#242d38; --rel-z-field-line:#9aa7b4;
  --rel-field-bg:#242d38; --rel-field-ink:#f7f2e9;
  --rel-line:rgba(215,215,209,.2); --rel-line-strong:rgba(225,225,220,.4);
  color:#f5f0e7; color-scheme: dark;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-board:not(.rel-board--custom-bg):not(.rel-board--tableau),
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-fiche__sheet {
  background:#1b222b !important; color:#f5efe6 !important;
  box-shadow:inset 0 0 0 1px #8390a1,0 12px 32px rgba(0,0,0,.4);
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-board:not(.rel-board--custom-bg) :is(.rel-board__title,.rel-h2,.rel-h3,.rel-section__head h2,.rel-panel__title,.rel-personal-calendar__summary),
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-fiche__sheet :is(h1,h2,h3,h4) {
  color:#fff0d1 !important; text-shadow:none !important;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-board:not(.rel-board--custom-bg) :is(p,li,dt,dd,summary,legend,label,small,figcaption),
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-fiche__sheet :is(p,li,dt,dd,summary,legend,label,small) {
  color:inherit;
}
/* Les fonds personnalisés ont déjà leur voile sombre ; ils héritent uniquement de la palette claire. */
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-board--custom-bg {
  --rel-z-ink:#fff3dc; --rel-z-head:#fff3dc; --rel-z-link:#ffe0a2;
  color:#fff3dc;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav,
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-sidepanel:not(.rel-sidepanel--events) {
  --rel-z-bg:#202630; --rel-z-raised:#29313d; --rel-z-ink:#f7f0e7;
  --rel-z-head:#fff0d1; --rel-z-ink-2:#d8d2c9; --rel-z-gold:#ffe0a2;
  --rel-z-link:#ffe0a2; --rel-z-field:#202731; --rel-z-field-line:#a2a8b0;
  background:#202630; color:#f7f0e7; box-shadow:inset 0 0 0 1px #74808a;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav :is(a,.rel-nav__link,.rel-user__name,.rel-user__out),
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-sidepanel:not(.rel-sidepanel--events) :is(.rel-sidepanel__title,.rel-agenda__name,.rel-agenda__meta,.rel-sidepanel__text) {color:#fff0d6;}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-sidepanel--events {
  --rel-z-ink:#fff2df; --rel-z-head:#fff1d9; --rel-z-gold:#ffe7b8;
  color:#fff0df;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select) {
  background:#252d37; color:#fff0de; border-color:#97a7b6;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin :is(input,textarea,select)::placeholder {color:#c3c6c8;opacity:1;}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin :is(.rel-field,.rel-form,.rel-panel,.rel-section,.rel-filters,.rel-cal__grid,.rel-cal__day,.rel-cal__dow,.rel-personal-calendar__day) {
  color:#f1ebdf; border-color:rgba(202,204,203,.3);
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin :is(.rel-cal__grid,.rel-cal__day,.rel-cal__dow,.rel-personal-calendar__day) {
  background-color:#232b35; color:#f4eee2;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin :is(.rel-cal__num,.rel-cal__none,.rel-cal__legend,.rel-cal__title,.rel-cal__today) {color:#ffeed2 !important;}
/* Les éléments de la grille des annonces ont leur fond parchemin: texte foncé, même en mode sombre. */
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin :is(.rel-card,.rel-carousel__card,.rel-x-card,.rel-tableau-card) {
  --rel-z-ink:#30251b; --rel-z-head:#281e16; --rel-z-ink-2:#51402e; --rel-z-link:#70431e;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-board:not(.rel-board--custom-bg) .rel-panel__note {color:#ded7ca;}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin :is(.rel-evo-card,.rel-evo-stat,.rel-x-note) {
  color:#f3ede2; background-color:#29303a; border-color:#8c99a7;
}
html[data-rel-color-mode="dark"] .rel-color-picker {background:#232b35; color:#ffefd3;border-color:#bd9b67;}

/* Catalogue : page liste sombre existante, fiche détail sombre explicite. */
html[data-rel-color-mode="dark"] .rel-catalogue {background:#191f27 !important;color:#f6f0e6;border-color:#85919d;}
html[data-rel-color-mode="dark"] .rel-catalogue__heading {color:#ffe3aa!important;}
html[data-rel-color-mode="dark"] .rel-catalogue__filters,
html[data-rel-color-mode="dark"] .rel-catalogue__related {background:#28303b;color:#f6eee1;border-color:#87939c;}
html[data-rel-color-mode="dark"] .rel-catalogue__filters label,
html[data-rel-color-mode="dark"] .rel-catalogue__counts,
html[data-rel-color-mode="dark"] .rel-catalogue__pager,
html[data-rel-color-mode="dark"] .rel-catalogue__empty {color:#e5dccd;}
html[data-rel-color-mode="dark"] .rel-catalogue__filters :is(input,select) {background:#242c35;color:#fff2de;border-color:#a6abb0;}
html[data-rel-color-mode="dark"] .rel-catalogue__filters :is(input,select)::placeholder {color:#cbc6c0;}
html[data-rel-color-mode="dark"] .rel-catalogue__pager a,
html[data-rel-color-mode="dark"] .rel-catalogue__back a,
html[data-rel-color-mode="dark"] .rel-catalogue__legacy a {color:#ffe3a6!important;}
html[data-rel-color-mode="dark"] .rel-catalogue__card {background:#292e35;color:#f6ecdd;border-color:#a7a39b;}
html[data-rel-color-mode="dark"] .rel-catalogue__body {background:#292f37;color:#f4edde;}
html[data-rel-color-mode="dark"] .rel-catalogue__body h3,
html[data-rel-color-mode="dark"] .rel-catalogue__body h3 a {color:#fff0d5!important;}
html[data-rel-color-mode="dark"] .rel-catalogue__excerpt,
html[data-rel-color-mode="dark"] .rel-catalogue__card .rel-univers__interest,
html[data-rel-color-mode="dark"] .rel-catalogue__card .rel-interest-count {color:#e9dfcc!important;}
html[data-rel-color-mode="dark"] .rel-catalogue__badges span {color:#261c12;}
html[data-rel-color-mode="dark"] .rel-catalogue__badges .rel-catalogue__badge--discord {color:#fff4db;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail {
  background:#1b222b!important;color:#f5f0e6;border-color:#8994a1;
}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail :is(.rel-catalogue__heading,.rel-h3) {color:#fff0d3!important;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-sys-detail {
  background:#252d37!important;color:#f5efe5;border-color:#87939d;
}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-sys-detail__text,
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-sys-detail :is(p,li,small),
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-sys-detail__text .rel-prose,
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-sys-detail__text .rel-prose p {
  color:#f3eee5!important;
}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-sys-detail__text .rel-h2 {color:#fff0d4!important;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-sys-detail a:not(.rel-btn):not(.rel-mastery__member) {color:#ffe2a2!important;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-univers.rel-univers--detail,
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-univers.rel-univers--detail.rel-univers--custom-bg {
  background:#252d37!important;background-image:none!important;color:#f5eee3;border-color:#88949d;
}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-univers--detail .rel-univers__header :is(h1,h2,p),
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-univers--detail .rel-univers__detail-text,
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-univers--detail .rel-univers__detail-text p {color:#f5eee3!important;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-univers--detail .rel-univers__detail-text {background:#2b3440!important;border-color:#919aa5;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-empty {color:#e4d8c7!important;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-empty p {color:#e4d8c7!important;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-interest-people,
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-mastery__roster {background:#151a21;color:#f4e6c9;border-color:#a3885f;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-mastery__form {background:#27303a;color:#f5ead4;border-color:#998363;}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-catalogue__delete {
  background:#30343d;color:#f3e8d8;border-color:#c0938d;
}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-catalogue__delete :is(summary,p) {color:#ffcebc!important;}

/* Univers historiques : liste et fiche, avec sous-surfaces homogènes. */
html[data-rel-color-mode="dark"] .rel-univers {background:#1b222b;color:#f5eee3;border-color:#8c98a1;}
html[data-rel-color-mode="dark"] .rel-univers__header :is(h1,h2,p),
html[data-rel-color-mode="dark"] .rel-univers__eyebrow,
html[data-rel-color-mode="dark"] .rel-univers__count,
html[data-rel-color-mode="dark"] .rel-univers__foot {color:#fff0d0!important;}
html[data-rel-color-mode="dark"] .rel-univers__filters {background:#28303a;color:#f4eee5;border-color:#8a98a6;}
html[data-rel-color-mode="dark"] .rel-univers__filters :is(label,input,select) {color:#f6ebdb;}
html[data-rel-color-mode="dark"] .rel-univers__filters :is(input,select) {background:#26303b;color:#f5eadc;border:1px solid #94a3b2;}
html[data-rel-color-mode="dark"] .rel-univers__paper {background:#2a313b;color:#f6ecdd;}
html[data-rel-color-mode="dark"] .rel-univers__paper h3,
html[data-rel-color-mode="dark"] .rel-univers__paper h3 a {color:#fff0d4!important;}
html[data-rel-color-mode="dark"] .rel-univers__excerpt,
html[data-rel-color-mode="dark"] .rel-univers__meta,
html[data-rel-color-mode="dark"] .rel-univers__more {color:#e8dfd0!important;}
html[data-rel-color-mode="dark"] .rel-univers__more summary {color:#ffdb9b;}
html[data-rel-color-mode="dark"] .rel-univers__more div {background:#313945;color:#f2e8d7;border-color:#86919a;}
html[data-rel-color-mode="dark"] :is(body,.rel-app,#rel-annonces-app) .rel-univers__interest,
html[data-rel-color-mode="dark"] :is(body,.rel-app,#rel-annonces-app) .rel-interest-count,
html[data-rel-color-mode="dark"] :is(body,.rel-app,#rel-annonces-app) .rel-interest-feedback {color:#eadfcf!important;}
html[data-rel-color-mode="dark"] .rel-univers__detail-text {background:#2b3440;color:#f5ece0;border-color:#909aa3;}
html[data-rel-color-mode="dark"] .rel-univers__detail-text p {color:#f5ece0;}
html[data-rel-color-mode="dark"] .rel-univers__return {color:#ffe0a4!important;}
html[data-rel-color-mode="dark"] .rel-univers__button--system {background:#313b45;color:#fff0d4!important;}
html[data-rel-color-mode="dark"] .rel-univers__link {background:#29313c;color:#f6eadc;}

/* Salles privées : sombre aussi dans les documents et formulaires.
   Les couvertures PDF restent des images, les contrôles du lecteur restent inchangés. */
html[data-rel-color-mode="dark"] .rel-salle {background:#151b23;color:#f4ebdd;border-color:#8c98a4;}
html[data-rel-color-mode="dark"] .rel-salle__hero,
html[data-rel-color-mode="dark"] .rel-salle__side section {background:#27313d;color:#f3eee4;border-color:#8b9ca9;}
html[data-rel-color-mode="dark"] .rel-salle__hero :is(h2,p,.rel-salle__eyebrow),
html[data-rel-color-mode="dark"] .rel-salle__side :is(h3,p,small),
html[data-rel-color-mode="dark"] .rel-salle__breadcrumb {color:#fff0d4;}
html[data-rel-color-mode="dark"] .rel-salle__main {background:#222a34;color:#f3eadc;border-color:#929da9;}
html[data-rel-color-mode="dark"] .rel-salle__head h3,
html[data-rel-color-mode="dark"] .rel-salle__compose h3,
html[data-rel-color-mode="dark"] .rel-salle__library-heading h3,
html[data-rel-color-mode="dark"] .rel-salle__other>h3 {color:#ffe6ac;}
html[data-rel-color-mode="dark"] .rel-salle__entry,
html[data-rel-color-mode="dark"] .rel-salle__pdf-card {background:#303945;color:#f3eadd;border-color:#909da9;}
html[data-rel-color-mode="dark"] .rel-salle__entry :is(strong,p,.rel-salle__text,.rel-salle__by,time),
html[data-rel-color-mode="dark"] .rel-salle__compose p,
html[data-rel-color-mode="dark"] .rel-salle__library-heading p,
html[data-rel-color-mode="dark"] .rel-salle__library-heading small {color:#f0e6d8;}
html[data-rel-color-mode="dark"] .rel-salle__form :is(label,input,textarea),
html[data-rel-color-mode="dark"] .rel-salle__dice select {color:#f5eadd;}
html[data-rel-color-mode="dark"] .rel-salle__form :is(input,textarea),
html[data-rel-color-mode="dark"] .rel-salle__dice select {background:#27313c;border-color:#99a7b4;}
html[data-rel-color-mode="dark"] .rel-salle__members li,
html[data-rel-color-mode="dark"] .rel-salle__members small {color:#ede5db;}
html[data-rel-color-mode="dark"] .rel-salle__zip,
html[data-rel-color-mode="dark"] .rel-salle__download {background:#2f3945;color:#ffe1a8!important;border-color:#bca26e;}
html[data-rel-color-mode="dark"] .rel-salle__empty {color:#d6c9b5;}
html[data-rel-color-mode="dark"] .rel-salle__pdf-fallback {background:linear-gradient(135deg,#cab88d,#a68e68);color:#302215;}

/* Parfum d'Aventure : respect des sous-cartes sur lesquelles du texte est placé.
   La variante Claire reprend le panneau parchemin ; sombre bascule TOUTES les cartes. */
html[data-rel-color-mode="dark"] .relp {background:#151b23;color:#f5ede0;border-color:#8b9aa7;}
html[data-rel-color-mode="dark"] .relp-hero {background:#252f3a;color:#f5e9d7;}
html[data-rel-color-mode="dark"] .relp-hero :is(h1,p,.relp-eyebrow) {color:#fff0d4;}
html[data-rel-color-mode="dark"] .relp-panel {background:#252e39;color:#f5ede1;border-color:#8492a0;box-shadow:inset 0 0 0 1px #566473,0 8px 20px #0005;}
html[data-rel-color-mode="dark"] .relp-panel :is(h2,h3,h4) {color:#fff0d5;}
html[data-rel-color-mode="dark"] .relp-panel>h2 {border-bottom-color:#a8936c;}
html[data-rel-color-mode="dark"] :is(.relp-muted,.relp-copy,.relp-field,.relp-game__meta,.relp-ride__top,.relp-roster) {color:#e7ddcd;}
html[data-rel-color-mode="dark"] :is(.relp-timeline__item,.relp-game,.relp-form,.relp-vote,.relp-empty,.relp-menus>article,.relp-room,.relp-ride,.relp-stats>div,.relp-data,.relp-data tr:nth-child(even) td) {
  background:#303946;color:#f5eadc;border-color:#8b9aa5;
}
html[data-rel-color-mode="dark"] :is(.relp-game h4,.relp-menus h3,.relp-room h3,.relp-ride h3,.relp-timeline__item strong,.relp-stats b) {color:#ffe2ae;}
html[data-rel-color-mode="dark"] :is(.relp-form input,.relp-form textarea,.relp-form select,.relp-field input,.relp-field select,.relp-field textarea,.relp-data td select) {background:#25303c;color:#f7ece0;border-color:#a0acb6;}
html[data-rel-color-mode="dark"] .relp-data th {background:#1a232e;color:#fff0d6;}
html[data-rel-color-mode="dark"] .relp-panel a:not(.relp-button) {color:#ffe0a5;}
html[data-rel-color-mode="dark"] .relp .relp-button {color:#fff8ed;}
html[data-rel-color-mode="dark"] .relp-alert {background:#3a352c;color:#fff0d8;border-color:#baa174;}
html[data-rel-color-mode="dark"] .relp-saved {background:#213d2c;color:#e0f5e4;}
html[data-rel-color-mode="dark"] .relp-results {background:#29382d;color:#f1f1e4;}
html[data-rel-color-mode="dark"] .relp-game summary {color:#f8e0af;}
html[data-rel-color-mode="dark"] .relp-nav a,
html[data-rel-color-mode="dark"] .relp-subnav a,
html[data-rel-color-mode="dark"] .relp-admin-links a {background:#303c49;color:#ffe4b1;border-color:#a09b84;}

/* Sous-panneaux volontairement clairs, même en mode sombre : contrastes préservés. */
html[data-rel-color-mode="dark"] .rel-catalogue__notice {background:#fff3da;color:#382719;}
html[data-rel-color-mode="dark"] .rel-univers__tags span {background:#32231a;color:#ffe5b7;}
html[data-rel-color-mode="dark"] .rel-salle__pdf-cover-button {color:#fff1da;}

/* Focus très visible dans les deux variantes ; ne masque ni les liens ni les boutons. */
html[data-rel-color-mode="light"] :is(.rel-app,.rel-catalogue,.rel-univers,.relp,.rel-salle) :is(a,button,input,select,textarea,summary):focus-visible,
html[data-rel-color-mode="dark"] :is(.rel-app,.rel-catalogue,.rel-univers,.relp,.rel-salle) :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid #56a8e8!important; outline-offset:3px;
}
@media (forced-colors: active) {
  html[data-rel-color-mode="dark"] :is(.rel-app,.rel-catalogue,.rel-univers,.relp,.rel-salle),
  html[data-rel-color-mode="light"] :is(.rel-app,.rel-catalogue,.rel-univers,.relp,.rel-salle) {
    background: Canvas!important; color:CanvasText!important; border-color:CanvasText!important;
  }
}

/* Correctifs de priorité relevés au contrôle de contraste : anciens sélecteurs #rel-annonces-app
   et .rel-catalogue--detail étaient plus spécifiques que les nouveaux tokens. */
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav .rel-nav__link,
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav .rel-user__out,
html[data-rel-color-mode="light"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav .rel-user__name {
  color:#49321e !important;
}
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav .rel-nav__link,
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav .rel-user__out,
html[data-rel-color-mode="dark"] :is(.rel-app,#rel-annonces-app).rel-skin .rel-nav .rel-user__name {
  color:#ffebc4 !important;
}
html[data-rel-color-mode="light"] .rel-catalogue.rel-catalogue--detail .rel-interest-people a.rel-interest-people__member,
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-interest-people a.rel-interest-people__member {
  color:#fff0d9 !important;
}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-catalogue__back a,
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--detail .rel-back {
  color:#ffe3ad !important;
}
/* Respecter les images de fond définies par le CA, avec un voile adapté à la palette. */
html[data-rel-color-mode="light"] .rel-catalogue.rel-catalogue--custom-bg:not(.rel-catalogue--detail) {
  background-image:linear-gradient(rgba(252,248,238,.91),rgba(252,248,238,.91)),var(--rel-catalogue-bg) !important;
  background-size:cover !important; background-position:center top !important;
}
html[data-rel-color-mode="dark"] .rel-catalogue.rel-catalogue--custom-bg:not(.rel-catalogue--detail) {
  background-image:linear-gradient(rgba(17,22,30,.87),rgba(17,22,30,.87)),var(--rel-catalogue-bg) !important;
  background-size:cover !important; background-position:center top !important;
}
/* Ne pas recouvrir la toile de fond personnalisée (gabarit de page pleine largeur). */
html[data-rel-color-mode="light"] .rel-stage.rel-stage--image,
html[data-rel-color-mode="dark"] .rel-stage.rel-stage--image {
  background-image:none !important;
}


/* Shortcodes indépendants : conserver leurs illustrations, mais rendre leur sélecteur
   accessible et corriger les légendes du lanceur de dés sur fond sombre. */
html[data-rel-color-mode="dark"] .rel-dice:not(.rel-app) {
  color:#f3ece1;
}
html[data-rel-color-mode="dark"] .rel-dice__intro {
  color:#e8decc!important;
}
html[data-rel-color-mode="light"] .rel-dice__intro {
  color:#50402c!important;
}
html[data-rel-color-mode="dark"] .rel-x-tools {
  color:#f5eddd;
}
html[data-rel-color-mode="light"] .rel-x-tools {
  color:#30251b;
}
