/* =============================================================
   LEV STUDIO — Formation · Design system partagé (DA landing)
   Cadre/Hub en DA LEV (noir / rouge / Extenda) ; l'intérieur des
   cours garde son skin DaVinci Resolve (défini dans chaque épisode).
   ============================================================= */

@font-face {
  font-family: "Extenda 30 Deca";
  src: url("../../fonts/display.woff2") format("woff2"),
       url("../../fonts/display.woff") format("woff"),
       url("../../fonts/display.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:          #080808;
  --accent-red:  #e8000d;
  --text-dim:    #777;
  --text-mid:    #999;
  --text-bright: #ffffff;
  --border:      #1c1c1c;
  --border-2:    #2a2a2a;
  --font-display: "Extenda 30 Deca", sans-serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* la police d'affichage n'a qu'une graisse : pas de faux-gras synthétique */
html, body { font-synthesis: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; }

body.formation {
  background: var(--bg);
  color: var(--text-mid);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; }

.fmt-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── Barre du haut (cadre LEV) ──────────────────────────── */
.fmt-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 24px;
  background: rgba(8,8,8,.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.fmt-brand {
  font-family: var(--font-display);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-bright);
  font-size: 1.3rem;
  text-decoration: none;
}
.fmt-brand b { color: var(--accent-red); font-weight: 400; }
.fmt-topbar .spacer { flex: 1; }
.fmt-back {
  font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none; transition: color .2s ease;
}
.fmt-back:hover { color: var(--text-bright); }

/* ── Sélecteur de langue ────────────────────────────────── */
.fmt-lang {
  display: flex; align-items: center; gap: .4rem;
  font-size: .6rem; letter-spacing: .14em; color: var(--text-dim);
}
.fmt-lang button {
  background: none; border: none; cursor: pointer; padding: 0;
  font: inherit; letter-spacing: inherit; color: var(--text-dim);
  transition: color .2s ease;
}
.fmt-lang button.active { color: var(--text-bright); }
.fmt-lang button:not(.active):hover { color: var(--text-mid); }
.fmt-lang .sep { color: var(--border-2); }

/* ── En-tête / hero ─────────────────────────────────────── */
.fmt-hero { padding: 72px 0 40px; border-bottom: 1px solid var(--border); }
.fmt-kicker {
  font-size: .68rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent-red); font-weight: 600;
}
.fmt-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--text-bright); line-height: 1.1; margin: 18px 0 14px;
  letter-spacing: .01em;
}
.fmt-hero p { color: var(--text-mid); max-width: 620px; font-size: 1rem; }

/* ── Catalogue : séries + cartes ────────────────────────── */
.fmt-serie { margin-top: 56px; }
.fmt-serie-head {
  display: flex; align-items: baseline; gap: 16px;
  border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 24px;
}
.fmt-serie-head h2 {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-bright); font-size: clamp(1.5rem, 3vw, 1.9rem);
}
.fmt-serie-head .count {
  margin-left: auto; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim);
}
.fmt-serie.soon .fmt-serie-head h2 { color: var(--text-dim); }

.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.fmt-card {
  display: flex; flex-direction: column;
  background: #0d0d0d; border: 1px solid var(--border);
  border-radius: 3px; overflow: hidden; text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
a.fmt-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
a.fmt-card:hover .fmt-card-thumb img { opacity: .9; }

.fmt-card-thumb {
  aspect-ratio: 16 / 9; height: 0; padding-top: 56.25%; position: relative;
  background: #111; overflow: hidden;
}
.fmt-card-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(40%); transition: opacity .2s ease, filter .2s ease;
}
a.fmt-card:hover .fmt-card-thumb img { filter: grayscale(0%); }
.fmt-card-thumb .ep-num {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  background: rgba(8,8,8,.78); color: var(--accent-red); padding: 3px 8px; border-radius: 2px;
}
.fmt-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.fmt-card-body h3 { font-family: var(--font-display); color: var(--text-bright); font-size: 1.28rem; line-height: 1.25; }
.fmt-card-body p { font-size: .85rem; color: var(--text-dim); line-height: 1.6; flex: 1; }
.fmt-card-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mid);
  margin-top: 4px;
}
.fmt-card-meta .play { color: var(--accent-red); }

