/* ===== Fonts =====
   Place the real font files in /fonts/ to get the exact typefaces.
   Fallback stacks keep the same feel until then. */
@font-face { font-family: 'Bebas Neue'; src: url('../fonts/BebasNeue-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/DMSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/DMSans-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Libre Baskerville'; src: url('../fonts/LibreBaskerville-Italic.woff2') format('woff2'); font-style: italic; font-display: swap; }

:root {
  --navy: #003366;
  --navy-deep: #00203f;
  --gold: #C8A84B;
  --gold-soft: rgba(200, 168, 75, 0.55);
  --cream: #FDFCF0;
  --cream-dim: rgba(253, 252, 240, 0.64);
  --hairline: rgba(200, 168, 75, 0.24);

  --f-display: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  --f-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-quote: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--navy); color: var(--cream); font-family: var(--f-body); overflow: hidden; }
.deck { position: relative; width: 100vw; height: 100vh; }

.progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: rgba(253,252,240,0.08); z-index: 70; }
.progress-fill { height: 100%; width: 0%; background: var(--gold); transition: width .5s ease; }

/* ---- Frise persistante (repère de période) ---- */
.mini-timeline {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 1.6vw; z-index: 55; opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.mini-timeline.is-visible { opacity: 1; pointer-events: auto; }
.mini-timeline .mt-dot {
  display: flex; align-items: center; gap: .4em; cursor: pointer;
  font-family: var(--f-body); font-size: .72rem; letter-spacing: .03em;
  color: var(--cream-dim); padding: .2em .1em; transition: color .3s ease;
}
.mini-timeline .mt-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--hairline); transition: background .3s ease, box-shadow .3s ease;
}
.mini-timeline .mt-dot.on { color: var(--gold); }
.mini-timeline .mt-dot.on::before { background: var(--gold); box-shadow: 0 0 8px 1px var(--gold-soft); }
.mini-timeline .mt-dot:hover { color: var(--cream); }

.slide {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 6vh 8vw; opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
  background: radial-gradient(ellipse at 85% 12%, rgba(200,168,75,0.09), transparent 55%),
              linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.slide.is-active { opacity: 1; visibility: visible; transform: translateY(0); z-index: 2; }

.logo { position: absolute; top: 5vh; left: 8vw; height: 32px; opacity: .9; z-index: 3; }
.eyebrow-word { font-family: var(--f-body); font-weight: 500; letter-spacing: .04em; color: var(--gold); font-size: 1.05rem; margin: 0 0 .6em 0; }

/* ---- Title slide : grande photo réelle en fond ---- */
.slide--title { padding: 0; justify-content: flex-end; }
.hero-image {
  position: absolute; inset: 0; background-size: cover; background-position: center 35%;
  background-color: var(--navy-deep);
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(0,20,41,0.92) 0%, rgba(0,20,41,0.55) 42%, rgba(0,20,41,0.30) 68%, rgba(0,20,41,0.55) 100%),
    linear-gradient(90deg, rgba(0,20,41,0.35) 0%, transparent 45%);
}
.logo--onhero { top: 5vh; left: 8vw; height: 38px; z-index: 3; }

