/* YouRecap — style « cassette VHS » sombre. Aucun rouge YouTube. */
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'VT323'; src: url('../fonts/vt323-latin-400-normal.woff2') format('woff2'); font-display: swap; }

:root {
  --nuit: #0e0b1a;
  --nuit-2: #161127;
  --carte: #1c1533;
  --carte-2: #241b42;
  --trait: #352a5c;
  --texte: #f3efff;
  --doux: #b4aad6;
  --pale: #7d72a6;
  --corail: #ff6b5b;
  --cyan: #4fd1e8;
  --soleil: #ffd166;
  --violet: #a78bfa;
  --ok: #5ee6a8;
  --rayon: 14px;
  --mono: 'VT323', ui-monospace, monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--nuit); color: var(--texte);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  background-image: radial-gradient(1200px 600px at 80% -10%, #2a1d55 0%, transparent 60%), radial-gradient(900px 500px at -10% 30%, #1d2550 0%, transparent 55%);
  background-attachment: fixed;
}
/* Lignes de balayage très discrètes */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
a { color: var(--cyan); }
a:hover { color: #8ee6f5; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.cache { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mono { font-family: var(--mono); letter-spacing: .04em; }
.doux { color: var(--doux); }
.pale { color: var(--pale); }

/* --- En-tête --- */
.entete {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 18px 16px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--texte); text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.logo-k7 { width: 34px; height: 24px; flex: none; }
.logo b { color: var(--corail); font-weight: 700; }
.entete nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.entete nav a, .lien-btn { color: var(--doux); text-decoration: none; padding: 6px 10px; border-radius: 8px; background: none; border: 0; cursor: pointer; font-size: .95rem; }
.entete nav a:hover, .lien-btn:hover { color: var(--texte); background: var(--carte); }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px 64px; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; border: 1px solid var(--trait);
  background: var(--carte); color: var(--texte); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--carte-2); border-color: #4a3c80; color: var(--texte); }
