/* Site public d'AVE. Direction (2026-10-24) : « souverain, précis, humain ».
   Couleur, stratégie « engagée » : le bleu nuit de la marque porte l'ouverture, l'intégration et l'appel final ; les
   sections de lecture sont claires, d'un blanc teinté vers le bleu de la marque (pas crème). Le dégradé magenta → cyan
   n'existe QUE dans le symbole de la marque et dans un filet. L'ambre dit « expérimental ».
   Typographie : deux familles DESSINÉES POUR LA LISIBILITÉ, parce que les clients finaux d'AVE ne lisent pas tous
   couramment : Lexend (titres, issue de recherches sur la fluidité de lecture ; arrondie comme le mot AVE) et Atkinson
   Hyperlegible (texte). Sora, essayée d'abord, a été écartée : trop répandue, sans raison propre à AVE.
   Les deux en licence OFL, servies par le site (aucune police chargée chez un tiers). */

@font-face { font-family: "Lexend"; src: url("/assets/fonts/lexend-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("/assets/fonts/lexend-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --nuit: #010A29;
  --nuit-2: oklch(0.24 0.07 268);          /* surfaces sur nuit */
  --nuit-ligne: oklch(0.34 0.06 268);
  --sur-nuit: oklch(0.97 0.01 268);         /* texte sur nuit */
  --sur-nuit-2: oklch(0.84 0.035 268);      /* texte secondaire sur nuit (contraste ≥ 7:1) */
  --clair: oklch(0.975 0.006 265);          /* fond de lecture */
  --blanc: #FFFFFF;
  --encre: oklch(0.21 0.045 268);
  --encre-2: oklch(0.42 0.04 268);          /* ≥ 7:1 sur --clair */
  --ligne: oklch(0.89 0.015 268);
  --bleu: oklch(0.47 0.2 268);              /* liens, boutons sur clair */
  --ambre: #FFB020;
  --ambre-texte: oklch(0.38 0.09 70);
  --vert: oklch(0.52 0.12 160);
  /* avoid-ai-design-ignore: C1 — le dégradé EST la marque (DOSSIER AVE, LISEZ-MOI), réservé au symbole et aux filets. */
  --spectre: linear-gradient(90deg, #E11DF5 0%, #7C3AED 35%, #3B5BFF 55%, #14B4FF 80%, #00E5FF 100%);
  --titre: "Lexend", "Segoe UI", system-ui, sans-serif;
  --texte: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --code: "Cascadia Mono", "SF Mono", ui-monospace, Consolas, monospace;
  --marge: clamp(1rem, 4vw, 3.5rem);
  --large: 76rem;
  --z-entete: 10;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 1.0625rem/1.6 var(--texte); color: var(--encre); background: var(--clair); }
img { max-width: 100%; display: block; }
a { color: var(--bleu); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--ambre); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
p { text-wrap: pretty; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ambre); color: var(--nuit); padding: .6rem 1rem; z-index: calc(var(--z-entete) + 1); }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- En-tête */
.top { position: sticky; top: 0; z-index: var(--z-entete); display: flex; align-items: center; justify-content: space-between;
       gap: 1.5rem; padding: .9rem var(--marge); background: color-mix(in oklch, var(--nuit) 92%, transparent);
       backdrop-filter: blur(10px); /* avoid-ai-design-ignore: K3 — en-tête collant au-dessus du contenu qui défile */ border-bottom: 1px solid var(--nuit-ligne); }
.top-brand img { width: 84px; height: auto; }
.nav-large { display: flex; align-items: center; gap: 1.6rem; }
.nav-large a, .nav-petit a { color: var(--sur-nuit-2); text-decoration: none; font-size: .95rem; }
.nav-large a:hover { color: var(--sur-nuit); }
.nav-large .nav-console { color: var(--sur-nuit); border: 1px solid var(--nuit-ligne); padding: .45rem .9rem; border-radius: 999px; }
.nav-large .nav-console:hover { border-color: var(--sur-nuit-2); }
.nav-large .nav-cta { color: var(--nuit); background: var(--sur-nuit); padding: .5rem .95rem; border-radius: 999px; font-weight: 700; }
.nav-large .nav-cta:hover { background: var(--ambre); color: var(--nuit); }
.nav-petit { display: none; }
.nav-petit summary { list-style: none; cursor: pointer; color: var(--sur-nuit); border: 1px solid var(--nuit-ligne); border-radius: 999px; padding: .4rem .9rem; font-size: .95rem; }
.nav-petit summary::-webkit-details-marker { display: none; }
.nav-petit nav { position: absolute; right: var(--marge); left: var(--marge); top: calc(100% + .5rem); display: grid; gap: .25rem;
                 background: var(--nuit-2); border: 1px solid var(--nuit-ligne); border-radius: 12px; padding: .75rem; }
.nav-petit nav a { padding: .7rem .8rem; border-radius: 8px; color: var(--sur-nuit); }
.nav-petit nav a:hover { background: var(--nuit); }

/* ---------- Boutons */
.btn { display: inline-flex; align-items: center; min-height: 3rem; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 700;
       text-decoration: none; transition: background-color .25s cubic-bezier(.22, 1, .36, 1), color .25s cubic-bezier(.22, 1, .36, 1); }
.btn-primary { background: var(--ambre); color: var(--nuit); }
.btn-primary:hover { background: var(--sur-nuit); }
.btn-ghost { color: var(--sur-nuit); border: 1px solid var(--nuit-ligne); }
.btn-ghost:hover { border-color: var(--sur-nuit-2); }

/* ---------- Ouverture */
.hero { background: var(--nuit); color: var(--sur-nuit); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
        align-items: center; gap: clamp(2rem, 5vw, 5rem); padding: clamp(3.5rem, 9vw, 8rem) var(--marge) clamp(4rem, 9vw, 7.5rem);
        position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--spectre); }
