/*
 * IA PRONOS — page publique statique, feuille de style unique
 * ============================================================================
 * Aucune ressource externe. Aucun style ou script en ligne (CSP `style-src 'self'`,
 * `script-src 'self'`, sans `unsafe-inline`).
 * Recopiée puis élaguée depuis web/teaser/site/styles.css (gel Git
 * gel-teaser-commercial-2026-09-23), en exécution de l'ADR n°23. Composants supprimés dans
 * cette version : bascule de thème pilotée par JavaScript (remplacée par `prefers-color-scheme`
 * en CSS pur, ADR n°23 décision 4), lien d'en-tête « Accéder au formulaire », bouton de bascule,
 * en-tête « verre » au défilement (dépendait d'un écouteur de défilement en script), formulaire
 * d'inscription et son champ piège, pages de confirmation. Voir le rapport de `frontend` pour le
 * détail de chaque suppression.
 *
 * Jetons de couleur/typographie repris à l'identique de web/teaser/assets/tokens.css
 * (voir docs/07-identite.md). Toute évolution de valeur doit être répercutée là-bas.
 *
 * Palette de MARQUE (--color-accent, --gradient-brand) et palette de DONNÉES
 * (--color-confidence-*) restent deux systèmes séparés — ne jamais les confondre.
 * Aucun vert, aucun rouge/orange de marque. Le dégradé de marque ne porte jamais
 * de texte porteur de sens.
 */

/* ============================================================
   Polices auto-hébergées — deux familles, licence SIL OFL
   (fichiers et licences : fonts/space-grotesk/, fonts/ibm-plex-mono/)
   ============================================================ */
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk/space-grotesk-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk/space-grotesk-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk/space-grotesk-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   Jetons — thème clair par défaut, thème sombre par préférence système
   (`prefers-color-scheme`, ADR n°23 décision 4 : aucun JavaScript, aucune bascule
   manuelle). Le clair sert de repli pour un navigateur qui ne rapporte aucune
   préférence, cohérent avec favicon.svg (même convention : encre sombre par défaut,
   encre claire seulement sous `prefers-color-scheme: dark`).
   ============================================================ */
:root {
  color-scheme: light dark;

  --color-bg: #F5F6FB;
  --color-surface: #FFFFFF;
  --color-surface-alt: #ECEEFA;
  --color-border: #DBDEEF;
  --color-border-strong: #7D86AE;

  --color-text-primary: #12131C;
  --color-text-secondary: #454A5E;
  --color-text-muted: #5B6178;
  --color-text-on-accent: #FFFFFF;

  --color-accent: #4F5FF5;
  --color-accent-hover: #3B49D6;
  --color-accent-subtle: #E7E9FC;
  --color-focus-ring: #4F5FF5;

  --gradient-brand: linear-gradient(135deg, #4F5FF5 0%, #8B5CF6 100%);

  --color-danger: #C22E33;
  --color-danger-bg: #FBEAEA;

  --color-confidence-1: #E7ECF9;
  --color-confidence-2: #C3D0EE;
  --color-confidence-3: #93A9DD;
  --color-confidence-4: #5C78B8;
  --color-confidence-5: #2A4D8F;

  --shadow-glow-accent: 0 20px 60px -10px rgba(79, 95, 245, 0.35);
  --shadow-elevated: 0 8px 30px rgba(18, 19, 28, 0.08);
  --surface-glass-bg: rgba(255, 255, 255, 0.65);
  --surface-glass-border: rgba(255, 255, 255, 0.5);
  --surface-glass-blur: 20px;

  --font-family-base: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
  --font-family-mono: 'IBM Plex Mono', 'Consolas', 'SFMono-Regular', monospace;

  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --font-size-display: 4rem;
  --font-size-h1: 2.25rem;
  --font-size-h2: 1.5rem;
  --font-size-body-lg: 1.125rem;
  --font-size-body: 1rem;
  --font-size-small: 0.875rem;
  --font-size-mono-label: 0.8125rem;

  --line-height-tight: 1.08;
  --line-height-normal: 1.55;
  --line-height-mono: 1.4;

  --letter-spacing-mono-label: 0.08em;
  --letter-spacing-display: -0.01em;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 600ms;

  /* Rythme vertical — non présent dans tokens.css, ajouté ici pour la mise en page */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --content-max-width: 74rem;
  --content-narrow-width: 42rem;
}

/* Sombre — suit uniquement la préférence système, jamais un attribut posé par script. */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0B0D17;
    --color-surface: #141726;
    --color-surface-alt: #1B1E30;
    --color-border: #262B45;
    --color-border-strong: #60699C;

    --color-text-primary: #EEF0FB;
    --color-text-secondary: #C6CAE0;
    --color-text-muted: #9AA0BE;
    --color-text-on-accent: #0B0D17;

    --color-accent: #8FA0FF;
    --color-accent-hover: #A8B6FF;
    --color-accent-subtle: #1E2242;
    --color-focus-ring: #8FA0FF;

    --gradient-brand: linear-gradient(135deg, #6C7BFF 0%, #B18CFF 100%);

    --color-danger: #F2777C;
    --color-danger-bg: #3A1620;

    --color-confidence-1: #1B2438;
    --color-confidence-2: #253863;
    --color-confidence-3: #37508F;
    --color-confidence-4: #5473C4;
    --color-confidence-5: #6E8FDE;

    --shadow-glow-accent: 0 30px 90px -10px rgba(140, 150, 255, 0.45);
    --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.55);
    --surface-glass-bg: rgba(20, 23, 38, 0.55);
    --surface-glass-border: rgba(255, 255, 255, 0.08);
  }
}

