/* On en dit — page d'accueil animée (façon « récit au défilement »).
   S'appuie sur les jetons de style.css : papier, encre, bleu. */

:root { --sombre: #1d1b17; --sombre-2: #2a2721; }
body.accueil { overflow-x: clip; }

/* arrivée : la page sort d'un flou */
body.charge main, body.charge .nav { filter: blur(14px); opacity: .35; }
main, .nav { transition: filter 1.1s var(--doux), opacity 1.1s var(--doux); }

/* la barre du haut suit la couleur de la section */
.nav.sur-sombre { background: linear-gradient(var(--sombre) 55%, rgba(29, 27, 23, 0)); color: var(--papier); }
.nav.sur-sombre .marque-g { color: var(--papier); }
.nav.sur-sombre nav a { color: rgba(243, 238, 227, .72); }
.nav.sur-sombre .nav-compte { color: var(--papier); border-color: rgba(243, 238, 227, .3); }
.nav.sur-bleu, .nav.sur-sombre { transition: background .4s, color .4s; }

/* ─── tuiles (monogrammes des moteurs et des sources) ─── */
.tuile {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 10px;
  font: 600 12px/1 var(--sans); color: #fff; letter-spacing: -.01em;
  box-shadow: 0 6px 14px -8px rgba(23, 21, 15, .5), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.t-gpt { background: #17150f; }
.t-gem { background: #1f35c4; }
.t-per { background: #1f6f6b; }
.t-cla { background: #c2643c; font-family: var(--serif); font-style: italic; font-size: 17px; font-weight: 400; }
.t-avis { background: #e8a400; font-size: 15px; }
.t-pj { background: #f2c500; color: #17150f; }
.t-ta { background: #34a07a; }
.t-www { background: #e9e2d2; color: #57524a; font: 500 9px/1 var(--mono); }

/* ─────────────── 1. Héros ─────────────── */
.heros-pin { position: relative; height: 100vh; overflow: hidden; }
.heros-fond { position: absolute; inset: 0; background: var(--bleu); opacity: 0; z-index: 0; }

.jetons { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.jeton {
  position: absolute; left: var(--x); top: var(--y);
  display: flex; align-items: center; gap: 8px;
  translate: -50% -50%;
}
.spark { width: 58px; height: 22px; overflow: visible; }
.spark path { stroke-dasharray: 120; stroke-dashoffset: 0; fill: none; stroke: var(--encre-2); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }

.heros-centre {
  position: absolute; left: 50%; top: 47%; z-index: 3;
  width: min(760px, 92vw); translate: -50% -50%;
  text-align: center;
}
.pastille {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px;
  padding: 6px 13px; border: 1px solid var(--trait); border-radius: 999px;
  background: rgba(251, 248, 241, .7); font-size: 13px; color: var(--encre-2);
}
.pastille span { width: 7px; height: 7px; border-radius: 50%; background: var(--bleu); }
.titre-mots { margin: 0; font: 400 clamp(46px, 6.6vw, 96px)/.98 var(--serif); letter-spacing: -.022em; }
.titre-mots .mot { display: inline-block; color: #b9b2a5; }
.titre-mots em .mot { color: #b9b2a5; }
.heros-saisie { width: min(620px, 100%); margin: 30px auto 0; background: var(--carte); box-shadow: 0 24px 50px -30px rgba(23, 21, 15, .45); }
.heros-puces { justify-content: center; padding: 14px 0 0; }

/* téléphone */
.telephone {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 258px; height: 528px; margin: -264px 0 0 -129px;
  padding: 10px; border-radius: 46px; background: #121110;
  box-shadow: 0 50px 90px -40px rgba(23, 21, 15, .6), inset 0 0 0 2px #2c2a27;
}
.tel-encoche { position: absolute; top: 20px; left: 50%; width: 86px; height: 25px; margin-left: -43px; border-radius: 20px; background: #121110; z-index: 2; }
.tel-ecran {
  position: relative; height: 100%; border-radius: 37px; background: var(--carte);
  padding: 16px 18px 18px; display: flex; flex-direction: column; align-items: center; overflow: hidden;
}
.tel-barre { width: 100%; display: flex; justify-content: space-between; margin: 0 0 22px; padding: 0 8px; font: 600 11px var(--sans); }
.tel-barre span:last-child { letter-spacing: -1px; font-size: 8px; }
.tel-marque { margin: 0 0 12px; font: italic 20px var(--serif); }
.tel-marque span { color: var(--bleu); font-style: normal; margin-right: 3px; }
.tel-score { position: relative; width: 138px; height: 138px; display: grid; place-items: center; }
.tel-score svg { position: absolute; inset: 0; rotate: -90deg; }
.tel-score circle { fill: none; stroke-width: 7; }
.anneau-fond { stroke: var(--papier-2); }
.anneau { stroke: var(--bleu); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; }
.tel-score b { font: 400 54px/1 var(--serif); color: var(--bleu); margin-top: 4px; }
.tel-score small { position: absolute; bottom: 36px; font-size: 11px; color: var(--encre-3); }
.tel-nom { margin: 12px 0 14px; font-size: 12px; color: var(--encre-2); text-align: center; }
.tel-tuiles { display: grid; grid-template-columns: repeat(4, 34px); gap: 10px; }
.tel-tuiles span { width: 34px; height: 34px; border-radius: 10px; background: var(--papier-2); }
.tel-bouton { margin: auto 0 0; width: 100%; padding: 11px; border-radius: 13px; background: var(--encre); color: var(--papier); text-align: center; font-size: 13px; font-weight: 500; }

.passerelle { position: absolute; top: 50%; z-index: 3; width: min(27vw, 380px); translate: 0 -50%; color: var(--papier); opacity: 0; }
.passerelle.gauche { left: 7vw; }
.passerelle.droite { right: 7vw; }
.passerelle h2 { margin: 0; font: 400 clamp(34px, 3.4vw, 54px)/1.02 var(--serif); letter-spacing: -.015em; }
.passerelle p { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(243, 238, 227, .82); }

/* lettres révélées une à une */
.lettres .l { display: inline-block; white-space: pre; }
.lettres .w { display: inline-block; white-space: nowrap; }

/* ─────────────── 2. Cartes sombres ─────────────── */
.bento-section { background: var(--sombre); color: var(--papier); padding: clamp(90px, 12vw, 150px) clamp(16px, 5vw, 60px); }
.section-titre { margin: 0 0 44px; text-align: center; font: 400 clamp(40px, 5vw, 64px)/1 var(--serif); letter-spacing: -.02em; }
.bento {
  max-width: 1020px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(220px, auto); gap: 14px;
}
.carte {
  position: relative; overflow: hidden;
  padding: 22px; border-radius: 22px; background: var(--carte); color: var(--encre);
}
.carte h3 { margin: 0 0 6px; font: 600 20px/1.2 var(--sans); letter-spacing: -.01em; }
.carte p { margin: 0; font-size: 13.5px; color: var(--encre-2); }
.c-etapes { grid-column: 1; grid-row: 1; }
.c-rivaux { grid-column: 2; grid-row: 1; }
.c-moteurs { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; }
.c-sources { grid-column: 1 / span 2; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.c-lundi { grid-column: 1; grid-row: 3; }
.c-questions { grid-column: 2 / span 2; grid-row: 3; display: flex; flex-direction: column; justify-content: flex-end; }

.etapes-mini { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.etapes-mini li { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 10px; border-radius: 12px; background: var(--papier); }
.etapes-mini i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--trait); flex: none; position: relative; transition: background .3s, border-color .3s; }
.etapes-mini li.ok i { background: var(--bleu); border-color: var(--bleu); }
.etapes-mini li.ok i::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; }
.etapes-mini b { display: block; font-size: 10.5px; font-family: var(--mono); font-weight: 500; color: var(--encre-3); letter-spacing: .06em; text-transform: uppercase; }

.pile { display: flex; margin: 4px 0 26px; }
.pile span {
  width: 46px; height: 46px; border-radius: 50%; margin-left: -10px; border: 3px solid var(--carte);
  display: grid; place-items: center; background: var(--c); color: #fff; font: italic 22px var(--serif);
}
.pile span:first-child { margin-left: 0; }
.pile .plus { background: var(--bleu-pale); color: var(--bleu); font: 500 22px var(--sans); }

.grille-tuiles { display: grid; grid-template-columns: repeat(3, 44px); justify-content: center; gap: 16px 22px; margin: auto 0; padding: 26px 0; }
.grille-tuiles .tuile { width: 44px; height: 44px; border-radius: 13px; font-size: 14px; }
.grille-tuiles .t-cla { font-size: 21px; }

.defilant { height: 180px; overflow: hidden; border-radius: 14px; background: var(--papier); mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); }
.defilant ul { list-style: none; margin: 0; padding: 0; animation: defile 16s linear infinite; animation-play-state: paused; }
.defilant.actif ul { animation-play-state: running; }
.defilant li { padding: 8px 0; text-align: center; font: 400 24px/1.1 var(--serif); }
.defilant li:nth-child(odd) { font-style: italic; }
@keyframes defile { to { transform: translateY(-50%); } }

.mini-tel {
  position: absolute; right: 22px; bottom: -14px; width: 150px; height: 104px;
  padding: 22px 14px 0; border: 6px solid #121110; border-bottom: 0; border-radius: 26px 26px 0 0;
  background: var(--papier); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-content: start;
}
.mini-tel .tuile { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; }
.mini-tel .t-cla { font-size: 14px; }

.rangees { display: grid; gap: 8px; margin: -4px -30px 18px; }
.rangees p { display: flex; gap: 8px; margin: 0; white-space: nowrap; }
.rangees span { padding: 7px 12px; border-radius: 999px; background: var(--papier); border: 1px solid var(--trait); font-size: 12.5px; color: var(--encre-2); }
.rangees span:nth-child(3n) { background: var(--bleu-pale); color: var(--bleu); border-color: transparent; }

/* ─────────────── 3. Bulles ─────────────── */
.bulles-section { background: var(--bleu); color: var(--papier); }
.bulles-pin { position: relative; height: 100vh; overflow: hidden; display: grid; place-items: center; }
.bulles { position: absolute; inset: 0; }
.bulles span {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  padding: 12px 18px; border-radius: 999px; background: var(--carte); color: var(--encre);
  font: italic 400 clamp(15px, 1.4vw, 20px)/1.2 var(--serif); white-space: nowrap;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .5);
}
.bulles-centre { position: relative; z-index: 2; max-width: 560px; text-align: center; padding: 0 16px; }
.bulles-centre h2 { margin: 0 0 14px; font: 400 clamp(40px, 5vw, 68px)/1 var(--serif); letter-spacing: -.02em; }
.bulles-centre p { margin: 0; font-size: 17px; color: rgba(243, 238, 227, .82); }

/* ─────────────── 4. Téléphone et étiquettes ─────────────── */
.sources-section { background: var(--sombre); color: var(--papier); padding: clamp(90px, 11vw, 140px) clamp(16px, 5vw, 60px); }
.sources-scene { max-width: 1020px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(20px, 4vw, 60px); }
.telephone.tel-petit { position: relative; left: auto; top: auto; margin: 0; width: 228px; height: 466px; }
.etiquettes { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px; }
.etiquettes.gauche { justify-items: end; }
.etiquettes.gauche li:nth-child(2) { margin-right: 40px; }
.etiquettes.droite li:nth-child(2) { margin-left: 40px; }
.etiquettes li {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--carte); color: var(--encre);
  font-size: 14.5px; font-weight: 500; box-shadow: 0 18px 30px -20px rgba(0, 0, 0, .6);
}
.etiquettes i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--bleu-pale); color: var(--bleu); font-style: normal; font-size: 13px; }
.fiche-etiquette { align-self: flex-start; margin: 4px 0 8px; font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--encre-3); padding: 4px 8px; border-radius: 999px; background: var(--papier-2); }
.fiche-nom { align-self: flex-start; margin: 0 0 6px; font: 400 24px/1.1 var(--serif); }
.fiche-etoiles { align-self: flex-start; margin: 0 0 4px; color: #e8a400; font-size: 13px; }
.fiche-etoiles span { color: var(--encre-2); font-size: 12px; margin-left: 4px; }
.fiche-ligne { align-self: flex-start; margin: 0; font-size: 12px; color: #3f8a5a; }
.fiche-code {
  margin-top: auto; width: 100%; aspect-ratio: 1.3; border-radius: 18px; background: var(--bleu-pale);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 18px;
}
.fiche-code i { border-radius: 6px; background: var(--bleu); opacity: .9; }
.fiche-code i:nth-child(2n) { opacity: .35; }
.fiche-code i:nth-child(5) { background: var(--encre); opacity: 1; }
.sources-sous { max-width: 420px; margin: 44px auto 0; text-align: center; color: rgba(243, 238, 227, .72); }

/* ─────────────── 5. Métiers ─────────────── */
.metiers { background: var(--papier); }
.metiers-pin { position: relative; height: 100vh; overflow: hidden; }
.metiers-texte { position: absolute; top: 50%; left: 8vw; width: min(34vw, 460px); translate: 0 -50%; z-index: 2; }
.metiers-blocs { display: grid; }
.mt-bloc { grid-area: 1 / 1; }
.metiers-surtitre { margin: 0 0 6px; font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--encre-3); }
.metiers-titre { margin: 0 0 18px; font: 400 clamp(40px, 4.6vw, 66px)/1 var(--serif); letter-spacing: -.02em; }
.metiers-question { margin: 0 0 26px; font: italic 20px/1.35 var(--serif); color: var(--encre-2); }
.metiers-photo {
  position: absolute; top: 50%; right: 8vw; z-index: 1;
  width: min(30vw, 420px); aspect-ratio: 4 / 5; translate: 0 -50%;
  border-radius: 30px; overflow: hidden; background: var(--papier-2);
  box-shadow: 0 40px 80px -46px rgba(23, 21, 15, .55);
}
.metiers-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.metiers-photo img:not(:first-child) { clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); }

/* ─────────────── 7. Pied sombre ─────────────── */
.pied-sombre { position: relative; overflow: hidden; background: var(--sombre); color: var(--encre); padding: clamp(110px, 14vw, 170px) clamp(16px, 5vw, 60px) clamp(80px, 10vw, 120px); }
.serpentin { position: absolute; inset: 0; width: 100%; height: 100%; }
.serpentin path { fill: none; stroke: var(--bleu); stroke-width: 58; stroke-linecap: round; }
.pied-cartes { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1.25fr 1fr .8fr; gap: 14px; align-items: start; }
.pcarte { padding: 24px; border-radius: 24px; background: var(--carte); }
.pcarte h3 { margin: 0 0 10px; font: 400 32px/1.02 var(--serif); letter-spacing: -.01em; }
.pcarte p { margin: 0 0 16px; font-size: 14px; color: var(--encre-2); }
.pcarte-grande .bouton { margin-bottom: 26px; }
.pcarte-marque { margin: 0 !important; font: italic 22px var(--serif) !important; color: var(--encre) !important; }
.pcarte-marque span { color: var(--bleu); font-style: normal; margin-right: 3px; }
.pcarte small { font-size: 11.5px; color: var(--encre-3); }
.pcarte-colonne { display: grid; gap: 14px; }
.pcarte a { display: block; padding: 5px 0; text-decoration: none; font-size: 14.5px; }
.pcarte a:hover { color: var(--bleu); }
.pcarte-bas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px 20px; font-size: 13px; }
.pcarte-bas a { display: inline; font-size: 13px; }
.pcarte-note p { margin: 0; font-size: 13px; }

/* ─────────────── petits écrans : on raconte sans épingler ─────────────── */
@media (max-width: 900px) {
  .heros-pin { height: auto; min-height: 100svh; padding: 110px 16px 60px; display: flex; flex-direction: column; align-items: center; }
  .jetons, .passerelle.droite { display: none; }
  .heros-centre { position: relative; left: auto; top: auto; translate: none; }
  .telephone:not(.tel-petit) { position: relative; left: auto; top: auto; margin: 56px auto 0; }
  .passerelle.gauche { position: relative; left: auto; top: auto; translate: none; width: 100%; margin-top: 30px; opacity: 1; color: var(--encre); text-align: center; }
  .bento { grid-template-columns: 1fr; }
  .c-etapes, .c-rivaux, .c-moteurs, .c-sources, .c-lundi, .c-questions { grid-column: 1; grid-row: auto; }
  .c-sources { grid-template-columns: 1fr; }
  .c-lundi { min-height: 200px; }
  .bulles span { font-size: 13px; padding: 8px 12px; }
  .sources-scene { grid-template-columns: 1fr; justify-items: center; }
  .etiquettes { gap: 12px; justify-items: center !important; }
  .etiquettes li { margin: 0 !important; }
  .metiers-texte { left: 16px; right: 16px; width: auto; top: auto; bottom: 7vh; translate: none; }
  .metiers-photo { right: 50%; top: 13vh; translate: 50% 0; width: min(62vw, 300px); }
  .metiers-titre { font-size: 38px; }
  .pied-cartes { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body.charge main, body.charge .nav { filter: none; opacity: 1; }
  .titre-mots .mot { color: inherit; }
  .passerelle { opacity: 1; }
  .defilant ul { animation: none; }
}

.pcarte a.bouton { display: inline-flex; padding: 11px 18px; }
.tel-tuiles .tuile { width: 34px; height: 34px; }
@media (max-width: 900px) { .bulles span { font-size: 12.5px; max-width: 72vw; } }

/* mot du titre qui change */
.rotateur { display: inline-block; position: relative; white-space: nowrap; text-align: left; vertical-align: bottom; }
.rotateur .mot { will-change: transform, filter; }
