/* Page d'accueil publique d'Assays (assays.fr).
   Thème sombre de l'application : même fond, même cyan que le logo.
   Une séquence forte (le scan de la console), puis des apparitions discrètes
   au défilement. Tout mouvement est coupé si le visiteur l'a demandé. */

@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --fond: #0a0d11;
  --fond-2: #0e1318;
  --surface: #11161d;
  --surface-2: #161d26;
  --trait: #1f2731;
  --trait-fort: #2b3542;
  --texte: #e6edf4;
  --texte-doux: #98a5b3;
  --cyan: #0ea5e9;
  --cyan-vif: #22d3ee;
  --bleu: #1e40af;
  --crit: #e5646d;
  --high: #e0925a;
  --med: #d3ba5c;
  --low: #7aa7d9;
  --ok: #2fbf8f;

  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --largeur: 1160px;
  --courbe: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--fond); }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: var(--cyan-vif); }
:focus-visible { outline: 2px solid var(--cyan-vif); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(14, 165, 233, .35); }

.cadre { width: 100%; max-width: var(--largeur); margin-inline: auto; padding-inline: 24px; }
.mono { font-family: var(--mono); }

.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 16px; top: 12px; z-index: 20; background: var(--surface); color: var(--texte); padding: 8px 12px; }

h1, h2, h3 { margin: 0; font-weight: 600; color: var(--texte); }
h1 { font-size: clamp(2.2rem, 4vw, 3.3rem); line-height: 1.07; letter-spacing: -0.025em; max-width: 16ch; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; line-height: 1.3; }
p { margin: 0; }

/* Boutons */
.bouton {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px; border-radius: 10px;
  font: 500 16px/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s var(--courbe), box-shadow .25s var(--courbe), border-color .2s, background-color .2s;
}
.bouton--principal {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan) 0%, #2563eb 55%, var(--bleu) 100%);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .25) inset, 0 8px 24px -10px rgba(14, 165, 233, .6);
}
.bouton--principal:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(34, 211, 238, .45) inset, 0 12px 32px -10px rgba(14, 165, 233, .85); }
.bouton--principal:active { transform: translateY(0); }
.bouton--secondaire { color: var(--texte); background: rgba(255, 255, 255, .02); border-color: var(--trait-fort); }
.bouton--secondaire:hover { border-color: var(--cyan); background: rgba(14, 165, 233, .08); }
.bouton--petit { min-height: 38px; padding: 0 14px; font-size: 15px; }
.bouton[disabled] { opacity: .6; cursor: progress; transform: none; }

/* En-tête : translucide, collé en haut */
.entete {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 13, 17, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(43, 53, 66, .6);
}
.entete__barre { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.marque { display: inline-flex; align-items: center; gap: 10px; color: var(--texte); text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.entete__liens { display: flex; align-items: center; gap: 26px; }
.entete__liens a:not(.bouton) { color: var(--texte-doux); text-decoration: none; font-size: 15px; transition: color .2s; }
.entete__liens a:not(.bouton):hover { color: var(--texte); }

/* Ouverture : grille fine et halo cyan derrière la console */
.ouverture { position: relative; overflow: hidden; }
.ouverture__fond {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 211, 238, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 65% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 65% 40%, #000 20%, transparent 75%);
}
.ouverture__fond::after {
  content: ""; position: absolute; width: 620px; height: 620px; right: 4%; top: -12%;
  background: radial-gradient(circle, rgba(14, 165, 233, .22), transparent 62%);
  filter: blur(10px); animation: halo 9s ease-in-out infinite alternate;
}
@keyframes halo { from { transform: translate(0, 0) scale(1); opacity: .8; } to { transform: translate(-40px, 30px) scale(1.08); opacity: 1; } }

.ouverture__grille {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px; align-items: start; padding-block: 80px 96px;
}
.ouverture__texte { display: flex; flex-direction: column; gap: 24px; animation: entree .8s var(--courbe) both; }
.chapeau { font-size: 19px; color: var(--texte-doux); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pour-qui { font-size: 15px; color: var(--texte-doux); max-width: 32em; }
@keyframes entree { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Console */
.console {
  position: relative; margin: 0; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, rgba(22, 29, 38, .92), rgba(13, 18, 24, .96));
  border: 1px solid rgba(34, 211, 238, .18);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 30px 80px -30px rgba(14, 165, 233, .35), 0 20px 50px -20px rgba(0, 0, 0, .8);
  animation: entree .8s .15s var(--courbe) both;
}
.console__barre {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--trait);
}
.console__hote { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--mono); color: var(--texte-doux); white-space: nowrap; }
.console__compteur { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; transition: color .4s; }
.console.trie .console__compteur { color: var(--ok); }
.voyant { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47, 191, 143, .6); animation: pouls 2.2s ease-out infinite; flex: none; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(47, 191, 143, .55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(47, 191, 143, 0); } }

