/* ============================================================
   KAPAW — sources.kapaw.ch  (design public)
   Éditorial : titres bold grotesk, mots clés en italique serif.
   Couleurs en variables : pour matcher la charte, change --accent.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Inter:wght@400;500;600&family=Newsreader:ital,opsz,wght@1,6..72,400;1,6..72,500&display=swap');

:root {
  --bg: #FCFBF7;
  --surface: #FFFFFF;
  --ink: #14140F;
  --ink-soft: #57564E;
  --line: #E7E4DA;
  --accent: #D8FB45;
  --accent-deep: #1C2B12;
  --radius: 18px;
  --maxw: 1140px;
  --shadow: 0 1px 2px rgba(20,20,15,.04), 0 12px 40px rgba(20,20,15,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
em, .it { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 500; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252,251,247,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: .06em; }
.brand .tag { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--accent); padding: 4px 9px; border-radius: 999px; }
.nav-back { font-size: 14px; font-weight: 500; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 7px; transition: color .2s; }
.nav-back:hover { color: var(--ink); }

/* Hero */
.hero { padding: 80px 0 44px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--ink); }
.hero h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; line-height: 1.02; letter-spacing: -.02em; font-size: clamp(40px, 7vw, 78px); max-width: 14ch; }
.hero p.lead { margin-top: 24px; max-width: 56ch; font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); }

/* Boîte code */
.code-block { background: var(--accent-deep); border-radius: var(--radius); padding: 34px 34px 36px; margin: 40px 0 8px; color: #EAF3DD; }
.code-block .ttl { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: #fff; font-size: clamp(20px, 2.6vw, 26px); }
.code-block .ttl em { color: var(--accent); }
.code-block p.sub { margin-top: 8px; font-size: 15px; opacity: .8; max-width: 52ch; }
.code-form { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.code-form input {
  flex: 1; min-width: 200px; font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 22px; letter-spacing: .12em; padding: 16px 20px; border: 0; border-radius: 12px;
  background: #fff; color: var(--ink);
}
.code-form input::placeholder { color: #B4B2A9; letter-spacing: .12em; }
.code-form button {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px;
  background: var(--accent); color: var(--accent-deep); border: 0; border-radius: 12px;
  padding: 0 26px; cursor: pointer; transition: transform .15s;
}
.code-form button:hover { transform: translateY(-2px); }
.code-error { margin-top: 14px; font-size: 14px; color: #FAC775; }

/* Grille vidéos */
.section-label { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 40px; }
.section-label h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 15px; letter-spacing: .02em; color: var(--ink-soft); }
.section-label .count { font-size: 13px; color: var(--ink-soft); }
.grid { display: grid; gap: 22px; margin: 32px 0 0; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card.live:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #D8D4C6; }
.card .thumb { aspect-ratio: 16 / 10; position: relative; background: var(--accent-deep); display: flex; align-items: flex-end; padding: 18px; overflow: hidden; }
.card .thumb .ep { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .1em; color: var(--accent); }
.card .thumb .play { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.14); backdrop-filter: blur(4px); display: grid; place-items: center; color: #fff; }
.card .thumb .codepill { position: absolute; top: 16px; left: 16px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .12em; color: var(--accent-deep); background: var(--accent); padding: 5px 11px; border-radius: 999px; }
.card .thumb .glow { position: absolute; inset: 0; background: radial-gradient(120% 100% at 80% 0%, rgba(216,251,69,.22), transparent 60%); }
.card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card .kicker { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.card h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 21px; line-height: 1.18; letter-spacing: -.01em; }
.card .meta { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-soft); }
.card .meta .arrow { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.empty { padding: 60px 0; color: var(--ink-soft); }

/* Page détail */
.detail-head { padding: 64px 0 36px; }
.detail-head .ep-badge { display: inline-flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .08em; background: var(--ink); color: var(--accent); padding: 7px 14px; border-radius: 999px; margin-bottom: 24px; }
.detail-head .ep-badge .cat { color: #fff; font-weight: 500; letter-spacing: .04em; }
.detail-head h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; line-height: 1.04; letter-spacing: -.02em; font-size: clamp(34px, 5.5vw, 62px); max-width: 18ch; }
.detail-head p.lead { margin-top: 24px; max-width: 60ch; font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); }
.detail-head .watch { margin-top: 26px; display: inline-flex; align-items: center; gap: 9px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; background: var(--accent); color: var(--accent-deep); padding: 12px 20px; border-radius: 999px; }

.sources-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 26px; margin: 18px 0 30px; }
.sources-intro h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.01em; }
.sources-intro .num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; color: var(--ink-soft); white-space: nowrap; }

.source { display: grid; grid-template-columns: 64px 1fr auto; gap: 26px; align-items: start; padding: 30px 0; border-top: 1px solid var(--line); }
.source:first-of-type { border-top: none; }
.source .idx { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; width: 52px; height: 52px; display: grid; place-items: center; }
.source .org { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.source .org .year { color: var(--ink); background: var(--accent); padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.source h3 { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 500; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.25; color: var(--ink); }
.source p { margin-top: 10px; color: var(--ink-soft); max-width: 60ch; font-size: 15.5px; }
.source .go { align-self: center; white-space: nowrap; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); border-radius: 999px; padding: 11px 18px; transition: background .2s, color .2s; }
.source .go:hover { background: var(--ink); color: var(--accent); }

.note { background: var(--accent-deep); color: #EAF3DD; border-radius: var(--radius); padding: 28px 30px; margin: 44px 0 0; display: flex; gap: 18px; align-items: flex-start; }
.note .dot { color: var(--accent); font-size: 22px; line-height: 1; }
.note p { font-size: 15px; max-width: 70ch; }
.note em { color: #fff; }

/* Footer */
.site-footer { margin-top: 90px; background: var(--accent-deep); color: #EAF3DD; }
.site-footer .wrap { padding: 56px 28px 48px; display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-end; justify-content: space-between; }
.site-footer .big { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(26px, 4vw, 40px); line-height: 1.05; letter-spacing: -.01em; color: #fff; max-width: 16ch; }
.site-footer .big em { color: var(--accent); }
.site-footer a.mail { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; color: var(--accent); }
.site-footer .links { display: flex; gap: 20px; font-size: 14px; opacity: .85; }
.site-footer .links a:hover { opacity: 1; color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.foot-bottom .wrap { padding: 20px 28px; font-size: 13px; opacity: .6; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.foot-bottom a { text-decoration: underline; }

@media (max-width: 720px) {
  .source { grid-template-columns: 44px 1fr; gap: 16px; }
  .source .go { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
  .source .idx { width: 44px; height: 44px; }
  .hero { padding: 52px 0 32px; }
  .detail-head { padding: 44px 0 28px; }
}