.btn:active { transform: translateY(1px); }
.btn-chaud { background: var(--corail); border-color: var(--corail); color: #1a0b10; }
.btn-chaud:hover { background: #ff8576; border-color: #ff8576; color: #1a0b10; }
.btn-petit { padding: 7px 12px; font-size: .9rem; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* --- Accueil --- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 40px 0 56px; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; margin: 12px 0 18px; letter-spacing: -.03em; font-weight: 700;
  text-shadow: -2px 0 rgba(79,209,232,.55), 2px 0 rgba(255,107,91,.55);
}
.hero h1 em { font-style: normal; color: var(--corail); }
.hero p.chapo { font-size: 1.15rem; color: var(--doux); max-width: 34em; margin: 0 0 24px; }
.etiquette { display: inline-flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 1.3rem; color: var(--cyan); }
.etiquette .rec { width: 10px; height: 10px; border-radius: 50%; background: var(--corail); animation: clignote 1.2s steps(2) infinite; }
@keyframes clignote { 50% { opacity: 0; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.promesses { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 8px; color: var(--doux); }
.promesses li::before { content: '▸ '; color: var(--cyan); font-family: var(--mono); }

/* Cassette illustrée */
.k7 { position: relative; aspect-ratio: 1.6; border-radius: 22px; background: linear-gradient(160deg, #2b2150, #1a1433); border: 1px solid var(--trait); padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.k7-etiquette { border-radius: 10px; background: linear-gradient(180deg, #f6efe3 0 30%, var(--corail) 30% 42%, #f6efe3 42% 54%, var(--cyan) 54% 66%, #f6efe3 66%); height: 58%; padding: 10px 14px; color: #2a1d40; font-family: var(--mono); font-size: 1.35rem; }
.k7-fenetre { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); width: 58%; height: 24%; border-radius: 40px; background: #0b0816; border: 1px solid #3c3168; display: flex; align-items: center; justify-content: space-around; }
.bobine { width: 54px; height: 54px; border-radius: 50%; border: 6px dashed #6c5ca8; animation: tourne 2.4s linear infinite reverse; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* --- Sections et cartes --- */
.section { margin: 56px 0; }
.section > h2, .titre-section { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; margin: 0 0 8px; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 20px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grille-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grille-2 > *, .grille-3 > * { min-width: 0; }

.etapes { counter-reset: e; list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.etapes li { counter-increment: e; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px 18px 20px; }
.etapes li::before { content: '0' counter(e); font-family: var(--mono); font-size: 1.8rem; color: var(--corail); display: block; line-height: 1; margin-bottom: 8px; }
.etapes h3 { margin: 0 0 6px; font-size: 1.05rem; }
.etapes p, .etapes ul { margin: 0; color: var(--doux); font-size: .95rem; }
.etapes ul { padding-left: 18px; }
.attention { border-left: 3px solid var(--soleil); padding: 10px 14px; background: rgba(255,209,102,.07); border-radius: 0 10px 10px 0; color: var(--texte); margin: 16px 0 0; }

/* Zone de dépôt */
.depot {
  display: grid; place-items: center; text-align: center; gap: 10px; padding: 44px 20px;
  border: 2px dashed #4a3c80; border-radius: 20px; background: rgba(28,21,51,.7); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.depot:hover, .depot.survol { border-color: var(--cyan); background: rgba(79,209,232,.06); }
.depot strong { font-size: 1.2rem; }
.depot .mono { font-size: 1.4rem; color: var(--cyan); }

/* Chargement */
.chargement { max-width: 560px; margin: 80px auto; text-align: center; }
.barre { height: 14px; border-radius: 8px; background: var(--carte); border: 1px solid var(--trait); overflow: hidden; margin: 18px 0 10px; }
.barre > i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--cyan) 0 12px, #3ab3c9 12px 24px); transition: width .25s; }
.compteur { font-family: var(--mono); font-size: 2.6rem; color: var(--cyan); }

.erreur { border: 1px solid rgba(255,107,91,.5); background: rgba(255,107,91,.08); border-radius: var(--rayon); padding: 16px 18px; margin: 18px 0; }
.erreur h3 { margin: 0 0 6px; color: var(--corail); }

/* --- Tableau de bord --- */
.tdb-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 16px 0 22px; }
.tdb-tete h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.03em; }
.tdb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--trait); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.onglets button { background: none; border: 0; padding: 10px 14px; color: var(--doux); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.onglets button[aria-selected='true'] { color: var(--texte); border-color: var(--corail); }

.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tuile { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; }
.tuile .v { font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.tuile .l { color: var(--doux); font-size: .88rem; }
.note { color: var(--pale); font-size: .85rem; }

.barres-v { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.barres-v .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.barres-v .col i { width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--corail), #c8485c); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.barres-v .col span { font-family: var(--mono); font-size: 1rem; color: var(--doux); white-space: nowrap; height: 1.2em; line-height: 1.2em; }
.barres-v.cyan .col i { background: linear-gradient(180deg, var(--cyan), #2b8ea3); }
.barres-v.fines { gap: 2px; height: 120px; }
.barres-v.fines .col span { font-size: .85rem; }
button.col { background: none; border: 0; padding: 0; cursor: pointer; }
button.col:hover i { filter: brightness(1.2); }

.liste { list-style: none; padding: 0; margin: 0; }
.liste li { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid rgba(53,42,92,.6); }
.liste li:last-child { border-bottom: 0; }
.liste .rang { font-family: var(--mono); color: var(--pale); font-size: 1.2rem; }
.liste .nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste .jauge { height: 4px; border-radius: 2px; background: var(--cyan); margin-top: 4px; opacity: .8; }
.liste .chiffre { font-family: var(--mono); font-size: 1.2rem; color: var(--doux); }
.liste button.nom { background: none; border: 0; text-align: left; cursor: pointer; padding: 0; color: var(--texte); }
.liste button.nom:hover { color: var(--cyan); }

.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; overflow-x: auto; padding-bottom: 6px; }
.heatmap i { width: 12px; height: 12px; border-radius: 3px; background: #231c3d; }
.heatmap i[data-n='1'] { background: #2f5a7a; } .heatmap i[data-n='2'] { background: #3a8aa8; }
.heatmap i[data-n='3'] { background: var(--cyan); } .heatmap i[data-n='4'] { background: var(--soleil); }
.heatmap i.vide { background: transparent; }

.filtres { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.puce { border: 1px solid var(--trait); background: var(--carte); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: .9rem; color: var(--doux); }
.puce[aria-pressed='true'] { border-color: var(--cyan); color: var(--texte); background: rgba(79,209,232,.12); }
.champ { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--trait); background: var(--nuit-2); margin-bottom: 14px; }
.champ:focus { border-color: var(--cyan); outline: none; }

.tableau { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tableau th { text-align: left; color: var(--pale); font-weight: 500; font-size: .85rem; padding: 8px; border-bottom: 1px solid var(--trait); }
.tableau td { padding: 9px 8px; border-bottom: 1px solid rgba(53,42,92,.5); vertical-align: top; }
.tableau-scroll { overflow-x: auto; }
.badge { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--trait); color: var(--doux); white-space: nowrap; }
.badge.jamais { color: var(--soleil); border-color: rgba(255,209,102,.4); }
.badge.abandonnee { color: var(--corail); border-color: rgba(255,107,91,.4); }
.badge.favorite { color: var(--ok); border-color: rgba(94,230,168,.4); }

.fiche { margin-top: 16px; }
.fiche h3 { margin: 0 0 4px; }
.vignette { width: 96px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: var(--carte-2); flex: none; }
.video-ligne { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(53,42,92,.5); }
.video-ligne:last-child { border-bottom: 0; }
.video-ligne > div { min-width: 0; overflow-wrap: anywhere; }
.fiche p { overflow-wrap: anywhere; }
.video-ligne a { color: var(--texte); text-decoration: none; }
.video-ligne a:hover { color: var(--cyan); }
.video-ligne .meta { color: var(--pale); font-size: .85rem; }

.annees { display: flex; gap: 8px; flex-wrap: wrap; }

.enrichi { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.enrichi p { margin: 4px 0 0; color: var(--doux); max-width: 46em; }

/* --- Rewind (story plein écran) --- */
.rewind { position: fixed; inset: 0; z-index: 500; background: #07050e; display: grid; place-items: center; }
.rw-cadre { position: relative; width: min(100vw, calc(100vh * 9 / 16)); height: min(100vh, calc(100vw * 16 / 9)); max-height: 100vh; overflow: hidden; background: var(--nuit); }
@media (max-width: 600px) { .rw-cadre { width: 100vw; height: 100dvh; } }
.rw-progres { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 5; }
.rw-progres span { flex: 1; height: 3px; background: rgba(255,255,255,.22); border-radius: 2px; overflow: hidden; }
.rw-progres span i { display: block; height: 100%; width: 0; background: #fff; }
.rw-progres span.fait i { width: 100%; }
.rw-haut { position: absolute; top: 24px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; z-index: 6; font-family: var(--mono); font-size: 1.25rem; color: rgba(255,255,255,.8); }
.rw-haut button { background: rgba(0,0,0,.25); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.rw-zone { position: absolute; top: 70px; bottom: 0; width: 35%; z-index: 4; background: none; border: 0; cursor: pointer; }
.rw-zone.g { left: 0; } .rw-zone.d { right: 0; width: 65%; }
.slide { position: absolute; inset: 0; padding: 92px 28px 48px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.slide.v1 { background: radial-gradient(120% 70% at 20% 0%, #3a1f5c 0%, var(--nuit) 60%); }
.slide.v2 { background: radial-gradient(120% 70% at 80% 100%, #0f4a5a 0%, var(--nuit) 60%); }
.slide.v3 { background: radial-gradient(120% 80% at 50% 0%, #5c1f2f 0%, var(--nuit) 62%); }
.slide.v4 { background: linear-gradient(170deg, #1d1440, #0e0b1a 70%); }
.slide .sur { font-family: var(--mono); font-size: 1.45rem; color: var(--cyan); }
.slide h2 { font-size: clamp(1.9rem, 7.5vw, 2.7rem); line-height: 1.05; letter-spacing: -.03em; margin: 0; }
.slide .geant { font-size: clamp(3.6rem, 18vw, 6rem); font-weight: 700; letter-spacing: -.05em; line-height: .95; color: var(--corail); text-shadow: -3px 0 rgba(79,209,232,.5); }
.slide p { margin: 0; font-size: 1.1rem; color: var(--doux); }
.slide .titre-video { font-size: 1.3rem; font-weight: 600; color: var(--texte); }
.slide .petite { font-size: .85rem; color: var(--pale); }
.slide ol { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.slide ol li { display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 8px; font-size: 1.12rem; }
.slide ol li b { font-family: var(--mono); color: var(--corail); font-size: 1.5rem; font-weight: 400; }
.slide ol li span:last-child { font-family: var(--mono); color: var(--doux); font-size: 1.2rem; }
.slide ol li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide .ere { border-left: 3px solid var(--cyan); padding: 2px 0 2px 12px; }
.slide .ere .mono { color: var(--cyan); font-size: 1.3rem; }
.slide .heures { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.slide .heures i { flex: 1; background: var(--cyan); border-radius: 3px 3px 0 0; opacity: .85; }
.slide .heures i.pic { background: var(--corail); opacity: 1; }
.slide .boutons { display: grid; gap: 10px; margin-top: 10px; position: relative; z-index: 7; }
.slide .anime { opacity: 0; transform: translateY(14px); animation: monte .6s ease forwards; }
.slide .anime:nth-child(2) { animation-delay: .15s; } .slide .anime:nth-child(3) { animation-delay: .3s; }
.slide .anime:nth-child(4) { animation-delay: .45s; } .slide .anime:nth-child(5) { animation-delay: .6s; }
.slide .anime:nth-child(n+6) { animation-delay: .75s; }
@keyframes monte { to { opacity: 1; transform: none; } }
.rew-bandes { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 2px, transparent 2px 7px); animation: defile .5s linear infinite; mix-blend-mode: screen; }
@keyframes defile { to { background-position: 0 -14px; } }
.pause-badge { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 1.3rem; color: #fff; z-index: 6; background: rgba(0,0,0,.4); padding: 2px 10px; border-radius: 6px; }

/* --- Pied --- */
.pied { max-width: 1120px; margin: 0 auto; padding: 28px 16px 40px; color: var(--pale); font-size: .88rem; border-top: 1px solid var(--trait); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pied a { color: var(--doux); }
.texte-long { max-width: 760px; }
.texte-long h2 { margin-top: 36px; }
.texte-long p, .texte-long li { color: var(--doux); }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; gap: 28px; }
  .k7 { max-width: 420px; }
  .etapes, .grille-3 { grid-template-columns: 1fr; }
  .grille-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .entete nav a.opt { display: none; }
  .tuile .v { font-size: 1.5rem; }
  .barres-v .col span { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .slide .anime { opacity: 1; transform: none; }
}