.console__corps { position: relative; }
.console__liste { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-direction: column; }
.console__balayage {
  position: absolute; left: 0; right: 0; top: 0; height: 56px; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .14) 70%, rgba(34, 211, 238, .55) 100%);
  border-bottom: 1px solid rgba(34, 211, 238, .8);
}
.console.scan .console__balayage { animation: balayage 1.5s linear forwards; }
@keyframes balayage { 0% { opacity: 1; transform: translateY(-56px); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--hauteur-liste, 480px)); } }

.ligne {
  display: grid; grid-template-columns: 76px minmax(0, 1.45fr) minmax(0, .8fr) minmax(0, 1.3fr);
  align-items: center; gap: 10px; padding: 0 18px; height: 40px; max-height: 40px; overflow: hidden;
  font-size: 13px; border-bottom: 1px solid rgba(31, 39, 49, .7);
  transition: max-height .55s var(--courbe), opacity .45s ease, border-color .45s, background-color .3s;
}
.ligne:hover { background: rgba(34, 211, 238, .04); }
.ligne:last-child { border-bottom: 0; }
.sev { justify-self: start; font: 500 10.5px/1 var(--mono); padding: 4px 6px; border-radius: 4px; border: 1px solid currentColor; }
.sev--crit { color: var(--crit); background: rgba(229, 100, 109, .08); }
.sev--high { color: var(--high); background: rgba(224, 146, 90, .08); }
.sev--med { color: var(--med); background: rgba(211, 186, 92, .06); }
.sev--low { color: var(--low); background: rgba(122, 167, 217, .06); }
.cve { font: 500 12.5px/1 var(--mono); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.pkg { font: 400 12.5px/1 var(--mono); color: var(--texte-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etat { justify-self: end; display: inline-flex; align-items: center; gap: 12px; color: var(--texte-doux); font-size: 12px; white-space: nowrap; }
.version { font: 400 12px/1 var(--mono); color: var(--ok); }
.score { font: 600 14px/1 var(--mono); color: var(--high); min-width: 3ch; text-align: right; }
.kev { font: 600 10px/1 var(--sans); color: #fff; background: var(--crit); padding: 3px 5px; border-radius: 4px; box-shadow: 0 0 12px -2px rgba(229, 100, 109, .7); }
.ligne--suite { display: block; height: 40px; line-height: 40px; color: var(--texte-doux); font-size: 12.5px; }
.console__legende { padding: 12px 18px 16px; font-size: 12.5px; line-height: 1.5; color: var(--texte-doux); border-top: 1px solid var(--trait); }

/* États de la séquence (posés par app.js). Sans JavaScript, tout reste visible. */
.console.js .ligne { opacity: 0; }
.console.js.scan .ligne { opacity: 1; transition-delay: calc(var(--i, 0) * 110ms); }
.console.js .ligne:not(.ligne--bruit) .version,
.console.js .ligne:not(.ligne--bruit) .score { opacity: 0; transition: opacity .45s ease; }
.console.js.trie .ligne .version,
.console.js.trie .ligne .score { opacity: 1; }
.console.js.trie .ligne { transition-delay: 0ms; }
.console.js.trie .ligne--bruit { max-height: 0; opacity: 0; border-color: transparent; }
.console:not(.trie) .ligne--suite { max-height: 0; opacity: 0; border-color: transparent; }

/* Apparitions au défilement */
.js-revele .revele { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--courbe), transform .7s var(--courbe); }
.js-revele .revele.r1 { transition-delay: 100ms; }
.js-revele .revele.r2 { transition-delay: 200ms; }
.js-revele .revele.r3 { transition-delay: 300ms; }
.js-revele .revele.visible { opacity: 1; transform: none; }

/* Vidéo */
.video { padding-block: 32px 104px; display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 80px; }
.video__cadre {
  position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9;
  border: 1px solid rgba(34, 211, 238, .16);
  box-shadow: 0 40px 100px -40px rgba(14, 165, 233, .4);
}
.video__cadre video { width: 100%; height: 100%; object-fit: cover; }

/* Étapes : une vraie séquence, donc numérotée */
.etapes { padding-block: 0 104px; display: flex; flex-direction: column; gap: 36px; scroll-margin-top: 80px; }
.etapes__liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.etape {
  min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 24px;
  border-radius: 14px; background: linear-gradient(180deg, var(--surface), var(--fond-2));
  border: 1px solid var(--trait); transition: border-color .3s, transform .3s var(--courbe), opacity .7s var(--courbe);
}
.etape:hover { border-color: rgba(34, 211, 238, .35); }
.etape h3 { display: flex; align-items: center; gap: 12px; }
.etape__num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  font: 500 14px/1 var(--mono); color: var(--cyan-vif);
  background: rgba(14, 165, 233, .12); border: 1px solid rgba(34, 211, 238, .3);
}
.etape p { color: var(--texte-doux); font-size: 16px; }

.vignette {
  margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 10px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--trait); font-size: 13.5px;
}
.vignette__ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vignette__ligne .mono { font-size: 13px; }
.vignette__ligne--douce { color: var(--texte-doux); }
.vignette__droite { margin-left: auto; }
.vignette__droite .mono { color: var(--texte); }
.etiquette { margin-left: auto; font-size: 12px; padding: 3px 8px; border-radius: 6px; border: 1px solid; }
.etiquette--ok { color: var(--ok); border-color: rgba(47, 191, 143, .45); background: rgba(47, 191, 143, .1); }
.jauge { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.jauge__remplissage {
  display: block; height: 100%; width: 66%; border-radius: inherit; transform-origin: left;
  background: linear-gradient(90deg, var(--med), var(--high) 70%, var(--crit));
  box-shadow: 0 0 12px rgba(224, 146, 90, .6);
}
.js-revele .jauge__remplissage { transform: scaleX(0); transition: transform 1.2s .5s var(--courbe); }
.js-revele .visible .jauge__remplissage { transform: scaleX(1); }
.score--grand { margin-left: auto; font-size: 20px; }
.score--grand small { font-size: 12px; color: var(--texte-doux); font-weight: 400; }

.plan {
  list-style: none; margin: auto 0 0; padding: 14px 16px; border-radius: 10px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--trait);
  font-size: 13.5px; display: flex; flex-direction: column; gap: 10px;
}
.plan li { display: flex; gap: 10px; align-items: center; }
.plan li::before {
  content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--ok); background: rgba(47, 191, 143, .15)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%232fbf8f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.js-revele .plan li { opacity: .25; transition: opacity .4s ease; }
.js-revele .plan li::before { border-color: var(--trait-fort); background-color: transparent; background-size: 0; transition: border-color .3s, background-color .3s, background-size .3s var(--courbe); }
.js-revele .visible .plan li { opacity: 1; }
.js-revele .visible .plan li::before { border-color: var(--ok); background-color: rgba(47, 191, 143, .15); background-size: 14px; }
.js-revele .visible .plan li:nth-child(1), .js-revele .visible .plan li:nth-child(1)::before { transition-delay: .6s; }
.js-revele .visible .plan li:nth-child(2), .js-revele .visible .plan li:nth-child(2)::before { transition-delay: 1.1s; }
.js-revele .visible .plan li:nth-child(3), .js-revele .visible .plan li:nth-child(3)::before { transition-delay: 1.6s; }
.js-revele .visible .plan li:nth-child(4), .js-revele .visible .plan li:nth-child(4)::before { transition-delay: 2.1s; }

/* Atouts : liste de définitions */
.atouts { padding-block: 0 112px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.atouts h2 { max-width: 14em; }
.atouts__liste { margin: 0; display: flex; flex-direction: column; }
.atouts__liste > div { position: relative; display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: 24px; padding-block: 22px; border-top: 1px solid var(--trait); }
.atouts__liste > div:last-child { border-bottom: 1px solid var(--trait); }
.atouts__liste > div::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--cyan-vif), transparent); transition: width .6s var(--courbe);
}
.atouts__liste > div:hover::before { width: 60%; }
.atouts__liste dt { font-weight: 600; }
.atouts__liste dd { margin: 0; color: var(--texte-doux); font-size: 16px; }

