/* Page d'accueil : le bureau d'enquêteur qui défile (accueil.js), puis « Pour qui », les compétences et l'appel final.
   Valeurs reprises de la maquette « Landing page — Dossier 001 ». Polices servies par la plateforme (vendor/polices). */
:root {
  --accent: #E08A4A;
  --fond: #14110E;
  --fond-2: #0F0D0B;
  --creme: #EFE6D2;
  --creme-clair: #F4ECDA;
  --texte: #CFC4AE;
  --trait: #2E2620;
  --encre: #2A2118;
  --papier: #EAE0C8;
  --punaise: #C7412F;
  --elite: 'Special Elite', monospace;
  --mono: 'IBM Plex Mono', monospace;
  --marge: clamp(20px, 5vw, 64px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--creme); font-family: 'IBM Plex Sans', system-ui, sans-serif; overflow-x: clip; }
a { color: var(--creme); }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
section { scroll-margin-top: 96px; }

/* Même langage que .s2h-btn (marque.css) : rayon 8, ombre décalée sable foncé, enfoncement au clic. */
.btn-main, .btn-ghost { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; font-size: 16px; text-decoration: none; border-radius: 8px;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.08s; }
.btn-main { font-weight: 600; color: #1A120B; background: var(--accent); box-shadow: 4px 4px 0 #8A4B22; }
.btn-main:hover { color: #1A120B; background: #F0A468; }
.btn-main:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #8A4B22; }
.btn-ghost { color: var(--creme); box-shadow: inset 0 0 0 1.5px #6A5A4A; }
.btn-ghost:hover { background: rgba(239, 230, 210, 0.08); box-shadow: inset 0 0 0 1.5px #A99D88; }
.btn-main:focus-visible, .btn-ghost:focus-visible { outline: 3px solid #F0A468; outline-offset: 3px; }
#cta-http[hidden] { display: none; }

/* --- Barre du haut --- */
.haut { position: sticky; top: 0; z-index: 30; background: rgba(20, 17, 14, 0.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(239, 230, 210, 0.08); }
.haut nav { max-width: 1280px; margin: 0 auto; padding: 14px var(--marge); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.marque-logo { width: 36px; height: 36px; border: 1.5px solid var(--accent); border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.marque-nom { font-family: var(--elite); font-size: 20px; letter-spacing: 0.02em; }
.badge-beta { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); padding: 3px 7px; border-radius: 2px; }
.nav-liens { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.nav-liens a { color: var(--texte); text-decoration: none; }
.nav-liens a:hover { text-decoration: underline; color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 15px; text-decoration: none; border-radius: 4px; }
.nav-actions .btn-main { padding: 0 20px; gap: 0; min-height: 44px; font-size: 15px; }
.nav-actions #nav-discord { gap: 8px; }

/* --- Scène animée : la page reste fixe, le bureau défile --- */
.piste { position: relative; height: calc(100vh * 5); margin-top: -73px; }
.scene { position: sticky; top: 0; height: 100vh; min-height: 600px; overflow: hidden; background: #25180F; }
.calque { position: absolute; left: 0; top: 0; width: 1440px; transform-origin: 0 0; will-change: transform; }
.bois { height: 3400px; background-color: #25180F; background-image: url(accueil/bois.svg); background-size: 1440px 900px; background-repeat: repeat; }
.milieu { height: 3600px; }
.avant { height: 4500px; pointer-events: none; }
.calque img.plein { position: absolute; left: 0; top: 0; width: 1440px; display: block; }
.trace { position: absolute; left: 0; top: 0; width: 1440px; height: 700px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 220px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 220px), transparent); }
.postit { position: absolute; left: 1120px; top: 440px; width: 170px; background: #E8D77E; color: var(--encre); padding: 22px 18px 18px; transform: rotate(6deg); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5); }
.postit i { position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; margin-left: -35px; background: rgba(226, 214, 186, 0.75); transform: rotate(-3deg); }
.postit p { font-family: var(--elite); font-size: 23px; line-height: 1.15; }
.carte-agent { position: absolute; left: 930px; top: 690px; width: 440px; display: flex; gap: 16px; align-items: flex-end; }
.photo { position: relative; flex: none; width: 118px; background: #F4EEE0; padding: 7px 7px 22px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55); transform: rotate(4deg); }
.photo img, .polaroid img { width: 100%; aspect-ratio: 289 / 252; object-fit: cover; display: block; background: #262A33; }
.punaise { position: absolute; top: -8px; left: 50%; margin-left: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--punaise); z-index: 2; }
.bulle-agent { background: #1C1713; border: 1px solid #4A3B2E; padding: 14px 16px; border-radius: 4px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); }
.etiquette { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.bulle-agent p:last-child { font-size: 15px; line-height: 1.45; }
.polaroid { position: absolute; left: 290px; top: 2300px; width: 250px; margin: 0; background: #F4EEE0; padding: 12px 12px 0; transform: rotate(-4deg); box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55); }
.polaroid .punaise { top: -9px; margin-left: -8px; width: 16px; height: 16px; }
.polaroid figcaption { padding: 12px 2px 16px; font-family: var(--elite); font-size: 19px; color: var(--encre); text-align: center; }
.lumiere { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 60% at 85% 0%, rgba(255, 194, 122, 0.22), rgba(255, 194, 122, 0) 70%), radial-gradient(ellipse 120% 90% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%); }
.ombre-g, .ombre-d { position: absolute; inset: 0; pointer-events: none; }
.ombre-g { opacity: 1; background: linear-gradient(90deg, rgba(14, 10, 7, 0.88) 0%, rgba(14, 10, 7, 0.55) 38%, rgba(14, 10, 7, 0) 62%); }
.ombre-d { opacity: 0; background: linear-gradient(270deg, rgba(14, 10, 7, 0.88) 0%, rgba(14, 10, 7, 0.55) 38%, rgba(14, 10, 7, 0) 62%); }

/* Textes : un par étape, alternés gauche / droite */
.chap { position: absolute; top: 50%; width: min(540px, 42%); transform: translate3d(0, -50%, 0); will-change: transform, opacity; }
.chap-g { left: clamp(48px, 7vw, 120px); }
.chap-d { right: clamp(48px, 7vw, 120px); }
.anim-on .chap + .chap { opacity: 0; visibility: hidden; }
.num { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 16px; }
.chap h1 { font-family: var(--elite); font-weight: 400; font-size: clamp(56px, 8vw, 120px); line-height: 0.95; letter-spacing: -0.01em; color: var(--creme-clair); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7); }
.chap h2 { font-family: var(--elite); font-weight: 400; font-size: clamp(44px, 5.6vw, 84px); line-height: 1; color: var(--creme-clair); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7); }
.chap p.texte { margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: #E0D6C2; }
.chap h1 + p.texte { margin-top: 26px; max-width: 480px; }
.chap .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.chap .btn-ghost { background: rgba(14, 10, 7, 0.78); backdrop-filter: blur(3px); border-color: #8A7860; }
.chap .btn-ghost:hover { background: rgba(40, 30, 22, 0.9); }
.chap > .btn-main { margin-top: 30px; }
.invite { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #EFE6D2; padding: 10px 16px; border-radius: 6px; background: rgba(14, 10, 7, 0.78); pointer-events: none; }
.souris { width: 24px; height: 38px; border: 1.5px solid #D6CBB5; border-radius: 12px; display: flex; justify-content: center; padding-top: 7px; }
.souris i { width: 4px; height: 8px; border-radius: 2px; background: var(--accent); animation: rebond 1.6s ease-in-out infinite; }
@keyframes rebond { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* --- Sections --- */
.largeur { max-width: 1280px; margin: 0 auto; padding: 120px var(--marge) 104px; }
.entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; }
.entete > div:first-child { max-width: 640px; }
.surtitre { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.titre { font-family: var(--elite); font-weight: 400; font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05; color: var(--creme-clair); }
.entete > p { max-width: 420px; font-size: 17px; line-height: 1.6; color: #E0D6C2; }

.profils { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.profil { position: relative; background: var(--papier); color: var(--encre); padding: 34px 28px 30px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.profil:nth-child(1) { transform: rotate(-1.2deg); }
.profil:nth-child(2) { transform: rotate(0.8deg) translateY(18px); }
.profil:nth-child(3) { transform: rotate(-0.6deg); }
.profil .punaise { top: -8px; margin-left: 0; width: 16px; height: 16px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
.profil h3 { font-family: var(--elite); font-weight: 400; font-size: 28px; margin-bottom: 12px; }
.profil p { font-size: 16px; line-height: 1.6; }

.competences { background: var(--fond-2); border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }
.competences .largeur { padding-top: 112px; }
.competences .entete { margin-bottom: 44px; }
.competences .largeur { padding-bottom: 64px; }
.progression { flex: 0 1 360px; min-width: 260px; }
.progression-t { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #A99D88; margin-bottom: 8px; }
.progression-t span:last-child { color: var(--creme); }
.segments { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.segments span { height: 8px; background: #3A2E24; }
.segments span:first-child { background: var(--accent); }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
@media (min-width: 960px) { .grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } }   /* 6 modules : 3 + 3 plutôt que 4 + 2 */
.grille > div { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: #1C1713; border: 1px solid #3A2E24; border-radius: 4px; }
.grille .n { flex: none; font-family: var(--elite); font-size: 22px; color: var(--accent); }
.grille b { display: block; font-size: 17px; font-weight: 600; color: var(--creme-clair); }
.grille span span { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--texte); }

.final { position: relative; padding: 72px var(--marge) 128px; text-align: center; overflow: hidden; }
.final::before { content: ''; position: absolute; left: 50%; top: -120px; width: 720px; height: 520px; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 30%, rgba(224, 138, 74, 0.22), rgba(20, 17, 14, 0) 65%); pointer-events: none; }
.final > div { position: relative; max-width: 760px; margin: 0 auto; }
.final .titre { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; }
.final p { max-width: 560px; margin: 22px auto 0; font-size: 18px; line-height: 1.6; color: #E0D6C2; }
.final .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }
.final .btn-main, .final .btn-ghost { min-height: 54px; font-size: 17px; }
.final .btn-main { padding: 0 28px; }
.final .btn-ghost { padding: 0 24px; border-color: #5A4A3B; }

.pied { border-top: 1px solid var(--trait); background: var(--fond-2); }
.pied > div { max-width: 1280px; margin: 0 auto; padding: 32px var(--marge); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; font-size: 14px; color: #A99D88; }
.pied .nom { font-family: var(--elite); font-size: 18px; color: var(--creme); }
.pied nav { display: flex; flex-wrap: wrap; gap: 24px; }
.pied nav a { color: var(--texte); }

/* --- Apparition au défilement (uniquement si le script tourne) --- */
.anim-on .reveal { opacity: 0; transform: translateY(44px); transition: opacity 1s cubic-bezier(.2, .7, .2, 1), transform 1s cubic-bezier(.2, .7, .2, 1); }
.anim-on .reveal.est-la { opacity: 1; transform: none; }

@media (min-width: 961px) { #ch0 .actions { width: max-content; max-width: calc(100vw - 2 * clamp(48px, 7vw, 120px)); } }
@media (max-width: 960px) { .nav-liens { display: none; } }
@media (max-width: 760px) {
  .chap { width: auto; top: 64%; left: 20px; right: 20px; }
  .chap + .chap { top: 73%; }
  .ombre-g, .ombre-d { background: linear-gradient(0deg, rgba(14, 10, 7, 0.96) 0%, rgba(14, 10, 7, 0.9) 52%, rgba(14, 10, 7, 0) 84%); }
  .chap .actions > a { flex: 1 1 100%; justify-content: center; min-height: 48px; }
  .chap p.texte { text-shadow: 0 1px 12px rgba(14, 10, 7, 0.9); }
  .invite { display: none; }
  .haut { background: rgba(20, 17, 14, 0.92); }
  .haut nav { flex-wrap: nowrap; gap: 8px; padding: 10px 16px; }
  .badge-beta { display: none; }
  .marque .s2h-mot { font-size: 20px !important; }
  .nav-actions { gap: 4px; }
  .nav-actions a, .nav-actions .btn-main { min-height: 40px; padding: 0 10px; font-size: 14px; white-space: nowrap; }
  .nav-actions .btn-main { padding: 0 12px; }
  .nav-actions #nav-discord { display: none; }   /* le lien du pied de page prend le relais */
  .piste { margin-top: -61px; }
  .profil p { color: #1E160F; }
}
/* Grand écran : le bureau suit déjà la largeur (accueil.js) ; textes, barre et sections suivent à leur tour,
   sinon ils restent à taille de portable au milieu d'une scène immense. */
/* Tablette et petit portable : la scène passe sous le texte, un voile le garde lisible. */
@media (min-width: 761px) and (max-width: 1199px) {
  .chap { padding: 22px 26px; border-radius: 12px; background: rgba(14, 10, 7, 0.74); backdrop-filter: blur(3px); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45); }
  .chap h1 { font-size: clamp(48px, 6.4vw, 72px); }
  .chap h2 { font-size: clamp(38px, 4.6vw, 56px); }
}
@media (min-width: 1800px) { .haut nav, .chap, #pour-qui > *, #competences > *, .final > div, .pied > div { zoom: 1.2; } }
/* Grand écran : la scène est plein cadre, l'en-tête s'aligne sur les bords des chapitres. */
@media (min-width: 1800px) { .haut nav { max-width: none; padding-inline: clamp(48px, 7vw, 120px); } }
@media (min-width: 2300px) { .haut nav, .chap, #pour-qui > *, #competences > *, .final > div, .pied > div { zoom: 1.45; } }
/* Petit téléphone : logo, « Se connecter » et « Rejoindre la bêta » tiennent sur une ligne. */
@media (max-width: 400px) {
  .haut nav { padding: 10px 12px; }
  .marque .s2h-mot { font-size: 17px !important; }
  .nav-actions a, .nav-actions .btn-main { padding: 0 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .souris i { animation: none; }
  .anim-on .reveal { transition: none; }
}
.btn-ghost-nav:hover { background: rgba(239, 230, 210, 0.08); }
