/* PERFIA — feuille de style unique.
   Jetons et règles conformes à la section 8 (design system) de la phase 3.
   Polices Sora et DM Sans auto-hébergées : voir /fonts, jamais Google Fonts. */

@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050A1A;
  --surface: #0A1330;
  --surface-2: #0F1B40;
  --text: #EAF1FF;
  --text-soft: #C9D6F2;
  --text-muted: #A7B7DA;
  --accent: #38C4FF;
  --accent-light: #7FD8FF;
  --accent-hover: #8FDCFF;
  --ink: #04101F;
  --line: rgba(140, 180, 255, 0.18);
  --control-border: rgba(140, 180, 255, 0.6);
  --error: #FF9A9A;
  --success: #6EE7A8;

  --font-heading: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --radius-card: 16px;
  --radius-control: 10px;
  --radius-button: 12px;
  --header-h: 76px;
}

/* Repli avant chargement des polices : polices système, jamais Google Fonts */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
svg { display: block; }

a { color: var(--accent); text-decoration: underline; }
a:hover { color: var(--accent-light); }
a.no-underline { text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--text);
}
h3 { font-weight: 600; line-height: 1.3; }

h1 { font-size: 34px; }
h2 { font-size: 30px; line-height: 1.15; }
h3 { font-size: 20px; }
@media (min-width: 900px) {
  h1 { font-size: 52px; }
  h2 { font-size: 44px; }
  h3 { font-size: 24px; }
  .hero h1 { font-size: 62px; }
}

p { margin: 0 0 1em; color: var(--text-soft); max-width: 68ch; }
.lede { font-size: 18px; line-height: 1.55; color: var(--text-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
@media (min-width: 900px) { .eyebrow { font-size: 13px; letter-spacing: 0.16em; } }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 900px) { .container { padding: 0 32px; } }

section { padding: 56px 0; }
@media (min-width: 900px) { section { padding: 96px 0; } }

/* Lien d'évitement */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--ink);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

/* Focus visible partout */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* En-tête */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 10, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { color: var(--text); }
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-desktop { display: none; }
@media (min-width: 980px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0; padding: 0;
  }
  .nav-desktop a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
  }
  .nav-desktop a[aria-current="page"] { color: var(--text); font-weight: 700; }
  .nav-desktop a:hover { color: var(--accent-light); }
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  color: var(--text);
  cursor: pointer;
}
@media (min-width: 980px) { .nav-toggle { display: none; } }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.nav-mobile.is-open { display: block; }
@media (min-width: 980px) { .nav-mobile { display: none !important; } }
.nav-mobile ul { list-style: none; margin: 0; padding: 12px 20px 24px; display: flex; flex-direction: column; gap: 4px; }
.nav-mobile a {
  display: block;
  padding: 12px 4px;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  min-height: 44px;
}
.nav-mobile a[aria-current="page"] { color: var(--accent-light); font-weight: 700; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-button);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink);
  height: 52px;
}
.btn-primary:hover { background: var(--accent-hover); color: var(--ink); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--control-border);
  height: 52px;
}
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-header { height: 44px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }

.link-arrow {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; color: var(--accent-light); }

/* Hero */
.hero { padding: 64px 0 56px; }
@media (min-width: 900px) { .hero { padding: 96px 0 80px; } }
.hero-signature { display: block; margin-bottom: 18px; }
.hero h1 { max-width: 18ch; }
.hero .lede { max-width: 52ch; margin-top: 18px; }
.hero .question { font-family: var(--font-heading); font-weight: 700; font-size: 20px; color: var(--text); margin: 28px 0 24px; max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 8px; }
.hero-mention { color: var(--text-muted); font-size: 14px; }
.hero-definition { color: var(--text-muted); font-size: 14px; margin-top: 28px; max-width: 56ch; }

.hero-examples { display: flex; flex-direction: column; gap: 16px; margin-top: 48px; }
@media (min-width: 640px) { .hero-examples { flex-direction: row; } }
.example-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  flex: 1;
}
.example-card .eyebrow { display: block; margin-bottom: 8px; }
.example-card p { margin: 0; color: var(--text-soft); font-size: 15px; }
.hero-examples-caption { color: var(--text-muted); font-size: 13px; margin-top: 10px; }