.hero-text { max-width: 44rem; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 4.1rem); line-height: 1.08; color: var(--sur-nuit); }
.hero h1 span { color: var(--sur-nuit-2); font-weight: 600; }
.hero-lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.65; color: var(--sur-nuit-2); margin: 1.75rem 0 2.25rem; max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-note { margin: 2.25rem 0 0; font-size: .95rem; color: var(--sur-nuit-2); max-width: 36rem; padding-top: 1.25rem; border-top: 1px solid var(--nuit-ligne); }
.hero-mark { margin: 0; justify-self: center; width: min(100%, 34rem); }
.voix { width: 100%; height: auto; overflow: visible; }

/* Le symbole parle : les barres montent et descendent comme un vumètre, en vague d'ouest en est ; l'onde se dessine
   une fois au chargement. Tout s'arrête si l'appareil demande moins de mouvement. */
.voix .barres rect, .voix .coeur rect { transform-box: fill-box; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .voix .barres rect { animation: parle 2.8s cubic-bezier(.45, 0, .55, 1) infinite; }
  .voix .coeur rect { animation: parle 2.8s cubic-bezier(.45, 0, .55, 1) infinite; animation-delay: -1.1s; }
  /* Visible par défaut : si l'animation ne tourne pas (onglet caché, capture), l'onde reste dessinée. */
  .voix .onde path { stroke-dasharray: 900; stroke-dashoffset: 0; animation: trace 1.6s cubic-bezier(.22, 1, .36, 1) .3s backwards; }
  .voix .barres rect:nth-child(3n+1) { animation-duration: 2.4s; }
  .voix .barres rect:nth-child(3n+2) { animation-duration: 3.1s; }
  .voix .barres rect:nth-child(1) { animation-delay: 0s; }    .voix .barres rect:nth-child(2) { animation-delay: -.12s; }
  .voix .barres rect:nth-child(3) { animation-delay: -.24s; } .voix .barres rect:nth-child(4) { animation-delay: -.36s; }
  .voix .barres rect:nth-child(5) { animation-delay: -.48s; } .voix .barres rect:nth-child(6) { animation-delay: -.6s; }
  .voix .barres rect:nth-child(7) { animation-delay: -.72s; } .voix .barres rect:nth-child(8) { animation-delay: -.84s; }
  .voix .barres rect:nth-child(9) { animation-delay: -.96s; } .voix .barres rect:nth-child(10) { animation-delay: -1.08s; }
  .voix .barres rect:nth-child(11) { animation-delay: -1.2s; } .voix .barres rect:nth-child(12) { animation-delay: -1.32s; }
  .voix .barres rect:nth-child(13) { animation-delay: -1.44s; } .voix .barres rect:nth-child(14) { animation-delay: -1.56s; }
  .voix .barres rect:nth-child(15) { animation-delay: -1.68s; } .voix .barres rect:nth-child(16) { animation-delay: -1.8s; }
  .voix .barres rect:nth-child(17) { animation-delay: -1.92s; } .voix .barres rect:nth-child(18) { animation-delay: -2.04s; }
  .voix .barres rect:nth-child(19) { animation-delay: -2.16s; } .voix .barres rect:nth-child(n+20) { animation-delay: -1.5s; }
}
@keyframes parle { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.78); } }
@keyframes trace { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }

