/* Controversia — thème « Nuit » (7.5.1) : bleu nuit et or.
   Chargé après site.css uniquement quand le thème Nuit est actif (réglage admin ou aperçu ?theme=nuit).
   Le thème Bleu (site.css) n'est jamais modifié : le désactiver suffit à revenir en arrière. */

:root[data-theme="nuit"] {
  --paper: #0b1220;          /* fond principal */
  --paper-2: #0f1828;        /* fond secondaire */
  --paper-3: #152036;        /* surface au survol / fond de portrait */
  --sheet: #111a2c;          /* surfaces et cartes */
  --ink: #edf0f6;            /* texte principal */
  --ink-2: #c5ccda;          /* texte secondaire */
  --muted: #94a0b8;          /* texte atténué */
  --faint: #7d89a1;          /* texte discret */
  --rule: #1f2a40;           /* filets */
  --rule-2: #2c3a57;         /* filets marqués */
  --gold: #e2c08d;           /* seul accent */
  --gold-d: #c9a467;         /* or foncé (survol) */
  --on-gold: #0b1220;        /* texte posé sur l'or */
  --link: #e2c08d;
  --focus: #e2c08d;
  --blue: #e2c08d;           /* l'ancien accent bleu devient l'or */
  --blue-d: #e2c08d;
  --cyan: #e2c08d;
  --conv: #ff8a7a; --conv-bg: #3b1c1e;
  --ind: #f3c47e;  --ind-bg: #3a2b15;
  --cleared: #a9b3c4; --cleared-bg: #1c2538;
  --grad: #e2c08d;           /* plus de dégradés : aplats */
  --grad-soft: #0f1828;
  --grad-deep: #0f1828;
  --shadow: 0 18px 44px -24px rgba(0, 0, 0, .7);
  --shadow-sm: 0 8px 22px -14px rgba(0, 0, 0, .65);
  --serif: "Newsreader", "Lora", Georgia, "Times New Roman", serif;
  --sans: "Poppins", "Segoe UI", system-ui, sans-serif;
  --mono: "Poppins", "Segoe UI", system-ui, sans-serif;
  /* carte des relations (atlas) : triplets r,g,b */
  --viz-ink: 148,160,184; --viz-line: 226,192,141; --viz-node: 237,240,246;
  --viz-edge-a: .32;
  --viz-label-bg: #e2c08d; --viz-label-fg: #0b1220;
  /* constellation des fiches */
  --cst-ink: #c5ccda; --cst-accent: #e2c08d; --cst-paper: #111a2c; --cst-soft: #152036;
  --cst-grid: rgba(226,192,141,.14);
  --cst-on-accent: #0b1220; --cst-tag-bg: #e2c08d; --cst-tag-fg: #0b1220;
  color-scheme: dark;
}

[data-theme="nuit"] body { background: var(--paper); color: var(--ink); }
[data-theme="nuit"] ::selection { background: var(--gold); color: var(--on-gold); }
[data-theme="nuit"] a { color: inherit; }
[data-theme="nuit"] .prose a, [data-theme="nuit"] .legal-note a, [data-theme="nuit"] .lang-banner a,
[data-theme="nuit"] .src-body a, [data-theme="nuit"] .btn-link { color: var(--gold); }
[data-theme="nuit"] :focus-visible { outline: 2px solid var(--gold) !important; outline-offset: 3px; border-radius: 4px; box-shadow: 0 0 0 5px rgba(226,192,141,.22); }
[data-theme="nuit"] .num, [data-theme="nuit"] .stat-n, [data-theme="nuit"] .lnum, [data-theme="nuit"] .mono { font-variant-numeric: tabular-nums; }

/* ---- typographie : titres à empattements ---- */
[data-theme="nuit"] .display, [data-theme="nuit"] .h1, [data-theme="nuit"] .h2, [data-theme="nuit"] .h3,
[data-theme="nuit"] .card-name, [data-theme="nuit"] .dossier-name, [data-theme="nuit"] .case-title,
[data-theme="nuit"] .section-title, [data-theme="nuit"] .prose h2, [data-theme="nuit"] .principles h3,
[data-theme="nuit"] .ms-title, [data-theme="nuit"] .res-name, [data-theme="nuit"] .ta-name, [data-theme="nuit"] .nl-head a,
[data-theme="nuit"] .const-detail h3 { font-family: var(--serif); letter-spacing: -.005em; }
[data-theme="nuit"] .display { font-weight: 500; letter-spacing: -.02em; }
[data-theme="nuit"] .display em { font-style: normal; color: var(--gold); background: none; -webkit-background-clip: initial; background-clip: initial; }
[data-theme="nuit"] .h1, [data-theme="nuit"] .h2, [data-theme="nuit"] .h3, [data-theme="nuit"] .section-title { font-weight: 500; }
[data-theme="nuit"] .eyebrow { color: var(--gold); }
[data-theme="nuit"] .wordmark { font-family: var(--serif); font-weight: 500; font-size: 19px; letter-spacing: .14em; }
[data-theme="nuit"] .mark { color: var(--gold); }

