/* ==========================================================================
   Feuille de style locale - bouton de theme + mode sombre
   Charge APRES pro.css (dependance "bg-pro") : les surcharges gagnent par la
   specificite :root[data-theme="dark"] (0,2,0) > :root (0,1,0).
   Palette alignee sur le reste de la plateforme (dashboards app.alpha 8095 /
   app.assist.alpha 8098) : fond #12141f, panneaux #1b1e2e, bordure #2a2e42,
   texte #e8eaf6, texte secondaire #c3c9de, muet #9aa2b8, violet de TEXTE
   #a99cf8, violet d'identite #6d5ef2 (boutons / degrades), teal #43e6c9.
   Cle localStorage : cl_darkui (comme les dashboards), anti-flash dans header.
   ========================================================================== */

/* Violet de texte : n'existait pas dans ce theme, on l'ajoute pour les deux
   themes (clair = la teinte de texte du theme clair, sombre = teinte claire). */
:root{--violet3:#5b4bdb}

/* ---------- bouton de bascule (visible dans les deux themes) ---------- */
.theme-toggle{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;
  border:1px solid var(--line);border-radius:11px;background:var(--bg-2);
  color:var(--ink);font-family:inherit;font-size:14px;font-weight:700;line-height:1;
  cursor:pointer;white-space:nowrap;
  transition:background .18s,border-color .18s,color .18s}
.theme-toggle:hover{background:var(--accent-soft);border-color:rgba(123,108,246,.45);color:var(--violet3)}
.theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.theme-toggle .tt-ico{font-size:15px;line-height:1}
.theme-toggle .tt-lbl{display:inline}
@media(max-width:720px){
  /* Petit ecran : bouton en icone seule, zone tactile >= 40 px, et un peu d'air
     en plus pour que l'entete (marque + 3 liens + bouton) tienne sur une seule
     ligne des 390 px de large. */
  .theme-toggle{padding:10px 11px;gap:0;min-width:40px;min-height:40px;justify-content:center}
  .theme-toggle .tt-lbl{display:none}
  .theme-toggle .tt-ico{font-size:17px}
  .site-head .wrap{padding:11px 16px}
  .nav{gap:8px}
}

/* ---------- palette sombre ---------- */
:root[data-theme="dark"]{
  --ink:#e8eaf6; --ink-2:#c3c9de; --muted:#9aa2b8; --line:#2a2e42;
  --bg:#12141f; --bg-2:#1b1e2e; --card:#1b1e2e;
  --accent:#6d5ef2; --accent-2:#43e6c9; --accent-soft:rgba(123,108,246,.18);
  --violet3:#a99cf8;
  color-scheme:dark;
}
[data-theme="dark"] body{background:var(--bg);color:var(--ink);
  transition:background-color .18s ease,color .18s ease}
[data-theme="dark"] a{color:var(--violet3)}
[data-theme="dark"] ::selection{background:var(--accent);color:#fff}

/* ---------- entete ---------- */
[data-theme="dark"] .site-head{background:rgba(18,20,31,.88);border-bottom-color:var(--line)}
[data-theme="dark"] .brand{color:var(--ink)}
[data-theme="dark"] .nav-list a{color:var(--ink-2)}
[data-theme="dark"] .nav-list a:hover{background:var(--bg-2);color:var(--ink)}

/* ---------- heros ---------- */
[data-theme="dark"] .hero{background:
  radial-gradient(900px 420px at 10% -20%,rgba(123,108,246,.20) 0,transparent 62%),
  radial-gradient(780px 400px at 95% 5%,rgba(67,230,201,.12) 0,transparent 58%)}
[data-theme="dark"] .kicker{background:var(--bg-2);border-color:var(--line);color:var(--violet3)}
[data-theme="dark"] .lead{color:var(--ink-2)}
[data-theme="dark"] .proof{border-top-color:var(--line)}
[data-theme="dark"] .proof b{color:var(--ink)}

/* ---------- cartes / sections ---------- */
[data-theme="dark"] .hero-card,
[data-theme="dark"] .card,
[data-theme="dark"] .feature{background:var(--bg-2);border-color:var(--line);
  box-shadow:0 20px 50px rgba(0,0,0,.42)}
[data-theme="dark"] .card .thumb{background:linear-gradient(135deg,rgba(123,108,246,.22),rgba(67,230,201,.13))}
[data-theme="dark"] .card .cat,
[data-theme="dark"] .entry .eyebrow,
[data-theme="dark"] a.card:hover h3{color:var(--violet3)}
[data-theme="dark"] .card h3 a,
[data-theme="dark"] a.card h3{color:var(--ink)}
[data-theme="dark"] .card p,
[data-theme="dark"] .feature .txt p{color:var(--ink-2)}
[data-theme="dark"] .section .sub,
[data-theme="dark"] .card .meta,
[data-theme="dark"] .feature .meta{color:var(--muted)}

/* ---------- boutons ---------- */
[data-theme="dark"] .btn:hover{background:#5b4bd8}
[data-theme="dark"] .btn.ghost{background:var(--bg-2);color:var(--violet3);border-color:var(--line)}
[data-theme="dark"] .btn.ghost:hover{background:rgba(123,108,246,.28)}

/* ---------- article ---------- */
[data-theme="dark"] .entry-body h2{border-left-color:var(--accent)}
[data-theme="dark"] .entry-body a{text-decoration-color:rgba(169,156,248,.55)}
[data-theme="dark"] .entry-body blockquote{background:var(--bg-2);border-left-color:var(--accent)}
[data-theme="dark"] .entry-body figcaption{color:var(--muted)}
[data-theme="dark"] .entry .byline{color:var(--muted)}
[data-theme="dark"] .chapter,
[data-theme="dark"] .cover-single{border:1px solid rgba(255,255,255,.09);
  box-shadow:0 18px 44px rgba(0,0,0,.45)}
[data-theme="dark"] .entry-foot{background:var(--bg-2);border-top-color:var(--line)}

/* ---------- sommaire + listes numerotees ---------- */
[data-theme="dark"] .toc{background:linear-gradient(180deg,#1b1e2e,#171a29);border-color:var(--line)}
[data-theme="dark"] .toc h2{color:var(--muted)}
[data-theme="dark"] .toc a{color:var(--ink)}
[data-theme="dark"] .toc a:hover{color:var(--violet3)}
[data-theme="dark"] .rll-list li{border-bottom-color:var(--line)}
[data-theme="dark"] .rll-list li b{color:var(--ink)}
[data-theme="dark"] .rll-list li span{color:var(--ink-2)}
[data-theme="dark"] .rll-list li:before{background:var(--accent-soft);color:var(--violet3)}
[data-theme="dark"] .rll-list li.rll-sep{color:var(--muted)}

/* ---------- formulaires (capture e-mail, commentaires) ---------- */
[data-theme="dark"] .capture{background:linear-gradient(135deg,rgba(123,108,246,.16),rgba(43,201,178,.10));
  border-color:rgba(123,108,246,.35);box-shadow:0 18px 40px rgba(0,0,0,.35)}
[data-theme="dark"] .capture h3{color:var(--ink)}
[data-theme="dark"] .capture p{color:var(--ink-2)}
[data-theme="dark"] .capture small{color:var(--muted)}
[data-theme="dark"] .capture small.ok{color:#57e0c4}
[data-theme="dark"] .capture input[type=email],
[data-theme="dark"] .c-field input,
[data-theme="dark"] .c-field textarea{background:var(--bg);border-color:var(--line);color:var(--ink)}
[data-theme="dark"] .capture input[type=email]::placeholder{color:var(--muted)}
[data-theme="dark"] .c-field label{color:var(--ink)}
[data-theme="dark"] .c-note{color:var(--muted)}
[data-theme="dark"] .comment-form-cookies-consent{color:var(--ink-2)}

/* ---------- encart "Il manque quelque chose ?" ---------- */
[data-theme="dark"] .ask{background:rgba(255,206,102,.09);border-color:rgba(255,206,102,.28)}
[data-theme="dark"] .ask p{color:var(--ink-2)}

/* ---------- commentaires ---------- */
[data-theme="dark"] .c-title{color:var(--ink)}
[data-theme="dark"] .comment-list .comment{background:var(--bg-2);border-color:var(--line)}
[data-theme="dark"] .comment-metadata,
[data-theme="dark"] .comment-metadata a{color:var(--muted)}
[data-theme="dark"] .comment-content{color:var(--ink)}
[data-theme="dark"] .reply a{color:var(--violet3)}
[data-theme="dark"] .comment-respond{background:var(--bg-2);border-color:var(--line)}

/* ---------- pagination ---------- */
[data-theme="dark"] .page-numbers{border-color:var(--line);color:var(--ink-2)}
[data-theme="dark"] .page-numbers.current{background:var(--accent);border-color:var(--accent);color:#fff}

/* ---------- pied de page (deja sombre) ---------- */
[data-theme="dark"] .site-foot{background:#0d1020;color:#aab0c7}
[data-theme="dark"] .site-foot h4{color:#fff}
[data-theme="dark"] .site-foot a{color:#d7dbeb}
[data-theme="dark"] .site-foot .legal{border-top-color:rgba(255,255,255,.12);color:#8b91a8}
