/* =============================================================================
   ParrainÉclair — système de design (France).
   Archétype : UTILITAIRE HAUT-CONTRASTE / NÉO-BRUTALISTE, SOMBRE PAR DÉFAUT.
   Bords durs (radius 0), bordures épaisses, ombres décalées, grille visible.
   Titres/labels en MONOSPACE ; corps en sans neutre. Aubergine + vert lime.
   Sombre par défaut ; variante claire via prefers-color-scheme. Polices système
   = zéro fetch, zéro CLS.
   ============================================================================= */

:root {
  color-scheme: dark light;

  /* — surfaces (sombre par défaut) — */
  --bg: #0b0910;
  --bg-2: #120e1a;
  --surface: #171122;
  --surface-2: #1e1630;

  /* — texte — */
  --ink: #f6f1fc;       /* titres */
  --text: #e3d9f0;      /* corps */
  --text-2: #a394ba;    /* atténué */

  /* — traits & bordures (brutalisme = bordures visibles) — */
  --border: #4a3a68;
  --border-hard: #7b64a6;

  /* — accents : aubergine/prune + lime électrique — */
  --plum: #a855f7;
  --plum-2: #7c3aed;
  --plum-deep: #4c1d95;
  --lime: #c9f13a;
  --lime-ink: #16210a;

  /* — états — */
  --good: #45d17f;
  --warn: #f4b13c;
  --bad: #ff6f8d;

  /* — ombre décalée dure (signature) — */
  --sh-col: #000000;
  --hard: 5px 5px 0 var(--plum-2);
  --hard-hover: 8px 8px 0 var(--plum-2);
  --hard-lime: 5px 5px 0 var(--lime);
  --hard-ink: 5px 5px 0 var(--sh-col);

  --shell: 1160px;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo,
          Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f0f9;
    --bg-2: #e8e2f4;
    --surface: #ffffff;
    --surface-2: #f3eefb;
    --ink: #150e21;
    --text: #241a34;
    --text-2: #5c4f70;
    --border: #150e21;
    --border-hard: #150e21;
    --plum: #6d28d9;
    --plum-2: #6d28d9;
    --plum-deep: #4c1d95;
    --lime: #a6e00a;
    --lime-ink: #1c2a04;
    --good: #148a4e;
    --warn: #a05a00;
    --bad: #c62a4a;
    --sh-col: #150e21;
    --hard: 5px 5px 0 var(--sh-col);
    --hard-hover: 8px 8px 0 var(--sh-col);
    --hard-lime: 5px 5px 0 var(--sh-col);
    --hard-ink: 5px 5px 0 var(--sh-col);
  }
}

/* ── base ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--text); background: var(--bg);
  line-height: 1.62; font-size: 1.02rem; -webkit-font-smoothing: antialiased;
  /* grille technique discrète en fond */
  background-image:
    linear-gradient(color-mix(in srgb, var(--border) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--border) 22%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  background-position: -1px -1px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
img, svg { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--plum); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--lime); }

h1, h2, h3, h4 {
  font-family: var(--mono); color: var(--ink); line-height: 1.08; margin: 0 0 .5em;
  letter-spacing: -.01em; font-weight: 700;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
strong { color: var(--ink); font-weight: 700; }
.lead { font-size: 1.16rem; color: var(--text); max-width: 66ch; }
.muted { color: var(--text-2); }
.small { font-size: .9rem; } .xsmall { font-size: .8rem; }
code { font-family: var(--mono); }

.shell { width: min(100% - 2rem, var(--shell)); margin-inline: auto; }
.band { padding: clamp(2.4rem, 6vw, 4.4rem) 0; border-bottom: 2px solid var(--border); }
.band.tint { background: var(--bg-2); }
.band > .shell > h2 { margin-bottom: .35em; }
.band.narrow > .shell { max-width: 800px; }
.band.narrow .prose { max-width: none; }
main { display: block; }

.skip-link {
  position: absolute; left: -999px; top: .5rem; z-index: 100;
  background: var(--lime); color: var(--lime-ink); padding: .6rem 1rem;
  border: 2px solid var(--border-hard); font-family: var(--mono); font-weight: 700;
}
.skip-link:focus { left: .5rem; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* ── en-tête ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 2px solid var(--border-hard);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700;
  color: var(--ink); text-decoration: none; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .02em; }
.brand:hover { color: var(--ink); }
.brand .logo { flex: none; }
.brand-name { font-size: 1.06rem; }
.brand-name b { color: var(--lime); font-weight: 700; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.site-nav a { color: var(--text-2); text-decoration: none; padding: .5rem .7rem;
  font-family: var(--mono); font-weight: 600; font-size: .84rem;
  text-transform: uppercase; letter-spacing: .03em; }
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--lime); box-shadow: inset 0 -3px 0 var(--lime); }
.nav-toggle { display: none; }