/* ---- bandeau, en-tête, navigation ---- */
[data-theme="nuit"] .ticker { background: var(--paper-2); color: var(--muted); border-bottom: 1px solid var(--rule); }
[data-theme="nuit"] .ticker-in span + span::before { background: var(--rule-2); }
[data-theme="nuit"] .ticker-live { color: var(--ink-2); }
[data-theme="nuit"] .ticker-live i { background: var(--gold); }
[data-theme="nuit"] .site-header { background: rgba(11, 18, 32, .86); border-bottom: 1px solid var(--rule); }
[data-theme="nuit"] .site-nav a { color: var(--ink-2); }
[data-theme="nuit"] .site-nav a::after { background: var(--gold); }
[data-theme="nuit"] .site-nav a:hover, [data-theme="nuit"] .site-nav a[aria-current="page"] { color: var(--ink); }
[data-theme="nuit"] .nav-search { background: var(--sheet); border-color: var(--rule-2); color: var(--muted) !important; }
[data-theme="nuit"] .nav-search:hover { border-color: var(--gold); color: var(--ink) !important; }
[data-theme="nuit"] .nav-support { background: var(--gold); color: var(--on-gold) !important; box-shadow: none; }
[data-theme="nuit"] .nav-support:hover { background: var(--gold-d); filter: none; color: var(--on-gold) !important; }
[data-theme="nuit"] .nav-toggle span:not(.sr) { background: var(--ink); }
[data-theme="nuit"] kbd { background: var(--paper-2); border-color: var(--rule-2); color: var(--muted); }
[data-theme="nuit"] .lang-switch { background: var(--sheet); border: 1px solid var(--rule-2); }
[data-theme="nuit"] .lang-switch a { color: var(--ink-2) !important; }
[data-theme="nuit"] .lang-switch a:hover { background: var(--paper-3); }
[data-theme="nuit"] .lang-switch .ls-on { background: var(--gold); color: var(--on-gold); box-shadow: none; }
@media (max-width: 860px) {
  [data-theme="nuit"] .site-nav { background: var(--paper-2); border-bottom: 1px solid var(--rule-2); box-shadow: var(--shadow); }
  [data-theme="nuit"] .site-nav a { border-bottom-color: var(--rule); }
}

/* ---- boutons ---- */
[data-theme="nuit"] .btn-ink { background: var(--gold); color: var(--on-gold); box-shadow: none; }
[data-theme="nuit"] .btn-ink:hover { background: var(--gold-d); filter: none; }
[data-theme="nuit"] .btn-line { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); border-radius: 999px; }
[data-theme="nuit"] .btn-line:hover { background: var(--gold); color: var(--on-gold); }

