:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --off: #f5f4f0;
  --magenta: #fe28fe;
  --cyan: #02fefe;
  --muted-dark: #a9a9a9;
  --muted-light: #5c5c5c;
  --radius: 12px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; }
body.dark { background: var(--ink); color: #f2f2f2; }
body.light { background: var(--off); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }

/* ---------- En-tête / pied ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: var(--ink);
}
.brand img { display: block; width: 112px; height: auto; }
.topbar-link { color: #f2f2f2; font-size: 14px; font-weight: 500; text-decoration: none; opacity: .8; }
.topbar-link:hover { opacity: 1; text-decoration: underline; }
.footer { padding: 32px clamp(20px, 5vw, 56px); font-size: 13px; }
body.dark .footer { color: var(--muted-dark); border-top: 1px solid #222; }
body.light .footer { color: var(--muted-light); background: var(--ink); color: var(--muted-dark); }

/* ---------- Typo ---------- */
.kicker {
  margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan);
}
body.light .kicker { color: #b000b0; }
h1 {
  margin: 0 0 18px; font-weight: 900; font-style: italic; letter-spacing: -.01em;
  font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04;
}
.glitch { text-shadow: 3px 0 0 var(--magenta), -3px 0 0 var(--cyan); }
h2 { font-weight: 800; font-style: italic; font-size: 22px; line-height: 1.2; margin: 0 0 8px; }
.subtitle { margin: 0 0 14px; font-size: clamp(18px, 2vw, 21px); color: #d8d8d8; max-width: 34ch; }
.format { margin: 0; font-size: 14px; color: var(--muted-dark); }
.muted { color: var(--muted-light); font-size: 15px; }
body.dark .muted { color: var(--muted-dark); }

/* ---------- Portail ---------- */
.portal {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
  grid-template-areas: "intro" "form" "details";
  max-width: 1120px; margin: 0 auto;
  padding: clamp(28px, 6vw, 80px) clamp(20px, 5vw, 56px) 64px;
}
.portal-intro { grid-area: intro; }
.portal-form { grid-area: form; }
.portal-details { grid-area: details; }
@media (min-width: 900px) {
  .portal {
    grid-template-columns: 1.1fr .9fr; column-gap: 64px; row-gap: 40px;
    grid-template-areas: "intro form" "details form";
    align-items: start;
  }
  .portal-form { position: sticky; top: 24px; }
}

.checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; color: #e6e6e6; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 4px;
  background: var(--magenta); box-shadow: -3px 0 0 var(--cyan);
}
.portal-details h2 { font-size: 18px; text-transform: uppercase; letter-spacing: .06em; font-style: normal; color: var(--muted-dark); }

/* ---------- Carte formulaire ---------- */
.card {
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: 8px 8px 0 var(--magenta), -4px -4px 0 var(--cyan);
}
.card-sub { margin: 0 0 20px; color: var(--muted-light); font-size: 15px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 340px) { .row { grid-template-columns: 1fr; } }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 2px solid var(--ink); border-radius: 10px; background: #fff;
}
.field input:focus-visible { outline: 3px solid var(--magenta); outline-offset: 1px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 16px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #ffe8ff; border: 1px solid #c000c0; color: #6b006b; font-size: 14px; }
.notice { margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; background: #e6ffff; border: 1px solid #00a3a3; font-size: 14px; }
.legal { margin: 14px 0 0; font-size: 12px; color: var(--muted-light); }

.btn {
  display: inline-block; width: 100%; cursor: pointer; text-align: center; text-decoration: none;
  font: inherit; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .04em; font-size: 17px;
  color: #fff; background: var(--ink); border: 2px solid var(--ink); border-radius: 10px; padding: 15px 20px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--magenta); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.btn-invert { width: auto; background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Merci / 404 ---------- */
.thanks { padding: clamp(40px, 10vw, 120px) 20px; display: flex; justify-content: center; }
.card-center { max-width: 560px; width: 100%; }
.card-center h1 { font-size: clamp(30px, 4.5vw, 44px); }
.card-center .kicker { color: #b000b0; }

/* ---------- Accueil ---------- */
.home { max-width: 1120px; margin: 0 auto; padding: clamp(28px, 6vw, 80px) clamp(20px, 5vw, 56px) 64px; }
.res-list { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.res {
  display: block; height: 100%; text-decoration: none; color: var(--ink); background: #fff;
  border: 2px solid #fff; border-radius: var(--radius); padding: 22px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.res:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--magenta); }
.res .kicker { color: #b000b0; display: block; margin-bottom: 8px; }
.res-title { display: block; font-weight: 900; font-style: italic; font-size: 22px; line-height: 1.15; margin-bottom: 8px; }
.res-sub { display: block; color: var(--muted-light); font-size: 15px; }

/* ---------- Page de contenu ---------- */
.content { padding: clamp(28px, 6vw, 72px) 20px 0; }
.article { max-width: 720px; margin: 0 auto; }
.article h1 { font-size: clamp(32px, 5vw, 52px); }
.article .format { color: var(--muted-light); margin-bottom: 36px; }
.prose { font-size: 18px; line-height: 1.7; }
.prose .lead { font-size: 21px; line-height: 1.5; }
.prose h2 { font-size: 28px; margin: 48px 0 14px; }
.prose h3 { font-size: 21px; font-weight: 800; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose code { font-size: .88em; background: #e9e7e0; padding: 2px 6px; border-radius: 5px; }
.prose blockquote { margin: 28px 0; padding: 16px 20px; border-left: 5px solid var(--magenta); background: #fff; border-radius: 0 10px 10px 0; }
.prose img { border-radius: 10px; border: 2px solid var(--ink); }
.prose a { color: #8a008a; }
.cta-band {
  max-width: 720px; margin: 64px auto 0; padding: 28px; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--ink); color: #fff; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.cta-band p { margin: 0; font-weight: 800; font-style: italic; font-size: 20px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