/* ── boutons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: var(--mono); font-weight: 700; cursor: pointer; text-decoration: none;
  padding: .72rem 1.2rem; border: 2px solid var(--border-hard); border-radius: 0;
  text-transform: uppercase; letter-spacing: .03em; font-size: .92rem;
  transition: transform .1s ease, box-shadow .1s ease;
  color: var(--ink); background: var(--surface);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--hard); color: var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn-solid { background: var(--lime); color: var(--lime-ink); border-color: var(--border-hard); box-shadow: var(--hard); }
.btn-solid:hover { color: var(--lime-ink); box-shadow: var(--hard-hover); }
.btn-line { background: transparent; color: var(--ink); }
.btn-mini { padding: .5rem .9rem; background: var(--plum-2); color: #fff; border-color: var(--border-hard); font-size: .8rem; }
.btn-mini:hover { color: #fff; }
.btn-full { display: flex; width: 100%; margin-top: .9rem; }

/* ── masthead (première vue) ──────────────────────────────────────────────── */
.masthead { position: relative; overflow: clip; border-bottom: 2px solid var(--border-hard);
  background:
    radial-gradient(720px 360px at 90% -20%, color-mix(in srgb, var(--plum-2) 30%, transparent), transparent 60%),
    radial-gradient(620px 360px at -8% 0%, color-mix(in srgb, var(--plum-deep) 34%, transparent), transparent 58%); }
.masthead-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center; padding: clamp(2.2rem, 6vw, 4.4rem) 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono);
  font-weight: 700; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--lime-ink); background: var(--lime); padding: .4rem .8rem;
  border: 2px solid var(--border-hard); }
.masthead h1 .hl { color: var(--lime); }
.masthead h1 .mark { background: var(--plum-2); color: #fff; padding: 0 .12em; box-decoration-break: clone; }
.masthead-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ── sélecteur de modèle (accueil : archétype CATALOGUE) ──────────────────── */
.chooser { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin: 1.6rem 0 1rem; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem;
  padding: 1.5rem; min-height: 214px; }
.pick .pick-name { font-family: var(--mono); font-size: clamp(1.5rem, 4vw, 1.9rem); line-height: 1;
  color: var(--ink); font-weight: 700; margin: .1rem 0 0; letter-spacing: -.01em; }
.pick .pick-benefit { color: var(--ink); font-weight: 700; margin: 0; }
.pick .pick-note { color: var(--text-2); font-size: .9rem; margin: 0; }
.pick .pick-go { margin-top: auto; padding-top: .6rem; font-family: var(--mono); font-weight: 700;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--lime); }
.pick-rest { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin: 0 0 .4rem; }
.pick-rest .block { padding: 1.05rem 1.2rem; }
.pick-rest .block h3 { margin: .35rem 0 .3rem; font-size: 1.05rem; }
@media (max-width: 640px) {
  .chooser, .pick-rest { grid-template-columns: 1fr; }
}

/* ── liste de specs (pills) ───────────────────────────────────────────────── */
.speclist { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.2rem 0; }
.spec { background: var(--surface); border: 2px solid var(--border); padding: .42rem .8rem;
  font-family: var(--mono); font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em; color: var(--text); }
.spec-hot { background: var(--lime); color: var(--lime-ink); border-color: var(--border-hard); }

/* ── bloc terminal (unité code/copie) ─────────────────────────────────────── */
.terminal { background: var(--surface); border: 2px solid var(--border-hard);
  box-shadow: var(--hard-lime); }
