/* Unvarnish — dark theme. Active only under :root[data-theme="dark"]. */
:root[data-theme="light"]{color-scheme:light;}
:root[data-theme="dark"]{
  color-scheme:dark;
  /* unvarnish tokens (brand red --unv-red kept at origin #E2001A, NOT overridden) */
  --unv-ink:#e8e8e7;--unv-paper:#1b1a18;--unv-grey:#a4a3a3;--unv-line:#31302f;
  /* theme presets — page-level levers (--primary orange kept at origin) */
  --wp--preset--color--base:#1b1a18;
  --wp--preset--color--contrast:#f0f0f0;
  --wp--preset--color--light:#272624;
  --wp--preset--color--accent:#494846;
  /* base (near-white) scale → dark */
  --wp--preset--color--base-50:#201f1d;--wp--preset--color--base-100:#272624;
  --wp--preset--color--base-200:#31302f;--wp--preset--color--base-300:#494846;
  /* secondary grey scale → inverted (KEEP --secondary + secondary-50 to preserve dark section-4) */
  --wp--preset--color--secondary-100:#31302f;--wp--preset--color--secondary-200:#494846;
  --wp--preset--color--secondary-300:#5f5e5d;--wp--preset--color--secondary-400:#767674;
  --wp--preset--color--secondary-500:#8d8c8b;--wp--preset--color--secondary-600:#a4a3a3;
  --wp--preset--color--secondary-700:#babab9;--wp--preset--color--secondary-800:#d1d1d1;
  --wp--preset--color--secondary-900:#e8e8e7;--wp--preset--color--secondary-950:#f5f5f5;
}

/* residual hardcoded surfaces (text/bg that don't follow a flipped token) */
:root[data-theme="dark"] .unv-nblm-btn,
:root[data-theme="dark"] .unv-nblm-btn:hover{color:var(--unv-paper) !important;}
:root[data-theme="dark"] .unv-toggle{background:#272624;border-color:#494846;}
:root[data-theme="dark"] .unv-media-chip.is-active,
:root[data-theme="dark"] .unv-media-tag.is-active,
:root[data-theme="dark"] .unv-media-pagination .page-numbers.current{color:var(--unv-paper);}
/* category/media hero: white text over darkened PHOTO → unchanged in both modes */

/* Footer wordmark "Unvarnish" (.unv-brand-1) has no own color → inherits the footer link
   color, which the theme darkens in dark mode. It is white in light mode → keep it white.
   ("Media" = .unv-brand-2 keeps brand red.) */
:root[data-theme="dark"] footer .wp-block-site-title .unv-brand-1{color:#fff !important;}

/* Footer slogan/tagline uses has-secondary-100-color (a light grey on the always-dark footer);
   that grey is inverted in dark → keep slogan light (match light mode #e8e8e7). */
:root[data-theme="dark"] footer .wp-block-site-tagline{color:#e8e8e7 !important;}

/* Post cards with title OVER a cover image (Hero Lite): text sits on a darkened PHOTO →
   keep it white in dark mode too (theme-independent). Category link stays brand red. */
:root[data-theme="dark"] .wp-block-cover .wp-block-post-title,
:root[data-theme="dark"] .wp-block-cover .wp-block-post-title a,
:root[data-theme="dark"] .wp-block-cover .wp-block-post-date{color:#fff !important;}

/* nav dividers (both modes): border right of "Accueil" (first item) + left of theme toggle */
.wp-block-navigation__container > .wp-block-navigation-item:first-child{border-right:1px solid var(--unv-line);padding-right:1rem;}
/* "Accueil" (first item) always red to mark it apart */
.wp-block-navigation__container > .wp-block-navigation-item:first-child a{color:var(--unv-red) !important;}
/* toggle button (both modes) — always red to mark it apart */
.unv-theme-toggle{display:inline-flex;align-items:center;justify-content:center;height:2.2rem;padding:0 0 0 .8rem;margin-left:.8rem;background:transparent;border:0;border-left:1px solid var(--unv-line);color:var(--unv-red);cursor:pointer;line-height:0;}
.unv-theme-toggle:hover{color:var(--unv-red);}
.unv-theme-toggle:focus-visible{outline:2px solid var(--unv-red);outline-offset:2px;}
.unv-theme-toggle .unv-ico{width:1.25rem;height:1.25rem;display:block;}
.unv-theme-toggle .unv-ico-sun{display:none;}
:root[data-theme="dark"] .unv-theme-toggle .unv-ico-sun{display:block;}
:root[data-theme="dark"] .unv-theme-toggle .unv-ico-moon{display:none;}
