/* Senpai Stream - feuille de style (mobile-first, sans dépendance externe) */
:root {
  --bg: #0b0b14;
  --bg-alt: #101020;
  --surface: #161628;
  --surface-2: #1d1d34;
  --border: #2a2a46;
  --text: #ecebf5;
  --muted: #b3b1c9;
  --accent: #ff4d6d;
  --accent-2: #7c5cff;
  --ok: #3ecf8e;
  --warn: #ffb547;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: #c9bcff; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: #ffd166; color: #000; padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 20, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; position: relative; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800;
}
.brand-name { font-weight: 800; }
.brand-tag { display: none; font-size: .78rem; color: var(--muted); border: 1px solid var(--border); padding: .1rem .5rem; border-radius: 99px; }

.nav-toggle {
  width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  display: grid; place-items: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); padding: .5rem; }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: .8rem 1rem; color: var(--text); text-decoration: none; border-radius: 10px; min-height: 44px; }
.main-nav a:hover { background: var(--surface); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 2.5rem 0 3.5rem;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(124, 92, 255, .35), transparent 60%),
    radial-gradient(700px 380px at -10% 20%, rgba(255, 77, 109, .22), transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #ffb3c1; margin-bottom: .8rem;
}
.lead { font-size: 1.15rem; color: #fff; }
.hero-copy > p { color: var(--muted); max-width: 62ch; }
.hero-copy > .lead { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.5rem; border-radius: 14px; border: 0;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--accent), #ff7a59 55%, var(--accent-2));
  box-shadow: 0 10px 28px rgba(255, 77, 109, .35);
}
.btn-primary[disabled] { cursor: default; transform: none; filter: saturate(.6) brightness(.85); box-shadow: none; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid #3a3a60; min-height: 48px; }
.btn-secondary:hover { background: #26264a; }
.btn-icon { font-size: .9rem; }

.open-box { margin: 1.5rem 0 1rem; }
.open-panel {
  margin-top: 1rem; padding: 1.1rem; border-radius: var(--radius);
  background: rgba(22, 22, 40, .85); border: 1px solid var(--border); max-width: 640px;
}
.countdown { display: flex; align-items: center; gap: 1rem; }
.countdown-ring { position: relative; width: 80px; height: 80px; flex: none; }
.countdown-ring svg { transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 6; }
.ring-bg { stroke: #2d2d4d; }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 213.63; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.countdown-number { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; }
.countdown-text { margin: 0; }
.result-title { font-weight: 700; margin-bottom: .6rem; }
.url-row { display: flex; flex-direction: column; gap: .75rem; }
.url-text {
  display: block; padding: .8rem 1rem; border-radius: 12px; background: #0b0b14; border: 1px dashed #4a4a78;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .98rem;
  word-break: break-all; user-select: all;
}
.copy-feedback { min-height: 1.5em; margin: .5rem 0 0; color: var(--ok); font-weight: 600; }
.result-note { font-size: .9rem; color: var(--muted); margin-bottom: 0; }

.chips { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { font-size: .85rem; padding: .3rem .75rem; border: 1px solid var(--border); border-radius: 99px; background: rgba(255, 255, 255, .03); color: var(--muted); }

.hero-visual { display: none; position: relative; height: 420px; }
.hero-visual .poster {
  position: absolute; width: 210px; height: auto; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: 14px; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .08);
}
.hero-visual .p1 { left: 4%; top: 40px; transform: rotate(-8deg); }
.hero-visual .p2 { left: 32%; top: 0; transform: rotate(2deg); z-index: 2; }
.hero-visual .p3 { right: 0; top: 70px; transform: rotate(9deg); }

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-intro { color: var(--muted); max-width: 70ch; margin-bottom: 1.5rem; }
.small { font-size: .9rem; color: var(--muted); }
.plain-url { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; background: var(--surface); padding: .1rem .4rem; border-radius: 6px; }

.status-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.status-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1rem; }
.status-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem; border-radius: 99px; font-weight: 700; font-size: .95rem; }
.status-badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.status-unconfirmed { background: rgba(255, 181, 71, .14); color: var(--warn); border: 1px solid rgba(255, 181, 71, .4); }
.status-ok { background: rgba(62, 207, 142, .16); color: var(--ok); border: 1px solid rgba(62, 207, 142, .5); }
.status-date { margin: 0; color: var(--muted); font-size: .95rem; }

.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: .98rem; }
th, td { text-align: left; padding: .75rem 1rem; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; width: 42%; }

/* Grille d'affiches */
.poster-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.poster-grid figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: transform .2s ease, box-shadow .2s ease; }
.poster-grid figure:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.poster-grid img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.poster-grid figcaption { padding: .6rem .8rem; font-weight: 600; font-size: .95rem; }
.poster-grid li:last-child { grid-column: 1 / -1; max-width: 50%; justify-self: center; }
.credit { margin-top: 1rem; }