.terminal-bar { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem;
  background: var(--surface-2); border-bottom: 2px solid var(--border-hard); }
.terminal-dots { display: inline-flex; gap: .38rem; }
.terminal-dots i { width: 11px; height: 11px; border: 2px solid var(--border-hard); display: block; }
.terminal-dots i:nth-child(1) { background: var(--bad); }
.terminal-dots i:nth-child(2) { background: var(--warn); }
.terminal-dots i:nth-child(3) { background: var(--good); }
.terminal-title { font-family: var(--mono); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-2); }
.terminal-body { padding: 1.2rem; }
.term-verify { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--mono);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--good);
  font-weight: 700; margin: 0 0 .7rem; }
.term-verify i { width: 8px; height: 8px; background: var(--good); display: inline-block;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 30%, transparent); }
.term-label { font-family: var(--mono); font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: .03em; font-size: .82rem; margin: 0 0 .6rem; }
.term-line { display: flex; align-items: center; gap: .5rem; background: var(--bg);
  border: 2px solid var(--border); padding: .6rem .75rem; min-height: 3rem;
  font-family: var(--mono); overflow-x: auto; }
.term-prompt { color: var(--lime); font-weight: 700; flex: none; }
.term-host { color: var(--text-2); white-space: nowrap; }
.term-code { color: var(--ink); font-weight: 700; white-space: nowrap; letter-spacing: .02em; }
.term-copy { margin-left: auto; flex: none; font-family: var(--mono); font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; font-size: .78rem; cursor: pointer;
  padding: .42rem .8rem; border: 2px solid var(--border-hard); background: var(--plum-2); color: #fff; }
.term-copy:hover { background: var(--plum); }
.term-copy.copied { background: var(--good); color: #06210f; }
.term-sub { margin: .8rem 0 0; }
.term-note { margin: .7rem 0 0; }

/* ── grilles & blocs ──────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.block { background: var(--surface); border: 2px solid var(--border); padding: 1.3rem; }
.block h3 { margin-top: 0; }
a.block { text-decoration: none; color: inherit; display: block;
  transition: transform .1s, box-shadow .1s; }
a.block:hover { transform: translate(-3px, -3px); box-shadow: var(--hard); border-color: var(--border-hard); }
.block .tag, .tag { font-family: var(--mono); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; display: inline-block; margin-bottom: .4rem;
  padding: .12rem .45rem; border: 2px solid currentColor; }
.tag.ok { color: var(--good); } .tag.no { color: var(--bad); } .tag.warn { color: var(--warn); }
.sig { font-family: var(--mono); font-size: .76rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; margin: 0 0 .6rem; color: var(--plum); }
.step-num { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem;
  background: var(--plum-2); color: #fff; font-weight: 700; margin-bottom: .5rem; font-family: var(--mono); }

/* ── icône glyph (feature) ────────────────────────────────────────────────── */
.glyph { width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.35rem;
  background: var(--surface-2); border: 2px solid var(--border); margin-bottom: .7rem; }
.glyph.lime { background: var(--lime); border-color: var(--border-hard); }
.glyph.grad { background: var(--plum-2); border-color: var(--border-hard); }

/* ── tableaux ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 2px solid var(--border-hard); }
table { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--surface); }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 2px solid var(--border); font-size: .95rem; }
thead th { background: var(--surface-2); font-family: var(--mono); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
tbody tr:last-child td { border-bottom: 0; }
.yes { color: var(--good); font-weight: 700; } .noo { color: var(--bad); font-weight: 700; }
.maybe { color: var(--warn); font-weight: 700; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: .6rem; max-width: 840px; }
.faq-item { background: var(--surface); border: 2px solid var(--border); }
.faq-item summary { cursor: pointer; list-style: none; padding: 1rem 1.15rem; font-weight: 700;
  color: var(--ink); font-family: var(--mono); font-size: .98rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "[+]"; font-family: var(--mono); color: var(--lime); flex: none; }
.faq-item[open] summary::after { content: "[-]"; }
.faq-item[open] summary { border-bottom: 2px solid var(--border); }
.faq-a { padding: 1rem 1.15rem; color: var(--text-2); }
.faq-a :is(p):last-child { margin-bottom: 0; }

/* ── encarts ──────────────────────────────────────────────────────────────── */
.note { border-left: 5px solid var(--plum); background: var(--surface-2);
  border-top: 2px solid var(--border); border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border); padding: 1rem 1.15rem; margin: 1.2rem 0; }
.note.warn { border-left-color: var(--warn); }
.note.good { border-left-color: var(--good); }
.note strong { color: var(--ink); }

/* ── fil d'Ariane ─────────────────────────────────────────────────────────── */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0;
  margin: 0 0 1.2rem; font-family: var(--mono); font-size: .82rem; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .03em; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--border-hard); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--lime); }

