/* ============================================================
   KOMÉLA — feuille de style
   ------------------------------------------------------------
   Charte officielle (Djamil, 03/09/2026) :
     Bleu marine #0E2D5B · Corail #FF5A4F · Turquoise #2CC3B1
     Blanc cassé #FAF9F6 · Manrope 400/500/700/800

   LE PARTI PRIS — les trajectoires.
   Le logo est un K d'où partent TROIS CHEMINS qui divergent. C'est
   l'idée même du produit : « il raconte où leurs chemins les ont
   menés » (briefing §35). Le site est donc traversé de trajectoires
   colorées qui se tracent au défilement, et alterne des aplats
   francs de marine et de crème.

   Première version jugée « pas très audacieuse, plutôt moche » par
   Djamil, à raison : elle se contentait d'ÉVITER les interdits du
   briefing (pas de glassmorphism, pas de dégradé violet) sans rien
   construire à la place. Le neutre finit toujours par ressembler à
   du générique — précisément ce que le §20 proscrit.

   ⚠️ MANROPE EST SERVIE EN LOCAL, jamais depuis Google Fonts : le CSS
   de marque fourni contenait un @import vers fonts.googleapis.com,
   qui aurait transmis l'IP de chaque visiteur à Google sur un site
   traitant des parcours d'anciens élèves. Licence OFL, fichiers dans
   assets/fonts/.
============================================================ */

