/* LIHA — charte du rapport : carte de nuit, bleu marine, orange, bleu clair. */
:root {
  --marine: #082344;
  --encre: #132e4b;
  --bleu: #087ec3;
  --bleu-clair: #bee0fa;
  --or: #ffa734;
  --or-fonce: #ff9d28;
  --blanc: #ffffff;
  --texte-doux: #dce9f5;
  --verre: rgba(8, 35, 68, 0.62);
  --bord-verre: rgba(190, 224, 250, 0.22);
  --erreur: #ff8a8a;
  --vert: #29a65a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
/* Les effets autour des cartouches peuvent dépasser de l'écran : jamais de défilement horizontal pour autant. */
html, body { overflow-x: clip; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--marine); color: var(--blanc); line-height: 1.5; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fond animé ---------- */
.decor { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.carte { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; object-position: 60% 60%;
  animation: survol 38s ease-in-out infinite alternate; }
@keyframes survol {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.12) translate(-2.5%, -3%); }
}
.balayage { position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 42%, rgba(255, 196, 120, .13) 50%, transparent 58%);
  animation: balaye 11s ease-in-out infinite; }
@keyframes balaye { 0% { transform: translateX(-40%); } 55%, 100% { transform: translateX(40%); } }
.onde { position: absolute; left: 72%; top: 64%; width: 0; height: 0; }
.onde span { position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%;
  border: 1.5px solid rgba(255, 167, 52, .55); box-shadow: 0 0 24px rgba(255, 167, 52, .25);
  animation: onde 4.5s cubic-bezier(.2, .6, .3, 1) infinite; opacity: 0; }
.onde span:nth-child(2) { animation-delay: 1.5s; }
.onde span:nth-child(3) { animation-delay: 3s; }
@keyframes onde { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
.voile { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 35, 68, .55) 0%, rgba(8, 35, 68, .25) 35%, rgba(8, 35, 68, .75) 100%); }
@media (min-width: 900px) {
  .onde { left: 48%; top: 46%; }
  .voile { background: linear-gradient(90deg, rgba(8, 35, 68, .82) 0%, rgba(8, 35, 68, .45) 55%, rgba(8, 35, 68, .25) 100%); }
}

/* ---------- Mise en page ---------- */
.page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
/* L'en-tête a la même largeur que le contenu : le logo reste aligné sur le titre (téléphone, tablette, ordinateur). */
.entete { padding: max(18px, env(safe-area-inset-top)) 16px 4px; width: 100%; max-width: 560px; margin: 0 auto; }
@media (min-width: 900px) { .entete { max-width: 1080px; } }
.logo { width: 190px; height: auto; display: block; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .35)); }

/* ---------- Logo animé (mesures en pixels du logo d'origine × --u) ---------- */
.logo-anime { --u: .2px; display: inline-block; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .35)); }
.logo-ligne { display: flex; align-items: flex-start; }
.symbole { width: calc(413 * var(--u)); height: calc(386 * var(--u)); display: block; }
.lettres { display: flex; align-items: flex-start; margin-top: calc(81 * var(--u)); margin-left: calc(60 * var(--u)); }
.lettre { height: calc(280 * var(--u)); width: auto; display: block; }
.lettre.i { margin-left: calc(47 * var(--u)); }
.lettre.h { margin-left: calc(64 * var(--u)); }
.lettre.a { margin-left: calc(37 * var(--u)); }
.devise { margin: calc(26 * var(--u)) 0 0 calc(52 * var(--u)); font-size: calc(54 * var(--u)); line-height: 1.2; color: #fff; white-space: nowrap; letter-spacing: .1px; }
.devise span { display: inline-block; white-space: pre; }
@media (min-width: 900px) { .logo-anime { --u: .26px; } }

/* Arrivée : le symbole tourne en grand au centre puis vient se poser ; LIHA en vague ; la devise lettre par lettre. */
.symbole-volant { position: fixed; z-index: 20; pointer-events: none; will-change: transform; filter: drop-shadow(0 0 40px rgba(255, 167, 52, .35)); }
.symbole-volant img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Éclat lumineux centré sur le point bleu (50,7 % / 53,6 % de l'image du symbole). */
.symbole-volant .eclat { position: absolute; left: 50.7%; top: 53.6%; width: 30%; aspect-ratio: 1; margin: -15% 0 0 -15%; border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 224, 250, .95) 0%, rgba(190, 224, 250, .35) 45%, transparent 70%); opacity: 0; }
/* Étincelles autour du point bleu (centre du point : 50,7 % / 53,6 % du symbole). */
.symbole-volant .etincelle { position: absolute; left: 50.7%; top: 53.6%; width: 7px; height: 7px; border-radius: 50%;
  background: #ffc06a; box-shadow: 0 0 10px 2px rgba(255, 167, 52, .8); }
.symbole-volant .etincelle.bleue { background: #e3f2ff; box-shadow: 0 0 10px 2px rgba(190, 224, 250, .9); }
/* Traînée de comète et onde de choc. */
.trainee { position: fixed; z-index: 19; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 110, .55) 0%, rgba(190, 224, 250, .25) 45%, transparent 70%); filter: blur(2px); }
.onde-choc { position: fixed; z-index: 19; pointer-events: none; border-radius: 50%; border: 2px solid rgba(255, 167, 52, .9);
  box-shadow: 0 0 22px rgba(255, 167, 52, .6), inset 0 0 18px rgba(190, 224, 250, .4); }
