/* ============================================================
   MsFlix — feuille de style commune
   Palette : noir + blanc + une couleur par section
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --paper: #f7f5f0;
  --red: #e10600;
  --blue: #003c8a;
  --acid: #f4ff33;

  --bg: var(--ink);
  --fg: var(--paper);
  --muted: #a8a49c;
  --line: #2a2a2a;
  --card: #141414;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --maxw: 1240px;
  --radius: 2px;
}

/* Sections colorées : le texte s'inverse sur chaque fond */
.sec-red   { --bg: var(--red);   --fg: #fff;      --muted: #ffd9d7; --line: #b10500; --card: #c90600; }
.sec-blue  { --bg: var(--blue);  --fg: #fff;      --muted: #c3d6f5; --line: #002f6d; --card: #00306e; }
.sec-acid  { --bg: var(--acid);  --fg: #0a0a0a;   --muted: #4a4a12; --line: #c9d423; --card: #e6f21f; }
.sec-paper { --bg: var(--paper); --fg: #0a0a0a;   --muted: #5c5850; --line: #d8d3c8; --card: #ffffff; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><circle cx='1.5' cy='1.5' r='1.1' fill='%23ffffff' fill-opacity='0.09'/></svg>");
  background-size: 20px 20px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #232323;
}

.site-head__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0;
}
.logo b { color: var(--red); }

.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-left: auto;
  align-items: center;
}

.nav a {
  text-decoration: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.7rem 0.7rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  color: #d8d4cc;
}
.nav a:hover { color: #fff; background: #1c1c1c; }
.nav a[aria-current="page"] { color: var(--acid); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.75rem 1.4rem;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--fg); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: #c00500; border-color: #c00500; }
.btn--sm { min-height: 40px; padding: 0.5rem 0.9rem; font-size: 0.75rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- Sections ---------- */

.section {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><circle cx='1.5' cy='1.5' r='1.1' fill='%23000000' fill-opacity='0.06'/></svg>");
  background-size: 20px 20px;
  color: var(--fg);
  padding-block: clamp(3rem, 8vw, 6rem);
  border-bottom: 1px solid var(--line);
}
.sec-red .section, .sec-blue .section { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><circle cx='1.5' cy='1.5' r='1.1' fill='%23ffffff' fill-opacity='0.10'/></svg>"); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

/* ---------- Hero : titre empilé + poids qui bouge au scroll ---------- */

.hero {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 11vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin: 0 0 1.6rem;
  font-variation-settings: "wght" 200;
  text-wrap: balance;
}
.hero h1 span { display: block; }
.hero h1 span:nth-child(2) { margin-left: 1.4em; }
.hero h1 span:nth-child(3) { margin-left: -0.35em; }
.hero h1 em { font-style: normal; color: var(--red); }

@keyframes weigh {
  from { font-variation-settings: "wght" 200; }
  to   { font-variation-settings: "wght" 900; }
}
@supports (animation-timeline: scroll()) {
  .hero h1 {
    animation: weigh linear both;
    animation-timeline: scroll(root);
    animation-range: 0 40vh;
  }
}

.hero__lede {
  max-width: 46ch;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: #cfcbc3;
  margin: 0 0 2rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 2.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8f8b83;
}

/* ---------- Bento cassé ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.8rem, 2vw, 1.4rem);
}

.bento > * { min-width: 0; }

.b-1 { grid-column: 1 / 4; }
.b-2 { grid-column: 4 / 7; }
.b-3 { grid-column: 2 / 5; }
.b-4 { grid-column: 5 / 7; }
.b-5 { grid-column: 1 / 3; }
.b-6 { grid-column: 3 / 7; }

@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr; }
  .bento > * { grid-column: 1 / -1 !important; }
}

.tile {
  border: 1px solid var(--line);
  background: var(--card);
  padding: clamp(1.1rem, 2.5vw, 1.8rem);
  border-radius: var(--radius);
}
.tile h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.tile p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.tile__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.9rem;
}

/* ---------- Bande draggable ---------- */

.band {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding-block: 0.5rem;
  touch-action: pan-y;
}
.band.is-dragging { cursor: grabbing; }
.band__track {
  display: flex;
  gap: 1rem;
  width: max-content;
  will-change: transform;
}
.band__item {
  flex: 0 0 auto;
  width: clamp(150px, 34vw, 210px);
}
.band__item img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  pointer-events: none;
  background: #1b1b1b;
}
.band__item figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}
.band__hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

/* ---------- Grille de films ---------- */

.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: clamp(0.9rem, 2vw, 1.5rem);
}

.film-card {
  text-decoration: none;
  display: block;
  color: inherit;
}
.film-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: #1b1b1b;
  transition: transform 0.2s ease;
}
.film-card:hover img { transform: scale(1.02); }
.film-card h3 {
  font-size: 0.95rem;
  margin: 0.6rem 0 0.15rem;
  letter-spacing: -0.01em;
}
.film-card p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Forfaits ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.plan {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border-radius: var(--radius);
}
.plan--featured { border: 2px solid var(--fg); }
.plan__name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.plan__price {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
}
.plan__price small { font-size: 0.8rem; font-family: var(--font-body); letter-spacing: 0; }
.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
}
.plan li::before { content: "— "; color: var(--fg); }

