/* Web51. Concept : un vol de nuit, de la piste 51 au lever du soleil. La scène 3D (scene.js) est fixe derrière la page. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --nuit: #050b24;
  --encre: #0c1838;
  --encre-doux: #43506f;
  --bleu: #1c46c9;
  --bleu-nuit: #0f2778;
  --bleu-clair: #c3d0f5;
  --balise: #ffc928;
  --sel: #e8edf3;
  --blanc: #fafcfe;
  --trait-nuit: #34457d;

  --police: "Archivo", "Segoe UI", Arial, sans-serif;
  --t-l: clamp(2.1rem, 4.6vw, 4.1rem);
  --t-m: clamp(1.3rem, 2vw, 1.75rem);
  --bloc: clamp(5rem, 11vw, 10rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; background: var(--nuit); }
body { margin: 0; background: var(--sel); color: var(--encre); font: 400 1.0625rem/1.6 var(--police); -webkit-font-smoothing: antialiased; }
body:not(.vol-de-nuit) { min-height: 100vh; }
body.vol-de-nuit { background: none; color: var(--blanc); }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2 { font-stretch: 120%; font-weight: 820; line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: var(--t-l); }
h3 { font-size: var(--t-m); font-stretch: 114%; font-weight: 720; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--balise); outline-offset: 3px; box-shadow: 0 0 0 3px var(--encre); }
::selection { background: var(--balise); color: var(--encre); }

#vol { position: fixed; z-index: -1; inset: 0; width: 100%; height: 100%; height: 100lvh; display: block; background: linear-gradient(#050b24, #0f2778 55%, #17368f 72%, #0c1838); }

.cadre { width: 100%; max-width: 84rem; margin-inline: auto; padding-inline: max(1.25rem, 3.5vw); }
.evitement { position: absolute; left: 1rem; top: -5rem; z-index: 30; padding: .75rem 1rem; background: var(--balise); color: var(--encre); }
.evitement:focus { top: 1rem; }

.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: .7rem 1.7rem; border: 0; border-radius: 3px; cursor: pointer; background: var(--balise); color: var(--encre); font: 720 1.0625rem/1.2 var(--police); text-decoration: none; transition: background-color .2s; }
.bouton:hover { background: #ffdc73; }
.lien { display: inline-flex; align-items: center; min-height: 3.5rem; font-weight: 600; }

/* En-tête et altimètre */
.entete { position: fixed; z-index: 20; inset: 0 0 auto; color: var(--blanc); transition: background-color .3s; }
.entete.pose, body:not(.vol-de-nuit) .entete { background: rgb(5 11 36 / .92); }
body:not(.vol-de-nuit) .entete { position: static; }
.entete .cadre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.marque { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1.45rem; font-weight: 800; font-stretch: 120%; letter-spacing: -.02em; text-decoration: none; }
.marque b { margin-left: .18em; padding: .08em .28em; background: var(--balise); color: var(--encre); font-weight: 900; }
.nav { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.altimetre { position: fixed; z-index: 15; right: max(1.25rem, 3.5vw); bottom: 1.5rem; padding: .5rem .8rem; background: rgb(5 11 36 / .8); color: var(--bleu-clair); font-size: .95rem; line-height: 1.3; font-variant-numeric: tabular-nums; transition: opacity .3s; }
.altimetre b { display: inline-block; min-width: 4.6em; text-align: right; color: var(--balise); font-weight: 700; }
.arrivee .altimetre { opacity: 0; }
.sans-gl .altimetre { display: none; }

/* Ouverture */
.ouverture { min-height: 100svh; }
.ouverture .cadre { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: 100svh; padding-block: clamp(6.5rem, 15vh, 10rem) clamp(2rem, 6vh, 4rem); }
h1 { font-size: clamp(2.75rem, min(6.6vw, 11.5vh), 5.8rem); font-stretch: 125%; font-weight: 850; }
h1 span { display: block; animation: deploie 1.7s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * .13s); }
h1 span:nth-child(2) { --i: 1; }
h1 span:nth-child(3) { --i: 2; color: var(--balise); }
@keyframes deploie { from { font-stretch: 62%; font-weight: 320; letter-spacing: .01em; } }
.depart { max-width: 31rem; }
.depart p { font-size: 1.25rem; line-height: 1.5; text-shadow: 0 0 24px #050b24, 0 0 6px #050b24; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 1.6rem; }

/* Grandes phrases */
.envol { position: relative; height: 260vh; }
.cap { position: absolute; left: 0; width: 1px; height: 1px; }
.phrase { max-width: 84rem; margin-inline: auto; padding-inline: max(1.25rem, 3.5vw); font-size: clamp(2.2rem, 6.4vw, 6.6rem); font-weight: 820; font-stretch: 120%; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.envol .phrase { position: sticky; top: 17vh; text-shadow: 0 0 60px rgb(5 11 36 / .7); }
.envol .phrase span { display: block; opacity: calc(.42 + .58 * var(--v, 1)); transition: opacity .5s, color .5s; }
.or { color: color-mix(in srgb, var(--balise) calc(var(--v, 1) * 100%), #fff); }

/* Services */
.services { padding-block: 34vh 6rem; }
.intro { max-width: 60rem; margin-bottom: clamp(3rem, 8vw, 6rem); text-shadow: 0 0 40px #050b24, 0 0 12px #050b24; }
.intro p, .sous { margin-top: 1.1rem; font-size: 1.2rem; color: #dbe4ff; }
.service { position: sticky; top: calc(5.25rem + var(--r, 0) * .9rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4.5rem); align-items: center; min-height: min(38rem, calc(100svh - 10rem)); margin-bottom: 42vh; padding: clamp(1.5rem, 4vw, 4rem); background: #0a1645; border: 1px solid var(--trait-nuit); border-radius: 6px; box-shadow: 0 -24px 80px rgb(5 11 36 / .55); }
.service:nth-of-type(2) { --r: 1; }
.service:nth-of-type(3) { --r: 2; }
.service:nth-of-type(4) { --r: 3; margin-bottom: 10vh; }
.service h3 { font-size: clamp(1.8rem, 3.3vw, 3rem); font-weight: 800; font-stretch: 120%; line-height: 1.06; letter-spacing: -.02em; }
.dit p { margin-top: 1.1rem; max-width: 34ch; font-size: 1.15rem; color: #dbe4ff; }
.dit .ex { color: var(--balise); font-size: 1.0625rem; }

.demo { min-width: 0; padding: clamp(1.1rem, 2.4vw, 2rem); background: var(--blanc); color: var(--encre); border-radius: 5px; }
.titre-demo { margin-bottom: 1rem; font-size: 1.2rem; font-weight: 700; font-stretch: 108%; }
.retour { min-height: 1.6em; margin-top: 1rem; font-weight: 600; color: var(--bleu); }

.agenda { width: 100%; border-collapse: separate; border-spacing: 5px; table-layout: fixed; }
.agenda td, .agenda th { padding: 0; }
.agenda th { font-weight: 600; color: var(--encre-doux); }
.agenda button { width: 100%; min-height: 3rem; padding: 0; border: 0; border-radius: 3px; background: #dce5fb; color: var(--bleu-nuit); font: 600 1rem var(--police); cursor: pointer; transition: background-color .15s, transform .15s; }
.agenda button:hover:not(:disabled) { background: #b9cbf8; }
.agenda button:active:not(:disabled) { transform: scale(.95); }
.agenda button:disabled { background: none; color: #69758f; text-decoration: line-through; cursor: not-allowed; }
.agenda button[aria-pressed="true"], .agenda button[aria-pressed="true"]:hover { background: var(--bleu); color: #fff; }

.devis label, .total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: .6rem; font-weight: 600; }
.devis input[type="range"] { width: 100%; height: 1.9rem; margin: 0; accent-color: var(--bleu); cursor: pointer; }
.devis select { width: 100%; min-height: 2.75rem; margin-top: .3rem; padding: .3rem .6rem; border: 1px solid #74819c; border-radius: 3px; background: #fff; color: inherit; font: 400 1rem var(--police); }
.plan { display: grid; place-items: center; height: 9rem; background: #dfe9dc; border-radius: 3px; overflow: hidden; }
#terrasse { width: 45%; height: 45%; max-width: 94%; background: repeating-linear-gradient(90deg, rgb(0 0 0 / .16) 0 1px, transparent 1px 9px) var(--bois, #c98d55); transition: width .3s cubic-bezier(.2, 1, .3, 1), height .3s cubic-bezier(.2, 1, .3, 1), background-color .3s; }
.total { align-items: center; margin-top: 1rem; padding-top: .8rem; border-top: 2px solid var(--encre); font-size: 1.15rem; }
.total output { font-size: 2.2rem; line-height: 1; font-weight: 820; font-stretch: 115%; font-variant-numeric: tabular-nums; color: var(--bleu); }

.avant-apres { --x: 50%; position: relative; height: 23rem; padding: 0; overflow: hidden; }
.avant, .apres { position: absolute; inset: 0; padding: 1.6rem; }
.apres { background: var(--blanc); }
.apres li { display: grid; grid-template-columns: minmax(0, 1fr) auto 7rem; align-items: center; gap: 1rem; min-height: 3.9rem; border-top: 1px solid #dde4ee; }
.apres li span { font-variant-numeric: tabular-nums; }
.apres i { justify-self: end; padding: .2rem .6rem; border-radius: 3px; font-style: normal; font-size: .9375rem; font-weight: 600; white-space: nowrap; }
.ok { background: #d3f0df; color: #0b5532; }
.att { background: #fff0bd; color: #614500; }
.ret { background: #ffdcd6; color: #8c1d0c; }
.avant { padding: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); background: #c3c3c3; color: #000; font: 14px/1.4 Tahoma, Verdana, sans-serif; border: 2px outset #eee; }
.barre { padding: 4px 8px; background: #00007b; color: #fff; font-weight: 700; }
.menus { padding: 4px 8px; border-bottom: 1px solid #888; }
.avant table { width: calc(100% - 16px); margin: 8px; border-collapse: collapse; background: #fff; border: 2px inset #ddd; }
.avant td, .avant th { padding: 6px 7px; border: 1px solid #a8a8a8; text-align: left; font-weight: 400; white-space: nowrap; }
.avant th { background: #c3c3c3; }
.pile { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px; }
.pile span { padding: 4px 12px; border: 2px outset #f2f2f2; background: #c3c3c3; }
.trait { position: absolute; inset-block: 0; left: var(--x); width: 4px; margin-left: -2px; background: var(--balise); pointer-events: none; }
.trait::after { content: "\2194"; position: absolute; top: 72%; left: 50%; display: grid; place-items: center; width: 3.2rem; height: 3.2rem; margin: -1.6rem; border-radius: 50%; background: var(--balise); color: var(--encre); font-size: 1.5rem; font-weight: 700; }
#curseur { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
#curseur:focus-visible ~ .trait::after { outline: 3px solid var(--encre); outline-offset: 2px; }

.flux .bouton { width: 100%; background: var(--bleu); color: #fff; }
.flux .bouton:hover { background: var(--bleu-nuit); }
.flux .bouton:disabled { background: #5b6b96; cursor: default; }
.flux ol { margin-top: 1.4rem; }
.flux li { position: relative; display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0 .85rem 2.6rem; }
.flux li::before { content: ""; position: absolute; z-index: 1; left: 6px; top: 1.2rem; width: 18px; height: 18px; border-radius: 50%; background: #c8d2e6; transition: background-color .3s, box-shadow .3s; }
.flux li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 2rem; bottom: -1.2rem; width: 3px; background: linear-gradient(var(--bleu) 0 0) top / 100% var(--p, 0%) no-repeat #c8d2e6; transition: background-size .45s linear; }
.flux li.fait::before { background: var(--bleu); box-shadow: 0 0 0 6px var(--balise); }
.flux li.fait { --p: 100%; }
.flux li span { color: var(--encre-doux); text-align: right; }
.flux li.fait span { color: var(--bleu-nuit); font-weight: 600; }

/* Sections */
.bloc { padding-block: var(--bloc); }
.situations { text-shadow: 0 0 30px #050b24, 0 0 10px #050b24; background: linear-gradient(transparent, rgb(5 11 36 / .62) 18% 82%, transparent); }
.avap { width: 100%; margin-top: clamp(2.5rem, 6vw, 5rem); border-collapse: collapse; text-align: left; }
.avap th { padding-bottom: 1rem; font-weight: 600; color: var(--bleu-clair); }
.avap th + th { color: var(--balise); }
.avap td { width: 50%; padding: 2rem 3rem 2rem 0; border-top: 1px solid #5068b8; vertical-align: top; font-size: clamp(1.2rem, 1.9vw, 1.65rem); line-height: 1.35; text-wrap: pretty; }
.avap td:first-child { color: var(--bleu-clair); }
.avap td:last-child { padding-right: 0; font-weight: 700; font-stretch: 106%; }

.methode { min-height: 110vh; padding-top: 20vh; text-shadow: 0 0 20px rgb(5 11 36 / .9); }
.profil { display: block; width: 100%; height: clamp(8rem, 18vw, 16rem); margin-top: 1rem; overflow: visible; }
.profil path { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
.profil .fond { stroke: #6f88d8; stroke-opacity: .5; }
.profil .trace { stroke: var(--balise); }
.etapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; margin-top: 2rem; }
.etapes .n { display: block; margin-bottom: .6rem; font-size: clamp(3.5rem, 6vw, 5.5rem); line-height: .9; font-weight: 800; font-stretch: 80%; color: var(--balise); }
.etapes p { margin-top: .6rem; color: #dbe4ff; }

.questions { background: var(--nuit); }
.questions .cadre { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2.5rem 4rem; }
details { border-top: 1px solid var(--trait-nuit); }
details:last-child { border-bottom: 1px solid var(--trait-nuit); }
summary { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.4rem; font-size: 1.25rem; font-weight: 650; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--balise); }
summary::after { content: "+"; flex: none; font-size: 1.6rem; line-height: 1.2; color: var(--balise); }
details[open] summary::after { content: "\2212"; }
details p { max-width: 62ch; padding-bottom: 1.6rem; color: #dbe4ff; }

.aube { height: 190vh; }
.aube .phrase { position: sticky; top: 16vh; max-width: 80rem; padding-top: 4vh; text-align: center; text-shadow: 0 0 40px rgb(8 20 70 / .75), 0 0 10px rgb(8 20 70 / .5); }
/* Sans la 3D : un ciel d'aube fixe derrière la phrase */
.sans-gl .aube { --ciel-aube: radial-gradient(circle at 50% 74%, #fff0bd 0 2.6rem, rgb(255 201 40 / .55) 3rem, transparent 22rem), linear-gradient(#050b24, #16246b 22%, #3b3580 48%, #8a4f7a 62%, #e08a4a 74%, #5a4a78 82%, #1b2350); }
.sans-gl .aube::before { content: ""; position: sticky; top: 0; display: block; height: 100vh; height: 100lvh; margin-bottom: -100vh; margin-bottom: -100lvh; background: var(--ciel-aube); }

.contact { position: relative; background: var(--balise); color: var(--encre); }
.contact .cadre { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem 4rem; align-items: start; }
.contact h2 { font-size: clamp(2.6rem, 6.2vw, 6rem); }
.contact .texte > p { margin-top: 1.4rem; max-width: 34ch; font-size: 1.25rem; }
.adresse { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-top: 2rem; }
.adresse a { font-size: clamp(1.35rem, 2.2vw, 1.9rem); font-weight: 750; }
.copier { min-height: 2.75rem; padding: .4rem .9rem; border: 2px solid var(--encre); border-radius: 3px; background: none; color: inherit; font: 600 1rem var(--police); cursor: pointer; }
.copier:hover { background: var(--encre); color: var(--blanc); }
.fiche { display: grid; gap: 1.2rem; padding: clamp(1.25rem, 3vw, 2.5rem); background: var(--blanc); border-radius: 5px; }
.champ { display: grid; gap: .35rem; }
.champ label { font-weight: 600; }
.champ input, .champ select, .champ textarea { width: 100%; min-height: 3.1rem; padding: .65rem .8rem; border: 1px solid #74819c; border-radius: 3px; background: #fff; color: var(--encre); font: 400 1.0625rem/1.4 var(--police); }
.champ textarea { min-height: 9rem; resize: vertical; }
.fiche .bouton { background: var(--bleu); color: #fff; }
.fiche .bouton:hover { background: var(--bleu-nuit); }
.fiche .bouton:disabled { background: #5b6b96; cursor: default; }
.champ input[aria-invalid="true"], .champ select[aria-invalid="true"], .champ textarea[aria-invalid="true"] { border: 2px solid #b3261e; }
.erreur { color: #9c1c15; font-size: .95rem; font-weight: 600; }
.erreur::before { content: "Erreur : "; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.merci { align-content: center; justify-items: start; }
.merci h3 { font-size: 1.75rem; line-height: 1.15; font-weight: 750; }
.merci h3:focus { outline: none; box-shadow: none; }
.merci .bouton { width: auto; }
.note { font-size: .95rem; color: var(--encre-doux); }

.pied { position: relative; padding-block: 3rem 2rem; background: var(--nuit); color: var(--bleu-clair); overflow: hidden; }
.geant { display: flex; align-items: center; font-size: min(18vw, 15.4rem); line-height: 1; font-weight: 850; font-stretch: 125%; letter-spacing: -.04em; color: var(--blanc); white-space: nowrap; }
.geant b { margin-left: .14em; padding: 0 .12em; background: var(--balise); color: var(--encre); font-weight: 900; }
.bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; margin-top: 2.5rem; }

/* Pages simples */
.page { max-width: 46rem; padding-block: var(--bloc); }
.page h1 { font-size: clamp(2rem, 3.8vw, 3.1rem); margin-bottom: 2rem; }
.page h2 { font-size: var(--t-m); margin: 2.25rem 0 .6rem; }
.page p + p { margin-top: .8rem; }
.page .bouton { margin-top: 2rem; }
mark { padding: .05em .3em; background: var(--balise); color: var(--encre); }
body:not(.vol-de-nuit) .pied .cadre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.pied .marque { color: var(--blanc); }

/* Animations liées au défilement */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .profil .trace { stroke-dasharray: 1; animation: tracer linear both; animation-timeline: view(); animation-range: entry 60% cover 62%; }
    @keyframes tracer { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
    .geant { animation: elargir linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    @keyframes elargir { from { font-stretch: 62%; } to { font-stretch: 125%; } }
  }
}

@media (max-width: 940px) {
  .service { position: relative; top: 0; grid-template-columns: minmax(0, 1fr); min-height: 0; margin-bottom: 16vh; }
  .dit p { max-width: 60ch; }
  .questions .cadre, .contact .cadre { grid-template-columns: minmax(0, 1fr); }
  .profil { display: none; }
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 3rem; }
}
@media (max-height: 760px) and (min-width: 941px) {
  .service { position: relative; top: 0; margin-bottom: 18vh; }
}
@media (max-width: 600px) {
  .nav a:not(.essentiel) { display: none; }
  .altimetre { display: none; }
  h1 { font-stretch: 112%; font-size: clamp(2.3rem, 11.4vw, 3.4rem); }
  .ouverture .cadre { justify-content: flex-start; gap: 1.5rem; padding-top: 6.25rem; }
  .depart p { font-size: 1.125rem; }
  .actions { margin-top: 1.1rem; }
  .envol { height: 210vh; }
  .phrase { font-stretch: 108%; }
  .etapes { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .etapes li { display: grid; grid-template-columns: 4rem minmax(0, 1fr); }
  .agenda { border-spacing: 3px; }
  .agenda button { font-size: .9375rem; }
  .apres { padding: 1.1rem; }
  .apres li { grid-template-columns: minmax(0, 1fr) auto; }
  .apres li span { display: none; }
  .avap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .avap tr { display: block; padding-block: 1.5rem; border-top: 1px solid #5068b8; }
  .avap td { display: block; width: auto; padding: 0; border: 0; }
  .avap td + td { margin-top: 1rem; }
  .avap td::before { content: attr(data-l); display: block; font-size: 1rem; font-weight: 600; font-stretch: 100%; color: var(--bleu-clair); }
  .avap td + td::before { color: var(--balise); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .envol { height: auto; padding-block: 20vh; }
  .envol .phrase, .aube .phrase { position: static; }
  .aube { height: 90vh; padding-top: 16vh; }
  .sans-gl .aube { background: var(--ciel-aube); }
  .sans-gl .aube::before { content: none; }
}