.intro .symbole, .intro .lettre, .intro .devise span { opacity: 0; }
.intro .apparait, .intro .pied { animation-play-state: paused; opacity: 0; }
.intro-voile { position: fixed; inset: 0; z-index: 15; background: rgba(8, 35, 68, .55); pointer-events: none; transition: opacity .8s; }
.lettre.vague { animation: vague .7s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes vague {
  0% { opacity: 0; transform: translateY(70%) scale(.6); }
  60% { opacity: 1; transform: translateY(-14%) scale(1.04); }
  100% { opacity: 1; transform: none; }
}
.devise span.tape { animation: tape .35s ease-out both; }
@keyframes tape { from { opacity: 0; transform: translateY(40%); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 28px; }
@media (min-width: 900px) {
  main { max-width: 1080px; }
  #vue-formulaire { display: grid; grid-template-columns: 1fr 460px; gap: 56px; align-items: start; padding-top: 40px; }
}

/* ---------- Accroche (comme la couverture du rapport) ---------- */
h1 { font-weight: 700; font-size: 32px; line-height: 1.15; margin: 14px 0 12px; letter-spacing: -.3px; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
@media (min-width: 900px) { .accroche h1 { font-size: 50px; } }
.or { color: var(--or); }
.sous { color: var(--texte-doux); font-size: 16px; margin: 0 0 14px; max-width: 520px; }
.trait { display: block; width: 56px; height: 3px; background: var(--or-fonce); border-radius: 2px; margin-bottom: 18px; }
.volets { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.volets li { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; padding: 7px 12px 7px 9px; border-radius: 999px;
  background: rgba(8, 35, 68, .55); border: 1px solid var(--bord-verre); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* Pastilles : se soulèvent au survol, comme les cartouches. */
.volets li { cursor: default; transition: transform .22s cubic-bezier(.3, 1.6, .5, 1), box-shadow .25s, border-color .25s, background .25s; }
/* Survol réservé aux écrans avec souris : sur tablette et téléphone, un toucher ne laisse pas l'élément « soulevé ». */
@media (hover: hover) {
  .volets li:hover { transform: translateY(-4px) scale(1.04); border-color: rgba(255, 167, 52, .6); background: rgba(8, 35, 68, .75);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .35), 0 0 0 3px rgba(255, 167, 52, .12); }
}
.volets svg { width: 17px; height: 17px; fill: var(--or); flex: none; }

/* ---------- Carte en verre ---------- */
.verre { background: var(--verre); border: 1px solid var(--bord-verre); border-radius: 20px; padding: 20px 18px;
  backdrop-filter: blur(16px) saturate(130%); -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06); }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 600; margin-bottom: 10px; color: var(--bleu-clair); font-size: 14px; text-transform: uppercase; letter-spacing: .8px; }
.formules { display: grid; gap: 10px; }
.carte-formule { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .05); border: 1.5px solid rgba(190, 224, 250, .18); transition: border-color .25s, background .25s, box-shadow .25s, transform .2s; }
/* Survol (souris) ou sélection au clavier : la cartouche se soulève, comme une vignette de jeu dans un menu. */
.carte-formule:focus-within { transform: translateY(-5px) scale(1.015); background: rgba(255, 255, 255, .09);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .35), 0 0 0 1px rgba(190, 224, 250, .35); }
@media (hover: hover) {
  .carte-formule:hover { transform: translateY(-5px) scale(1.015); background: rgba(255, 255, 255, .09);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .35), 0 0 0 1px rgba(190, 224, 250, .35); }
}
.carte-formule { transition: border-color .25s, background .25s, box-shadow .25s, transform .22s cubic-bezier(.3, 1.6, .5, 1); }
.carte-formule:has(input:checked), .carte-formule:has(input:checked):hover { border-color: var(--or); background: rgba(255, 167, 52, .1);
  box-shadow: 0 0 0 4px rgba(255, 167, 52, .12), 0 8px 26px rgba(255, 157, 40, .18); }
