/**
 * Mode sombre — compléments globaux (après style.css).
 * Les pages avec <style> inline redéfinissent aussi les tokens en fin de bloc.
 */

/* ── Variables sombres globales (disponibles sur toutes les pages) ── */
body.dark {
	color-scheme: dark;
	--text: #E8EDF5;
	--mid: #a8b4cc;
	--light: #556071;
	--border: #2d3d5c;
	--off: #0f1419;
	--dark: #05080f;
	--surface: #161d2e;
	--surface-alt: #1a2438;
	--mix: #1a2230;
	--sh: 0 4px 24px rgba(0, 0, 0, .35);
	--sh-lg: 0 12px 48px rgba(0, 0, 0, .45);
	--b1-readable: #c5d4f5;
	--b5: #9ec5ff;
}

/* ── Enveloppes Kadence / contenu ── */
body.dark #wrapper,
body.dark .site,
body.dark #inner-wrap,
body.dark .content-container,
body.dark .content-area,
body.dark .entry {
	background: var(--off);
	color: var(--text);
}

body.dark .entry-content,
body.dark .entry-content p,
body.dark .entry-content li {
	color: var(--text);
}

body.dark .entry-content h1,
body.dark .entry-content h2,
body.dark .entry-content h3,
body.dark .entry-content h4,
body.dark .wp-block-heading {
	color: var(--text);
}

body.dark .entry-content a {
	color: var(--b5);
}

body.dark .entry-content a:hover {
	color: #a8c8ff;
}

/* Titres articles (pas les héros pleine largeur) */
body.dark {
	--b1-readable: #c5d4f5;
}

body.dark .content-area h1.entry-title,
body.dark .content-area .entry-header .entry-title {
	color: var(--b1-readable);
}

/* Hero — bouton « primaire » : plus de blanc pur sur fond sombre */
body.dark .home-hero-btn-primary {
	background: var(--surface-alt) !important;
	color: var(--text) !important;
	border: 1px solid var(--border) !important;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .25) !important;
}

body.dark .home-hero-btn-primary:hover {
	background: linear-gradient(135deg, var(--b2) 0%, var(--b3) 55%, var(--b3) 100%) !important;
	color: #fff !important;
	border-color: transparent !important;
	/* translateY retiré ici : déjà sur le bouton clair au hover — évite double décalage visuel j/n */
	box-shadow: 0 10px 28px rgba(0, 0, 0, .45) !important;
}

/* Footer — logo : fond blanc + léger relief (contraste maximal sur footer sombre) */
body.dark footer .custom-logo,
body.dark footer .site-logo,
body.dark footer img[class*="logo"],
body.dark .site-footer .custom-logo,
body.dark .site-footer .site-logo,
body.dark .site-footer img[class*="logo"] {
	background: #ffffff !important;
	padding: 12px 14px !important;
	border-radius: var(--r, 8px);
	box-shadow:
		0 8px 28px rgba(0, 0, 0, 0.5),
		inset 0 0 0 1px rgba(15, 63, 147, 0.06);
	filter: none;
	border: 1px solid rgba(255, 255, 255, 0.95) !important;
}
body.dark .site-footer a.custom-logo-link,
body.dark footer a.custom-logo-link {
	display: inline-block;
	background: transparent !important;
	padding: 0 !important;
	box-shadow: none !important;
	border-radius: var(--r, 8px);
}

/* Pastille notif espace adhérent — header Mon espace */
body.dark .nav-ea-notif-badge {
	background: #EA4F70;
	color: #fff;
	box-shadow: 0 1px 8px rgba(234, 79, 112, .5);
}

/* Déconnexion topbar — fond rouge clair → teinte sombre */
body.dark .topbar-user-logout:hover {
	background: rgba(220, 38, 38, 0.18) !important;
}

/* Connexion (template sans header — styles inline après wp_head) */
body.dark.cftc-login-page .cl-card {
	background: var(--surface) !important;
	border: 1px solid var(--border);
	box-shadow: 0 32px 80px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06);
}

body.dark.cftc-login-page .cl-tabs {
	background: var(--surface-alt);
}

