@font-face { font-family: "Geist"; src: url("assets/geist.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --fond: #1a3cf0;
  --cobalt: #1a3cf0;
  --blanc: #f2f5ff;
  --encre: #050b36;
  --corail: #ff5a3c;
  --or: #ffc83d;
  --marge: clamp(20px, 3.6vw, 56px);
  --doux: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--fond); scrollbar-color: rgba(242, 245, 255, .45) transparent; scroll-padding-top: 70px; }
body { margin: 0; color: var(--blanc); background: var(--fond); font: 400 18px/1.5 "Geist", system-ui, sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { color: var(--encre); background: var(--or); }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
h1, h2 { font-weight: 600; letter-spacing: -.04em; line-height: .98; text-wrap: balance; }
ul { list-style: none; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

.toile { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
main, .pied { position: relative; z-index: 1; }
main { overflow-x: clip; }

.barre {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 36px;
  padding: 14px var(--marge);
  background: var(--fond);
  transition: background-color .3s;
}
.marque { font-size: 20px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.barre nav { display: flex; gap: 26px; margin-right: auto; font-size: 16px; }
.barre nav a { text-decoration: none; }
.barre nav a:hover { text-decoration: underline; }
.barre, .barre a { transition: color .3s; }
.sur-clair .barre { color: var(--encre); background: var(--blanc); }
.sur-clair .barre .bouton { color: var(--blanc); background: var(--encre); }

.bouton {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  color: var(--encre); background: var(--blanc);
  font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--doux), background-color .2s, color .2s;
}
.bouton:hover { transform: translateY(-2px); background: var(--or); color: var(--encre); }
.bouton:active { transform: scale(.97); }

/* Les niveaux, sur le bord droit de l'écran */
.rail { position: fixed; right: var(--marge); top: 50%; z-index: 9; display: none; flex-direction: column; gap: 10px; transform: translateY(-50%); text-align: right; font-size: 14px; transition: opacity .3s; }
.rail a { text-decoration: none; opacity: .55; transition: opacity .25s, transform .35s var(--doux); }
.rail a:hover { opacity: 1; }
.rail a[data-actif] { opacity: 1; color: var(--or); transform: translateX(-6px); font-weight: 600; }
.sur-clair .rail, .hors-niveaux .rail { opacity: 0; pointer-events: none; }

/* Le premier écran */
.accueil {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100svh; padding: 0 var(--marge) clamp(20px, 3vw, 40px);
}
.accueil h1 { font-size: clamp(50px, 10.8vw, 190px); line-height: .9; letter-spacing: -.05em; white-space: nowrap; }
.accueil-bas { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(14px, 2vw, 26px); }
.accueil-bas p { max-width: 34em; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.35; }
.js:not(.calme) .accueil h1 { animation: monter 1.4s var(--doux) both .15s; }
.js:not(.calme) .accueil-bas { animation: monter 1.4s var(--doux) both .35s; }
@keyframes monter { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* Chaque formation est un niveau */
.niveau { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); min-height: 170svh; padding: 0 var(--marge); }
.texte { position: sticky; top: 24svh; align-self: start; grid-column: 1 / span 5; margin-top: 24svh; margin-bottom: 24svh; }
[data-cote="droite"] .texte { grid-column: 8 / span 5; padding-right: 110px; }
.texte h2 { font-size: clamp(38px, 4.8vw, 76px); }
.texte > p { max-width: 28em; margin-top: 20px; font-size: clamp(18px, 1.45vw, 22px); line-height: 1.35; }
.chiffres { display: flex; flex-wrap: wrap; gap: 8px 30px; margin-top: 24px; font-size: 16px; }
.chiffres b { display: block; font-size: clamp(36px, 3.6vw, 56px); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.lien { display: inline-block; margin-top: 24px; font-weight: 600; transition: color .2s; }
.lien:hover { color: var(--or); }
.js:not(.calme) .niveau .texte > *, .js:not(.calme) .contact .texte > * { opacity: .12; transform: translateY(26px); transition: opacity .6s var(--doux), transform .9s var(--doux); }
.js:not(.calme) .actif .texte > * { opacity: 1; transform: none; }
.js:not(.calme) .actif .texte > :nth-child(2) { transition-delay: 70ms; }
.js:not(.calme) .actif .texte > :nth-child(3) { transition-delay: 140ms; }
.js:not(.calme) .actif .texte > :nth-child(4) { transition-delay: 210ms; }

/* La respiration claire, avant le fond */
.apprendre { padding: clamp(90px, 11vw, 170px) var(--marge); color: var(--encre); background: var(--blanc); }
.apprendre h2 { font-size: clamp(44px, 8vw, 128px); }
.chapeau { max-width: 30em; margin-top: 26px; font-size: clamp(20px, 2vw, 30px); line-height: 1.25; letter-spacing: -.015em; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); margin-top: clamp(50px, 7vw, 100px); }
.modes h3 { margin-bottom: 10px; color: var(--cobalt); font-size: clamp(26px, 2.6vw, 38px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.modes p { max-width: 26em; }
.modes a { font-weight: 600; }
.cadre-legal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); margin-top: clamp(50px, 7vw, 100px); padding: clamp(22px, 2.6vw, 36px); color: var(--blanc); background: var(--encre); font-size: 16px; }
.cadre-legal b { display: block; margin-bottom: 4px; font-weight: 600; }
.js:not(.calme) [data-monte] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--doux), transform .9s var(--doux); transition-delay: calc(var(--ordre, 0) * 80ms); }
.js:not(.calme) [data-monte].vu { opacity: 1; transform: none; }

/* Le fond */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; min-height: 110svh; padding: 0 var(--marge); }
.contact .texte { position: static; grid-column: 1 / span 5; align-self: center; margin: 0; }
.courriel { display: inline-block; margin-top: 24px; color: var(--or); font-size: clamp(25px, 2.7vw, 42px); font-weight: 600; letter-spacing: -.03em; overflow-wrap: anywhere; }
.courriel:hover { color: var(--blanc); }

.pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding: 22px var(--marge); font-size: 15px; opacity: .85; }

/* Mentions légales */
.page-legale { color: var(--encre); background: var(--blanc); }
.page-legale .barre { color: var(--blanc); background: var(--cobalt); }
.legal { max-width: 46rem; padding: 130px var(--marge) 80px; }
.legal h1 { font-size: clamp(38px, 6vw, 76px); }
.legal h2 { margin-top: 2.2rem; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; }
.legal p { margin-top: .6rem; }

.sans3d .niveau { min-height: auto; padding-top: 12svh; padding-bottom: 12svh; }
.sans3d .texte { position: static; margin: 0; }

@media (min-width: 1200px) { .rail { display: flex; } }

@media (max-width: 899px) {
  body { font-size: 17px; }
  .barre { justify-content: space-between; gap: 12px; padding: 10px var(--marge); }
  .barre nav { display: none; }
  .bouton { padding: 10px 18px; }
  .accueil h1 { font-size: 19vw; white-space: normal; }
  .accueil-bas { flex-direction: column; align-items: flex-start; gap: 14px; }

  .niveau, .contact { display: block; min-height: 135svh; }
  /* Sur téléphone, la 3D occupe le haut de l'écran et le texte s'installe dessous, sur la couleur du niveau. */
  .niveau .texte, [data-cote="droite"] .texte {
    position: sticky; top: 50svh; margin: 0; padding: 18px 0 20px;
    min-height: 50svh; background: var(--fond);
  }
  .niveau { padding-top: 50svh; }
  .texte h2 { font-size: 34px; }
  .texte > p { margin-top: 10px; font-size: 17px; }
  .chiffres { gap: 6px 22px; margin-top: 12px; font-size: 15px; }
  .chiffres b { font-size: 30px; }
  .lien { margin-top: 12px; }

  .modes, .cadre-legal { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .contact { min-height: 100svh; padding-top: 52svh; padding-bottom: 20px; }
  .contact .texte { padding-bottom: 20px; }
  .pied { flex-direction: column; }
}

/* Petits téléphones : le texte du niveau doit tenir sous la 3D. */
@media (max-width: 899px) and (max-height: 700px) {
  .accueil h1 { font-size: 16vw; }
  .accueil-bas p { font-size: 15px; }
  .niveau { padding-top: 40svh; }
  .niveau .texte, [data-cote="droite"] .texte { top: 40svh; min-height: 60svh; padding: 10px 0 12px; }
  .texte h2 { font-size: 27px; }
  .texte > p { margin-top: 6px; font-size: 15px; line-height: 1.3; }
  .chiffres { margin-top: 8px; font-size: 13px; }
  .chiffres b { font-size: 22px; }
  .lien { margin-top: 8px; font-size: 15px; }
  .contact { padding-top: 42svh; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0s !important; animation: none !important; }
}