@font-face { font-family:'Manrope'; font-style:normal; font-weight:400; font-display:swap;
  src:url('/assets/fonts/manrope-400-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400; font-display:swap;
  src:url('/assets/fonts/manrope-400-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:500; font-display:swap;
  src:url('/assets/fonts/manrope-500-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:500; font-display:swap;
  src:url('/assets/fonts/manrope-500-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:700; font-display:swap;
  src:url('/assets/fonts/manrope-700-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:700; font-display:swap;
  src:url('/assets/fonts/manrope-700-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:800; font-display:swap;
  src:url('/assets/fonts/manrope-800-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:800; font-display:swap;
  src:url('/assets/fonts/manrope-800-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }


:root {
  --nuit:      #0e2d5b;
  --nuit-fonce:#071b3a;
  --nuit-clair:#1d4a8f;
  --corail:    #ff5a4f;
  --corail-fonce:#e8433a;
  --turquoise: #2cc3b1;
  --turquoise-fonce:#1a9d8e;
  --creme:     #faf9f6;
  --encre:     #0b2145;
  --gris:      #5a6880;
  --gris-clair:#8c96a9;
  --trait:     #e5e3dd;
  --blanc:     #ffffff;
  --accent:    var(--corail);

  --sans: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Une courbe unique pour tout le site : ce qui bouge bouge pareil.
     Des durées différentes partout donnent une impression de bricolage. */
  --glisse: cubic-bezier(.22, .68, .35, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  /* Le site ne défile JAMAIS horizontalement, quoi qu'on y pose —
     les trajectoires débordent volontairement de leur section. */
  overflow-x: hidden;
}

.km-page { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.km-etroit { max-width: 680px; }
@media (max-width: 640px) { .km-page { padding: 0 18px; } }


/* ============================================================
   L'APPARITION AU DÉFILEMENT
   Posée par assets/komela.js (IntersectionObserver). Sans JavaScript,
   tout reste visible : l'état par défaut est « visible », et c'est le
   script qui masque avant d'animer. Une page qui dépend du JS pour
   afficher son texte est une page cassée.
============================================================ */

.km-js .km-vient { opacity: 0; transform: translateY(26px); }
.km-js .km-vient.km-la {
  opacity: 1; transform: none;
  transition: opacity .7s var(--glisse), transform .7s var(--glisse);
}
/* Un décalage en cascade quand plusieurs éléments arrivent ensemble. */
.km-js .km-vient.km-la:nth-child(2) { transition-delay: .08s; }
.km-js .km-vient.km-la:nth-child(3) { transition-delay: .16s; }
.km-js .km-vient.km-la:nth-child(4) { transition-delay: .24s; }
.km-js .km-vient.km-la:nth-child(5) { transition-delay: .32s; }
.km-js .km-vient.km-la:nth-child(6) { transition-delay: .40s; }


/* ============================================================
   LE HÉROS — plein écran, marine, traversé de trajectoires
============================================================ */

.km-hero {
  position: relative;
  background: var(--nuit);
  color: var(--blanc);
  overflow: hidden;
  padding: 0 0 90px;
  isolation: isolate;
}

/* Les trajectoires : trois courbes qui divergent, comme dans le logo.
   Elles se tracent au chargement (stroke-dashoffset), puis restent. */
.km-traj { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.km-traj path {
  fill: none; stroke-linecap: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: km-tracer 2.4s var(--glisse) forwards;
}
.km-traj path:nth-child(1) { stroke: var(--corail);    stroke-width: 5; animation-delay: .15s; opacity: .9; }
.km-traj path:nth-child(2) { stroke: var(--turquoise); stroke-width: 5; animation-delay: .35s; opacity: .9; }
.km-traj path:nth-child(3) { stroke: #ffffff;          stroke-width: 3; animation-delay: .55s; opacity: .22; }
.km-traj path:nth-child(4) { stroke: var(--turquoise); stroke-width: 2; animation-delay: .75s; opacity: .3; }

@keyframes km-tracer { to { stroke-dashoffset: 0; } }

/* Le voile de lisibilité. Les trajectoires partent du bas gauche et
   s'ouvrent vers la droite ; ce dégradé assombrit la zone du texte
   pour que rien ne passe derrière une lettre. Il est INDISPENSABLE :
   sur un petit écran, les courbes se resserrent et remontent dans le
   titre — c'est ce qui rendait la première version illisible. */
.km-hero-voile {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg,
    var(--nuit) 0%, var(--nuit) 34%,
    rgba(14, 45, 91, .82) 52%,
    rgba(14, 45, 91, .35) 70%,
    rgba(14, 45, 91, 0) 88%);
}
@media (max-width: 900px) {
  /* En mobile, le texte occupe toute la largeur : le voile couvre
     davantage, et les trajectoires ne servent plus que d'ambiance. */
  .km-hero-voile {
    background: linear-gradient(170deg,
      var(--nuit) 0%, var(--nuit) 40%,
      rgba(14, 45, 91, .86) 62%,
      rgba(14, 45, 91, .55) 82%,
      rgba(14, 45, 91, .3) 100%);
  }
}

/* Une lueur diffuse, pour que le marine ne soit pas un aplat mort.
   Ce n'est PAS un dégradé violet/bleu de SaaS : deux halos de la
   palette, très étalés, sur un fond de marque. */
.km-hero::before {
  content: ""; position: absolute; z-index: -1;
  width: 780px; height: 780px; border-radius: 50%;
  top: -320px; right: -240px;
  background: radial-gradient(circle, rgba(44,195,177,.30), transparent 68%);
}
.km-hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 640px; height: 640px; border-radius: 50%;
  bottom: -300px; left: -220px;
  background: radial-gradient(circle, rgba(255,90,79,.26), transparent 68%);
}

.km-hero-in { position: relative; z-index: 2; padding-top: 40px; }

.km-hero h1 {
  color: var(--blanc);
  font-size: clamp(38px, 8.2vw, 92px);
  font-weight: 800; line-height: 1.02; letter-spacing: -.042em;
  margin: 0 0 22px;
}
/* Le mot qui porte la question, souligné d'un trait corail qui se
   déroule — l'accent visuel de la page. */
.km-souligne { position: relative; display: inline-block; white-space: nowrap; }
/* ⚠️ Le trait passe SOUS les jambages. À .06em il coupait le « q » de
   « quoi ? » en deux — mesuré à l'écran : 5,5 px du bas de la boîte,
   soit en plein dans le descendant de Manrope. Une valeur négative le
   sort de la boîte du texte, là où il doit être. */
.km-souligne::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -.055em; height: .085em;
  background: var(--corail); border-radius: 99px;
  transform: scaleX(0); transform-origin: left center;
  animation: km-souligner .9s var(--glisse) 1.1s forwards;
}
@keyframes km-souligner { to { transform: scaleX(1); } }

.km-hero-chapo {
  font-size: clamp(17px, 2.2vw, 21px); color: #b9cbe8;
  max-width: 34em; margin: 0 0 38px; font-weight: 500;
}

/* La flèche qui invite à descendre. */
.km-descendre {
  display: inline-flex; align-items: center; gap: 9px;
  color: #8fa9cf; text-decoration: none; font-size: 14px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; margin-top: 34px;
}
.km-descendre i { display: block; width: 1px; height: 30px; background: #4a6899; position: relative; }
.km-descendre i::after {
  content: ""; position: absolute; left: -3px; top: 0;
  width: 7px; height: 7px; border-radius: 50%; background: var(--corail);
  animation: km-tomber 2s var(--glisse) infinite;
}
@keyframes km-tomber {
  0% { top: 0; opacity: 0; } 25% { opacity: 1; }
  75% { opacity: 1; } 100% { top: 24px; opacity: 0; }
}


/* ============================================================
   LA CARTE DU FORMULAIRE — posée sur le héros
============================================================ */

.km-carte-form {
  background: var(--blanc);
  border-radius: 18px;
  padding: 30px;
  max-width: 470px;
  box-shadow: 0 26px 60px -18px rgba(4, 18, 42, .55);
  animation: km-monter .9s var(--glisse) .35s both;
}
@keyframes km-monter { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }

.km-carte-form h2 { font-size: 20px; margin: 0 0 20px; letter-spacing: -.02em; }


/* ============================================================
   SECTIONS ET RUBANS DE COULEUR
============================================================ */

.km-section { padding: 88px 0; position: relative; }
@media (max-width: 640px) { .km-section { padding: 58px 0; } }

/* Une section en marine plein, pour casser la monotonie du crème. */
.km-section-nuit {
  background: var(--nuit); color: #dbe5f4; overflow: hidden; position: relative;
}
.km-section-nuit h2, .km-section-nuit h3 { color: var(--blanc); }
.km-section-nuit .km-oeil { color: var(--turquoise); }

/* Une section en crème appuyé, pour un troisième registre. */
.km-section-clair { background: var(--blanc); }

h1, h2, h3 { color: var(--nuit); line-height: 1.13; margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 5.6vw, 56px); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(26px, 4vw, 42px); font-weight: 800; letter-spacing: -.032em; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }

.km-chapo { font-size: 19px; color: var(--gris); max-width: 44em; margin: 0 0 30px; }
.km-section-nuit .km-chapo { color: #b9cbe8; }

.km-oeil {
  display: inline-flex; align-items: center; gap: 9px;
  text-transform: uppercase; letter-spacing: .15em;
  font-size: 12px; font-weight: 800; color: var(--accent); margin: 0 0 14px;
}
.km-oeil::before {
  content: ""; width: 26px; height: 3px; border-radius: 99px;
  background: currentColor; display: block;
}


/* ============================================================
   L'ANNÉE COMME OBJET GRAPHIQUE
============================================================ */

.km-annee {
  font-size: clamp(54px, 11vw, 120px); line-height: .84;
  font-weight: 800; letter-spacing: -.055em; color: var(--nuit);
}
/* En filigrane, derrière le contenu — la signature visuelle du site.

   ⚠️ MASQUÉE SOUS 760 px. Sur un téléphone, le texte occupe toute la
   largeur : le nombre passait alors PILE derrière le titre et le
   rendait pénible à lire. Un filigrane n'a de sens que s'il reste
   dans une marge ; quand il n'y a plus de marge, il n'a plus de
   raison d'être. Vu à l'écran en 375 px, pas à la relecture. */
.km-annee-fond {
  position: absolute; z-index: 0; pointer-events: none;
  font-size: clamp(150px, 26vw, 330px); line-height: .8;
  font-weight: 800; letter-spacing: -.06em;
  color: rgba(14, 45, 91, .04);
  top: -.12em; right: -.06em; user-select: none;
}
.km-section-nuit .km-annee-fond { color: rgba(255, 255, 255, .038); }
@media (max-width: 760px) { .km-annee-fond { display: none; } }


/* ============================================================
   BOUTONS
============================================================ */

.km-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer; position: relative; overflow: hidden;
  background: var(--nuit); color: var(--blanc);
  font: inherit; font-weight: 700; font-size: 16px;
  padding: 15px 30px; border-radius: 99px;
  text-decoration: none; text-align: center;
  transition: transform .25s var(--glisse), box-shadow .25s var(--glisse), background .2s;
}
.km-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(14,45,91,.55); }
.km-btn:active { transform: translateY(0); }
.km-btn-accent { background: var(--corail); }
.km-btn-accent:hover { background: var(--corail-fonce); box-shadow: 0 12px 26px -10px rgba(255,90,79,.65); }
.km-btn-turq { background: var(--turquoise); color: #04322c; }
.km-btn-turq:hover { background: var(--turquoise-fonce); color: var(--blanc); }
.km-btn-fant { background: transparent; color: var(--nuit); box-shadow: inset 0 0 0 2px var(--trait); }
.km-btn-fant:hover { box-shadow: inset 0 0 0 2px var(--nuit); }
.km-section-nuit .km-btn-fant { color: var(--blanc); box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); }
.km-section-nuit .km-btn-fant:hover { box-shadow: inset 0 0 0 2px var(--blanc); }
.km-btn[disabled] { opacity: .45; cursor: default; transform: none; }

/* La flèche du bouton avance au survol : un détail, mais c'est ce
   genre de détail qui fait qu'une interface paraît vivante. */
.km-btn span.km-fl { transition: transform .25s var(--glisse); }
.km-btn:hover span.km-fl { transform: translateX(4px); }


/* ============================================================
   FORMULAIRES
============================================================ */

.km-champ { margin: 0 0 18px; }
.km-champ label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 7px; color: var(--nuit); }
.km-champ .km-aide { font-size: 14px; color: var(--gris); margin: 0 0 8px; }
.km-champ input[type=text], .km-champ input[type=email], .km-champ input[type=password],
.km-champ input[type=number], .km-champ select, .km-champ textarea {
  width: 100%; font: inherit; font-weight: 500; color: var(--encre);
  padding: 14px 16px; border: 2px solid var(--trait); border-radius: 12px;
  background: var(--creme); transition: border-color .2s, background .2s;
}
.km-champ textarea { min-height: 120px; resize: vertical; }
.km-champ input:hover, .km-champ select:hover { border-color: #cfd6e2; }
.km-champ input:focus, .km-champ select:focus, .km-champ textarea:focus {
  outline: none; border-color: var(--corail); background: var(--blanc);
}
a:focus-visible, button:focus-visible, .km-btn:focus-visible,
input:focus-visible, select:focus-visible {
  outline: 3px solid var(--corail); outline-offset: 2px;
}


/* ============================================================
   MESSAGES
============================================================ */

.km-msg { padding: 15px 20px; border-radius: 12px; margin: 0 0 22px; font-size: 15px; font-weight: 500; }
.km-msg-ok   { background: #e3f7f3; color: #0d5f55; border-left: 4px solid var(--turquoise); }
.km-msg-err  { background: #ffeceb; color: #a32a21; border-left: 4px solid var(--corail); }
.km-msg-info { background: #e9f0fa; color: #1a3a66; border-left: 4px solid var(--nuit-clair); }


/* ============================================================
   STATISTIQUES — des barres qui se remplissent
============================================================ */

.km-stat { margin: 0 0 22px; }
.km-stat-ligne { display: flex; align-items: baseline; gap: 12px; margin: 0 0 7px; }
.km-stat-nom { font-weight: 700; font-size: 16px; color: var(--nuit); }
.km-section-nuit .km-stat-nom { color: var(--blanc); }
.km-stat-val { margin-left: auto; font-size: 26px; font-weight: 800; color: var(--nuit); letter-spacing: -.04em; }
.km-section-nuit .km-stat-val { color: var(--blanc); }
.km-stat-val small { color: var(--gris-clair); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.km-stat-barre { height: 14px; background: #ebe9e2; border-radius: 99px; overflow: hidden; }
.km-section-nuit .km-stat-barre { background: rgba(255,255,255,.12); }
.km-stat-barre i {
  display: block; height: 100%; border-radius: 99px; background: var(--nuit);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1.1s var(--glisse);
}
.km-la .km-stat-barre i, .km-stat.km-la i { transform: scaleX(1); }
.km-stat:nth-of-type(3n+1) .km-stat-barre i { background: var(--corail); }
.km-stat:nth-of-type(3n+2) .km-stat-barre i { background: var(--turquoise); }
.km-stat:nth-of-type(3n+3) .km-stat-barre i { background: var(--nuit-clair); }
.km-section-nuit .km-stat:nth-of-type(3n+3) .km-stat-barre i { background: var(--blanc); }

.km-echantillon {
  font-size: 14.5px; color: var(--gris); background: rgba(14,45,91,.035);
  border-left: 3px solid var(--trait); padding: 13px 18px; margin: 22px 0 0; border-radius: 0 10px 10px 0;
}
.km-section-nuit .km-echantillon { color: #a9bcd8; background: rgba(255,255,255,.05); border-left-color: rgba(255,255,255,.25); }


/* ============================================================
   LE COMPTEUR — un grand chiffre qui monte
============================================================ */

.km-compteur {
  font-size: clamp(48px, 9vw, 86px); font-weight: 800;
  letter-spacing: -.05em; line-height: 1; color: var(--nuit);
  font-variant-numeric: tabular-nums;
}
.km-section-nuit .km-compteur { color: var(--blanc); }
.km-compteur-lib { font-size: 15px; color: var(--gris); font-weight: 600; margin-top: 6px; }
.km-section-nuit .km-compteur-lib { color: #a9bcd8; }


/* ============================================================
   TIMELINE D'UN PARCOURS
============================================================ */

.km-fil { position: relative; padding-left: 32px; margin: 28px 0; }
.km-fil::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--corail), var(--turquoise));
  border-radius: 99px;
}
.km-etape { position: relative; padding: 0 0 28px; }
.km-etape::before {
  content: ""; position: absolute; left: -32px; top: 7px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--creme); box-shadow: inset 0 0 0 3px var(--accent);
}
.km-etape-annee { font-weight: 800; font-size: 13px; color: var(--accent); letter-spacing: .08em; }
.km-etape-titre { font-size: 21px; font-weight: 700; color: var(--nuit); margin: 3px 0 5px; letter-spacing: -.02em; }
.km-etape-detail { color: var(--gris); font-size: 15px; }


/* ============================================================
   GRILLES ET CARTES
============================================================ */

.km-grille { display: grid; gap: 24px; }
.km-grille-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.km-grille-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.km-fiche {
  background: var(--blanc); border-radius: 16px; padding: 26px;
  border: 1px solid var(--trait); position: relative; overflow: hidden;
  transition: transform .3s var(--glisse), box-shadow .3s var(--glisse);
}
/* Un filet de couleur en haut de chaque carte, qui se déploie au
   survol : les trois couleurs alternent, comme les trajectoires. */
.km-fiche::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--corail); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--glisse);
}
.km-fiche:nth-child(3n+2)::before { background: var(--turquoise); }
.km-fiche:nth-child(3n+3)::before { background: var(--nuit-clair); }
.km-fiche:hover::before { transform: scaleX(1); }
.km-fiche-lien { text-decoration: none; color: inherit; display: block; }
.km-fiche-lien:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -20px rgba(14,45,91,.35); }
.km-section-nuit .km-fiche { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.12); color: #dbe5f4; }

.km-pseudo { font-size: 20px; font-weight: 800; color: var(--nuit); letter-spacing: -.02em; }
.km-section-nuit .km-pseudo { color: var(--blanc); }

.km-badge {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .05em;
  padding: 4px 11px; border-radius: 99px; background: #dff5f1; color: #10695e;
  text-transform: uppercase;
}
.km-badge-attente { background: #fff0e2; color: #8a5310; }

/* La pastille de situation, colorée selon la famille de parcours. */
.km-puce {
  display: inline-block; font-size: 13px; font-weight: 700;
  padding: 5px 13px; border-radius: 99px;
  background: rgba(255,90,79,.12); color: var(--corail-fonce);
}


/* ============================================================
   TABLEAUX (espace enseignant)
============================================================ */

.km-tab { width: 100%; border-collapse: collapse; font-size: 15px; }
.km-tab th, .km-tab td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--trait); }
.km-tab th { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--gris); font-weight: 800; }
.km-tab tr { transition: background .15s; }
.km-tab tbody tr:hover { background: var(--blanc); }
.km-tab-cadre { overflow-x: auto; border-radius: 14px; background: var(--blanc); border: 1px solid var(--trait); padding: 4px 14px; }


/* ============================================================
   EN-TÊTE
============================================================ */

.km-top {
  display: flex; align-items: center; gap: 18px; padding: 16px 0;
  position: relative; z-index: 10;
}
.km-top-nuit { border-bottom: 0; }
.km-marque { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.km-marque img { display: block; height: 38px; width: auto; }
.km-nav { margin-left: auto; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.km-nav a {
  color: var(--gris); text-decoration: none; font-size: 15px; font-weight: 600;
  position: relative; padding: 3px 0;
}
.km-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); border-radius: 99px;
  transform: scaleX(0); transform-origin: right; transition: transform .3s var(--glisse);
}
.km-nav a:hover::after, .km-nav a.on::after { transform: scaleX(1); transform-origin: left; }
.km-nav a:hover, .km-nav a.on { color: var(--nuit); }

/* Sur le héros marine, la navigation passe en clair. */
.km-top-nuit .km-nav a { color: #a9bcd8; }
.km-top-nuit .km-nav a:hover, .km-top-nuit .km-nav a.on { color: var(--blanc); }

/* ⚠️ En mobile, cinq liens sur deux lignes mangeaient 130 px de haut et
   repoussaient le titre hors de l'écran. La navigation devient une
   BARRE DÉFILANTE d'une seule ligne : tout reste atteignable, rien
   n'est masqué derrière un menu à ouvrir, et le héros récupère sa
   place. La barre de défilement est cachée mais le geste fonctionne. */
@media (max-width: 760px) {
  .km-top { flex-wrap: wrap; gap: 10px; padding: 14px 0 10px; }
  .km-marque img { height: 30px; }
  .km-nav {
    margin-left: 0; width: 100%; gap: 20px; font-size: 14.5px;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* De l'air à droite, pour qu'on voie qu'il y a une suite. */
    padding-bottom: 4px; scroll-padding-left: 18px;
  }
  .km-nav::-webkit-scrollbar { display: none; }
  .km-nav a { white-space: nowrap; flex: 0 0 auto; }
}


/* ============================================================
   PIED DE PAGE
============================================================ */

.km-pied { background: var(--nuit-fonce); color: #8fa4c4; padding: 52px 0 44px; font-size: 14.5px; }
.km-pied a { color: #b9cbe8; text-decoration: none; }
.km-pied a:hover { color: var(--blanc); }
.km-pied-liens { display: flex; gap: 24px; flex-wrap: wrap; margin: 0 0 20px; font-weight: 600; }
.km-pied img { height: 34px; width: auto; margin: 0 0 18px; display: block; }


/* ============================================================
   ESPACE ENSEIGNANT
============================================================ */

.km-prof-top { background: var(--nuit); color: var(--blanc); padding: 12px 0; }
.km-prof-top .km-page { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.km-prof-top img { height: 26px; width: auto; display: block; }
.km-prof-top a { color: #b9c7dd; text-decoration: none; font-size: 15px; font-weight: 600; }
.km-prof-top a:hover, .km-prof-top a.on { color: var(--blanc); }
.km-prof-qui { margin-left: auto; font-size: 14px; color: #8fa4c4; }

.km-todo { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 28px; }
.km-todo a {
  text-decoration: none; color: var(--nuit); background: var(--blanc);
  border: 1px solid var(--trait); border-radius: 14px; padding: 16px 22px;
  position: relative; overflow: hidden;
  transition: transform .25s var(--glisse), box-shadow .25s var(--glisse);
}
.km-todo a::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--corail);
}
.km-todo a:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(14,45,91,.5); }
.km-todo b { font-size: 30px; font-weight: 800; display: block; letter-spacing: -.04em; line-height: 1.1; }
.km-todo span { font-size: 14px; color: var(--gris); font-weight: 600; }


/* ============================================================
   MOBILE ET ACCESSIBILITÉ
============================================================ */

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .km-carte-form { padding: 24px 20px; border-radius: 16px; }
  .km-hero { padding-bottom: 62px; }
  .km-fiche { padding: 22px; }
  /* Les boutons prennent toute la largeur : au pouce, une cible large
     vaut mieux qu'une cible élégante. */
  .km-hero .km-btn, .km-carte-form .km-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  /* Un visiteur peut l'avoir demandé — on ne discute pas ce réglage.
     Tout reste VISIBLE, seul le mouvement disparaît. */
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important;
    transition-duration: .001ms !important;
  }
  .km-traj path { stroke-dashoffset: 0; }
  .km-souligne::after { transform: scaleX(1); }
  .km-stat-barre i { transform: scaleX(1); }
  .km-js .km-vient { opacity: 1; transform: none; }
}

@media print {
  .km-top, .km-nav, .km-pied, .km-prof-top, .km-btn, .km-traj, .km-descendre { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .km-hero, .km-section-nuit { background: #fff !important; color: #000 !important; }
  .km-hero h1, .km-section-nuit h2 { color: #000 !important; }
  .km-stat-barre i { transform: scaleX(1); }
}
