/* Même identité que l'exercice : salle de projection, terre sombre, ambre de la lampe.
   Mise en page : l'échelle des plans sert de barre de navigation ; chaque valeur est une section
   (définition + image principale, puis exemples tirés de l'histoire du cinéma). */
:root {
  --bg: #15110d;
  --surface: #1f1914;
  --surface-2: #2a221b;
  --line: #3a3027;
  --fg: #efe6da;
  --muted: #a8998a;
  --accent: #f2b134;
  --accent-ink: #1a1208;

  --f-display: "Big Shoulders Display", "Oswald", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 6px;
  --nav-h: 3.1rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--nav-h) + 1rem); }
html, body { background: var(--bg); color: var(--fg); }
body { margin: 0; font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1; margin: 0; text-wrap: balance; letter-spacing: .01em; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.muted { color: var(--muted); }
.acc { color: var(--accent); }
em { font-style: italic; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.wrap.narrow { max-width: 820px; }
.eyebrow { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* ---------- barre d'échelle ---------- */
.scalebar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: .75rem;
  min-height: var(--nav-h); padding: .35rem 16px;
  background: color-mix(in srgb, var(--bg) 93%, transparent); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.scalebar .home { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; color: var(--fg); text-decoration: none; white-space: nowrap; }
.steps { display: flex; gap: 3px; overflow-x: auto; flex: 1 1 auto; min-width: 0; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps a {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 600; text-decoration: none; color: var(--muted);
  background: var(--surface-2); border-radius: 3px; padding: .3rem .5rem; white-space: nowrap;
}
.steps a:hover { color: var(--fg); }
.steps a.on { background: var(--accent); color: var(--accent-ink); }
.scalebar .exo { font-family: var(--f-mono); font-size: .75rem; white-space: nowrap; text-decoration: none; }

/* ---------- ouverture ---------- */
.hero { position: relative; background: #000; }
.hero-img { width: 100%; max-height: 62vh; object-fit: cover; opacity: .85; }
.hero-text { padding-block: 2rem 3rem; display: grid; gap: .9rem; }
.hero h1 { font-size: clamp(3.2rem, 11vw, 8rem); text-transform: uppercase; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--muted); max-width: 40ch; }
.hero-cap { font-size: .85rem; }

/* ---------- blocs ---------- */
.block { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
.block h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); text-transform: uppercase; margin-block: .4rem 1.2rem; }
.prose { display: grid; gap: .9rem; max-width: 62ch; min-width: 0; }
.prose strong { color: var(--accent); font-weight: 600; }
.text-block .prose p { font-size: 1.15rem; }
.lead { margin-bottom: 1.5rem; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.schema { max-height: 78vh; width: auto; margin-inline: auto; }

/* ---------- l'échelle complète ---------- */
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem .8rem; }
.cell { display: grid; gap: .4rem; text-decoration: none; color: var(--muted); font-size: .8rem; }
.cell img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 3px; transition: transform .2s; }
.cell b { color: var(--accent); font-family: var(--f-mono); margin-right: .3rem; }
.cell:hover img { transform: translateY(-2px); }

/* ---------- une valeur de plan ---------- */
.abbr { font-family: var(--f-display); font-weight: 800; font-size: clamp(4.5rem, 12vw, 8.5rem); line-height: .85; color: var(--accent); }
.shot h2 { margin-block: .2rem .3rem; }
.alt { color: var(--muted); font-size: .95rem; margin-top: -.4rem; }
.num { color: var(--muted); }

figure { margin: 0; display: grid; gap: .5rem; min-width: 0; }
figcaption { font-size: .85rem; display: grid; gap: .1rem; }
figcaption .note { color: var(--muted); }
.zoom { padding: 0; border: 0; background: #000; cursor: zoom-in; border-radius: 4px; overflow: hidden; display: block; width: 100%; }
.zoom img { width: 100%; transition: opacity .2s; }
.zoom:hover img { opacity: .9; }

.hero-shot { display: grid; gap: 1rem; min-width: 0; }
.comment { border-left: 2px solid var(--accent); padding-left: .9rem; color: var(--muted); font-size: .95rem; display: grid; gap: .2rem; max-width: 62ch; }

.examples { margin-top: clamp(2rem, 5vw, 3.5rem); display: grid; gap: 1.2rem; }
.examples h3 { font-size: 1.6rem; text-transform: uppercase; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.6rem 1.2rem; align-items: start; }
.extra { font-size: .9rem; }

/* ---------- étude de cas ---------- */
.duel { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1rem .8rem; counter-reset: none; }
.duel li { display: grid; gap: .35rem; font-family: var(--f-mono); font-size: .8rem; }
.duel b { color: var(--accent); }
#duel .comment { margin-top: 1rem; }

/* ---------- exercice ---------- */
.cta { margin-top: 2rem; display: grid; gap: .8rem; justify-items: start; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600;
  padding: .75rem 1.2rem; border-radius: var(--radius);
}
.btn:hover { filter: brightness(1.07); }

.credits .prose p { font-size: .95rem; }

/* ---------- loupe ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .94);
  display: grid; place-items: center; align-content: center; gap: .8rem; padding: 16px; cursor: zoom-out;
}
.lightbox img { max-height: 84vh; width: auto; }
.lightbox p { color: #d8cfc4; font-size: .9rem; text-align: center; max-width: 70ch; }

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scalebar .exo { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