/* ---- recherche (pilule) ---- */
[data-theme="nuit"] .search-field { background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 999px; box-shadow: var(--shadow); }
[data-theme="nuit"] .search-field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226,192,141,.18); }
[data-theme="nuit"] .search-field input { color: var(--ink); }
[data-theme="nuit"] .search-field input::placeholder { color: var(--faint); }
[data-theme="nuit"] .sf-icon { color: var(--muted); }
[data-theme="nuit"] .sf-submit { background: var(--gold); color: var(--on-gold); border-radius: 999px; border: 0; margin: 6px; height: auto; align-self: stretch; padding: 0 26px; font-weight: 600; }
[data-theme="nuit"] .sf-submit:hover { background: var(--gold-d); }
[data-theme="nuit"] .ta-list { background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
[data-theme="nuit"] .ta-item a, [data-theme="nuit"] .qs-item a { border-bottom-color: var(--rule); color: var(--ink); }
[data-theme="nuit"] .ta-item[aria-selected="true"] a, [data-theme="nuit"] .ta-item a:hover,
[data-theme="nuit"] .qs-item[aria-selected="true"] a, [data-theme="nuit"] .qs-item a:hover { background: var(--paper-3); }
[data-theme="nuit"] .ta-thumb { background-color: var(--paper-3); color: var(--muted); }
[data-theme="nuit"] .ta-all a { background: var(--paper-2); color: var(--gold); }
[data-theme="nuit"] .qs-backdrop { background: rgba(5, 9, 18, .78); }
[data-theme="nuit"] .qs-panel { background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 22px; box-shadow: var(--shadow); }
[data-theme="nuit"] .qs-form { border-bottom-color: var(--rule); }
[data-theme="nuit"] .qs-form input { background: transparent; color: var(--ink); }
[data-theme="nuit"] .qs-esc { background: var(--paper-2); border-color: var(--rule-2); color: var(--muted); }

/* ---- statuts (même sens, recalibrés pour le sombre) ---- */
[data-theme="nuit"] .lg-conviction, [data-theme="nuit"] .lg-inline.conv { background: var(--conv-bg); color: var(--conv); }
[data-theme="nuit"] .lg-indictment, [data-theme="nuit"] .lg-inline.ind { background: var(--ind-bg); color: var(--ind); }
[data-theme="nuit"] .status { background: var(--sheet); border-color: var(--rule-2); color: var(--ink-2); }
[data-theme="nuit"] .status-conviction { background: var(--conv-bg); border-color: rgba(255,138,122,.45); color: var(--conv); }
[data-theme="nuit"] .status-indictment { background: var(--ind-bg); border-color: rgba(243,196,126,.45); color: var(--ind); }
[data-theme="nuit"] .status-cleared { background: var(--cleared-bg); border-color: #3a4763; color: var(--cleared); }
[data-theme="nuit"] .status-cleared i { background: transparent; border-color: var(--cleared); }
[data-theme="nuit"] .status-neutral { background: var(--sheet); color: var(--ink-2); }
[data-theme="nuit"] .dot-conviction { background: var(--conv); } [data-theme="nuit"] .dot-indictment { background: var(--ind); }
[data-theme="nuit"] .chip { background: var(--paper-2); border-color: var(--rule-2); color: var(--ink-2); }
[data-theme="nuit"] .role-note { background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--rule-2); }

/* ---- cartes de fiches : portrait 4:5, 6 / 3 / 2 par rangée ---- */
[data-theme="nuit"] .card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; box-shadow: none; overflow: hidden; }
[data-theme="nuit"] .card:hover { border-color: var(--rule-2); transform: translateY(-2px); }
[data-theme="nuit"] .card-body { padding: 14px 14px 16px; }
[data-theme="nuit"] .card-body::before { left: 14px; right: 14px; background: var(--gold); height: 2px; }
[data-theme="nuit"] .card[data-legal="conviction"] .card-body::before { background: var(--conv); }
[data-theme="nuit"] .card[data-legal="indictment"] .card-body::before { background: var(--ind); }
[data-theme="nuit"] .card-num { background: rgba(11,18,32,.82); color: var(--ink-2); box-shadow: none; }
[data-theme="nuit"] .card-meta { color: var(--muted); }
[data-theme="nuit"] .card-foot { color: var(--muted); }
[data-theme="nuit"] .portrait { background: var(--paper-3); aspect-ratio: 4 / 5; }
[data-theme="nuit"] .portrait img { filter: none; }
[data-theme="nuit"] .portrait-empty { background: var(--paper-3); border: 0; }
[data-theme="nuit"] .ph-initials { color: var(--faint); opacity: 1; font-family: var(--serif); }
[data-theme="nuit"] .ph-label { color: var(--faint); }
[data-theme="nuit"] .corners { display: none; }
.cards-portrait { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cards-portrait .card-summary, .cards-portrait .card-num { display: none; }
.cards-portrait .card-name { font-size: 18px; line-height: 1.2; margin: 0 0 6px; }
.cards-portrait .card-meta { font-size: 10.5px; margin: 0 0 8px; }
.cards-portrait .card-foot { gap: 6px 10px; }
.cards-portrait .lg { font-size: 11px; }
.card-date { margin: 8px 0 0; color: var(--faint); font-size: 10.5px; }
@media (max-width: 1100px) { .cards-portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards-portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .cards-portrait .card-name { font-size: 16px; } }

/* ---- accueil Nuit ---- */
.nh-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.nh-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(40px, 6vw, 80px); }
.nh-hero .eyebrow { display: flex; align-items: center; gap: 12px; }
.nh-hero .eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.nh-hero .display { font-size: clamp(42px, 6.4vw, 92px); line-height: 1.02; margin-top: 18px; }
.nh-hero .hero-lede { color: var(--ink-2); max-width: 54ch; }
.nh-hero .hero-hint { color: var(--faint); }
.nh-globe { margin: 0; position: relative; justify-self: end; width: min(100%, 560px); aspect-ratio: 1; }
.nh-globe img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nh-globe::after { content: ""; position: absolute; inset: 8% -6% 8% 8%; border: 1px solid rgba(226,192,141,.16); border-radius: 50%; transform: rotate(-18deg) scaleY(.36); pointer-events: none; }
.nh-stats { padding-top: 34px; padding-bottom: 8px; }
.nh-stats-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.1fr); background: var(--sheet); border: 1px solid var(--rule);
  border-radius: 22px; overflow: hidden; }
