/*
 * site.css — biz.michaelpardo.fr
 * Même charte que michaelpardo.fr (mode sombre par défaut + mode clair).
 * Aucun style en ligne dans les pages : tout est ici (CSP stricte).
 */

:root {
  --bg: #080c10; --surface: #0f1520; --card: #131d2b; --border: #1e3050;
  --accent: #00d4ff; --accent2: #ff6b35; --accent3: #7c3aed;
  --text: #e8f4f8; --muted: #BFC7D9;
  --glow: 0 0 20px rgba(0,212,255,0.3);
  --grid-line: rgba(0,212,255,0.03); --glow-tl: rgba(0,212,255,0.05); --glow-br: rgba(124,58,237,0.08);
  --ok: #4ade80; --err: #ff6b6b; --warn: #ffb347;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
}
[data-theme="light"] {
  --bg: #f0f4f8; --surface: #ffffff; --card: #ffffff; --border: #d0dce8;
  --accent: #0078a8; --accent2: #d4500a; --accent3: #5b21b6;
  --text: #0f1b2d; --muted: #5a6e84;
  --glow: 0 0 20px rgba(0,120,168,0.2);
  --grid-line: rgba(0,120,168,0.06); --glow-tl: rgba(0,120,168,0.08); --glow-br: rgba(91,33,182,0.07);
  --ok: #15803d; --err: #b91c1c; --warn: #b45309;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--mono); line-height: 1.7; min-height: 100vh; overflow-x: hidden;
  transition: background .3s, color .3s;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 800px 600px at 20% 20%, var(--glow-tl) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 80% 80%, var(--glow-br) 0%, transparent 60%);
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── En-tête / pied ── */
.site-header { position: relative; z-index: 10; padding: 2rem 1.5rem 1rem; text-align: center; border-bottom: 1px solid var(--border); }
.logo-wrap { display: inline-flex; align-items: center; gap: .75rem; margin-bottom: .5rem; text-decoration: none; }
.avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--accent); box-shadow: var(--glow); object-fit: cover; }
.logo-marque { width: 56px; height: 56px; object-fit: contain; }
.logo-textes { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.site-marque { color: var(--muted); font-size: .8rem; letter-spacing: .12em; margin-top: .15rem; }
.site-title {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.02em; line-height: 1.1;
  background: linear-gradient(135deg, var(--accent) 0%, var(--text) 50%, var(--accent3) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.tagline { color: var(--muted); font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; margin-top: .25rem; }
.tagline a { text-decoration: none; }
.theme-toggle {
  position: fixed; top: 1rem; right: 1rem; z-index: 200; width: 40px; height: 40px; line-height: 1; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.theme-toggle:hover { border-color: var(--accent); box-shadow: var(--glow); }
.site-footer { position: relative; z-index: 1; text-align: center; padding: 1.5rem; border-top: 1px solid var(--border); font-size: .68rem; color: var(--muted); letter-spacing: .05em; }
.site-footer a { text-decoration: none; }

/* ── Mise en page ── */
.page-wrap { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.page-wrap.narrow { max-width: 560px; }
.page-wrap.wide { max-width: 980px; }
.page-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.02em; line-height: 1.15; margin-bottom: .5rem; }
.page-title.small { font-size: clamp(1.4rem, 4vw, 1.9rem); margin-bottom: 1rem; }
.page-lead { color: var(--muted); margin-bottom: 2rem; }

/* ── Article ── */
.bloc { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem 1.5rem 1.25rem; margin-bottom: 1.25rem; }
.bloc h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1.2; }
.sous-titre { color: var(--accent); font-family: 'Syne', sans-serif; font-weight: 700; margin: .25rem 0 1rem; }
.bloc p, .bulle-corps p { margin-bottom: 1rem; }
.bloc h4, .bulle-corps h4 { font-family: 'Syne', sans-serif; margin: 1rem 0 .4rem; }
.bloc ul, .bulle-corps ul { margin: 0 0 1rem 1.25rem; }
/* Listes numérotées et listes des cadres : la remise à zéro générale (*) leur enlève le retrait, et les numéros sortaient du cadre */
.bloc ol, .bulle-corps ol { margin: 0 0 1rem 1.6rem; }
.form-box ol:not([class]), .form-box ul:not([class]) { margin: .5rem 0 .9rem 1.6rem; }
.form-box ol:not([class]) > li, .form-box ul:not([class]) > li { padding-left: .25rem; margin-bottom: .2rem; }
.bloc blockquote, .bulle-corps blockquote { margin: 0 0 1rem; padding: .4rem .9rem; border-left: 3px solid var(--accent); color: var(--muted); }
.bloc hr, .bulle-corps hr { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.terme { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); cursor: pointer; }
.terme:hover { border-bottom-style: solid; }
.illu { margin: 1rem 0; text-align: center; }
.illu img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); }
.illu-clair img { background: #ffffff; padding: .5rem; }     /* option {clair} : pour une image à fond transparent et texte sombre */
.illu-etroite img { max-width: 197px; }
.conclusion { font-family: 'Syne', sans-serif; font-size: 1.15rem; margin-top: 1rem; }

/* ── Bulles de définition (même esprit que les bulles de BCBA) ── */
.bulle {
  margin: auto; width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 640px); overflow: auto;
  padding: 1.25rem 1.4rem; color: var(--text); background: var(--card);
  border: 2px solid var(--accent); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.45);
}
.bulle::backdrop { background: rgba(4,8,14,.65); }
.bulle h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--accent); margin: 0 2rem .6rem 0; line-height: 1.25; }
.bulle-corps { font-size: .88rem; }
.bulle-corps h2, .bulle-corps .sous-titre { font-size: 1rem; }
.bulle-corps p:last-child { margin-bottom: 0; }
.bulle-fermer {
  position: sticky; float: right; top: 0; width: 30px; height: 30px; margin: -.3rem -.4rem 0 .5rem; cursor: pointer;
  font-size: .9rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
}
.bulle-fermer:hover { border-color: var(--accent); }