/* Cartes */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
@media (min-width: 640px) { .card-grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } .card-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .card-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px 24px 28px;
}
.card-bg { background: var(--bg); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-soft); font-size: 15px; margin-bottom: 16px; }
.card-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
}
.card-link::after { content: ""; }
.card-clickable { text-decoration: none; }
.card-clickable::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
}
.card-clickable:hover { border-color: var(--control-border); }
.card-clickable:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }

.card-solution .eyebrow { display: block; margin-bottom: 12px; }
.card-solution p { color: var(--text); font-weight: 600; margin-bottom: 10px; }
.card-solution .desc { color: var(--text-muted); font-weight: 400; font-size: 14px; }

.status-pill {
  display: inline-block;
  border: 1px dashed var(--text-muted);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  margin-top: 12px;
}

/* Bénéfices */
.benefits-grid { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 40px; }
@media (min-width: 900px) { .benefits-grid { grid-template-columns: repeat(4, 1fr); } }
.benefit { border-top: 2px solid var(--accent); padding-top: 16px; }
.benefit h3 { font-size: 17px; margin-bottom: 8px; }
.benefit p { font-size: 14px; margin: 0; }

/* Méthode / chaîne */
.method-row { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
@media (min-width: 900px) { .method-row { grid-template-columns: repeat(4, 1fr); } }
.method-step .step-number { font-family: var(--font-heading); color: var(--accent); font-weight: 700; font-size: 15px; display: block; margin-bottom: 10px; }

.chain { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.chain-word {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--accent-light);
  font-size: 14px;
}

/* Tableau des étapes */
.steps-table { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.step-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px;
}
.step-block h3 { color: var(--accent-light); }
.step-block .step-question { font-weight: 600; color: var(--text); margin-bottom: 10px; }

/* Formulaires */
.form-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  max-width: 640px;
}
@media (min-width: 640px) { .form-shell { padding: 36px; } }

.form-step-indicator {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.form-error-summary {
  display: none;
  background: rgba(255, 154, 154, 0.1);
  border: 1px solid var(--error);
  border-radius: var(--radius-control);
  padding: 16px 18px;
  margin-bottom: 24px;
  color: var(--error);
}
.form-error-summary.is-visible { display: block; }
.form-error-summary h2 { font-size: 16px; color: var(--error); margin-bottom: 8px; }
.form-error-summary ul { margin: 0; padding-left: 20px; }
.form-error-summary a { color: var(--error); }

.field { margin-bottom: 24px; }
.field label, .field legend {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  padding: 0;
}
fieldset.field { border: none; margin: 0 0 24px; padding: 0; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  background: var(--bg);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-control);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 12px 14px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field-hint { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.field-error { display: none; align-items: flex-start; gap: 6px; color: var(--error); font-size: 15px; margin-top: 8px; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border: 2px solid var(--error); }
.field.has-error .field-error { display: flex; }

.choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-pill { position: relative; }
.choice-pill input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.choice-pill label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  margin: 0;
}
.choice-pill input:checked + label {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
}
.choice-pill input:focus-visible + label { outline: 3px solid var(--accent-light); outline-offset: 2px; }

.consent-row { display: flex; align-items: flex-start; gap: 12px; }
.consent-row input[type="checkbox"] {
  width: 24px; height: 24px;
  flex-shrink: 0;
  accent-color: var(--accent);
  margin-top: 2px;
}
.consent-row label { font-weight: 400; font-size: 15px; color: var(--text-soft); margin: 0; }

.form-actions { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.form-note { color: var(--text-muted); font-size: 13px; margin-top: 20px; }

/* Pied de page */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  margin-top: 48px;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand .logo { margin-bottom: 12px; }
.footer-signature { font-style: normal; color: var(--text-muted); font-size: 14px; max-width: 32ch; }
.footer-col h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: 15px; }
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

/* Contenu légal / prose */
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.5em; font-size: 18px; }
.prose ul, .prose ol { color: var(--text-soft); max-width: 68ch; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.bracket { color: var(--accent-light); background: rgba(56,196,255,0.12); padding: 0 4px; border-radius: 4px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 22px; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 18px; margin: 0; }

/* Bandes et sections alternées */
.section-alt { background: var(--surface); }
.section-title-row { max-width: 62ch; }

/* Page 404 / confirmation */
.status-page { padding: 120px 0; text-align: left; }

/* Utilitaires */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