.nh-stat { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-right: 1px solid var(--rule); }
.nh-stat svg { width: 40px; height: 40px; flex: none; color: var(--gold); padding: 9px; border: 1px solid var(--rule-2); border-radius: 50%; }
.nh-stat .stat-n { color: var(--gold); background: none; -webkit-background-clip: initial; background-clip: initial; font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 2.6vw, 38px); display: block; line-height: 1.05; }
.nh-stat .stat-l { color: var(--muted); display: block; margin-top: 4px; }
.nh-stats-note { margin: 0; padding: 22px 24px; color: var(--muted); font-size: 13.5px; line-height: 1.55; align-self: center; }
.nh-network { padding-top: clamp(48px, 6vw, 84px); }
.nh-network-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.nh-network .atlas { border: 1px solid var(--rule); border-radius: 22px; background: var(--paper-2); box-shadow: none; }
.nh-network .atlas::before, .nh-network .atlas::after { display: none; }
.nh-network .atlas-hud { color: var(--muted); }
.nh-network #atlas-read { color: var(--ink); }
.nh-network p { color: var(--ink-2); }
.nh-network .fine { color: var(--muted); font-size: 13px; }
.nh-rule { display: block; width: 34px; height: 1px; background: var(--gold); margin-bottom: 18px; }
@media (max-width: 960px) {
  .nh-hero-grid, .nh-network-grid { grid-template-columns: minmax(0, 1fr); }
  .nh-globe { position: absolute; right: -32%; top: 6%; width: 78%; opacity: .32; z-index: 0; pointer-events: none; }
  .nh-hero-grid > div { position: relative; z-index: 1; }
  .nh-stats-box { grid-template-columns: minmax(0, 1fr); }
  .nh-stat { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* ---- sections génériques de l'accueil ---- */
[data-theme="nuit"] .hero, [data-theme="nuit"] .hero::before { background: none; }
[data-theme="nuit"] .stats-row > div { background: var(--sheet); border-color: var(--rule); box-shadow: none; }
[data-theme="nuit"] .stats-row > div:last-child { background: var(--paper-2); }
[data-theme="nuit"] .stat-n { color: var(--gold); background: none; -webkit-background-clip: initial; background-clip: initial; }
[data-theme="nuit"] .section-head .h2 { font-family: var(--serif); }
[data-theme="nuit"] .discover .section-head > div::before, [data-theme="nuit"] .recent .section-head > div::before { content: ""; display: block; width: 34px; height: 1px; background: var(--gold); margin-bottom: 16px; }
[data-theme="nuit"] .ledger { background: var(--sheet); border-color: var(--rule); box-shadow: none; }
[data-theme="nuit"] .ledger a { border-bottom-color: var(--rule); }
[data-theme="nuit"] .ledger a:hover { background: var(--paper-3); }
[data-theme="nuit"] .method-strip { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
[data-theme="nuit"] .method-strip::before, [data-theme="nuit"] .method-strip::after { display: none; }
[data-theme="nuit"] .method-strip .eyebrow, [data-theme="nuit"] .principles .mono { color: var(--gold); }
[data-theme="nuit"] .method-strip .h2 { color: var(--ink); }
[data-theme="nuit"] .principles li { background: var(--sheet); border: 1px solid var(--rule); border-top: 1px solid var(--gold); }
[data-theme="nuit"] .principles h3 { color: var(--ink); }
[data-theme="nuit"] .principles p { color: var(--ink-2); }
[data-theme="nuit"] .method-strip .btn-link { color: var(--gold); }
[data-theme="nuit"] .support-block { background: var(--paper-2); border: 1px solid var(--rule); }
[data-theme="nuit"] .empty-state { background: var(--sheet); border-color: var(--rule-2); }

/* ---- pied de page ---- */
[data-theme="nuit"] .site-footer { background: var(--paper-2); border-top: 1px solid var(--gold); color: var(--ink-2); }
[data-theme="nuit"] .site-footer .wordmark, [data-theme="nuit"] .site-footer .mark { color: var(--ink); }
[data-theme="nuit"] .site-footer .mark { color: var(--gold); }
[data-theme="nuit"] .footer-brand p, [data-theme="nuit"] .footer-legal, [data-theme="nuit"] .footer-meta { color: var(--muted); }
[data-theme="nuit"] .footer-nav a { color: var(--ink); }
[data-theme="nuit"] .footer-nav a:hover { color: var(--gold); }
[data-theme="nuit"] .footer-legal { border-top-color: var(--rule-2); }

/* ---- fiche ---- */
[data-theme="nuit"] .crumbs a { color: var(--gold); }
[data-theme="nuit"] .dossier-portrait { box-shadow: 0 0 0 1px var(--rule-2), var(--shadow); }
[data-theme="nuit"] .dh-portrait::before { display: none; }
[data-theme="nuit"] .dek { color: var(--ink-2); }
[data-theme="nuit"] .aliases, [data-theme="nuit"] .updated, [data-theme="nuit"] .credit { color: var(--muted); }
[data-theme="nuit"] .ledger-strip > div, [data-theme="nuit"] .ledger-strip > div:first-child { background: var(--sheet); border-color: var(--rule); box-shadow: none; }
[data-theme="nuit"] .ledger-strip .lnum, [data-theme="nuit"] .ledger-strip > div:nth-child(1) .lnum, [data-theme="nuit"] .ledger-strip > div:nth-child(2) .lnum {
  color: var(--gold); background: none; -webkit-background-clip: initial; background-clip: initial; font-family: var(--serif); font-weight: 500; }
[data-theme="nuit"] .llab, [data-theme="nuit"] .lsub { color: var(--muted); }
[data-theme="nuit"] .lcell-ind.on { background: var(--ind-bg) !important; border-color: rgba(243,196,126,.4) !important; }
[data-theme="nuit"] .lcell-conv.on { background: var(--conv-bg) !important; border-color: rgba(255,138,122,.4) !important; }
[data-theme="nuit"] .lcell-ind.on .lnum, [data-theme="nuit"] .lcell-ind.on .lsub, [data-theme="nuit"] .lcell-ind.on .llab { color: var(--ind); }
[data-theme="nuit"] .lcell-conv.on .lnum, [data-theme="nuit"] .lcell-conv.on .llab { color: var(--conv); }
[data-theme="nuit"] .legal-note { background: var(--sheet); border-color: var(--rule); color: var(--muted); }
[data-theme="nuit"] .toc-in { background: var(--sheet); border-color: var(--rule); box-shadow: none; }
[data-theme="nuit"] .toc ol a { color: var(--ink-2); }
[data-theme="nuit"] .toc ol a:hover, [data-theme="nuit"] .toc ol a.active { background: var(--paper-3); color: var(--ink); }
[data-theme="nuit"] .toc-extra a { color: var(--gold); }
[data-theme="nuit"] .section-title .mono { background: var(--gold); color: var(--on-gold); }
[data-theme="nuit"] .case { background: var(--sheet); border-color: var(--rule); box-shadow: none; }
[data-theme="nuit"] .case[data-legal="conviction"] { border-left: 3px solid var(--conv); }
[data-theme="nuit"] .case[data-legal="indictment"] { border-left: 3px solid var(--ind); }
[data-theme="nuit"] .case-idx { background: var(--paper-3); color: var(--gold); border: 1px solid var(--rule-2); }
[data-theme="nuit"] .case-period { color: var(--gold); }
[data-theme="nuit"] .case-body .lede { color: var(--ink); }
[data-theme="nuit"] .facts dt { color: var(--muted); }
[data-theme="nuit"] .facts dd { color: var(--ink-2); }
[data-theme="nuit"] .facts > div { border-color: var(--rule); }
[data-theme="nuit"] .defense { background: var(--paper-2); border: 1px solid var(--rule); border-left: 2px solid var(--gold); }
[data-theme="nuit"] .defense .eyebrow { color: var(--gold); }
[data-theme="nuit"] .defense p { color: var(--ink-2); }
[data-theme="nuit"] .sources { border-top-color: var(--rule); }
[data-theme="nuit"] .src-n, [data-theme="nuit"] .src-pub, [data-theme="nuit"] .src-date, [data-theme="nuit"] .verified { color: var(--muted); }
[data-theme="nuit"] .src-notes { color: var(--muted); }
[data-theme="nuit"] .src-more summary { color: var(--gold); }
[data-theme="nuit"] .history li { border-color: var(--rule); color: var(--ink-2); }
[data-theme="nuit"] .const { background: var(--paper-2); border-color: var(--rule); box-shadow: none; }
[data-theme="nuit"] .const-panel { background: var(--sheet); border-left-color: var(--rule); }
[data-theme="nuit"] .const-detail a { color: var(--gold); }
[data-theme="nuit"] .disclaimer { background: var(--sheet); border-color: var(--rule-2); color: var(--muted); }
[data-theme="nuit"] .lk-rel { background: var(--gold); }
[data-theme="nuit"] .net-fallback { border-color: var(--rule); }
[data-theme="nuit"] .net-fallback summary { color: var(--gold); }
[data-theme="nuit"] .net-list li { border-color: var(--rule); }
[data-theme="nuit"] .update-cta { background: var(--paper-2); border: 1px solid var(--rule); border-top: 1px solid var(--gold); color: var(--ink); box-shadow: none; }
[data-theme="nuit"] .update-cta p { color: var(--ink-2); }
[data-theme="nuit"] .update-cta .section-title { color: var(--ink); }
[data-theme="nuit"] .update-cta .section-title .mono { background: var(--gold); color: var(--on-gold); }
[data-theme="nuit"] .update-cta .btn-ink { background: var(--gold); color: var(--on-gold); }
[data-theme="nuit"] .fiche-support { background: var(--sheet); border-color: var(--rule); }
[data-theme="nuit"] .milestones { border-left-color: rgba(226,192,141,.25); }
[data-theme="nuit"] .milestones .ms { border-bottom-color: var(--rule); }
[data-theme="nuit"] .milestones .ms::before { background: var(--paper); border-color: var(--gold); }
[data-theme="nuit"] .ms-period, [data-theme="nuit"] .ms-src summary { color: var(--gold); }
[data-theme="nuit"] .ms-body p { color: var(--ink-2); }
[data-theme="nuit"] .lang-banner { background: var(--sheet); border: 1px solid var(--rule-2); color: var(--ink-2); }
[data-theme="nuit"] .lang-note { background: var(--paper-2); color: var(--ink-2); }
[data-theme="nuit"] .lang-banner span, [data-theme="nuit"] .lang-note span { background: var(--gold); color: var(--on-gold); }
[data-theme="nuit"] .lang-suggest { background: var(--paper-2); color: var(--ink); border-bottom: 1px solid var(--gold); }
[data-theme="nuit"] .lang-suggest a { background: var(--gold); color: var(--on-gold); }
[data-theme="nuit"] .lang-suggest a:hover { background: var(--gold-d); }
[data-theme="nuit"] .lang-suggest button { color: var(--ink); }
[data-theme="nuit"] .preview-banner { background: var(--gold); color: var(--on-gold); }

/* ---- modale de demande, note de soutien ---- */
[data-theme="nuit"] .modal { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule-2); border-radius: 22px; }
[data-theme="nuit"] .modal::backdrop { background: rgba(5, 9, 18, .78); }
[data-theme="nuit"] .modal textarea { background: var(--paper-2); border-color: var(--rule-2); color: var(--ink); }
[data-theme="nuit"] .modal-x { color: var(--ink-2); }
[data-theme="nuit"] .field-error { color: var(--conv); }
[data-theme="nuit"] .support-note { background: var(--sheet); border: 1px solid var(--rule-2); color: var(--ink-2); box-shadow: var(--shadow); }
[data-theme="nuit"] .support-close { color: var(--ink-2); }

/* ---- recherche, pages éditoriales ---- */
[data-theme="nuit"] .result a { background: var(--sheet); border-color: var(--rule); box-shadow: none; color: var(--ink); }
[data-theme="nuit"] .result a:hover { border-color: var(--rule-2); background: var(--paper-3); }
[data-theme="nuit"] .res-meta, [data-theme="nuit"] .res-count { color: var(--muted); }
[data-theme="nuit"] .res-sum, [data-theme="nuit"] .res-alias { color: var(--ink-2); }
[data-theme="nuit"] mark { background: rgba(226,192,141,.28); color: var(--ink); }
[data-theme="nuit"] .prose-head { background: var(--paper-2); border: 1px solid var(--rule); }
[data-theme="nuit"] .prose-toc a { color: var(--ink-2); }
[data-theme="nuit"] .prose-toc a:hover { color: var(--gold); }
[data-theme="nuit"] .prose h2 { color: var(--ink); border-top-color: var(--rule); }
[data-theme="nuit"] .prose h2 .mono { color: var(--gold); }
[data-theme="nuit"] .prose p { color: var(--ink-2); }
[data-theme="nuit"] .legal-table .lt-row { border-color: var(--rule); }
[data-theme="nuit"] .legal-table dd { color: var(--ink-2); }

/* ---- aperçu du thème (visible seulement pour qui a utilisé ?theme=…) ---- */
.theme-preview { position: fixed; left: 16px; bottom: 16px; z-index: 90; margin: 0; max-width: calc(100vw - 32px); padding: 9px 14px; border-radius: 999px;
  background: #e2c08d; color: #0b1220; font: 500 12.5px/1.4 "Poppins", system-ui, sans-serif; box-shadow: 0 8px 24px -10px rgba(0,0,0,.6); }
.theme-preview a { color: #0b1220; font-weight: 700; margin-left: 6px; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="nuit"] *, [data-theme="nuit"] *::before, [data-theme="nuit"] *::after { animation: none !important; transition: none !important; }
  [data-theme="nuit"] .card:hover { transform: none; }
}

/* recherche : texte de la pilule en sans-serif, taille lisible sans troncature */
[data-theme="nuit"] .search-field input { font: 400 clamp(16px, 1.4vw, 19px) var(--sans); height: 60px; }
[data-theme="nuit"] .search-field input::placeholder { font-style: normal; }
[data-theme="nuit"] .lang-hint { color: var(--faint); }
.nh-hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
.nh-hero .search-field input { font-size: 16px; }
.nh-hero .search-field input::placeholder { text-overflow: ellipsis; }
.cards-portrait .ph-label { display: none; }
[data-theme="nuit"] .portrait-empty { background: radial-gradient(circle at 50% 42%, #18233a, #111a2c 70%); }
[data-theme="nuit"] .search-field input:focus-visible, [data-theme="nuit"] .qs-form input:focus-visible { outline: none !important; box-shadow: none; }
@media (max-width: 640px) { .theme-preview { font-size: 11.5px; padding: 7px 12px; } }

/* ---- 7.5.1 : Terre de nuit (image NASA fournie) en fond du hero ---- */
.nh-hero { isolation: isolate; }
.nh-hero-grid { grid-template-columns: minmax(0, 1fr); position: relative; z-index: 1; }
.nh-hero-grid > div { max-width: 640px; }
.nh-earth { position: absolute; z-index: 0; margin: 0; pointer-events: none; right: -7%; top: 26px; width: min(64vw, 1040px); }
.nh-earth img { display: block; width: 100%; height: auto; }
.nh-hero::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, #0b1220 0%, #0b1220 30%, rgba(11,18,32,.72) 48%, rgba(11,18,32,0) 68%); }
.nh-credit { position: absolute; right: 18px; bottom: 10px; z-index: 1; margin: 0; color: var(--faint); font-size: 10px; letter-spacing: .06em; text-transform: none; }
@media (max-width: 960px) {
  .nh-earth { right: -38%; top: 0; width: 120%; opacity: .55; }
  .nh-hero::after { background: linear-gradient(180deg, rgba(11,18,32,.15) 0%, rgba(11,18,32,.55) 35%, #0b1220 75%); }
}
@media (max-width: 960px) and (min-width: 641px) {
  .nh-stats-box { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nh-stat { border-bottom: 0; border-right: 1px solid var(--rule); flex-direction: column; align-items: flex-start; }
  .nh-stats-note { grid-column: 1 / -1; border-top: 1px solid var(--rule); }
}

/* 7.6 : catégories */
.cards-portrait .cat-badge:nth-child(n+2) { display: none; }
:root[data-theme="nuit"] .cat-badge { color: var(--ink-2); border-color: var(--rule-2); }
:root[data-theme="nuit"] .cat-tile, :root[data-theme="nuit"] .cat-chip { background: var(--sheet); }
:root[data-theme="nuit"] .cat-filter select { color-scheme: dark; }

/* S7.10 constellation */
[data-theme="nuit"] { --cst-line: #e2c08d; }
[data-theme="nuit"] .cst { background: radial-gradient(circle at 50% 50%, #131d31 0%, var(--paper-2) 75%); border-color: var(--rule); box-shadow: none; }
[data-theme="nuit"] .cst-pop { background: var(--sheet); border-color: var(--rule); }
[data-theme="nuit"] .cst-pop a { color: var(--gold); }
[data-theme="nuit"] .dz-tabs { background: var(--sheet); border-color: var(--rule); }
[data-theme="nuit"] .dz-tab[aria-selected="true"] { background: var(--gold); color: #0b1220; }
[data-theme="nuit"] .lg-neutral { background: transparent; border-color: var(--rule-2); color: var(--ink-2); }
[data-theme="nuit"] .lg-inline { background: transparent; color: inherit; }
[data-theme="nuit"] .cm-pill { background: var(--sheet); border-color: var(--rule); }
[data-theme="nuit"] .cm-pill[aria-pressed="true"] { background: var(--gold); color: #0b1220; border-color: var(--gold); }
[data-theme="nuit"] .cm-caption a { color: var(--gold); }
/* S7.11 */
[data-theme="nuit"] .globe { background: transparent; }
[data-theme="nuit"] .dcard-link { background: var(--sheet); border-color: var(--rule); }
[data-theme="nuit"] .dcard-media { background: var(--paper-2); }
[data-theme="nuit"] .dcard-mono { color: hsl(var(--h) 30% 82%); background: radial-gradient(120% 120% at 20% 10%, hsl(var(--h) 24% 24%), hsl(calc(var(--h) + 25) 22% 13%)); }
[data-theme="nuit"] .read-box > div { border-left-color: var(--gold); }
[data-theme="nuit"] .lx-crumbs li[aria-current] { color: var(--gold); }
[data-theme="nuit"] .result a.res-links { background: none; border: 0; color: var(--gold); }
[data-theme="nuit"] .result a.res-links:hover { background: none; }
[data-theme="nuit"] .lx-chip { background: var(--sheet); border-color: var(--rule); }
[data-theme="nuit"] .page-home-v11 .dz .section-head > div::before { margin-bottom: 8px; }
[data-theme="nuit"] .pf-kind a[aria-current] { background: var(--gold); color: #0b1220; }
/* S7.13: small phones — the wordmark no longer runs under the « Faire un don » button */
@media (max-width: 460px) { [data-theme="nuit"] .wordmark { font-size: 15px; letter-spacing: .1em; } }
@media (max-width: 400px) { [data-theme="nuit"] .wordmark { font-size: 13px; letter-spacing: .06em; } }
@media (max-width: 340px) { [data-theme="nuit"] .wordmark { display: none; } }
/* S7.15: room for the « Appli mobile gratuite » icon on small phones */
@media (max-width: 420px) {
  [data-theme="nuit"] .wordmark { font-size: 12px; letter-spacing: .04em; }
  .nav-app-icon { width: 36px; height: 36px; margin-left: auto; }
  .nav-app-icon svg { width: 20px; height: 20px; }
  .nav-donate { margin-left: 6px !important; }
}
@media (max-width: 350px) { [data-theme="nuit"] .wordmark { display: none; } }
/* S7.17: a larger name in the header (the header keeps its height); never hidden on small phones */
[data-theme="nuit"] .site-header .wordmark { font-size: 25px; letter-spacing: .12em; display: inline; }
[data-theme="nuit"] .site-header .mark { width: 36px; height: 36px; }
@media (max-width: 1240px) and (min-width: 821px) { [data-theme="nuit"] .site-header .wordmark { font-size: 21px; letter-spacing: .08em; } [data-theme="nuit"] .site-header .mark { width: 32px; height: 32px; } }
@media (max-width: 820px) { [data-theme="nuit"] .site-header .wordmark { font-size: 19px; letter-spacing: .1em; } [data-theme="nuit"] .site-header .mark { width: 32px; height: 32px; } }
@media (max-width: 460px) { [data-theme="nuit"] .site-header .wordmark { font-size: 16px; letter-spacing: .05em; } [data-theme="nuit"] .site-header .mark { width: 28px; height: 28px; } [data-theme="nuit"] .site-header .brand { gap: 7px; } }
@media (max-width: 400px) { [data-theme="nuit"] .site-header .wordmark { font-size: 15px; letter-spacing: .02em; } .site-header .nav-donate { padding: 6px 9px !important; } }
@media (max-width: 370px) { [data-theme="nuit"] .site-header .wordmark { font-size: 14px; letter-spacing: 0; } .site-header .nav-app-icon { width: 34px; height: 34px; } .site-header .nav-toggle { width: 38px; } }
@media (max-width: 400px) { .site-header .header-in { gap: 6px; } .site-header .nav-donate { margin-left: 4px !important; font-size: 12.5px; } }
@media (max-width: 370px) { .site-header .header-in { gap: 4px; } [data-theme="nuit"] .site-header .brand { gap: 5px; } [data-theme="nuit"] .site-header .mark { width: 26px; height: 26px; } .site-header .nav-donate { padding: 6px 8px !important; font-size: 12px; } }