/* Démo */
.demo {
  position: relative; padding-block: 96px; scroll-margin-top: 66px;
  background: radial-gradient(ellipse 60% 80% at 80% 0%, rgba(14, 165, 233, .1), transparent 70%), var(--fond-2);
  border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait);
}
.demo__grille { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
.demo__texte { display: flex; flex-direction: column; gap: 16px; color: var(--texte-doux); }
.demo__texte h2 { margin-bottom: 4px; }
.formulaire {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px;
  padding: 28px; border-radius: 16px; background: rgba(17, 22, 29, .8); border: 1px solid var(--trait);
}
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ--large { grid-column: 1 / -1; }
.champ label { font-size: 15px; font-weight: 500; }
.facultatif { font-weight: 400; color: var(--texte-doux); }
.champ input, .champ select, .champ textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--trait-fort); background: var(--fond); color: var(--texte);
  font: 400 16px/1.4 var(--sans); transition: border-color .2s, box-shadow .2s;
}
.champ select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: var(--fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2398a5b3' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; }
.champ textarea { resize: vertical; min-height: 88px; }
.champ input:hover, .champ select:hover, .champ textarea:hover { border-color: #3a4757; }
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(14, 165, 233, .25);
}
.champ [aria-invalid="true"] { border-color: var(--crit); }
.champ--piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mention { grid-column: 1 / -1; font-size: 13.5px; color: var(--texte-doux); }
.formulaire .bouton { grid-column: 1 / -1; justify-self: start; }
.formulaire__retour { grid-column: 1 / -1; font-size: 15px; min-height: 1.5em; }
.formulaire__retour.erreur { color: #f19aa0; }
.envoye {
  display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: 16px;
  background: rgba(47, 191, 143, .08); border: 1px solid rgba(47, 191, 143, .4);
  animation: entree .5s var(--courbe) both;
}
.envoye h3 { color: var(--ok); }
.envoye p { color: var(--texte); }

/* Pied de page */
.pied { padding-block: 32px 44px; }
.pied__grille { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.pied__texte { font-size: 14.5px; color: var(--texte-doux); }
.pied__texte a { color: var(--texte-doux); }
.pied__texte a:hover { color: var(--texte); }

/* Écrans moyens et petits */
@media (max-width: 980px) {
  .ouverture__grille { grid-template-columns: minmax(0, 1fr); padding-block: 56px 72px; gap: 40px; }
  h1 { max-width: 18ch; }
  .etapes__liste { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .atouts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .demo__grille { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cadre { padding-inline: 18px; }
  .entete__liens a:not(.bouton) { display: none; }
  .chapeau { font-size: 17px; }
  .ligne { grid-template-columns: 70px minmax(0, 1fr) minmax(0, auto); padding-inline: 14px; }
  .ligne .pkg, .ligne .version { display: none; }
  .console__barre { padding-inline: 14px; }
  .atouts__liste > div { grid-template-columns: 1fr; gap: 6px; }
  .formulaire { grid-template-columns: 1fr; padding: 20px; }
  .demo { padding-block: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