/* ============================================================
   Réinitialisation minimale
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
}
img { max-width: 100%; display: block; }
a { color: var(--color-accent-hover); }
a:hover { color: var(--color-accent); }
h1, h2, h3 { font-family: var(--font-family-base); font-weight: var(--font-weight-bold); line-height: var(--line-height-tight); margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

/* ============================================================
   Accessibilité — focus, lien d'évitement
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--color-surface);
  color: var(--color-text-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: 8px;
  border: 1px solid var(--color-border-strong);
  z-index: 100;
  transition: top var(--duration-fast) var(--ease-out);
}
.skip-link:focus {
  top: var(--space-4);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Structure générale
   ============================================================ */
.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container-narrow {
  max-width: var(--content-narrow-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
section {
  padding: var(--space-16) 0;
}

/* ============================================================
   En-tête — non collant : le seul motif de son ancienne position sticky
   (assombrissement au défilement) dépendait d'un écouteur de défilement en
   script, retiré avec tout le reste du JavaScript (ADR n°23 décision 4).
   ============================================================ */
.site-header {
  padding: var(--space-6) 0;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.site-header__logo {
  /* Traitement recommandé 25/09/2026 (rapport logo-landing) : 32 -> 48px, +50%.
     Glyphe réduit (axe + point), jamais le glyphe plein à cette taille (voir
     comparaison/rendus). Mesuré confortable sur 320 px de large (v. rendu 390 px). */
  height: 48px;
  width: auto;
}
.site-header__logo--light { display: none; }
@media (prefers-color-scheme: light) {
  .site-header__logo--dark { display: none; }
  .site-header__logo--light { display: block; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: var(--space-16) 0 var(--space-24);
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-8);
}
/* Phrase factuelle hors du premier écran sur téléphone (avis `juriste` du 14/09/2026,
   web/maquettes/prototype/revue-2026-09-13/22-avis-juriste-phrase-factuelle-et-f2.md) :
   resserre le remplissage et l'écart du bloc héros sous 26,5 rem (424 px) seulement --
   aucun texte, aucune hauteur d'en-tête touchée. Complète, en CSS, le déplacement de
   `.fact-panel` juste après le `<h1>` déjà fait dans le balisage de index.html (piste A,
   web/maquettes/prototype/revue-2026-09-13/21-choix-en-tete-teaser-ux-ui.md §4). */
@media (max-width: 26.5rem) {
  .hero { padding-top: var(--space-8); }
  .hero__inner { gap: var(--space-4); }
}
.hero__heading {
  font-size: clamp(2.25rem, 5vw + 1rem, var(--font-size-display));
  letter-spacing: var(--letter-spacing-display);
  max-width: 18ch;
}
.hero__lead {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-secondary);
  max-width: 44ch;
}
.fact-panel {
  max-width: 44ch;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--surface-glass-bg);
  backdrop-filter: blur(var(--surface-glass-blur));
  -webkit-backdrop-filter: blur(var(--surface-glass-blur));
  font-size: var(--font-size-body-lg);
  color: var(--color-text-secondary);
}

/* Apparition unique au chargement (pas d'animation en boucle) */
.hero__heading, .hero__lead, .fact-panel {
  animation: hero-reveal var(--duration-slow) var(--ease-out) both;
}
.hero__heading { animation-delay: 80ms; }
.fact-panel { animation-delay: 140ms; }
.hero__lead { animation-delay: 200ms; }
@keyframes hero-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Section titres communs
   ============================================================ */
.section-title {
  font-size: var(--font-size-h1);
  margin-bottom: var(--space-8);
  text-align: center;
}

/* ============================================================
   Cartes — Axes de travail
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  list-style: none;
}
@media (min-width: 48rem) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-6);
}
.card__label,
.illustration-figure__label {
  font-family: var(--font-family-mono);
  font-weight: 500;
  font-size: var(--font-size-mono-label);
  letter-spacing: var(--letter-spacing-mono-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.card__text {
  font-size: var(--font-size-body-lg);
  color: var(--color-text-secondary);
}

/* ============================================================
   Courbe de calibration illustrative — section conservée (condition C2 de
   `juriste`, bloquante) : AUCUNE animation, transition ou `stroke-dashoffset`
   animé ne doit rapprocher la courbe de la diagonale, à aucun moment.
   ============================================================ */
.illustration-figure {
  margin: 0 auto;
  max-width: 22rem;
  text-align: center;
}
.illustration-figure__frame {
  aspect-ratio: 1 / 1;
  border: 1px dashed var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-surface);
  padding: var(--space-6);
}
.calibration-svg { width: 100%; height: 100%; }
.calibration-svg .axis { stroke: var(--color-border-strong); stroke-width: 2; }
.calibration-svg .diagonal { stroke: var(--color-text-muted); stroke-width: 2; stroke-dasharray: 6 6; }
/* Arbitrage juriste 12/09/2026 : courbe nettement écartée de la diagonale (modèle
   fictif volontairement surconfiant), teinte neutre (pas la couleur de marque),
   aucune lueur, AUCUNE ANIMATION — la courbe est statique dès le premier rendu,
   pour ne jamais donner l'impression qu'elle se rapproche de la diagonale. */