/* ── Menu, articles, listes ── */
.site-nav { margin-top: .75rem; font-size: .82rem; position: relative; z-index: 50; }
.site-nav > ul { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem .4rem; }
.site-nav a { text-decoration: none; }
.site-nav > ul > li > a, .menu-groupe > summary { display: inline-block; padding: .3rem .7rem; color: var(--accent); cursor: pointer; border-radius: 8px; }
.site-nav > ul > li > a:hover, .menu-groupe > summary:hover, .menu-groupe[open] > summary { background: var(--surface); }
.menu-groupe { position: relative; }
.menu-groupe > summary { list-style: none; }
.menu-groupe > summary::-webkit-details-marker { display: none; }
.menu-groupe > summary::after { content: ' ▾'; font-size: .7em; }
.menu-groupe ul {
  list-style: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 240px; padding: .4rem; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.menu-groupe ul a { display: block; padding: .4rem .6rem; border-radius: 6px; color: var(--text); }
.menu-groupe ul a:hover { background: var(--surface); color: var(--accent); }

/* ── Volet du menu (téléphone et tablette) : trois barres en haut à gauche, volet qui glisse depuis la gauche ──
   Case à cocher #menu-bascule pilotée par le CSS (aucun JavaScript nécessaire) ; theme.js ajoute Échap.
   Au-dessus de 960 px (le menu en ligne mesure environ 850 px), il reste en ligne sous le titre et ces éléments sont cachés. */
.menu-bascule, .menu-bouton, .menu-tete, .menu-pied, .menu-voile { display: none; }
.site-nav a[aria-current="page"] { background: var(--surface); }
@media (max-width: 960px) {
  .site-header { z-index: auto; }          /* sinon le volet resterait sous le bandeau d'information */
  .menu-bascule { display: block; position: fixed; top: 1rem; left: 1rem; z-index: 205; width: 40px; height: 40px; margin: 0; opacity: 0; pointer-events: none; }
  .menu-bouton {
    display: flex; align-items: center; justify-content: center; position: fixed; top: 1rem; left: 1rem; z-index: 205; width: 40px; height: 40px;
    color: var(--text); cursor: pointer; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.2); -webkit-tap-highlight-color: transparent;
  }
  .menu-bouton:hover { border-color: var(--accent); box-shadow: var(--glow); }
  .menu-bascule:focus-visible + .menu-bouton { outline: 2px solid var(--accent); outline-offset: 2px; }
  .menu-icone, .menu-icone::before, .menu-icone::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
  .menu-icone { position: relative; }
  .menu-icone::before, .menu-icone::after { content: ''; position: absolute; left: 0; }
  .menu-icone::before { top: -6px; }
  .menu-icone::after { top: 6px; }

  .site-nav {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 10002; width: min(84vw, 320px); margin: 0;
    display: flex; flex-direction: column; text-align: left; font-size: .95rem; overflow-y: auto; overscroll-behavior: contain;
    background: var(--card); border-right: 1px solid var(--border); box-shadow: 8px 0 40px rgba(0,0,0,.45);
    transform: translateX(-102%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s;
  }
  .menu-bascule:checked ~ .site-nav { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
  .menu-voile {
    display: block; position: fixed; inset: 0; z-index: 10001; cursor: pointer; background: rgba(4,8,12,.6);
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s;
  }
  .menu-bascule:checked ~ .menu-voile { opacity: 1; visibility: visible; transition: opacity .25s; }
  body:has(.menu-bascule:checked) { overflow: hidden; }

  .menu-tete { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1rem 1rem 1.25rem; border-bottom: 1px solid var(--border); }
  .menu-marque { display: flex; align-items: center; gap: .6rem; min-width: 0; text-decoration: none; color: var(--text); }
  .menu-marque img { width: 34px; height: 34px; object-fit: contain; flex: none; }
  .menu-marque span { display: flex; flex-direction: column; line-height: 1.15; }
  .menu-marque strong {
    font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--accent) 0%, var(--text) 50%, var(--accent3) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  .menu-marque small { color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
  .menu-fermer {
    display: flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; font-size: 1rem;
    color: var(--text); cursor: pointer; border: 1px solid var(--border); border-radius: 10px;
  }
  .menu-fermer:hover { color: var(--accent); border-color: var(--accent); }

  .site-nav > ul { display: block; flex: 1 0 auto; padding: .5rem 0; }
  .site-nav > ul > li > a, .site-nav .menu-groupe > summary {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.25rem;
    color: var(--text); font-size: .95rem; border-radius: 0;
  }
  .site-nav > ul > li > a::after { content: '›'; color: var(--muted); font-size: 1.25em; line-height: 1; }
  .site-nav > ul > li > a[target="_blank"]::after { content: '↗'; font-size: .95em; }
  .site-nav > ul > li > a:hover, .site-nav .menu-groupe > summary:hover { background: var(--surface); color: var(--accent); }
  .site-nav > ul > li > a[aria-current="page"] { color: var(--accent); background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
  .site-nav .menu-groupe ul { position: static; transform: none; min-width: 0; padding: 0 0 .4rem 1rem; background: transparent; border: none; box-shadow: none; }
  .site-nav .menu-compte { padding: .9rem 1.25rem .25rem; }
  .site-nav .menu-compte > a { justify-content: center; padding: .75rem 1rem; border-radius: 10px; font-weight: 700; color: #080c10; background: var(--accent); }
  [data-theme="light"] .site-nav .menu-compte > a { color: #fff; }
  .site-nav .menu-compte > a:hover { color: #080c10; background: var(--accent); opacity: .9; }
  [data-theme="light"] .site-nav .menu-compte > a:hover { color: #fff; }
  .site-nav .menu-compte > a::after, .site-nav .menu-compte > a[target="_blank"]::after { content: none; }
  .menu-pied { display: block; padding: 1rem 1.25rem 1.5rem; border-top: 1px solid var(--border); font-size: .75rem; line-height: 1.9; color: var(--muted); }
  .menu-pied a { text-decoration: none; }
}
/* Titre sur téléphone : logo et « Markethique » tiennent sur la largeur de l'écran */
@media (max-width: 520px) {
  .site-header { padding: 3rem 1rem .9rem; }
  .logo-wrap { gap: .55rem; max-width: 100%; }
  .logo-marque { width: 42px; height: 42px; }
  .site-title { font-size: min(1.9rem, calc((100vw - 90px) / 10.5)); }   /* « Markethique » en Syne fait environ 10 fois la taille de la police */
  .site-marque { font-size: .72rem; }
  .tagline { letter-spacing: .08em; }
}
.recents { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; padding: 1rem 1.25rem 1.5rem; font-size: .8rem; color: var(--muted); }
.recents h2 { font-family: 'Syne', sans-serif; font-size: 1rem; color: var(--text); margin-bottom: .5rem; }
.recents ul { list-style: none; }
.recents li { padding: .3rem 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.c-image img { display: block; max-width: 280px; max-height: 280px; margin-top: .5rem; border-radius: 8px; border: 1px solid var(--border); }
.art-head { margin-bottom: 1.25rem; }
.art-meta { color: var(--muted); font-size: .78rem; margin: .25rem 0; }
.etiquettes { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.etiquette { font-size: .7rem; text-decoration: none; padding: 1px 9px; border: 1px solid var(--border); border-radius: 100px; color: var(--muted); }
.etiquette:hover { border-color: var(--accent); color: var(--accent); }
.etiquette.theme { color: var(--accent); border-color: var(--accent); }
.couverture img { width: 100%; max-height: 340px; object-fit: cover; }
.post.centre .bloc { text-align: center; }
.post.centre .bloc ul, .post.centre .bloc ol { list-style-position: inside; margin-left: 0; }
.bloc figure:first-child { margin-top: 0; }
.bloc h3.sous-titre { font-weight: 700; font-size: 1rem; }
.bloc > h2:not(:first-child) { margin-top: 1.25rem; }
.ligne-bouton { margin: 1rem 0; }
.bouton {
  display: inline-block; padding: .55rem 1.1rem; font-weight: 700; font-size: .85rem; text-decoration: none;
  color: #080c10; background: var(--accent); border-radius: 10px;
}
[data-theme="light"] .bouton { color: #fff; }
.bouton:hover { opacity: .88; }
.bouton.secondaire, [data-theme="light"] .bouton.secondaire { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* ── Le fondateur (bloc de l'accueil et page /fondateur) ── */
.fondateur-bloc { display: flex; align-items: center; gap: 1rem; margin: 2rem 0 1rem; padding: 1rem 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.fondateur-bloc p { margin: 0; }
.fondateur-bloc p + p { margin-top: .25rem; font-size: .9rem; }
.fondateur-photo { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover; }
.fondateur-photo.grande { width: 120px; height: 120px; float: right; margin: 0 0 1rem 1.25rem; }
.fondateur-page::after { content: ''; display: block; clear: both; }
.fondateur-liens { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 520px) { .fondateur-photo.grande { float: none; display: block; margin: 0 auto 1rem; } }
.accordeon { border: 1px solid var(--border); border-radius: 10px; margin-bottom: .5rem; background: var(--surface); }
.accordeon summary { cursor: pointer; padding: .7rem 1rem; font-family: 'Syne', sans-serif; font-weight: 700; }
.accordeon[open] summary { border-bottom: 1px solid var(--border); }
.accordeon-corps { padding: .75rem 1rem; font-size: .9rem; }
.accordeon-corps ol, .accordeon-corps ul { margin: 0 0 .5rem 1.25rem; }
.accordeon-corps li { margin-bottom: .6rem; }
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.carte { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.carte:hover { border-color: var(--accent); }
.carte > a img { display: block; width: 100%; height: 150px; object-fit: cover; }
.carte-corps { padding: .9rem 1rem; display: flex; flex-direction: column; flex: 1; }
.carte h3 { font-family: 'Syne', sans-serif; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.carte h3 a { color: var(--text); text-decoration: none; }
.carte h3 a:hover { color: var(--accent); }
.carte-extrait { font-size: .8rem; color: var(--muted); margin: .4rem 0; flex: 1; overflow-wrap: anywhere; }
/* Plaques libres de l'accueil (onglet « 🏠 Accueil » de l'éditeur) */
.carte > img.carte-image { display: block; width: 100%; height: 150px; object-fit: cover; }
.carte-action { margin-top: .5rem; }
.bouton.petit { padding: .4rem .85rem; font-size: .78rem; }
/* Slogans sous le grand titre de l'accueil : une ligne par slogan */
.page-lead.slogan { margin-bottom: .35rem; }
.page-lead.slogan:last-child { margin-bottom: 2rem; }
.filtres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem .75rem; align-items: end;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; margin: 1rem 0; }
.filtres label { display: block; font-size: .72rem; margin-bottom: .2rem; color: var(--muted); }
.filtres input, .filtres select { width: 100%; padding: .5rem .6rem; font: inherit; font-size: .82rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.filtres-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; font-size: .8rem; }
.filtres-actions .btn-primary { margin-top: 0; padding: .5rem 1rem; font-size: .82rem; }
.nuage { margin: .5rem 0 1rem; font-size: .82rem; }
.nuage summary { cursor: pointer; color: var(--accent); }
.a-lire { margin-top: 2.5rem; }
.a-lire h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.4rem; margin-bottom: 1rem; }
.art-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; font-size: .82rem; }
.art-nav a { text-decoration: none; overflow-wrap: anywhere; }
.art-nav a[rel=next] { text-align: right; margin-left: auto; }
.empty { color: var(--muted); padding: 1.5rem 0; }
.avertissement { z-index: 10000; }
.avert-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; align-items: center; }
.avert-actions .btn-primary { margin-top: 0; }
.btn-small {
  display: inline-block; padding: .35rem .8rem; font: inherit; font-size: .78rem; cursor: pointer; text-decoration: none;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.btn-small:hover { border-color: var(--accent); }

/* ── Réactions et étoiles ── */
.avis { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.25rem; margin: 1.25rem 0; }
.note { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .75rem; font-size: .85rem; }
.etoiles { display: inline-flex; }
.etoiles button { background: none; border: none; cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 0 .1rem; color: var(--border); }
.etoiles button.actif, .etoiles:hover button { color: #f5b301; }
.etoiles button:hover ~ button { color: var(--border); }
.note-moyenne { color: var(--muted); }
.reagir { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.emo { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; font: inherit; font-size: 1.05rem; line-height: 1; padding: .3rem .5rem;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 100px; transition: transform .1s; }
.emo span { font-size: .72rem; color: var(--muted); }
.emo:hover { border-color: var(--accent); transform: scale(1.12); }
.emo.actif { border-color: var(--accent); box-shadow: var(--glow); }
.reagir-comment { margin-top: .5rem; }
.reagir-comment .emo { font-size: .85rem; padding: .15rem .4rem; }
.reagir-msg { font-size: .75rem; color: var(--accent); }

/* ── Commentaires ── */
.comments { margin-top: 2.5rem; }
.comments-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.comments h2, .form-box h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.4rem; }
.tri { font-size: .8rem; color: var(--muted); }
.tri a { margin-left: .75rem; text-decoration: none; padding-bottom: 2px; }
.tri a.actif { border-bottom: 2px solid var(--accent); color: var(--text); }
.comment { display: flex; gap: .75rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; margin-bottom: .75rem; }
.comment.depth-1 { margin-left: 1.5rem; }
.comment.depth-2 { margin-left: 3rem; }
.comment.depth-3 { margin-left: 4.25rem; }
.comment.is-author { border-color: var(--accent); }
.comment.is-pinned { border-color: var(--accent3); }
.c-avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; color: #fff; user-select: none;
}
.av-0 { background: #0e7490; } .av-1 { background: #7c3aed; } .av-2 { background: #be185d; } .av-3 { background: #b45309; }
.av-4 { background: #15803d; } .av-5 { background: #1d4ed8; } .av-6 { background: #a21caf; } .av-7 { background: #b91c1c; }
.c-main { flex: 1; min-width: 0; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.c-name { font-family: 'Syne', sans-serif; font-weight: 700; }
.c-date { color: var(--muted); font-size: .72rem; }
.c-body { overflow-wrap: anywhere; font-size: .92rem; }
.c-actions { margin-top: .5rem; font-size: .75rem; }
.c-actions a { text-decoration: none; }
.badge { display: inline-block; font-size: .65rem; padding: 1px 8px; border-radius: 100px; border: 1px solid var(--border); color: var(--muted); }
.badge-author { color: var(--accent); border-color: var(--accent); }
.badge-pin { color: var(--accent3); border-color: var(--accent3); }
.pagination { display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap; margin: 1.25rem 0; font-size: .85rem; }
.pagination a { text-decoration: none; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 8px; }
.pagination a.actif { border-color: var(--accent); color: var(--text); }

/* ── Formulaires ── */
.form-box { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; margin-top: 1.5rem; }
.form-box p { margin-top: .6rem; }
.form-note { color: var(--muted); font-size: .78rem; margin: .5rem 0 1rem; }
.form label { display: block; margin: 1rem 0 .3rem; font-size: .82rem; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=search], .form textarea {
  width: 100%; padding: .65rem .8rem; font: inherit; font-size: .92rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.form textarea { resize: vertical; min-height: 7rem; }
.form input:focus, .form textarea:focus { border-color: var(--accent); outline: none; box-shadow: var(--glow); }
.req { color: var(--accent2); } .opt { color: var(--muted); font-size: .75rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reply-quote { margin: .75rem 0 .25rem; padding: .5rem .9rem; border-left: 3px solid var(--accent); color: var(--muted); font-size: .85rem; }
.btn-primary {
  display: inline-block; margin-top: 1.2rem; padding: .7rem 1.4rem; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none;
  color: #080c10; background: var(--accent); border: none; border-radius: 10px;
}
[data-theme="light"] .btn-primary { color: #fff; }
.btn-primary:hover { opacity: .88; }
.notice { padding: .8rem 1rem; border-radius: 10px; margin: .75rem 0; border: 1px solid var(--border); font-size: .88rem; }
.notice ul { margin-left: 1.1rem; }
.notice-ok { border-color: var(--ok); color: var(--ok); }
.notice-err { border-color: var(--err); color: var(--err); }
.notice-warn { border-color: var(--warn); color: var(--warn); }

@media (max-width: 600px) {
  .menu-groupe ul { position: fixed; top: auto; left: 12px; right: 12px; transform: none; min-width: 0; }
  .page-wrap { padding: 1.25rem 1rem 2.5rem; }
  .bloc { padding: 1.1rem; }
  .comment { padding: .8rem; gap: .6rem; }
  .comment.depth-1 { margin-left: .75rem; } .comment.depth-2 { margin-left: 1.5rem; } .comment.depth-3 { margin-left: 2.25rem; }
  .c-avatar { flex-basis: 34px; width: 34px; height: 34px; }
  .theme-toggle { top: .6rem; right: .6rem; width: 40px; height: 40px; font-size: 1rem; }
  .menu-bascule, .menu-bouton { top: .6rem; left: .6rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ── Académie ── */
progress { display: block; width: 100%; height: 10px; margin: .2rem 0 .8rem; accent-color: var(--accent); }
.sous-section { font-family: 'Syne', sans-serif; font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
.form select { width: 100%; padding: .6rem; font: inherit; font-size: .9rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.form label.case { display: flex; gap: .5rem; align-items: center; }

/* Articles fermés dans les listes : titre, image et cadenas, jamais le contenu */
.carte.fermee .carte-extrait { color: var(--muted); font-style: italic; }