/* Cartes */
.card-grid { display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: border-color .2s ease, transform .2s ease; }
.card:hover { border-color: #5a4bd6; transform: translateY(-3px); }
.card-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 77, 109, .2), rgba(124, 92, 255, .25)); font-size: 1.4rem; margin-bottom: .75rem; }
.card p { color: var(--muted); margin-bottom: 0; }

.qa-grid { display: grid; gap: 1rem; }
.qa { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent-2); border-radius: var(--radius); padding: 1.25rem; }
.qa:nth-child(2) { border-left-color: var(--warn); }
.qa:nth-child(3) { border-left-color: var(--accent); }
.qa p:last-child { margin-bottom: 0; color: var(--muted); }

.check-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.check-grid li { padding: .9rem 1rem .9rem 2.8rem; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.check-grid li::before { content: "!"; position: absolute; left: .9rem; top: .9rem; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 181, 71, .18); color: var(--warn); font-weight: 800; font-size: .9rem; }

.plain-list li { margin-bottom: .4rem; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: .75rem; }
.steps li { counter-increment: step; position: relative; padding: 1rem 1rem 1rem 3.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.steps li::before { content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: .6rem; }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 700; min-height: 48px; list-style-position: inside; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details p { padding: 1rem 1.25rem 0; color: var(--muted); }
.faq details p:last-child { padding-bottom: 1rem; margin-bottom: 0; }

.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--border); background: #08080f; color: var(--muted); }
.footer-inner p { margin-bottom: .8rem; }

/* Tablette */
@media (min-width: 640px) {
  .brand-tag { display: inline-block; }
  .url-row { flex-direction: row; align-items: stretch; }
  .url-text { flex: 1; }
  .poster-grid { grid-template-columns: repeat(3, 1fr); }
  .poster-grid li:last-child { grid-column: auto; max-width: none; }
  .card-grid, .qa-grid { grid-template-columns: repeat(2, 1fr); }
  .check-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

/* Bureau */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav { display: block; position: static; background: none; border: 0; padding: 0; }
  .main-nav ul { display: flex; gap: .25rem; }
  .main-nav a { padding: .5rem .8rem; font-size: .95rem; }
  .hero { padding: 4.5rem 0 5rem; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .hero-visual { display: block; }
  .poster-grid { grid-template-columns: repeat(5, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .qa-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ===== Pages internes ===== */
.quick-nav { background: var(--bg-alt); border-block: 1px solid var(--border); position: sticky; top: 64px; z-index: 40; overflow-x: auto; }
.quick-nav ul { list-style: none; margin: 0; padding: .6rem 0; display: flex; gap: .5rem; white-space: nowrap; }
.quick-nav a { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); text-decoration: none; font-size: .9rem; background: var(--surface); }
.quick-nav a:hover { color: #fff; border-color: var(--accent-2); }
.mt { margin-top: 2rem; }
.guide-card h3 a { color: var(--text); text-decoration: none; }
.guide-card h3 a:hover { color: #fff; text-decoration: underline; }

.page-hero { padding: 2.5rem 0 1.5rem; background: radial-gradient(800px 300px at 90% -20%, rgba(124, 92, 255, .25), transparent 60%), var(--bg); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
.breadcrumb ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .9rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: .4rem; }
.meta-dates { color: var(--muted); font-size: .9rem; margin: 0; }
.prose { padding-block: 2.5rem 4rem; }
.prose h2 { margin-top: 2.2rem; font-size: clamp(1.35rem, 3.5vw, 1.8rem); }
.prose h3 { margin-top: 1.4rem; }
.prose .lead { font-size: 1.15rem; }
.prose li { margin-bottom: .4rem; }
.decision { display: grid; gap: .9rem; margin: 1rem 0 1.5rem; }
.decision section { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent-2); border-radius: 12px; padding: 1rem 1.25rem; }
.decision h3 { margin-top: 0; font-size: 1.1rem; }
.decision p:last-child { margin-bottom: 0; }
.callout { margin: 2rem 0 0; padding: 1rem 1.25rem; border-radius: 12px; background: rgba(124, 92, 255, .12); border: 1px solid rgba(124, 92, 255, .4); }
.callout p { margin: 0; }

.form { display: grid; gap: 1rem; max-width: 560px; margin-top: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field input, .field select, .field textarea { width: 100%; padding: .75rem .9rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid #3a3a60; border-radius: 10px; min-height: 48px; }
.field textarea { min-height: 140px; resize: vertical; }
.field-error { color: #ff8fa3; font-size: .9rem; margin: .35rem 0 0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ff8fa3; }

.footer-inner { display: grid; gap: 1.25rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: #fff; }