/* Carte « à venir » */
.fmt-card.soon { opacity: .5; cursor: default; }
.fmt-card.soon .ep-num { color: var(--text-dim); }
.fmt-card.soon .fmt-card-thumb {
  background: repeating-linear-gradient(45deg, #0e0e0e, #0e0e0e 10px, #111 10px, #111 20px);
}
.fmt-card.soon .badge-soon {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text-mid);
}

/* ── Cadre de cours : navigation inter-épisodes ─────────── */
.course-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1080px; margin: 56px auto 0; padding: 24px;
  border-top: 1px solid var(--border);
}
.course-nav a, .course-nav span {
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--text-dim); transition: color .2s ease;
}
.course-nav a:hover { color: var(--text-bright); }
.course-nav .sommaire { color: var(--accent-red); }
.course-nav .disabled { opacity: .3; pointer-events: none; }

/* Nav du haut : collée sous la topbar, pas de grande marge */
.course-nav-top {
  margin: 0 auto;
  padding: 14px 24px;
  border-top: none;
  border-bottom: 1px solid var(--border);
}

/* ── Pied de page ───────────────────────────────────────── */
.fmt-footer {
  text-align: center; color: var(--text-dim); font-size: .68rem; letter-spacing: .04em;
  padding: 48px 24px; border-top: 1px solid var(--border); margin-top: 64px;
}
.fmt-footer a { color: var(--text-mid); text-decoration: none; }
.fmt-footer a:hover { color: var(--text-bright); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .fmt-wrap { padding: 0 16px; }
  .fmt-topbar { padding: 12px 16px; gap: 10px; }
  .fmt-brand { font-size: 1.1rem; letter-spacing: .08em; }
  .fmt-back { display: none; }
  .fmt-hero { padding: 48px 0 32px; }
  .fmt-grid { grid-template-columns: 1fr; gap: 16px; }
  .course-nav { padding: 20px 16px; }
}

/* =============================================================
   HUB ÉDITORIAL — héros, comparateur, citation, bio, teaser
   ============================================================= */
.fmt-hero .subhead {
  font-family: var(--font-display);
  color: var(--text-bright); font-size: clamp(1.1rem, 2.4vw, 1.55rem);
  line-height: 1.25; margin: 4px 0 18px; letter-spacing: .01em;
}

/* ── Épisode héros ─────────────────────────────────────── */
.fmt-featured {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center;
  border: 1px solid var(--border); border-radius: 4px; padding: 26px;
  background: linear-gradient(180deg, #0d0d0d, #0a0a0a);
  margin-top: 48px;
}
.fmt-featured-media { min-width: 0; }
.fmt-featured-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; border: 1px solid var(--border); }
.fmt-featured-body .ep-kicker {
  font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-red); font-weight: 700;
}
.fmt-featured-body h2 {
  font-family: var(--font-display); color: var(--text-bright);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.12; margin: 10px 0 12px;
}
.fmt-featured-body > p { color: var(--text-mid); font-size: .92rem; line-height: 1.7; }
.fmt-result {
  margin: 16px 0; padding: 12px 14px; border-left: 2px solid var(--accent-red);
  background: rgba(232,0,13,.06); font-size: .9rem; color: var(--text-bright); line-height: 1.6;
}
.fmt-result .lbl {
  display: inline-block; font-size: .56rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-red); font-weight: 700; margin-right: 8px;
}
.fmt-outcomes { list-style: none; margin: 16px 0 22px; display: grid; gap: 9px; }
.fmt-outcomes li { position: relative; padding-left: 20px; font-size: .86rem; color: var(--text-mid); line-height: 1.5; }
.fmt-outcomes li::before { content: '—'; position: absolute; left: 0; color: var(--accent-red); }
.fmt-cta {
  display: inline-block; padding: .8rem 1.6rem; border: 1px solid var(--accent-red); color: var(--text-bright);
  font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; border-radius: 2px;
  transition: background .2s ease, color .2s ease;
}
.fmt-cta:hover { background: var(--accent-red); color: #fff; }

/* ── Comparateur avant/après ───────────────────────────── */
.fmt-ba {
  position: relative; width: 100%; height: 0; padding-top: 56.25%; overflow: hidden;
  border: 1px solid var(--border); border-radius: 3px; background: #000;
  user-select: none; touch-action: none; cursor: ew-resize;
}
.fmt-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.fmt-ba .top { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.fmt-ba .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--accent-red); transform: translateX(-1px); pointer-events: none; }
.fmt-ba .handle::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent-red); border: 2px solid #fff;
}
.fmt-ba .tag {
  position: absolute; top: 10px; font-size: .55rem; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: rgba(8,8,8,.72); padding: 3px 8px; border-radius: 2px;
}
.fmt-ba .tag.l { left: 10px; } .fmt-ba .tag.r { right: 10px; }