/* ---------- Sections claires : rythme commun */
section:not(.hero) { padding: clamp(4rem, 9vw, 7.5rem) var(--marge); }
section > h2, .langues-intro h2, .integration-text h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.12; max-width: 22ch; }

/* ---------- Le tableau des langues (pièce maîtresse) */
.langues { max-width: var(--large); margin: 0 auto; }
.langues-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem 4rem; align-items: end; margin-bottom: 3rem; }
.langues-intro h2 { grid-row: span 2; align-self: start; }
.langues-intro p { margin: 0; color: var(--encre-2); max-width: 60ch; }
.legende { font-size: .95rem; line-height: 2; }
.statut { display: inline-block; font-family: var(--texte); font-weight: 700; font-size: .8rem; letter-spacing: .02em;
          padding: .2rem .7rem; border-radius: 999px; white-space: nowrap; vertical-align: .1em; }
.s-exp { background: var(--ambre); color: var(--nuit); }
.s-prep { background: transparent; color: var(--encre-2); box-shadow: inset 0 0 0 1.5px var(--ligne); }
.s-ok { background: var(--vert); color: var(--blanc); }

.tableau { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--encre); }
.lg { display: grid; grid-template-columns: minmax(10rem, 1.3fr) minmax(8rem, 1fr) minmax(10rem, 1.4fr) auto; gap: .5rem 1.5rem;
      align-items: baseline; padding: 1.15rem 0; border-bottom: 1px solid var(--ligne); }
.lg-natif { font-family: var(--titre); font-weight: 600; font-size: clamp(1.45rem, 2.6vw, 2.15rem); line-height: 1.15; letter-spacing: -0.015em; }
.lg-nom { color: var(--encre); font-weight: 700; }
.lg-pays { color: var(--encre-2); font-size: .95rem; }
.lg .statut { justify-self: end; }
/* La seule langue utilisable : sa ligne porte l'ambre. */
.lg:first-child { background: linear-gradient(90deg, color-mix(in oklch, var(--ambre) 14%, transparent), transparent 70%);
                  padding-left: 1rem; margin-left: -1rem; border-radius: 6px 0 0 6px; }
.lg:not(:first-child) .lg-natif { color: color-mix(in oklch, var(--encre) 72%, var(--clair)); }

.chemin { margin-top: 4.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 1.5rem 4rem; }
.chemin h3 { font-size: 1.35rem; line-height: 1.25; max-width: 16ch; }
.chemin ol { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.chemin li { counter-increment: etape; color: var(--encre-2); font-size: .98rem; }
/* Numérotée parce que c'est une vraie séquence : on ne saute pas d'étape. */
.chemin li::before { content: counter(etape); display: block; font-family: var(--titre); font-weight: 700; font-size: 2.4rem; line-height: 1;
                     color: var(--encre); margin-bottom: .75rem; }
.chemin li strong { display: block; color: var(--encre); margin-bottom: .3rem; }

/* ---------- Pour qui */
.usages { background: var(--blanc); border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); }
.usages > * { max-width: var(--large); margin-left: auto; margin-right: auto; }
.scenes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: clamp(2rem, 4vw, 4rem); margin-top: 3.5rem; }
.scene h3 { font-family: var(--texte); font-size: .95rem; font-weight: 700; color: var(--encre-2); }
.scene-dit { font-family: var(--titre); font-weight: 600; font-size: clamp(1.4rem, 2.2vw, 1.85rem); line-height: 1.25; color: var(--encre); margin: .8rem 0 1rem; letter-spacing: -0.015em; }
.scene p:last-child { color: var(--encre-2); margin: 0; }
.usages-note { margin-top: 3rem; font-size: .92rem; color: var(--encre-2); }