/* ---------- Formulaires ---------- */

.field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  min-height: 46px;
  color: var(--fg);
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--fg);
  outline: none;
  box-shadow: 0 0 0 3px rgba(244, 255, 51, 0.35);
}
.field__hint { font-size: 0.78rem; color: var(--muted); margin: 0; }
.field__error { font-size: 0.78rem; color: var(--red); margin: 0; min-height: 1em; }
.sec-red .field__error, .sec-blue .field__error { color: #fff; font-weight: 700; }

.form-card {
  max-width: 520px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: clamp(1.3rem, 4vw, 2.2rem);
  border-radius: var(--radius);
}

.notice {
  border-left: 4px solid var(--fg);
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
}
.notice--warn { border-left-color: var(--red); }

/* ---------- Tableau admin ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 620px; }
th, td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}
tbody tr:last-child td { border-bottom: 0; }

.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
}
.tab[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- Divers ---------- */

.placeholder {
  background: rgba(244, 255, 51, 0.18);
  border-bottom: 1px dotted currentColor;
  padding: 0 0.15em;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 1.1rem;
  border-radius: var(--radius);
}
.stat dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.prose { max-width: 62ch; }
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}
.prose p { margin: 0 0 1rem; color: var(--muted); }
.prose strong { color: var(--fg); }

.player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dl-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }

/* ---------- Épisodes ---------- */

.ep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }

.ep-btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 0.85rem 1rem;
  min-height: 52px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ep-btn:hover { border-color: var(--fg); }
.ep-btn.is-active { border-color: var(--fg); background: rgba(255, 255, 255, 0.14); }
.ep-btn__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.ep-btn__title { font-weight: 600; font-size: 0.95rem; }
.ep-btn__dur {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ep-row {
  display: grid;
  grid-template-columns: 90px 90px 1fr;
  gap: 0.7rem;
  align-items: end;
  border: 1px solid var(--line);
  padding: 0.9rem;
  margin-bottom: 0.8rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.12);
}
.ep-row .field:nth-child(3),
.ep-row .field:nth-child(4) { grid-column: 1 / -1; }
.ep-row .field { margin-bottom: 0; }
.ep-row > .btn { grid-column: 1 / -1; justify-self: start; }

@media (max-width: 560px) {
  .ep-row { grid-template-columns: 1fr 1fr; }
  .ep-btn { grid-template-columns: auto 1fr; }
  .ep-btn__dur { grid-column: 2; }
}

/* ---------- Footer ---------- */

.site-foot {
  background: var(--ink);
  color: #8f8b83;
  padding: 2.5rem 0 4rem;
  font-size: 0.85rem;
}
.site-foot a { color: #cfcbc3; }
.site-foot__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }

.attribution {
  position: static;
  margin-top: 2rem;
  font-size: 0.72rem;
  opacity: 1;
  color: #9a968e;
  font-family: var(--font-mono);
}
.attribution a { color: #c9c5bd; text-decoration: underline; }

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 { animation: none !important; font-variation-settings: "wght" 700; }
  .btn:hover, .film-card:hover img { transform: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