body.dark.cftc-login-page .cl-tab.active {
	background: var(--surface) !important;
	color: var(--text) !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

body.dark.cftc-login-page .cl-input {
	background: var(--surface-alt) !important;
	color: var(--text) !important;
	border-color: var(--border) !important;
}

body.dark.cftc-login-page .cl-logo-name {
	color: var(--b1-readable);
}

/* Logo sur page connexion — fond blanc pour le PNG (contraste) */
body.dark.cftc-login-page .cl-logo .custom-logo-link img,
body.dark.cftc-login-page .cl-logo .custom-logo-link .custom-logo {
	background: #ffffff !important;
	padding: 6px 10px !important;
	border-radius: 8px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

/* Liens de la page connexion — bleu lisible en mode sombre */
body.dark.cftc-login-page .cl-footer a {
	color: #9ec5ff !important;
}
body.dark.cftc-login-page .cl-footer a:hover {
	color: #cfe8ff !important;
	text-decoration: underline;
}
body.dark.cftc-login-page .cl-form a {
	color: #9ec5ff !important;
}
body.dark.cftc-login-page .cl-form a:hover {
	color: #cfe8ff !important;
	text-decoration: underline;
}

/* Services — cartes / champs (si déjà en var(--surface) dans le template, renforce) */
body.dark .svc-droit-theme,
body.dark .svc-logement-card,
body.dark .svc-form-item,
body.dark .svc-media-card,
body.dark .svc-calc-tile,
body.dark .svc-outil-card,
body.dark .svc-form-dl,
body.dark .svc-media-tab,
body.dark .svc-forms-search input,
body.dark .svc-media-empty {
	background: var(--surface) !important;
	border-color: var(--border) !important;
	color: var(--text);
}
body.dark .svc-forms-ress-link {
	color: #c5d8ff !important;
}
body.dark .svc-forms-ress-link:hover {
	color: #e8f0ff !important;
}

body.dark .svc-droit-theme h2,
body.dark .svc-droit-theme h3,
body.dark .svc-logement-card .svc-title,
body.dark .svc-form-item,
body.dark .svc-media-card {
	color: var(--text);
}

/* Harmonisation hover/active (Services + Representants) */
body.dark .svc-quick:hover,
body.dark .svc-quick.active {
	background: color-mix(in srgb, var(--b5, #9ec5ff) 16%, var(--surface)) !important;
	border-color: color-mix(in srgb, var(--b5, #9ec5ff) 36%, var(--border)) !important;
	color: #eaf3ff !important;
	box-shadow: 0 4px 12px rgba(108, 168, 255, 0.12);
}
body.dark .svc-forms-cat.active,
body.dark .svc-forms-cat:hover,
body.dark .svc-media-tab.active,
body.dark .svc-media-tab:hover {
	background: color-mix(in srgb, var(--b5, #9ec5ff) 18%, var(--surface-alt)) !important;
	border-color: color-mix(in srgb, var(--b5, #9ec5ff) 38%, var(--border)) !important;
	color: #eaf3ff !important;
	box-shadow: 0 3px 10px rgba(108, 168, 255, 0.10);
}
body.dark .svc-aide-btn:hover {
	background: color-mix(in srgb, var(--yellow, #FBBB1D) 74%, #fff) !important;
	color: var(--b1, #212E81) !important;
	box-shadow: 0 8px 18px rgba(251, 187, 29, 0.22), 0 2px 6px rgba(0, 0, 0, 0.20) !important;
}
body.dark .rp-quick:hover,
body.dark .rp-quick.rp-active {
	background: color-mix(in srgb, var(--b5, #9ec5ff) 16%, rgba(255, 255, 255, 0.08)) !important;
	border-color: color-mix(in srgb, var(--b5, #9ec5ff) 36%, rgba(255, 255, 255, 0.18)) !important;
	color: #eaf3ff !important;
	box-shadow: 0 4px 12px rgba(108, 168, 255, 0.12);
}
body.dark .rp-tab:hover:not(.active) {
	background: color-mix(in srgb, var(--b5, #9ec5ff) 14%, var(--surface)) !important;
	color: #eaf3ff !important;
}
body.dark .rp-tab.active {
	background: color-mix(in srgb, var(--b5, #9ec5ff) 16%, var(--surface-alt)) !important;
	color: #eaf3ff !important;
	border-color: color-mix(in srgb, var(--b5, #9ec5ff) 36%, var(--border)) !important;
}
body.dark .rp-dt-filter.active,
body.dark .rp-dt-filter:hover {
	background: color-mix(in srgb, var(--b5, #9ec5ff) 18%, var(--surface)) !important;
	border-color: color-mix(in srgb, var(--b5, #9ec5ff) 38%, var(--border)) !important;
	color: #eaf3ff !important;
}
body.dark .rp-prem-card:hover {
	box-shadow: 0 10px 24px rgba(108, 168, 255, 0.12), 0 4px 14px rgba(0, 0, 0, 0.34) !important;
}

/* Entretien pro — cartes */
body.dark .ep-sidebar-card,
body.dark .ep-check-item,
body.dark .ep-check-box,
body.dark .ep-card,
body.dark .ep-warn,
body.dark .ep-notes-wrap {
	background: var(--surface) !important;
	border-color: var(--border) !important;
	color: var(--text);
}

/* Élections uniquement (ne pas toucher .el-* partagés type hero Ressourcerie) */
body.dark.cftc-page-elections .el-terrain-card,
body.dark.cftc-page-elections .el-dt-wrap {
	background: var(--surface) !important;
	border-color: var(--border) !important;
	color: var(--text);
}

body.dark .ep-notes-textarea:focus,
body.dark .ep-cta-btn-w {
	background: var(--surface-alt) !important;
	color: var(--text) !important;
}

/* Lettres types — aperçu papier */
body.dark .lt-preview-paper {
	background: var(--surface-alt);
	border-color: var(--border);
	color: var(--text);
}

body.dark .lt-form-section,
body.dark .lt-sidebar-help,
body.dark .lt-type-btn.active {
	background: var(--surface-alt);
	border-color: var(--border);
}

body.dark .lt-input,
body.dark .lt-select,
body.dark .lt-textarea {
	background: var(--surface-alt);
	color: var(--text);
	border-color: var(--border);
}

body.dark .lt-form-header-title,
body.dark .lt-type-title,
body.dark .lt-sidebar-help-title,
body.dark .lt-label {
	color: var(--text);
}

body.dark .lt-sidebar {
	background: var(--off);
	border-color: var(--border);
}

/* Gate adhérent */
body.dark .cftc-gate {
	background: var(--surface) !important;
	border-color: var(--border) !important;
	color: var(--text);
}

body.dark .cftc-gate .cftc-gate-title {
	color: var(--text) !important;
}

body.dark .cftc-gate .cftc-gate-desc {
	color: var(--mid) !important;
}

body.dark .cftc-gate-btn--secondary {
	background: rgba(82, 183, 136, 0.12) !important;
	color: #86efac !important;
	border-color: rgba(134, 239, 172, 0.45) !important;
}

body.dark .cftc-gate-btn--secondary:hover {
	background: rgba(82, 183, 136, 0.2) !important;
	color: #bbf7d0 !important;
}

/* ══ Blocs « réservé adhérent » (Services — fonds #eef / overlays blancs en mode clair) ══ */
body.dark .svc-droit-item--locked-inline .svc-droit-item-inner--locked {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
}

body.dark .svc-droit-item--locked-inline .svc-droit-item-icon {
	color: var(--b5) !important;
}

body.dark .svc-droit-item--locked-inline .svc-droit-item-hint {
	color: var(--mid) !important;
}

body.dark .svc-locked-overlay {
	background: rgba(10, 14, 22, 0.9) !important;
	backdrop-filter: blur(6px) !important;
}

body.dark .svc-locked-msg {
	color: var(--text) !important;
}

body.dark .svc-logement-card.svc-card-locked {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
}

body.dark .svc-logement-locked-hint {
	color: var(--mid) !important;
}

body.dark .svc-form-item--locked {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
}

body.dark .svc-form-item--locked .svc-form-hint {
	color: var(--mid) !important;
}

body.dark .svc-media-thumb-lock {
	background: rgba(10, 14, 22, 0.9) !important;
}

body.dark .svc-media-thumb-lock-msg {
	color: var(--text) !important;
}

body.dark .svc-calc-tile-locked {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
}

/* Hero inline (inc/hero.php) */
body.dark .cftc-ho-card,
body.dark .cftc-ho-input {
	background: var(--surface) !important;
	border-color: var(--border) !important;
	color: var(--text) !important;
}

/* Lettre-type — zone centrale (grille) sur fond page */
body.dark .lt-wrap,
body.dark .lt-main {
	background: var(--off) !important;
}

/* Services — titre calculateur déplié (renfort si cascade Kadence) */
body.dark .svc-calc-exp-info .svc-calc-exp-title {
	color: var(--text) !important;
}

/* Tiroir profil représentant (css/rp-drawer-global.css) */
body.dark .rp-drawer {
	background: var(--surface) !important;
	box-shadow: -24px 0 72px rgba(0, 0, 0, 0.55) !important;
	--rp-draw-off: #1a2230;
	--rp-draw-border: #2d3d5c;
	--rp-draw-light: #8a96a8;
	--rp-draw-mid: #b8c4d6;
	--rp-draw-b1: #e8edf5;
	--rp-draw-b3: #9ec5ff;
}

body.dark .rp-drawer-head {
	background: linear-gradient(135deg, #1a2744 0%, #152e5c 48%, #124252 100%) !important;
}

body.dark .rp-drawer-av {
	background: rgba(255, 255, 255, 0.14) !important;
	border-color: rgba(255, 255, 255, 0.35) !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

body.dark .rp-drawer-footer {
	background: var(--surface) !important;
	border-top-color: var(--border) !important;
}

body.dark .rp-drawer-row {
	background: var(--surface-alt) !important;
}

body.dark .rp-drawer-ico {
	background: color-mix(in srgb, var(--b3) 18%, var(--surface-alt)) !important;
	border-color: var(--border) !important;
}

body.dark .rp-drawer-val,
body.dark .rp-drawer-nego-static {
	color: var(--text) !important;
}

body.dark .rp-drawer-val a {
	color: var(--b5) !important;
}

body.dark .rp-drawer-nego-link {
	color: var(--b5) !important;
}

body.dark .rp-drawer-nego-link:hover {
	color: #cfe8ff !important;
}

body.dark .rp-drawer-missions {
	color: var(--mid) !important;
}

body.dark .rp-drawer-nav {
	background: var(--surface-alt) !important;
	border-bottom-color: var(--border) !important;
}

body.dark .rp-dnav-tab {
	color: var(--mid) !important;
}

body.dark .rp-dnav-tab.is-active {
	color: var(--text) !important;
	border-bottom-color: var(--b5) !important;
}

body.dark .rp-act-row {
	border-bottom-color: var(--border) !important;
}

body.dark a.rp-act-row:hover {
	background: color-mix(in srgb, var(--b3) 12%, var(--surface)) !important;
}

body.dark .rp-act-title {
	color: var(--text) !important;
}

body.dark a.rp-act-row:hover .rp-act-title {
	color: var(--b5) !important;
}

/* Popup « Contacter un délégué » (delegue-popup.php) — format deux colonnes .cftc-popup */
body.dark .cftc-popup {
	background: var(--surface) !important;
	box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55) !important;
	border-color: var(--border) !important;
}

body.dark .cftc-popup-close {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
	color: var(--text) !important;
}

body.dark .cftc-popup-close:hover {
	background: var(--b3) !important;
	color: #fff !important;
	border-color: transparent !important;
}

body.dark .cftc-popup-right-head {
	border-bottom-color: var(--border) !important;
}

body.dark .cftc-popup-label {
	color: var(--b5) !important;
}

body.dark .cftc-popup-body {
	background: var(--off) !important;
}

body.dark .cftc-popup-chip {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
	color: var(--mid) !important;
}

body.dark .cftc-popup-chip[aria-selected="true"] {
	border-color: var(--b5) !important;
	background: color-mix(in srgb, var(--b3) 22%, var(--surface)) !important;
	color: var(--text) !important;
}

body.dark .cftc-popup-context {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
}

body.dark .cftc-popup-where {
	color: var(--text) !important;
}

body.dark .cftc-popup-line {
	color: var(--mid) !important;
}

body.dark .cftc-popup-card {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
}

body.dark .cftc-popup-card--prive {
	--pp-tint: color-mix(in srgb, var(--b3) 18%, transparent);
}

body.dark .cftc-popup-card--fp {
	--pp-tint: color-mix(in srgb, var(--teal) 14%, transparent);
}

body.dark .cftc-popup-card__name {
	color: var(--text) !important;
}

body.dark .cftc-popup-card__role {
	color: var(--mid) !important;
}

body.dark .cftc-popup-card__kv a {
	color: var(--b5) !important;
}

body.dark .cftc-popup-card--fp .cftc-popup-card__kv a {
	color: color-mix(in srgb, var(--teal) 85%, #fff) !important;
}

body.dark .cftc-popup-dock {
	background: linear-gradient(180deg, var(--surface) 0%, var(--off) 100%) !important;
	border-top-color: var(--border) !important;
}

body.dark .cftc-popup-aside {
	color: var(--b5) !important;
}

body.dark .cftc-popup-aside:hover {
	color: #dbe8ff !important;
}

/* Notre syndicat — titre forcé en #212E81 dans le template */
body.dark .notre-syndicat-main h1.entry-title {
	color: var(--text) !important;
}

body.dark select {
	color-scheme: dark;
}

/* Article (single.php) — boutons non écrasés par .entry-content a */
body.dark .sng-page a.sng-cta-adh-btn,
body.dark .entry-content .sng-page a.sng-cta-adh-btn {
	background: linear-gradient(135deg, #3d9a6c, #2d6a4f) !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

body.dark .sng-page a.sng-cta-adh-btn:hover,
body.dark .entry-content .sng-page a.sng-cta-adh-btn:hover {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	filter: brightness(1.08);
}

body.dark .sng-page button.sng-cf-submit,
body.dark .sng-page input.sng-cf-submit,
body.dark .entry-content .sng-page button.sng-cf-submit,
body.dark .entry-content .sng-page input.sng-cf-submit {
	background: linear-gradient(135deg, var(--b3, #0f3f93), var(--b2, #24318a)) !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	border: none !important;
}

body.dark .sng-page button.sng-cf-submit:hover,
body.dark .entry-content .sng-page button.sng-cf-submit:hover {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	filter: brightness(1.1);
}

/* Tiroir représentant — footer + bouton « écrire à » */
body.dark .rp-drawer-footer {
	background: var(--surface) !important;
	border-top-color: var(--border) !important;
}

body.dark .rp-drawer-btn {
	background: #3d7ee8 !important;
	color: #fff !important;
	border: 1px solid transparent !important;
}

body.dark .rp-drawer-btn:hover {
	background: #5aa2ff !important;
	color: #fff !important;
	border-color: transparent !important;
}

/* Icône téléphone (et autres icônes) dans le tiroir — couleur claire */
body.dark .rp-drawer-ico {
	color: var(--mid) !important;
}

/* Bulle nb articles / négos — contraste renforcé (moins « pastel ») */
body.dark .rp-dnav-tab[data-count]::after {
	background: linear-gradient(135deg, #1a3d78 0%, #142d5c 100%) !important;
	color: #e8edf5 !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Icône téléphone (cartes DT / filiales) */
body.dark .cftc-phone-ico {
	color: var(--b5, #9ec5ff) !important;
}

/* ── Contact : renfort global (Kadence / wrappers hors .ct-*) ── */
body.dark.cftc-page-contact #wrapper,
body.dark.cftc-page-contact #inner-wrap,
body.dark.cftc-page-contact .content-container,
body.dark.cftc-page-contact .content-area,
body.dark.cftc-page-contact .site-main,
body.dark.cftc-page-contact article.post,
body.dark.cftc-page-contact .entry,
body.dark.cftc-page-contact .entry-content {
	background: var(--off) !important;
	color: var(--text) !important;
}

body.dark.cftc-page-contact .ct-hero-title,
body.dark.cftc-page-contact .ct-hero-title em {
	color: #fff !important;
}

body.dark.cftc-page-contact .ct-legal-link:hover {
	color: var(--b5) !important;
}

/* Vos services — bouton « Réduire » calculateur (évite hover blanc / peu lisible) */
body.dark .svc-calc-btn-secondary {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
	color: var(--text) !important;
}

body.dark .svc-calc-btn-secondary:hover {
	background: color-mix(in srgb, var(--b3) 22%, var(--surface)) !important;
	border-color: var(--b5) !important;
	color: #e8f4ff !important;
}

/* ── Notre syndicat (template simple, titres inline) ── */
body.dark.cftc-page-notre-syndicat .notre-syndicat-main {
	background: var(--off) !important;
	color: var(--text) !important;
}

body.dark.cftc-page-notre-syndicat .entry-header .entry-title {
	color: var(--b1-readable) !important;
}

body.dark.cftc-page-notre-syndicat .entry-content,
body.dark.cftc-page-notre-syndicat .entry-content p,
body.dark.cftc-page-notre-syndicat .entry-content li {
	color: var(--text) !important;
}

body.dark.cftc-page-notre-syndicat .entry-content a {
	color: var(--b5) !important;
}

body.dark.cftc-page-notre-syndicat .entry-content a:hover {
	color: #cfe8ff !important;
}

body.dark.cftc-page-notre-syndicat .entry-content blockquote {
	border-left-color: var(--border) !important;
	color: var(--mid) !important;
}

/* ── Actualités — archive (hero inchangé, corps + cartes) ── */
body.dark.cftc-page-archive-articles .arc-body {
	background: var(--off) !important;
}

body.dark.cftc-page-archive-articles .arc-sidebar {
	background: var(--surface) !important;
	border-color: var(--border) !important;
	box-shadow: var(--sh) !important;
}

body.dark.cftc-page-archive-articles .arc-side-section + .arc-side-section {
	border-top-color: var(--border) !important;
}

body.dark.cftc-page-archive-articles .arc-side-label {
	color: var(--light) !important;
	border-bottom-color: var(--border) !important;
}

body.dark.cftc-page-archive-articles .arc-search-input {
	background: var(--surface-alt) !important;
	color: var(--text) !important;
	border-color: var(--border) !important;
}

body.dark.cftc-page-archive-articles .arc-search-input:focus {
	background: var(--surface) !important;
	border-color: var(--b3) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--b3) 28%, transparent) !important;
}

body.dark.cftc-page-archive-articles .arc-search-input::placeholder {
	color: var(--light) !important;
}

body.dark.cftc-page-archive-articles .arc-side-filt {
	color: var(--text) !important;
}

body.dark.cftc-page-archive-articles .arc-side-filt:hover {
	background: var(--surface-alt) !important;
	color: var(--b5) !important;
}

body.dark.cftc-page-archive-articles .arc-side-filt.active {
	background: color-mix(in srgb, var(--b3) 18%, var(--surface)) !important;
	color: var(--b5) !important;
}

body.dark.cftc-page-archive-articles .arc-side-badge {
	background: var(--surface-alt) !important;
	color: var(--mid) !important;
}

body.dark.cftc-page-archive-articles .arc-featured-card,
body.dark.cftc-page-archive-articles .arc-card,
body.dark.cftc-page-archive-articles .arc-empty {
	background: var(--surface) !important;
	border-color: var(--border) !important;
}

body.dark.cftc-page-archive-articles .arc-card:hover,
body.dark.cftc-page-archive-articles .arc-featured-card:hover {
	border-color: color-mix(in srgb, var(--b3) 45%, var(--border)) !important;
	box-shadow: var(--sh-lg) !important;
}

body.dark.cftc-page-archive-articles .arc-card-footer {
	border-top-color: var(--border) !important;
}

body.dark.cftc-page-archive-articles .arc-featured-title,
body.dark.cftc-page-archive-articles .arc-card-title,
body.dark.cftc-page-archive-articles .arc-empty-title {
	color: var(--text) !important;
}

body.dark.cftc-page-archive-articles .arc-featured-excerpt,
body.dark.cftc-page-archive-articles .arc-card-excerpt,
body.dark.cftc-page-archive-articles .arc-empty-desc {
	color: var(--mid) !important;
}

body.dark.cftc-page-archive-articles .arc-featured-meta,
body.dark.cftc-page-archive-articles .arc-card-meta,
body.dark.cftc-page-archive-articles .arc-card-time {
	color: var(--light) !important;
}

body.dark.cftc-page-archive-articles .arc-results-info {
	color: var(--mid) !important;
}

body.dark.cftc-page-archive-articles .arc-results-info strong {
	color: var(--text) !important;
}

body.dark.cftc-page-archive-articles .arc-view-toggle {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
}

body.dark.cftc-page-archive-articles .arc-view-btn {
	color: var(--mid) !important;
}

body.dark.cftc-page-archive-articles .arc-view-btn:hover {
	color: var(--b5) !important;
}

body.dark.cftc-page-archive-articles .arc-view-btn.active {
	background: var(--b3) !important;
	color: #fff !important;
}

body.dark.cftc-page-archive-articles .arc-pagination .arc-page-btn {
	background: var(--surface) !important;
	border-color: var(--border) !important;
	color: var(--text) !important;
}

body.dark.cftc-page-archive-articles .arc-pagination .arc-page-btn:hover {
	border-color: var(--b5) !important;
	color: var(--b5) !important;
}

body.dark.cftc-page-archive-articles .arc-pagination .arc-page-btn.is-current {
	background: var(--b3) !important;
	color: #fff !important;
	border-color: var(--b3) !important;
}

body.dark.cftc-page-archive-articles .arc-card-read {
	color: #c5d8ff !important;
}
body.dark.cftc-page-archive-articles .arc-featured-cta {
	background: var(--yellow, #FBBB1D) !important;
	color: var(--b1, #212E81) !important;
}
body.dark.cftc-page-archive-articles .arc-featured-card .arc-featured-cta,
body.dark.cftc-page-archive-articles .arc-featured-card:hover .arc-featured-cta,
body.dark.cftc-page-archive-articles .arc-featured-cta:hover {
	background: color-mix(in srgb, var(--yellow, #FBBB1D) 82%, #fff) !important;
	color: var(--b1, #212E81) !important;
}
body.dark.cftc-page-archive-articles .arc-sidebar-kicker {
	color: var(--mid, #a8b4cc) !important;
	border-bottom: 1px solid var(--border, #2d3d5c);
}
body.dark.cftc-page-archive-articles .arc-author-name {
	color: var(--mid) !important;
}

/* Ressourcerie — selects alertes abonnements (renfort hors inline si besoin) */
body.dark .rs-page .rs-subs-cat__filters select option {
	background: var(--surface-alt) !important;
	color: var(--text) !important;
}

/* Négociations — enveloppes Kadence (complément au bloc inline .ng-page) */
body.dark.cftc-page-negociations #wrapper,
body.dark.cftc-page-negociations .site,
body.dark.cftc-page-negociations .site-content,
body.dark.cftc-page-negociations .content-area {
	background: var(--off) !important;
}
body.dark.cftc-page-negociations .ng-h2 {
	color: #fff !important;
}
body.dark .ng-page .ng-h2 {
	color: #fff !important;
}

/* ══ Impression — outils « document » (lettre-type, entretien-pro), évite fonds sombres / héros ══ */
@media print {
	body.cftc-tool-document,
	body.dark.cftc-tool-document {
		background: #fff !important;
		color: #000 !important;
	}
	body.cftc-tool-document #wrapper,
	body.cftc-tool-document .site,
	body.cftc-tool-document .site-content,
	body.cftc-tool-document .content-area,
	body.cftc-tool-document .site-main,
	body.cftc-tool-document article {
		background: #fff !important;
		color: #000 !important;
		box-shadow: none !important;
	}
	body.cftc-tool-document .topbar,
	body.cftc-tool-document .navbar-custom,
	body.cftc-tool-document .site-footer,
	body.cftc-tool-document .lt-hero,
	body.cftc-tool-document .lt-mosaic,
	body.cftc-tool-document .ep-hero,
	body.cftc-tool-document .ep-mosaic,
	body.cftc-tool-document .baro-hero,
	body.cftc-tool-document .baro-mosaic,
	body.cftc-tool-document .lt-tool-back,
	body.cftc-tool-document .ep-tool-back,
	body.cftc-tool-document .baro-tool-back {
		display: none !important;
	}
	body.cftc-tool-document .lt-wrap,
	body.cftc-tool-document .ep-wrap,
	body.cftc-tool-document .baro-wrap,
	body.cftc-tool-document .lt-main,
	body.cftc-tool-document .ep-content {
		max-width: 100% !important;
		padding: 0 !important;
	}
	body.cftc-tool-document * {
		box-shadow: none !important;
		text-shadow: none !important;
	}
	body.cftc-tool-document a {
		color: #000 !important;
		text-decoration: underline;
	}
}

/* ══ Front page — ex-inline front-page.php (cache navigateur + fichier unique) ══ */
body.dark .home-section-title,
body.dark .home-ressource-title,
body.dark .home-agenda-chip-label {
	color: var(--text);
}
body.dark .home-section-eyebrow,
body.dark .home-agenda-eyebrow {
	color: var(--b5);
}
body.dark .home-agenda {
	background: var(--off);
	border-color: var(--border);
}
body.dark .home-agenda-inner {
	padding-top: 10px;
	padding-bottom: 12px;
}
body.dark .home-ressource-card--locked {
	background: var(--surface-alt) !important;
	border-color: var(--border) !important;
}
body.dark .home-ressource-card--locked .home-ressource-title {
	color: var(--text) !important;
}

body.dark .home-ressource-card--locked .home-ressource-icon {
	color: var(--b5) !important;
}

body.dark .home-ressource-desc--locked {
	color: var(--mid) !important;
}

body.dark .home-utility {
	background: var(--off);
}
body.dark .home-faq {
	background: linear-gradient(180deg, color-mix(in srgb, var(--b3) 8%, var(--off)) 0%, color-mix(in srgb, var(--teal) 5%, var(--off)) 100%);
	border-right-color: var(--border);
}
body.dark .home-faq-item:has(.home-faq-q:hover),
body.dark .home-faq-item:has(.home-faq-q[aria-expanded="true"]) {
	background: var(--surface-alt);
	border-color: var(--border);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
body.dark .home-faq-q {
	color: var(--text);
}
body.dark .home-faq-q:hover {
	color: var(--b5);
	background: color-mix(in srgb, var(--b3) 12%, var(--surface));
}
body.dark .home-faq-q[aria-expanded="true"] {
	color: var(--b5);
	background: color-mix(in srgb, var(--b3) 16%, var(--surface));
}
body.dark .home-faq-q:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}
body.dark .home-faq-q[aria-expanded="false"]:focus:not(:focus-visible) {
	background: transparent;
	color: var(--text);
}
body.dark .home-faq-q[aria-expanded="false"]:focus:not(:focus-visible) .home-faq-chevron {
	color: var(--light);
	opacity: 0.75;
}
body.dark .home-faq-chevron {
	color: var(--light);
}
body.dark .home-faq-a-inner {
	color: var(--mid);
	background: var(--surface);
	border-top-color: var(--border);
}
body.dark .home-faq-a-inner a:not(.home-faq-more) {
	color: var(--b5);
}
body.dark .home-faq-more {
	color: var(--b5) !important;
	background: none;
	box-shadow: none;
}
body.dark .home-faq-more:hover {
	color: #cfe8ff !important;
	background: none;
	box-shadow: none;
}
body.dark .home-ressearch-label,
body.dark .home-ressearch-input-wrap input[type="search"] {
	color: var(--text);
}
body.dark .home-ressearch-tag {
	background: var(--surface-alt);
	color: var(--b5);
	border-color: var(--border);
}
body.dark .home-ressearch-tag:hover {
	color: #fff;
	background: color-mix(in srgb, var(--b5, #9ec5ff) 22%, var(--surface)) !important;
	border-color: color-mix(in srgb, var(--b5, #9ec5ff) 45%, var(--border)) !important;
	box-shadow: 0 4px 14px rgba(108, 168, 255, 0.14);
}
body.dark .home-join {
	background: linear-gradient(180deg, var(--surface) 0%, var(--off) 100%);
}
body.dark .home-join-title,
body.dark .home-join-sub {
	color: var(--text);
}
body.dark .home-join-eyebrow {
	color: var(--teal);
}
body.dark .home-join-cta {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
body.dark .home-join-secondary {
	border-color: var(--border);
	color: var(--text);
	background: var(--surface-alt);
}
body.dark .home-agenda-chip {
	background: var(--surface);
	border-color: var(--border);
	overflow: hidden;
}
body.dark .home-agenda-chip:hover {
	border-color: color-mix(in srgb, var(--chip-color, var(--b5)) 38%, var(--border)) !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}
body.dark .home-agenda-chip:hover .home-agenda-chip-label {
	color: var(--text) !important;
}
body.dark .home-agenda-chip-date {
	color: #fff !important;
	background: color-mix(in srgb, var(--chip-color, var(--b5)) 82%, #1e2838) !important;
	border: none !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.dark .home-agenda-chip:hover .home-agenda-chip-date {
	filter: none !important;
	color: #fff !important;
	transform: translateX(1px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
	outline: none !important;
	background: color-mix(in srgb, var(--chip-color, var(--b5)) 70%, #252e3d) !important;
}
body.dark .home-see-all {
	border-color: var(--border);
	color: var(--b5);
	background: var(--surface-alt);
}
body.dark .home-see-all:hover {
	color: #fff !important;
	background: var(--b3) !important;
	border-color: var(--b3) !important;
}
body.dark .home-hero-btn-secondary {
	border-color: rgba(255, 255, 255, 0.42) !important;
	background: rgba(255, 255, 255, 0.06) !important;
}
body.dark .home-hero-btn-secondary:hover {
	border-color: color-mix(in srgb, var(--b5, #9ec5ff) 52%, #fff) !important;
	background: color-mix(in srgb, var(--b5, #9ec5ff) 18%, rgba(255, 255, 255, 0.06)) !important;
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(108, 168, 255, 0.16) !important;
}
body.dark .home-featured:hover .home-featured-cta {
	background: #fff !important;
	color: var(--b3) !important;
	border-color: transparent !important;
}
body.dark .home-section-title-icon {
	color: var(--b5);
	opacity: 0.9;
}
body.dark .home-editorial {
	background: var(--surface);
}
body.dark .home-agenda-all {
	border-color: color-mix(in srgb, var(--yellow, #FBBB1D) 55%, #8a6a1a);
	color: #12181A;
	background: var(--yellow, #FBBB1D);
	box-shadow: 0 2px 12px rgba(251, 187, 29, .22);
}
body.dark .home-agenda-all:hover {
	background: color-mix(in srgb, var(--yellow, #FBBB1D) 88%, #fff);
	color: #12181A;
	border-color: var(--yellow, #FBBB1D);
	box-shadow: 0 6px 16px rgba(251, 187, 29, .32);
}

/* Réduction des animations (WCAG 2.3.3) */
html.cftc-reduced-motion *,
html.cftc-reduced-motion *::before,
html.cftc-reduced-motion *::after {
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.01ms !important;
	scroll-behavior: auto !important;
}

/* ── Élections (template elections.php) : tokens lisibles en mode sombre (fichier global = charge après styles inline) ── */
body.dark[class*="page-template-election"] .el-content,
body.dark.page-template-elections .el-content {
	--b1: #e8edf5;
	--b2: #c5d4f5;
	--b3: #9ec5ff;
	--b5: #a8c8ff;
	--mid: #a8b4cc;
	--light: #8a96a8;
}
body.dark[class*="page-template-election"] .el-score-number[style*="#6B48FF"],
body.dark[class*="page-template-election"] .el-achieve-val[style*="#6B48FF"],
body.dark.page-template-elections .el-score-number[style*="#6B48FF"],
body.dark.page-template-elections .el-achieve-val[style*="#6B48FF"] {
	color: #c4b5fd !important;
}
body.dark[class*="page-template-election"] .el-score-number span[style*="#9B7FFF"],
body.dark.page-template-elections .el-score-number span[style*="#9B7FFF"] {
	color: #ddd6fe !important;
}
body.dark[class*="page-template-election"] .el-droit-link,
body.dark.page-template-elections .el-droit-link {
	color: var(--b5, #9ec5ff) !important;
}
body.dark[class*="page-template-election"] .el-droit-link:hover,
body.dark.page-template-elections .el-droit-link:hover {
	color: #cfe8ff !important;
	opacity: 1;
}
body.dark[class*="page-template-election"] .el-content h3[style*="color:var(--b1"],
body.dark.page-template-elections .el-content h3[style*="color:var(--b1"] {
	color: var(--text, #e8edf5) !important;
}

/* Classe dédiée (body_class) — renfort si le slug template varie */
body.dark.cftc-page-elections .el-content {
	--b1: #e8edf5;
	--b2: #c5d4f5;
	--b3: #9ec5ff;
	--b5: #a8c8ff;
	--mid: #a8b4cc;
	--light: #8a96a8;
	color: var(--text, #e8edf5);
}
body.dark.cftc-page-elections .el-hero + .el-content {
	--b1: #e8edf5;
	--b3: #9ec5ff;
	--b5: #a8c8ff;
	--mid: #a8b4cc;
}
body.dark.cftc-page-elections .el-content .el-h2,
body.dark.cftc-page-elections .el-content .el-kicker,
body.dark.cftc-page-elections .el-content .el-histo-year {
	color: var(--text, #e8edf5) !important;
}
body.dark.cftc-page-elections .el-content .el-kicker {
	color: var(--b5, #9ec5ff) !important;
}
body.dark.cftc-page-elections .el-content .el-sub,
body.dark.cftc-page-elections .el-content .el-foi-desc,
body.dark.cftc-page-elections .el-content .el-droit-desc {
	color: var(--mid, #a8b4cc) !important;
}
body.dark.cftc-page-elections .el-foi-card[style*="--fc"] .el-foi-title,
body.dark.cftc-page-elections .el-foi-card[style*="--fc"] .el-foi-generic-t {
	color: var(--text, #e8edf5) !important;
}
body.dark.cftc-page-elections .el-foi-badge,
body.dark.cftc-page-elections .el-foi-dl {
	color: var(--b5, #9ec5ff) !important;
	border-color: var(--border, #2d3d5c) !important;
}

/* Espace adhérent — Mes démarches */
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) .ea-dm-title {
	color: var(--b5, #9ec5ff) !important;
}
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) .ea-dm-pill {
	background: color-mix(in srgb, var(--b5, #9ec5ff) 14%, transparent) !important;
	color: var(--b5, #9ec5ff) !important;
}
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) .ea-dm-pill--muted {
	background: rgba(255, 255, 255, 0.06) !important;
	color: var(--mid, #a8b4cc) !important;
}
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) .ea-dm-item-meta {
	color: var(--mid, #a8b4cc) !important;
}
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) .ea-dm-btn,
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) a.ea-dm-btn {
	border-color: var(--border, #2d3d5c) !important;
	background: var(--surface-alt, #1a2438) !important;
	color: var(--text, #e8edf5) !important;
}
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) .ea-dm-btn:hover,
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) a.ea-dm-btn:hover {
	border-color: color-mix(in srgb, var(--b5, #9ec5ff) 50%, var(--border, #2d3d5c)) !important;
	background: color-mix(in srgb, var(--b5, #9ec5ff) 10%, var(--surface-alt, #1a2438)) !important;
	color: var(--b5, #9ec5ff) !important;
}
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) .ea-dm-btn--trash {
	border-color: color-mix(in srgb, var(--pink) 45%, var(--border, #2d3d5c)) !important;
	background: color-mix(in srgb, var(--pink) 8%, var(--surface-alt, #1a2438)) !important;
	color: color-mix(in srgb, var(--pink) 88%, var(--text)) !important;
}
:is(body.dark, body.cftc-theme-dark, body[data-theme="dark"]) .ea-dm-btn--trash:hover {
	border-color: color-mix(in srgb, var(--pink) 55%, var(--border)) !important;
	background: color-mix(in srgb, var(--pink) 18%, var(--surface-alt)) !important;
}

/* Encadrés éditoriaux (Attention, Information, citation…) */
body.dark .cftc-actu-callout,
body.dark .entry-content .cftc-actu-callout,
body.dark .sng-article-body .cftc-actu-callout {
	background: color-mix(in srgb, #0F3F93 24%, var(--surface, #161d2e)) !important;
	border-color: color-mix(in srgb, #9ec5ff 32%, var(--border, #2d3d5c)) !important;
	color: var(--text, #e8edf5) !important;
	box-shadow: none !important;
}
body.dark .cftc-actu-callout--question,
body.dark .sng-article-body .cftc-actu-callout--question {
	background: color-mix(in srgb, #20B29E 18%, var(--surface, #161d2e)) !important;
	border-color: color-mix(in srgb, #20B29E 40%, var(--border, #2d3d5c)) !important;
}
body.dark .cftc-actu-callout--warn,
body.dark .sng-article-body .cftc-actu-callout--warn {
	background: color-mix(in srgb, #c2410c 22%, var(--surface, #161d2e)) !important;
	border-color: color-mix(in srgb, #f97316 38%, var(--border, #2d3d5c)) !important;
}
body.dark .cftc-actu-callout--tip,
body.dark .sng-article-body .cftc-actu-callout--tip {
	background: color-mix(in srgb, #FBBB1D 16%, var(--surface, #161d2e)) !important;
	border-color: color-mix(in srgb, #FBBB1D 36%, var(--border, #2d3d5c)) !important;
}
body.dark .cftc-actu-callout-kicker,
body.dark .sng-article-body .cftc-actu-callout-kicker {
	color: var(--b5, #9ec5ff) !important;
}
body.dark .cftc-actu-callout--question .cftc-actu-callout-kicker {
	color: #7ee0d0 !important;
}
body.dark .cftc-actu-callout--warn .cftc-actu-callout-kicker {
	color: #fdba74 !important;
}
body.dark .cftc-actu-callout--tip .cftc-actu-callout-kicker {
	color: #fcd34d !important;
}
body.dark .cftc-actu-callout p,
body.dark .cftc-actu-callout li,
body.dark .sng-article-body .cftc-actu-callout p {
	color: var(--text, #e8edf5) !important;
}
body.dark .entry-content blockquote:not(.cftc-actu-callout),
body.dark .sng-article-body blockquote:not(.cftc-actu-callout),
body.dark .wp-block-quote {
	background: color-mix(in srgb, #20B29E 12%, var(--surface, #161d2e)) !important;
	border-left-color: #20B29E !important;
	color: var(--text, #e8edf5) !important;
}

/* Lecteur PDF intégré */
body.dark .acc-pdf-viewer {
	background: var(--surface-alt, #1a2438) !important;
	border-color: var(--border, #2d3d5c) !important;
}
body.dark .acc-pdf-viewer-bar {
	background: var(--surface, #161d2e) !important;
	border-bottom-color: var(--border, #2d3d5c) !important;
}
body.dark .acc-pdf-viewer-label {
	color: var(--text, #e8edf5) !important;
}
body.dark .acc-pdf-viewer-open {
	color: var(--b5, #9ec5ff) !important;
}
body.dark .acc-pdf-mount {
	background: var(--off, #0f1419) !important;
}
body.dark .acc-pdf-status {
	color: var(--mid, #a8b4cc) !important;
}