/* ---------- Intégration (fond nuit) */
.integration { background: var(--nuit); color: var(--sur-nuit); display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
               gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.integration h2 { color: var(--sur-nuit); }
.integration-text > p { color: var(--sur-nuit-2); margin: 1.5rem 0 2rem; max-width: 55ch; line-height: 1.7; }
.faits { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.faits li { color: var(--sur-nuit-2); line-height: 1.6; padding-top: 1.1rem; border-top: 1px solid var(--nuit-ligne); }
.faits strong { color: var(--sur-nuit); display: block; }
.code { margin: 0; background: var(--nuit-2); border: 1px solid var(--nuit-ligne); border-radius: 14px; overflow: hidden; position: sticky; top: 6rem; }
.code figcaption { font-size: .85rem; color: var(--sur-nuit-2); padding: .8rem 1.2rem; border-bottom: 1px solid var(--nuit-ligne); }
.code pre { margin: 0; padding: 1.2rem; overflow-x: auto; font: 400 .86rem/1.75 var(--code); color: var(--sur-nuit); }
.code .c { color: oklch(0.72 0.03 268); }
.code .k { color: #7FD8FF; }
.code .s { color: #FFD27A; }
.code .v { color: #F0A6FF; }

/* ---------- Données */
.donnees { max-width: var(--large); margin: 0 auto; }
.engagements { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 2.5rem 4rem; margin: 3rem 0 0; }
.engagements div { border-top: 2px solid var(--encre); padding-top: 1.1rem; }
.engagements dt { font-family: var(--titre); font-weight: 600; font-size: 1.2rem; margin-bottom: .5rem; }
.engagements dd { margin: 0; color: var(--encre-2); }

/* ---------- État du projet */
.etat { background: var(--blanc); border-top: 1px solid var(--ligne); }
.etat > * { max-width: var(--large); margin-left: auto; margin-right: auto; }
.etat-date { color: var(--encre-2); margin-top: .75rem; }
.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem 3rem; margin-top: 2.5rem; }
.col h3 { margin-bottom: 1rem; }
.col h3 .statut { font-size: .9rem; }
.col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .7rem; }
.col li { padding-bottom: .7rem; border-bottom: 1px solid var(--ligne); color: var(--encre); }

/* ---------- Appel final */
.pilote { background: var(--nuit); color: var(--sur-nuit); text-align: left; position: relative; }
.pilote::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--spectre); }
.pilote > * { max-width: 52rem; }
.pilote h2 { color: var(--sur-nuit); font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
.pilote p { color: var(--sur-nuit-2); font-size: 1.15rem; line-height: 1.7; margin: 1.5rem 0 0; }
.contact { display: grid; gap: .3rem; padding: 1.25rem 1.5rem; border: 1px dashed var(--nuit-ligne); border-radius: 12px; margin-top: 2.5rem !important; }
.contact-label { font-family: var(--titre); font-weight: 600; color: var(--sur-nuit); }
.contact-adresse { font-size: 1rem; }

/* ---------- Pied */
.pied { background: var(--nuit); color: var(--sur-nuit-2); padding: 2.5rem var(--marge) 3rem; border-top: 1px solid var(--nuit-ligne);
        display: grid; gap: .5rem; font-size: .92rem; }
.pied img { width: 64px; height: auto; margin-bottom: .5rem; }
.pied p { margin: 0; }

/* ---------- Pages légales : une colonne de lecture, sans ornement */
.nav-retour a { color: var(--sur-nuit-2); text-decoration: none; font-size: .95rem; }
.nav-retour a:hover { color: var(--sur-nuit); }
.legal { max-width: 46rem; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--marge) 5rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; }
.legal-date { color: var(--encre-2); margin: .75rem 0 2.5rem; }
.legal h2 { font-size: 1.25rem; margin: 2.25rem 0 .6rem; }
.legal p, .legal li { color: var(--encre); max-width: 68ch; }
.legal ul { padding-left: 1.2rem; }
.muted-l { color: var(--encre-2); font-size: .92rem; }
.pied a { color: var(--sur-nuit); }

/* ---------- Petits écrans */
@media (max-width: 920px) {
  .nav-large { display: none; }
  .nav-petit { display: block; }
  .hero, .integration { grid-template-columns: 1fr; }
  .hero-mark { order: -1; width: min(70%, 18rem); justify-self: start; }
  .langues-intro, .chemin { grid-template-columns: 1fr; }
  .langues-intro h2 { grid-row: auto; }
  .lg { grid-template-columns: 1fr auto; }
  .lg-nom { grid-column: 1; }
  .lg-pays { grid-column: 1 / -1; }
  .lg .statut { grid-column: 2; grid-row: 1; }
  .code { position: static; }
  .chemin ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .chemin ol { grid-template-columns: 1fr; }
}