.carte-formule input { margin-top: 4px; accent-color: var(--or); width: 18px; height: 18px; flex: none; }
.carte-contenu { display: grid; gap: 4px; }
.formule-titre { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.prix { color: var(--or); white-space: nowrap; }
.formule-texte { color: var(--texte-doux); font-size: 13.5px; opacity: .9; }

.champ { display: grid; gap: 6px; margin-bottom: 13px; position: relative; }
.ligne { display: grid; grid-template-columns: 118px 1fr; gap: 12px; }
@media (max-width: 360px) { .ligne { grid-template-columns: 1fr; } }
label { font-weight: 600; font-size: 14.5px; color: var(--texte-doux); }
input:not([type=radio]):not([type=checkbox]) {
  font: inherit; font-size: 16px; padding: 12px 13px; width: 100%; color: var(--blanc);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(190, 224, 250, .25); border-radius: 12px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder { color: rgba(220, 233, 245, .5); }
input:focus { outline: none; border-color: var(--or); background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 4px rgba(255, 167, 52, .18); }
input[aria-invalid=true] { border-color: var(--erreur); }
#suggestions { list-style: none; margin: 4px 0 0; padding: 5px; position: absolute; top: 100%; left: 0; right: 0; z-index: 5;
  background: #0d2c52; border: 1px solid var(--bord-verre); border-radius: 12px; max-height: 240px; overflow-y: auto;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .45); animation: deroule .18s ease-out; }
@keyframes deroule { from { opacity: 0; transform: translateY(-4px); } }
#suggestions li { padding: 10px 12px; border-radius: 9px; cursor: pointer; }
#suggestions li[aria-selected=true], #suggestions li:hover { background: rgba(255, 167, 52, .16); }
.accord { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13.5px; margin: 6px 0 14px; }
.accord input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--or); flex: none; }
.accord a { color: var(--bleu-clair); }

/* ---------- Boutons ---------- */
button { position: relative; overflow: hidden; font: inherit; font-size: 17px; font-weight: 700; width: 100%; padding: 15px; border: 0; border-radius: 14px;
  color: var(--marine); cursor: pointer; background: linear-gradient(135deg, #ffb54d, var(--or-fonce));
  box-shadow: 0 10px 28px rgba(255, 157, 40, .35); transition: transform .15s, box-shadow .2s; }
button::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
  animation: reflet 3.8s ease-in-out infinite; }
@keyframes reflet { 0%, 60% { left: -60%; } 100% { left: 130%; } }
button:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(255, 157, 40, .45); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .75; cursor: wait; }
button:disabled::after { display: none; }
button.envoi::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: -2px;
  border: 2.5px solid rgba(8, 35, 68, .3); border-top-color: var(--marine); border-radius: 50%; animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
button.secondaire { background: transparent; color: var(--blanc); border: 1.5px solid var(--bord-verre); box-shadow: none; margin-top: 10px; }
button.secondaire::after { display: none; }
.erreur { color: #ffd6d6; background: rgba(237, 60, 81, .18); border: 1px solid rgba(237, 60, 81, .45); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.mention { font-size: 12.5px; color: var(--texte-doux); opacity: .8; text-align: center; margin: 12px 0 0; }

/* ---------- Écrans de fin ---------- */
.fin { text-align: center; max-width: 520px; margin: 40px auto 0; padding: 30px 22px; animation: monte .6s cubic-bezier(.2, .7, .2, 1); }
.fin h1 { font-size: 28px; }
.fin p { color: var(--texte-doux); }
.fin strong { color: var(--blanc); }
.coche { width: 84px; height: 84px; margin: 0 auto 6px; position: relative; }
.coche::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(41, 166, 90, .35); animation: onde 2.4s ease-out .5s infinite; }
.coche svg { position: relative; width: 84px; height: 84px; }
.coche circle { fill: var(--vert); stroke: none; transform-origin: center; animation: grossit .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.coche path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40; animation: trace .45s ease-out .35s forwards; }
@keyframes grossit { from { transform: scale(0); } }
@keyframes trace { to { stroke-dashoffset: 0; } }

.verre h2 { font-size: 17px; color: var(--or); margin: 18px 0 4px; }
.verre p { color: var(--texte-doux); }
.verre a { color: var(--bleu-clair); }
.pied { text-align: center; font-size: 12.5px; color: var(--texte-doux); opacity: .7; padding: 14px 16px max(16px, env(safe-area-inset-bottom)); }

/* ---------- Apparition au chargement ---------- */
.apparait { animation: monte .8s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .12s; } .d2 { animation-delay: .24s; } .d3 { animation-delay: .36s; } .d4 { animation-delay: .5s; }
@keyframes monte { from { opacity: 0; transform: translateY(18px); } }

/* Mouvements réduits si le téléphone le demande. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .coche path { stroke-dashoffset: 0; }
}
