/* MEKARYX maquette v06 : sections ajoutées (démonstration du centre, sécurité en direct, studio, API, app, FAQ),
   narration au défilement, compagnon mascotte, pied de page complet.
   Aucune règle en ligne : compatible avec une CSP sans 'unsafe-inline'. */

/* ---------- Étiquettes d'état ---------- */
.demo-tag, .statut-pill {
  display: inline-flex; align-items: center; gap: .55rem; width: fit-content; margin-bottom: .25rem;
  padding: .38rem .85rem; border-radius: 999px; font: 500 .86rem/1.2 var(--f-text);
}
.demo-tag { color: #ffe3a3; background: rgb(255 196 77 / .08); border: 1px dashed rgb(255 196 77 / .5); }
.demo-tag span, .statut-pill span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.demo-tag--alerte { color: #ffd0c2; background: rgb(255 120 90 / .08); border-color: rgb(255 120 90 / .5); }
.statut-pill { color: #d3e8ff; background: rgb(79 231 255 / .08); border: 1px solid rgb(79 231 255 / .28); }
@media (prefers-reduced-motion: no-preference) {
  .motion .statut-pill span, .motion .demo-tag span { animation: battement-pill 2.4s ease-out infinite; }
}
@keyframes battement-pill { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- Langue ---------- */
.nav .nav__lang {
  min-width: 44px; justify-content: center; padding-inline: .7rem; border-radius: 999px;
  font: 600 .82rem/1 var(--f-display); letter-spacing: .12em; color: var(--givre);
  border: 1px solid var(--trait);
}
.nav .nav__lang:hover { border-color: var(--lilas); }

/* ---------- Chiffres (faits de la page, pas de statistiques inventées) ---------- */
.chiffres {
  list-style: none; margin: clamp(3rem, 7vw, 5rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(120deg, rgb(79 231 255 / .28), rgb(123 60 255 / .32));
}
.chiffres li { display: grid; gap: .35rem; align-content: start; padding: 1.4rem 1.3rem 1.5rem; background: rgb(6 10 26 / .96); }
.chiffres__n {
  font: 300 clamp(2.6rem, 1.6rem + 3vw, 4rem)/1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 10%, #9fdcff 60%, var(--lilas)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chiffres__l { color: var(--brume); font-size: .95rem; line-height: 1.4; max-width: 22ch; }
@media (min-width: 60rem) { .chiffres { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Démonstration du centre : une mission fictive ---------- */
.mission { padding-block: clamp(4rem, 9vw, 7rem); }
.mission__grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.mission__head { display: grid; gap: 1.1rem; justify-items: start; }
.mission__brief {
  display: grid; gap: .3rem; padding: 1rem 1.15rem; border-radius: 16px; max-width: 46ch;
  background: rgb(14 22 48 / .7); border: 1px solid var(--trait); color: var(--givre);
}
.mission__brief span { font: 600 .8rem/1 var(--f-display); letter-spacing: .14em; color: var(--ion); }
.mission__ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }
.mission__play svg { width: 14px; height: 14px; }
.mission__etat { color: var(--brume); font-size: .93rem; font-variant-numeric: tabular-nums; }
.mission__etat-n { color: var(--givre); font-weight: 600; }
.mission__board { display: grid; gap: 1.1rem; }
.mission__steps { --p: 0; position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
/* Fil qui se remplit d'étape en étape. */
.mission__steps::before, .mission__steps::after {
  content: ""; position: absolute; left: 10%; right: 10%; top: 13px; height: 2px; border-radius: 2px;
}
.mission__steps::before { background: rgb(160 190 255 / .16); }
.mission__steps::after {
  background: linear-gradient(90deg, var(--ion), var(--lilas)); box-shadow: 0 0 12px rgb(79 231 255 / .6);
  transform-origin: 0 50%; scale: var(--fil, 0) 1; transition: scale .5s var(--ease);
}
.etape { position: relative; z-index: 1; display: grid; justify-items: center; gap: .3rem; text-align: center; opacity: .45; transition: opacity .4s; }
.etape__dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--abysse); border: 2px solid rgb(160 190 255 / .3); transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.etape__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgb(160 190 255 / .35); transition: background-color .3s, scale .3s; }
.etape__qui { font: 600 .92rem/1.2 var(--f-display); }
.etape__quoi { color: var(--brume); font-size: .82rem; line-height: 1.3; }
.etape.is-actif, .etape.is-fait { opacity: 1; }
.etape.is-actif .etape__dot { border-color: var(--ion); box-shadow: 0 0 0 6px rgb(79 231 255 / .12), 0 0 22px rgb(79 231 255 / .6); }
.etape.is-actif .etape__dot::after { background: var(--ion); scale: 1.3; }
.etape.is-fait .etape__dot { border-color: var(--lilas); background: rgb(123 60 255 / .25); }
.etape.is-fait .etape__dot::after { background: #fff; }
.etape:last-child.is-fait .etape__dot { border-color: #6ee7a8; background: rgb(110 231 168 / .2); box-shadow: 0 0 20px rgb(110 231 168 / .5); }

.mission__console {
  position: relative; border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, rgb(10 16 38 / .96), rgb(5 8 20 / .98));
  border: 1px solid var(--trait-fort); box-shadow: 0 40px 90px -50px rgb(79 231 255 / .55);
}
.mission__console-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; border-bottom: 1px solid var(--trait); color: var(--brume); font-size: .8rem; }
.mission__console-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgb(160 190 255 / .25); }
.mission__console-bar span { margin-left: .5rem; font-family: var(--f-display); letter-spacing: .06em; }
.mission__log { list-style: none; margin: 0; padding: 1rem 1.1rem .5rem; display: grid; gap: .45rem; min-height: 15.5rem; align-content: start; font-size: .9rem; line-height: 1.45; }
.mission__log li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .6rem; color: #cfd8ee; }
.mission__log b { font: 600 .74rem/1.9 var(--f-display); letter-spacing: .12em; color: var(--ion); }
.mission__log li.is-ok { color: #c9f7dd; }
.mission__log li.is-ok b { color: #6ee7a8; }
.mission__approve { display: flex; gap: .6rem; padding: .3rem 1.1rem 1.1rem; }
.mission__approve span { padding: .5rem 1rem; border-radius: 999px; font-size: .88rem; font-weight: 600; border: 1px solid var(--trait-fort); color: var(--brume); }
.mission__approve-btn { background: rgb(110 231 168 / .12); border-color: rgb(110 231 168 / .5) !important; color: #c9f7dd !important; }
/* Animation : les lignes du journal apparaissent quand leur étape commence. */
.js.motion [data-mission] .mission__log li { opacity: 0; translate: 0 6px; transition: opacity .45s var(--ease), translate .45s var(--ease); }
.js.motion [data-mission] .mission__log li.is-vu { opacity: 1; translate: 0 0; }
.js.motion [data-mission] .mission__approve { opacity: .35; transition: opacity .4s; }
.js.motion [data-mission].is-accord .mission__approve { opacity: 1; }
[data-mission].is-valide .mission__approve-btn { background: #6ee7a8; color: #04130b !important; box-shadow: 0 0 24px rgb(110 231 168 / .6); }
@media (min-width: 64rem) {
  .mission__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
}
@media (min-width: 64rem) and (prefers-reduced-motion: no-preference) {
  /* Bureau : la scène reste épinglée pendant que le défilement fait avancer la mission. */
  .motion .mission { padding-block: 0; }
  .motion .mission__track { height: 260svh; }
  .motion .mission__pin { position: sticky; top: 0; min-height: 100svh; display: grid; align-items: center; padding-block: 2rem; }
}
@media (max-width: 39.99rem) {
  .mission__steps { grid-template-columns: 1fr; gap: .2rem; }
  .mission__steps::before, .mission__steps::after { left: 13px; right: auto; top: 14px; bottom: 14px; width: 2px; height: auto; }
  .mission__steps::after { transform-origin: 50% 0; scale: 1 var(--fil, 0); }
  .etape { grid-template-columns: 28px 1fr; justify-items: start; text-align: left; column-gap: .8rem; row-gap: 0; }
  .etape__dot { grid-row: span 2; }
  .mission__log { min-height: 0; }
  .mission__log li { grid-template-columns: 4.4rem 1fr; }
}

/* ---------- Sécurité en direct (démonstration) ---------- */
.securite { background: radial-gradient(60% 40% at 80% 20%, rgb(255 90 60 / .06), transparent 70%); }
.securite__head { display: grid; gap: 1.1rem; justify-items: start; margin-bottom: clamp(2rem, 5vw, 3rem); }
.securite__head .lead { max-width: 64ch; }
.soc { display: grid; gap: 1rem; }
.soc > * { border-radius: 22px; background: linear-gradient(160deg, rgb(14 20 46 / .95), rgb(6 10 24 / .97)); border: 1px solid var(--trait); }
.soc__radar { position: relative; aspect-ratio: 1; overflow: hidden; display: grid; place-items: center; }
.soc__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.soc__legende { position: absolute; left: 1rem; bottom: .8rem; font-size: .8rem; color: var(--brume); }
.soc__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: none !important; border: 0 !important; gap: 1rem; }
.soc__stats li { display: grid; gap: .25rem; padding: 1.1rem 1.15rem; border-radius: 18px; background: linear-gradient(160deg, rgb(14 20 46 / .95), rgb(6 10 24 / .97)); border: 1px solid var(--trait); }
.soc__n { font: 300 clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem)/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--givre); }
.soc__n--bloc { color: #ffb4a0; }
.soc__n--alerte { color: #ffe08a; }
.soc__l { color: var(--brume); font-size: .86rem; line-height: 1.3; }
.soc__flux { padding: 1rem 1.1rem; }
.soc__titre { font: 600 .82rem/1 var(--f-display); letter-spacing: .14em; color: var(--brume); margin-bottom: .7rem; }
.soc__feed { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.soc__feed li {
  display: grid; grid-template-columns: 4.6rem 1fr auto; align-items: center; gap: .7rem;
  padding: .6rem .7rem; border-radius: 12px; background: rgb(255 255 255 / .03); border: 1px solid rgb(255 255 255 / .05); font-size: .88rem;
}
.soc__feed li.is-neuf { animation: soc-neuf 1.1s var(--ease-out); }
@keyframes soc-neuf { from { opacity: 0; translate: 0 -10px; background: rgb(79 231 255 / .12); } }
.soc__sev { justify-self: start; padding: .15rem .5rem; border-radius: 6px; font: 600 .72rem/1.4 var(--f-display); letter-spacing: .06em; }
.sev-haute .soc__sev { color: #ffd0c2; background: rgb(255 90 60 / .18); }
.sev-moyenne .soc__sev { color: #ffe3a3; background: rgb(255 196 77 / .16); }
.sev-basse .soc__sev { color: #cfe6ff; background: rgb(79 160 255 / .16); }
.sev-info .soc__sev { color: #d9d2ff; background: rgb(179 156 255 / .14); }
.soc__msg { color: #d6def1; line-height: 1.35; overflow-wrap: anywhere; }
.soc__act { color: var(--brume); font-size: .8rem; white-space: nowrap; }
.soc__guard { padding: 1.1rem 1.2rem; display: grid; gap: .7rem; border-color: rgb(179 156 255 / .35) !important; box-shadow: 0 30px 70px -45px rgb(123 60 255 / .8); }
.soc__guard-qui { display: flex; align-items: center; gap: .6rem; font: 600 1rem/1.2 var(--f-display); }
.soc__guard-qui img { width: 36px; height: 36px; border-radius: 10px; }
.soc__guard-qui span { font: 500 .78rem/1 var(--f-text); color: #d3e8ff; padding: .25rem .55rem; border-radius: 999px; border: 1px solid rgb(79 231 255 / .3); }
.soc__guard-msg { color: #d6def1; font-size: .95rem; line-height: 1.5; }
.soc__guard-act { display: flex; gap: .5rem; }
.soc__guard-act span { padding: .45rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid var(--trait-fort); color: var(--brume); }
.soc__guard-act .soc__ok { color: #e3dcff; border-color: rgb(179 156 255 / .55); background: rgb(123 60 255 / .15); }
@media (min-width: 64rem) {
  .soc { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-areas: "radar stats" "radar flux" "guard flux"; }
  .soc__radar { grid-area: radar; }
  .soc__stats { grid-area: stats; }
  .soc__flux { grid-area: flux; }
  .soc__guard { grid-area: guard; }
}
@media (max-width: 39.99rem) {
  .soc__stats { grid-template-columns: 1fr; }
  .soc__stats li { grid-template-columns: auto 1fr; align-items: baseline; gap: .8rem; }
  .soc__feed li { grid-template-columns: 1fr auto; }
  .soc__feed .soc__msg { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Studio ---------- */
.studio__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.studio__head { display: grid; gap: 1.1rem; justify-items: start; }
.studio__note { color: var(--brume); font-size: .93rem; max-width: 56ch; }
.studio__prompt {
  position: relative; display: grid; gap: .35rem; width: 100%; max-width: 34rem; padding: 1rem 7.4rem 1rem 1.1rem; border-radius: 18px;
  background: rgb(8 12 30 / .85); border: 1px solid var(--trait-fort);
}
.studio__prompt::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, var(--ion), var(--lilas), transparent 80%) 0 0 / 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .8; }
@media (prefers-reduced-motion: no-preference) { .motion .studio__prompt::before { animation: prompt-onde 4s linear infinite; } }
@keyframes prompt-onde { to { background-position: -300% 0; } }
.studio__prompt-l { font: 600 .74rem/1 var(--f-display); letter-spacing: .16em; color: var(--ion); }
.studio__prompt-t { color: var(--givre); min-height: 3em; }
.studio__prompt-t.is-ecrit::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--ion); animation: curseur 1s steps(1) infinite; }
@keyframes curseur { 50% { opacity: 0; } }
.studio__prompt-go {
  position: absolute; right: .7rem; top: 50%; translate: 0 -50%; padding: .55rem 1rem; border-radius: 999px;
  font: 600 .88rem/1 var(--f-text); color: var(--abysse); background: linear-gradient(180deg, #fff, #cfe9ff);
}
.studio__stage { display: grid; gap: 1rem; justify-items: center; }
.studio__ecran {
  position: relative; width: min(100%, 20rem); aspect-ratio: 9 / 16; margin: 0; border-radius: 26px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--trait), 0 50px 100px -40px rgb(123 60 255 / .75), 0 0 80px -30px rgb(79 231 255 / .5);
}
.studio__ecran img, .studio__ecran video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio__ecran video { opacity: 0; transition: opacity .5s ease; }
.studio__ecran video.is-shown { opacity: 1; }
.studio__ecran.is-gen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgb(79 231 255 / .25) 50%, transparent) 0 -100% / 100% 50% no-repeat;
  animation: balaye-gen .9s var(--ease-out);
}
@keyframes balaye-gen { from { background-position: 0 -100%; } to { background-position: 0 200%; } }
.studio__cap { position: absolute; left: .8rem; top: .8rem; z-index: 2; padding: .25rem .6rem; border-radius: 999px; font-size: .76rem; background: rgb(4 6 15 / .7); color: var(--brume); }
.studio__film { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; width: min(100%, 30rem); }
.studio__vignette {
  position: relative; display: grid; width: 100%; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--trait); background: none; aspect-ratio: 9 / 13; transition: border-color .25s, translate .3s var(--ease);
}
.studio__vignette img { width: 100%; height: 100%; object-fit: cover; opacity: .65; transition: opacity .25s; }
.studio__vignette span { position: absolute; left: 0; right: 0; bottom: 0; padding: .9rem .3rem .35rem; font-size: .72rem; text-align: center; background: linear-gradient(180deg, transparent, rgb(4 6 15 / .9)); }
.studio__vignette[aria-pressed="true"] { border-color: var(--ion); box-shadow: 0 0 18px -4px rgb(79 231 255 / .8); }
.studio__vignette[aria-pressed="true"] img, .fine .studio__vignette:hover img { opacity: 1; }
.fine .studio__vignette:hover { translate: 0 -3px; }
@media (min-width: 64rem) { .studio__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- API ---------- */
.api__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.api__head { display: grid; gap: 1.1rem; justify-items: start; }
.api__points { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .6rem; }
.api__points li { position: relative; padding-left: 1.5rem; color: var(--brume); }
.api__points li::before { content: ""; position: absolute; left: 0; top: .55em; width: .55rem; height: .55rem; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--ion); box-shadow: 0 0 8px var(--ion); }
.api__points strong { color: var(--givre); font-weight: 600; }
.code {
  min-width: 0; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, rgb(10 15 36 / .98), rgb(5 8 20 / .99));
  border: 1px solid var(--trait-fort); box-shadow: 0 50px 100px -55px rgb(79 231 255 / .6), 0 0 0 1px rgb(123 60 255 / .12);
}
.code__bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .6rem; border-bottom: 1px solid var(--trait); }
.code__tabs { display: flex; gap: .2rem; flex-wrap: wrap; }
.code__tabs button, .code__copier {
  min-height: 40px; padding: .45rem .8rem; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer;
  font: 500 .86rem/1 var(--f-text); color: var(--brume);
}
.code__tabs button[aria-selected="true"] { color: var(--givre); background: rgb(79 231 255 / .1); border-color: rgb(79 231 255 / .3); }
.code__copier { border-color: var(--trait-fort); color: var(--givre); }
.code__copier.is-ok { border-color: #6ee7a8; color: #c9f7dd; }
.code pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; font: 400 .84rem/1.65 ui-monospace, "Cascadia Code", Consolas, monospace; color: #d6def1; tab-size: 2; }
.code__panel:focus-visible { outline: 2px solid var(--ion); outline-offset: -2px; }
.code__reponse { border-top: 1px dashed var(--trait); background: rgb(79 231 255 / .03); }
.t-kw { color: #c4a8ff; } .t-fn { color: #7fe9ff; } .t-str { color: #ffd59a; } .t-com { color: #7d89a8; }
.code__note { padding: .8rem 1.2rem 1rem; color: var(--brume); font-size: .85rem; border-top: 1px solid var(--trait); }
@media (min-width: 64rem) { .api__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }

/* ---------- App Android : maquette de téléphone ---------- */
.app__grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
.app__text { display: grid; gap: 1.1rem; justify-items: start; }
.app__points { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .55rem; }
.app__points li { position: relative; padding-left: 1.5rem; color: var(--brume); }
.app__points li::before { content: ""; position: absolute; left: .1rem; top: .5em; width: .6rem; height: .6rem; border-radius: 50%; border: 2px solid var(--lilas); }
.phone-scene { display: grid; place-items: center; perspective: 1200px; padding-block: 1rem; }
.phone {
  position: relative; width: min(19rem, 82vw); aspect-ratio: 9 / 19; padding: 12px; border-radius: 44px;
  background: linear-gradient(145deg, #2a3142, #0c0f18 45%, #1d2230);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08) inset, 0 60px 120px -50px rgb(123 60 255 / .8), 0 30px 60px -30px rgb(0 0 0 / .9);
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -10deg)); transform-style: preserve-3d; transition: transform .5s var(--ease);
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 26%; height: 18px; border-radius: 999px; background: #05070d; z-index: 3; }
.phone__ecran {
  position: relative; height: 100%; border-radius: 34px; overflow: hidden; padding: 2.6rem .9rem 1rem; display: grid; align-content: start; gap: .7rem;
  background: radial-gradient(120% 60% at 50% 0%, rgb(123 60 255 / .35), transparent 60%), linear-gradient(180deg, #0a0f24, #04060f);
  font-size: .8rem;
}
.phone__statut { position: absolute; top: .75rem; left: 1.4rem; right: 1.4rem; display: flex; justify-content: space-between; font-size: .7rem; color: var(--brume); }
.phone__icones { display: flex; gap: 3px; align-items: center; }
.phone__icones i { width: 12px; height: 7px; border-radius: 2px; background: var(--brume); opacity: .7; }
.phone__app { display: flex; align-items: center; gap: .5rem; font: 600 .95rem/1 var(--f-display); letter-spacing: .2em; }
.phone__app img { width: 28px; height: 28px; border-radius: 8px; }
.phone__toast {
  display: grid; gap: .15rem; padding: .6rem .75rem; border-radius: 14px; background: rgb(238 243 255 / .1);
  border: 1px solid rgb(255 255 255 / .12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #dfe6f7; line-height: 1.3;
}
.phone__toast b { font: 600 .7rem/1 var(--f-display); letter-spacing: .1em; color: var(--ion); }
.phone__carte { display: grid; gap: .3rem; padding: .8rem; border-radius: 16px; background: rgb(14 22 48 / .9); border: 1px solid rgb(79 231 255 / .25); }
.phone__k { font: 600 .66rem/1 var(--f-display); letter-spacing: .14em; color: var(--brume); }
.phone__t { font: 600 .92rem/1.25 var(--f-display); }
.phone__pret { display: flex; align-items: center; gap: .4rem; color: #ffe08a; font-size: .74rem; }
.phone__pret i { width: 7px; height: 7px; border-radius: 50%; background: #ffe08a; box-shadow: 0 0 8px #ffe08a; }
.phone__btns { display: flex; gap: .4rem; margin-top: .3rem; }
.phone__btns span { flex: 1; text-align: center; padding: .45rem; border-radius: 10px; font-weight: 600; font-size: .76rem; border: 1px solid var(--trait-fort); color: var(--brume); }
.phone__btns .phone__ok { background: #6ee7a8; border-color: #6ee7a8; color: #04130b; }
.phone__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.phone__liste li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: .5rem; padding: .45rem .6rem; border-radius: 10px; background: rgb(255 255 255 / .04); font-size: .74rem; }
.phone__liste i { width: 8px; height: 8px; border-radius: 50%; }
.phone__liste i.ok { background: #6ee7a8; } .phone__liste i.att { background: #ffe08a; }
.phone__liste span { color: var(--brume); font-size: .68rem; }
.phone__demo { margin-top: auto; text-align: center; font-size: .66rem; color: #ffe3a3; opacity: .8; }
@media (prefers-reduced-motion: no-preference) {
  .motion .phone__toast { animation: toast 7s var(--ease-out) infinite; }
  .app.is-away .phone__toast { animation-play-state: paused; }
}
@keyframes toast { 0%, 8% { opacity: 0; translate: 0 -14px; scale: .96; } 16%, 80% { opacity: 1; translate: 0 0; scale: 1; } 90%, 100% { opacity: 0; translate: 0 -8px; } }
@media (min-width: 64rem) { .app__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); } }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.faq__head { display: grid; gap: 1.1rem; align-content: start; }
.faq__liste { display: grid; gap: .6rem; }
.faq__item { border-radius: 16px; background: rgb(12 18 42 / .7); border: 1px solid var(--trait); transition: border-color .25s, background-color .25s; }
.faq__item[open] { border-color: rgb(79 231 255 / .35); background: rgb(14 22 50 / .85); }
.faq__item summary {
  position: relative; list-style: none; cursor: pointer; min-height: 52px; padding: 1rem 3.2rem 1rem 1.2rem;
  font: 500 1.05rem/1.35 var(--f-display);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 1.2rem; top: 50%; width: 12px; height: 12px; translate: 0 -70%; rotate: 45deg;
  border-right: 2px solid var(--ion); border-bottom: 2px solid var(--ion); transition: rotate .3s var(--ease), translate .3s var(--ease);
}
.faq__item[open] summary::after { rotate: -135deg; translate: 0 -20%; }
.faq__item summary:focus-visible { outline: 2px solid var(--ion); outline-offset: 2px; border-radius: 16px; }
.faq__item p { padding: 0 1.2rem 1.15rem; color: var(--brume); max-width: 70ch; }
@media (min-width: 64rem) { .faq__grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } .faq__head { position: sticky; top: 2rem; } }

/* ---------- Pied de page complet ---------- */
.foot__grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.foot__col { display: grid; align-content: start; gap: .15rem; }
.foot__col--marque { grid-column: 1 / -1; gap: .7rem; }
.foot__col a:not(.brand) { color: var(--brume); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; width: fit-content; }
.foot__col a:not(.brand):hover { color: var(--givre); text-decoration: underline; text-underline-offset: 4px; }
.foot__h { font: 600 .8rem/1 var(--f-display); letter-spacing: .14em; color: var(--givre); margin-bottom: .55rem; }
.foot__tag { color: var(--brume); font-size: .95rem; }
.foot__langue { display: flex; gap: .4rem; align-items: center; }
.foot__langue > * { min-height: 40px; display: inline-flex; align-items: center; padding: 0 .8rem; border-radius: 999px; font-size: .88rem; border: 1px solid var(--trait); }
.foot__langue [aria-current] { color: var(--givre); border-color: var(--lilas); }
.foot__bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--trait); }
@media (min-width: 64rem) { .foot__grid { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); } .foot__col--marque { grid-column: auto; } }

/* ---------- Chapitres : sommaire latéral qui suit la lecture (grands écrans) ---------- */
.chapitres { display: none; }
@media (min-width: 90rem) {
  .chapitres { display: block; position: fixed; right: 1.1rem; top: 50%; translate: 0 -50%; z-index: 40; opacity: 0; pointer-events: none; transition: opacity .4s; }
  .chapitres.is-visible { opacity: 1; pointer-events: auto; }
  .chapitres ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
  .chapitres a { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: .6rem; min-height: 28px; padding-right: 1.2rem; text-decoration: none; color: var(--brume); font-size: .78rem; }
  .chapitres a::after { content: ""; position: absolute; right: 0; width: 7px; height: 7px; border-radius: 50%; background: rgb(160 190 255 / .35); transition: background-color .3s, scale .3s, box-shadow .3s; }
  .chapitres a span { opacity: 0; translate: 6px 0; transition: opacity .25s, translate .25s; }
  .chapitres a:hover span, .chapitres a:focus-visible span, .chapitres a[aria-current="true"] span { opacity: 1; translate: 0 0; }
  .chapitres a[aria-current="true"] { color: var(--givre); }
  .chapitres a[aria-current="true"]::after { background: var(--ion); scale: 1.5; box-shadow: 0 0 10px var(--ion); }
}

/* ---------- Compagnon : la mascotte officielle accompagne la lecture (image officielle, transformations CSS seulement) ---------- */
.compagnon {
  --p: 0; --tilt: 0deg; --peek: 0px;
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 45;
  width: 76px; height: 76px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: none;
  opacity: 0; translate: 0 120%; transition: opacity .4s, translate .6s var(--ease-out);
}
.compagnon.is-visible { opacity: 1; translate: 0 var(--peek); }
.compagnon__anneau {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--ion) calc(var(--p) * 1turn), rgb(160 190 255 / .14) 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}
.compagnon::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(closest-side, rgb(123 60 255 / .45), rgb(7 11 29 / .92)); box-shadow: 0 10px 30px -8px rgb(123 60 255 / .9); }
.compagnon img { position: absolute; left: 50%; top: 52%; width: 92px; max-width: none; height: auto; translate: -50% -50%; rotate: var(--tilt); transition: rotate .4s var(--ease), scale .3s var(--ease); filter: drop-shadow(0 6px 10px rgb(0 0 0 / .5)); }
.fine .compagnon:hover img { scale: 1.08; }
.compagnon:active img { scale: .94; }
.compagnon:focus-visible { outline: 2px solid var(--ion); outline-offset: 4px; }
.compagnon.is-coucou img { animation: compagnon-coucou .9s var(--ease-out); }
@keyframes compagnon-coucou { 0% { translate: -50% -50%; } 35% { translate: -50% -78%; } 60% { translate: -50% -44%; } 100% { translate: -50% -50%; } }
@media (max-width: 39.99rem) { .compagnon { width: 58px; height: 58px; } .compagnon img { width: 72px; } .foot__bas { padding-bottom: 4.5rem; } }
/* v06.1 : sous 64rem, le compagnon s'efface pendant la démonstration et sur les panneaux denses (journal, flux, code). */
@media (max-width: 63.99rem) {
  .compagnon.is-visible.is-discret { opacity: 0; translate: 0 120%; pointer-events: none; }
}

/* ---------- v06.1 : cibles tactiles d'au moins 44 px sur mobile et écran tactile ---------- */
@media (max-width: 47.99rem), (pointer: coarse) {
  /* 48 px avant transformation : les cartes de démonstration ont une légère perspective à l'entrée. */
  .code__tabs button, .code__copier { min-height: 48px; min-width: 48px; padding-inline: 1rem; }
  .hoquet { min-height: 48px; padding-inline: 1.3rem; }
  .contact__mail a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
  .foot__col a:not(.brand) { min-height: 44px; min-width: 44px; }
  .foot__langue > * { min-height: 44px; }
  /* Les jetons du centre rapetissent avec la profondeur (jusqu'à 0,72) : une zone de toucher invisible garde 44 px au plus loin. */
  .node-chip::after { content: ""; position: absolute; inset: -9px -4px; border-radius: 999px; }
}

/* ---------- v06.1 : état du bouton de la démonstration pendant la lecture ---------- */
.mission__play.is-lecture svg { animation: lecture-pulse 1.1s ease-in-out infinite; }
@keyframes lecture-pulse { 50% { opacity: .35; scale: .8; } }
@media (prefers-reduced-motion: reduce) { .mission__play.is-lecture svg { animation: none; } }

/* ---------- Narration au défilement ---------- */
/* Lumière de chapitre : un halo propre à chaque section avance avec la lecture (animation liée à la vue). */
:is(.mission, .securite, .studio, .api, .app, .faq) { isolation: isolate; }
:is(.securite, .studio, .api, .app, .faq)::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 0; width: min(120vw, 70rem); aspect-ratio: 2; translate: -50% -30%; pointer-events: none;
  background: radial-gradient(closest-side, rgb(123 60 255 / .14), rgb(79 231 255 / .04) 60%, transparent);
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .motion :is(.securite, .studio, .api, .app, .faq)::before { animation: halo-chapitre linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    .motion :is(.soc__radar, .studio__ecran, .code, .phone-scene) { animation: profondeur linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  }
}
@keyframes halo-chapitre { from { translate: -60% -10%; opacity: 0; scale: .7; } 40% { opacity: 1; } to { translate: -40% 40%; opacity: 0; scale: 1.15; } }
@keyframes profondeur { from { transform: perspective(1200px) rotateX(14deg) translateY(40px); filter: brightness(.6); } to { transform: none; filter: none; } }

/* Sections hors écran : rendu différé. La démonstration épinglée garde une taille de réserve proche de la vraie. */
:is(.manifeste, .securite, .studio, .api, .app, .faq) { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.mission { content-visibility: auto; contain-intrinsic-size: auto 1500px; }
/* v06.1 : le centre aussi, pour que l'arrivée des polices (swap) ne remette en page que le haut de la page. */
.centre { content-visibility: auto; contain-intrinsic-size: auto 1400px; }
@media (prefers-reduced-motion: no-preference) { .motion .centre { contain-intrinsic-size: auto calc(230svh + 9rem); } }
@media (max-width: 39.99rem) and (prefers-reduced-motion: no-preference) { .motion .centre { contain-intrinsic-size: auto calc(200svh + 8rem); } }
@media (min-width: 64rem) and (prefers-reduced-motion: no-preference) { .motion .mission { contain-intrinsic-size: auto 260svh; } }

/* ---------- Mode capture et mode calme ---------- */
.capture :is(.manifeste, .centre, .mission, .securite, .studio, .api, .app, .faq) { content-visibility: visible; }
.capture .mission__track { height: auto !important; }
.capture .mission__pin { position: static !important; min-height: 0 !important; }
.capture .compagnon, .capture .chapitres { display: none !important; }
html:not(.motion) .mission__log li, .capture .mission__log li { opacity: 1 !important; translate: none !important; }
@media (prefers-reduced-motion: reduce) {
  .compagnon { transition: none; }
  .phone { transform: none; }
}

/* v06.1 : sur mobile, pas d'effet de perspective sur le bloc de code (placé en fin de fichier pour l'emporter) : les onglets gardent leur taille réelle. */
@media (max-width: 47.99rem), (pointer: coarse) { .motion .code { animation: none; } }