/* ── Citation / manifeste ──────────────────────────────── */
.fmt-quote {
  margin: 64px 0; padding-left: 22px; border-left: 3px solid var(--accent-red);
}
.fmt-quote blockquote {
  font-family: var(--font-display); color: var(--text-bright);
  font-size: clamp(1.4rem, 3.4vw, 2.2rem); line-height: 1.25; max-width: 800px;
}

/* ── Qui te forme ──────────────────────────────────────── */
.fmt-author {
  display: flex; align-items: center; gap: 22px; margin: 56px 0;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.fmt-author img {
  width: 92px; height: 116px; object-fit: cover; border-radius: 4px;
  filter: grayscale(100%); border: 1px solid var(--border); flex: none;
}
.fmt-author .who { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-red); font-weight: 700; margin-bottom: 7px; }
.fmt-author p { color: var(--text-mid); font-size: .92rem; line-height: 1.65; max-width: 620px; }
.fmt-author p b { color: var(--text-bright); font-weight: 400; }

/* ── La suite arrive ───────────────────────────────────── */
.fmt-coming { margin: 56px 0 8px; }
.fmt-coming-head { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
.fmt-coming-list { list-style: none; display: grid; gap: 2px; }
.fmt-coming-list li {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 14px;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.fmt-coming-list .n { font-family: var(--mono, ui-monospace, monospace); font-size: .7rem; color: var(--text-dim); }
.fmt-coming-list .t { font-family: var(--font-display); color: var(--text-mid); font-size: 1.05rem; }
.fmt-coming-list .d { grid-column: 2; font-size: .78rem; color: var(--text-dim); }

/* Rail « déjà disponible » : mêmes lignes, mais cliquables */
.fmt-coming-list.avail a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 6px 14px;
  text-decoration: none; transition: color .15s; padding: 14px 0;
}
.fmt-coming-list.avail li { padding: 0; }
.fmt-coming-list.avail .t { color: var(--text-bright); }
.fmt-coming-list.avail .go { grid-row: 1; grid-column: 3; align-self: center; font-size: .8rem; color: var(--accent-red); opacity: 0; transition: opacity .15s; }
.fmt-coming-list.avail a:hover .t { color: var(--accent-red); }
.fmt-coming-list.avail a:hover .go { opacity: 1; }

/* ── Rangée d'épisodes défilable (style Netflix) ───────── */
.fmt-rail-section { margin: 56px 0 8px; }
.fmt-rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.fmt-rail-head h2 {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-bright); font-size: clamp(1.3rem, 3vw, 1.8rem);
}
.fmt-rail-nav { display: flex; gap: 8px; flex: none; }
.fmt-rail-arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-2);
  background: #0d0d0d; color: var(--text-bright); cursor: pointer;
  display: grid; place-items: center; transition: border-color .2s ease, color .2s ease;
}
.fmt-rail-arrow svg { display: block; }
.fmt-rail-arrow:hover { border-color: var(--accent-red); color: var(--accent-red); }

.fmt-rail {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 18px 4px 30px; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--border-2) transparent;
}
.fmt-rail::-webkit-scrollbar { height: 7px; }
.fmt-rail::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
.fmt-rail::-webkit-scrollbar-track { background: transparent; }

.fmt-ep-card {
  flex: 0 0 300px; scroll-snap-align: start; display: flex; flex-direction: column;
  background: #10161a; border-radius: 6px; overflow: hidden; text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.4); will-change: transform;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease;
}
a.fmt-ep-card:hover {
  transform: translateY(-8px) scale(1.05); z-index: 3;
  box-shadow: 0 20px 44px rgba(0,0,0,.62), 0 0 0 1px rgba(95,211,230,.28);
}