/* ── prose ────────────────────────────────────────────────────────────────── */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.2rem; } .prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.25rem; } .prose li { margin: .35rem 0; }
.prose table { margin: 1rem 0; }

/* ── image d'article (news) ──────────────────────────────────────────────── */
.post-img { margin: 1.4rem 0; border: 2px solid var(--border-hard); background: var(--surface-2); }
.post-img img { display: block; width: 100%; height: auto; }
.post-img figcaption { padding: .55rem .8rem; font-size: .78rem; color: var(--text-2); font-family: var(--mono); }
.post-img figcaption a { color: var(--text-2); }
.byline { display: flex; align-items: center; gap: .7rem; margin: 0 0 1.4rem; color: var(--text-2);
  font-family: var(--mono); font-size: .84rem; }
.byline .avatar { width: 42px; height: 42px; background: var(--plum-2); color: #fff;
  border: 2px solid var(--border-hard); display: grid; place-items: center; font-weight: 700; flex: none; }

/* ── liste d'articles ─────────────────────────────────────────────────────── */
.post-list { display: grid; gap: 1rem; }
.post-meta { font-family: var(--mono); font-size: .78rem; color: var(--text-2); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; }
.post-tag { display: inline-block; background: var(--plum-2); color: #fff; font-family: var(--mono);
  font-weight: 700; font-size: .72rem; padding: .18rem .5rem; border: 2px solid var(--border-hard);
  text-transform: uppercase; letter-spacing: .04em; }

/* ── formulaire ───────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 1rem; }
.field label { font-family: var(--mono); font-weight: 700; color: var(--ink); display: block;
  margin-bottom: .3rem; text-transform: uppercase; font-size: .82rem; letter-spacing: .03em; }
.field input, .field textarea { width: 100%; padding: .7rem .8rem; border: 2px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; border-radius: 0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lime); }

/* ── utilitaires ──────────────────────────────────────────────────────────── */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-1 { margin-top: 1rem; }
.stack > * + * { margin-top: 1rem; }

/* ── ligne de confiance ───────────────────────────────────────────────────── */
.trust-line { display: flex; flex-wrap: wrap; gap: .35rem 1.3rem; margin: 1.4rem 0 0;
  padding: 0; list-style: none; color: var(--text-2); font-family: var(--mono);
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.trust-line li { display: inline-flex; align-items: center; gap: .4rem; }
.trust-line svg { flex: none; }

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 760px) {
  .masthead-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; margin-left: auto;
    background: var(--surface); border: 2px solid var(--border-hard); padding: 9px 8px; cursor: pointer; }
  .nav-toggle span { width: 20px; height: 2px; background: var(--ink); transition: .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 2px solid var(--border-hard); padding: .75rem 1rem 1.25rem;
    gap: .25rem; transform: translateY(-135%); transition: transform .2s ease; }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: .8rem .5rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--lime); }
  .site-nav .btn-mini { margin-top: .4rem; }
}
@media (max-width: 480px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; }
}

/* ── footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--bg-2); border-top: 2px solid var(--border-hard); margin-top: 0; padding-top: 2.6rem; }
.footer-brand .brand { margin-bottom: .6rem; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 1.6rem; }
.footer-grid nav { display: flex; flex-direction: column; gap: .35rem; }
.footer-grid nav a { color: var(--text-2); text-decoration: none; font-size: .9rem; }
.footer-grid nav a:hover { color: var(--lime); }
.foot-h { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink); margin: 0 0 .3rem; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  border-top: 2px solid var(--border); margin-top: 2.2rem; padding: 1.2rem 0; }