/* Affiche déjà complète (titre/logo/date incrustés dans l'image) : le moteur n'ajoute rien par-dessus */
.slide--title.is-full-card .hero-scrim,
.slide--title.is-full-card .hero-content,
.slide--title.is-full-card .logo--onhero { display: none; }
.slide--title.is-full-card .hero-image { background-size: cover; background-position: center; }
.hero-content { position: relative; z-index: 2; padding: 0 8vw 8vh; max-width: 60vw; }
.eyebrow--onhero { font-size: 1.15rem; }
.title-hero {
  font-family: var(--f-display); font-weight: 400; white-space: pre-line;
  font-size: clamp(3.6rem, 9.5vw, 9rem); line-height: .9; margin: 0 0 .35em 0; letter-spacing: .01em;
  text-shadow: 0 4px 30px rgba(0,10,25,0.5);
}
.subtitle--onhero { font-size: clamp(1.15rem, 2vw, 1.6rem); max-width: 34em; margin: 0 0 1.6em 0; }
.title-meta--onhero { font-size: 1.2rem; }
.title-meta { font-family: var(--f-body); font-size: 1.15rem; color: var(--cream); display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.title-meta--small { color: var(--cream-dim); font-size: .95rem; margin-top: .35em; }
.title-meta .dot { color: var(--gold); }

/* ---- Question slide ---- */
.slide--question { align-items: flex-start; }
.q-line { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; margin: 0 0 .5em 0; max-width: 18em; }
.q-sub { font-family: var(--f-quote); font-style: italic; color: var(--cream-dim); font-size: clamp(1.05rem, 1.6vw, 1.35rem); margin: .15em 0; }
.q-answer { margin-top: 1.4em; padding-top: 1.1em; border-top: 1px solid var(--hairline); font-family: var(--f-body); font-weight: 500; font-size: clamp(1.15rem, 1.9vw, 1.5rem); max-width: 28em; color: var(--cream); }

/* ---- Frise (grande, diapo dédiée) : axe avec dates ---- */
.slide--timeline { align-items: flex-start; justify-content: center; }
.axis-wrap { width: 100%; margin-top: 5vh; }
.axis-line { position: relative; height: 2px; background: var(--hairline); width: 100%; margin-bottom: 2.4vh; }
.axis-tick { position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--hairline); transform: translateX(-50%); transition: background .4s ease, box-shadow .4s ease; }
.axis-tick.on { background: var(--gold); box-shadow: 0 0 10px 2px var(--gold-soft); }
.axis-year { position: absolute; top: 14px; transform: translateX(-50%); font-size: .85rem; color: var(--cream-dim); font-family: var(--f-body); }
.axis-periods { display: flex; justify-content: space-between; margin-top: 5vh; }
.axis-period {
  font-family: var(--f-display); font-size: clamp(1.15rem, 2.3vw, 1.9rem); text-align: center; flex: 1;
  color: var(--cream-dim); opacity: 0; transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease, color .5s ease;
}
.axis-period.on { opacity: 1; transform: translateY(0); color: var(--gold); }

/* ---- Portrait slide : vidéo plein cadre, texte en surimpression ---- */
.slide--portrait { padding: 0; justify-content: flex-end; }
.portrait-video-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #012348, #003a73); overflow: hidden; }
.portrait-video-bg video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 2em; color: var(--cream-dim); font-size: 1rem; font-style: italic; background: linear-gradient(135deg, #012348, #003a73); }
.video-fallback.show { display: flex; }
.portrait-scrim-top { position: absolute; inset: 0 0 auto 0; height: 26vh; background: linear-gradient(180deg, rgba(0,15,33,0.85), transparent); z-index: 1; }
.portrait-scrim-bottom { position: absolute; inset: auto 0 0 0; height: 42vh; background: linear-gradient(0deg, rgba(0,15,33,0.94) 15%, rgba(0,15,33,0.55) 65%, transparent); z-index: 1; }

.portrait-header { position: relative; z-index: 2; padding: 5vh 8vw 0; }
.portrait-period { font-family: var(--f-body); font-weight: 500; color: var(--gold); letter-spacing: .04em; font-size: .95rem; margin: 0 0 .3em 0; }
.portrait-name { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 6.5vw, 5.6rem); line-height: .95; margin: 0; text-shadow: 0 3px 20px rgba(0,10,25,0.5); }

.portrait-facts { position: relative; z-index: 2; display: flex; gap: 4vw; padding: 0 8vw 5vh; margin-top: auto; }
.fact { flex: 1; min-width: 0; }
.fact-label { font-family: var(--f-body); font-weight: 500; color: var(--gold); font-size: .78rem; letter-spacing: .05em; margin: 0 0 .3em 0; }
.fact p { margin: 0; font-size: clamp(.95rem, 1.3vw, 1.15rem); line-height: 1.35; color: var(--cream); }

.mute-btn { display: none; } /* remplacé par .play-btn, gardé pour compatibilité */