.fmt-ep-thumb { position: relative; aspect-ratio: 16/9; background: #0e1417; overflow: hidden; }
.fmt-ep-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(30%);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .3s ease; }
a.fmt-ep-card:hover .fmt-ep-thumb img { transform: scale(1.08); filter: grayscale(0%); }
.fmt-ep-thumb::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(6,9,10,.6), transparent 55%); opacity: .7; transition: opacity .25s ease; }
a.fmt-ep-card:hover .fmt-ep-thumb::after { opacity: 1; }
@media (prefers-reduced-motion: reduce){
  a.fmt-ep-card:hover { transform: none; }
  a.fmt-ep-card:hover .fmt-ep-thumb img { transform: none; }
}
.fmt-ep-thumb .ep-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2; font-size: .54rem; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 700; background: rgba(8,8,8,.8); color: var(--accent-red);
  padding: 3px 8px; border-radius: 2px;
}
.fmt-ep-play {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(232,0,13,.92); color: #fff;
  opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease;
}
.fmt-ep-play svg { display: block; margin-left: 1px; } /* léger décalage optique du triangle */
/* Révélé au survol uniquement sur les appareils qui savent survoler (souris/trackpad). */
@media (hover: hover) {
  a.fmt-ep-card:hover .fmt-ep-play { opacity: 1; transform: none; }
}
/* Sur tactile (pas de vrai survol), badge affiché statiquement — pas de « pop » au tap. */
@media (hover: none) {
  .fmt-ep-play { opacity: 1; transform: none; transition: none; }
}
.fmt-ep-thumb.soon {
  display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #0e0e0e, #0e0e0e 10px, #111 10px, #111 20px);
}
.fmt-soon-badge {
  font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text-mid);
  border: 1px solid var(--border-2); padding: 5px 12px; border-radius: 2px;
}
.fmt-ep-info { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.fmt-ep-info h3 { font-family: var(--font-display); color: var(--text-bright); font-size: 1.2rem; line-height: 1.2; }
.fmt-ep-meta { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mid); }
.fmt-ep-info p { font-size: .82rem; color: var(--text-dim); line-height: 1.55; }
.fmt-ep-card.locked { opacity: .55; }
.fmt-ep-card.locked .fmt-ep-info h3 { color: var(--text-mid); }

@media (max-width: 768px) {
  .fmt-featured { grid-template-columns: 1fr; gap: 22px; padding: 18px; }
  .fmt-author { flex-direction: column; align-items: flex-start; gap: 16px; }
  .fmt-quote { margin: 44px 0; }
  .fmt-rail-nav { display: none; }
  .fmt-ep-card { flex-basis: 80vw; }
}

/* ── Animations (apparition au scroll + indices) ───────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes fmtBaPulse { 0% { box-shadow: 0 0 0 0 rgba(232,0,13,.55); } 70% { box-shadow: 0 0 0 13px rgba(232,0,13,0); } 100% { box-shadow: 0 0 0 0 rgba(232,0,13,0); } }
.fmt-ba .handle::after { animation: fmtBaPulse 2.2s ease-out .5s 2; }

.fmt-cta, .cta-projet { position: relative; }
.fmt-card-thumb img, .fmt-featured-thumb { transition: transform .5s ease, opacity .2s ease, filter .2s ease; }
a.fmt-card:hover .fmt-card-thumb img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .fmt-ba .handle::after { animation: none; }
  .fmt-card-thumb img, .fmt-featured-thumb { transition: none; }
  .fmt-rail { scroll-behavior: auto; }
  .fmt-ep-card, .fmt-ep-thumb img, .fmt-ep-play { transition: none; }
}

/* Sélecteur de séries du hub */
.fmt-series-nav{ display:flex; gap:8px; flex-wrap:wrap; margin:0 0 22px; }
.fmt-series-nav .fmt-chip{ font:600 .8rem/1 Helvetica,Arial,sans-serif; color:#b9c2c6;
  background:#141414; border:1px solid #2a2a2a; border-radius:999px; padding:8px 15px;
  cursor:pointer; transition:color .15s, border-color .15s, background .15s; }
.fmt-series-nav .fmt-chip:hover{ color:#fff; border-color:#3a3a3a; }
.fmt-series-nav .fmt-chip.is-on{ color:#fff; background:#e8000d; border-color:#e8000d; }