.calibration-svg .curve {
  fill: none;
  stroke: var(--color-text-muted);
  stroke-width: 3;
  stroke-linecap: round;
}
.illustration-figure__caption {
  margin-top: var(--space-3);
  font-family: var(--font-family-mono);
  font-weight: 500;
  font-size: var(--font-size-mono-label);
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

/* ============================================================
   Liste — Ce que ce travail n'est pas
   ============================================================ */
.limits-list {
  max-width: var(--content-narrow-width);
  margin: 0 auto;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.limits-list li {
  position: relative;
  padding-left: var(--space-6);
  font-size: var(--font-size-body-lg);
  color: var(--color-text-secondary);
}
.limits-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-text-muted);
}

/* ============================================================
   Pied de page
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-12) 0 var(--space-16);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
@media (min-width: 48rem) {
  .site-footer__grid { grid-template-columns: repeat(3, 1fr); }
}
.site-footer__links a {
  margin-right: var(--space-4);
}
.site-footer__legal a { color: inherit; }

/* ============================================================
   Pages légales — mise en page simple
   ============================================================ */
.legal-page main {
  max-width: var(--content-narrow-width);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-24);
  /* Repli posé sur le conteneur plutôt que sur `p, li` seuls : hérité par tout
     descendant présent ou futur (texte courant, liens, éléments en gras) --
     une règle posée seulement sur certains sélecteurs avait laissé passer un
     débordement mesuré par `qa-tests` le 13/09/2026 sur l'ancienne page de
     mentions légales du teaser. N'agit que sur une chaîne qui ne tient pas sur
     sa ligne : le texte courant continue de passer à la ligne à l'espace. */
  overflow-wrap: break-word;
}
.legal-page h1 { font-size: var(--font-size-h1); margin-bottom: var(--space-8); }
.legal-page h2 { font-size: var(--font-size-body-lg); margin-top: var(--space-12); margin-bottom: var(--space-3); }
.legal-page p, .legal-page li {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

/* ============================================================
   Mouvement réduit — annule toute animation d'apparition
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