.play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--gold);
  background: rgba(0,20,41,0.55); color: var(--gold); font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ---- Morceau slide ---- */
.slide--song { align-items: flex-start; justify-content: center; }
.song-period { font-family: var(--f-body); font-weight: 500; color: var(--gold); letter-spacing: .04em; font-size: .95rem; margin: 0 0 .8em 0; }
.song-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.8rem, 6.5vw, 5.6rem); line-height: 1; margin: 0 0 .3em 0; }
.song-composer { font-family: var(--f-quote); font-style: italic; color: var(--cream-dim); font-size: clamp(1.1rem, 1.8vw, 1.5rem); }
.song-year { font-family: var(--f-body); color: var(--cream-dim); font-size: 1rem; margin-top: .3em; }

/* ---- Conclusion / thanks ---- */
.slide--conclusion { align-items: center; text-align: center; }
.conclusion-quote { margin: 0; font-family: var(--f-quote); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.4; max-width: 22em; color: var(--cream); white-space: pre-line; }
.slide--thanks { align-items: center; text-align: center; }
.thanks-word { font-family: var(--f-display); font-size: clamp(3.5rem, 9vw, 7rem); margin: 0; }
.thanks-sub { font-family: var(--f-quote); font-style: italic; color: var(--cream-dim); font-size: 1.3rem; margin-top: .3em; }

/* ---- Navigation ---- */
.nav-arrow {
  position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--hairline); background: rgba(0,32,63,0.55); color: var(--gold); font-size: 1.6rem; line-height: 1;
  cursor: pointer; z-index: 60; display: flex; align-items: center; justify-content: center;
  transition: opacity .3s ease, border-color .3s ease; opacity: 0;
}
.deck:hover ~ .nav-arrow, .nav-arrow:hover { opacity: 1; border-color: var(--gold); }
.nav-arrow--left { left: 2vw; }
.nav-arrow--right { right: 2vw; }

.fullscreen-btn {
  position: fixed; bottom: 2.4vh; right: 2vw; z-index: 60; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--hairline); background: rgba(0,32,63,0.55); color: var(--cream-dim); cursor: pointer; font-size: .95rem;
}
.slide-counter {
  position: fixed; bottom: 2.4vh; left: 2vw; z-index: 60; font-family: var(--f-body); font-size: .82rem;
  color: var(--cream-dim); letter-spacing: .03em;
}

.shortcuts-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,15,33,0.82); display: none; align-items: center; justify-content: center;
}
.shortcuts-overlay.is-open { display: flex; }
.shortcuts-box { background: var(--navy); border: 1px solid var(--hairline); border-radius: 6px; padding: 2.2em 2.6em; max-width: 26em; }
.shortcuts-box h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; margin: 0 0 .7em 0; color: var(--gold); }
.shortcuts-box ul { list-style: none; margin: 0; padding: 0; }
.shortcuts-box li { display: flex; align-items: center; gap: .8em; padding: .45em 0; border-bottom: 1px solid var(--hairline); font-size: .95rem; }
.shortcuts-box li:last-child { border-bottom: none; }
.shortcuts-box kbd { font-family: var(--f-body); font-size: .78rem; background: rgba(253,252,240,0.08); border: 1px solid var(--hairline); border-radius: 3px; padding: .15em .5em; color: var(--cream); }
.shortcuts-box span { color: var(--cream-dim); }

@media (hover: none) { .nav-arrow { opacity: .5; } }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-content { max-width: 88vw; padding: 0 6vw 6vh; }
  .slide { padding: 12vh 6vw 6vh; }
  .portrait-header { padding: 12vh 6vw 0; }
  .portrait-facts { flex-direction: column; gap: 1.2em; padding: 0 6vw 4vh; }
  .mini-timeline { display: none; }
  .axis-periods { flex-wrap: wrap; }
  .axis-period { flex: 1 1 30%; }
}

@media (prefers-reduced-motion: reduce) {
  .slide, .axis-tick, .axis-period { transition: none !important; }
}
