/* mc.croissant-lab.fr : feuille commune (accueil + pages de titre). Polices système, aucune ressource externe. */
:root {
  --bg: #0c100e;
  --bg-2: #141a17;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f1f5f2;
  --muted: #a9b8ae;
  --accent: #a8e6b9;
  --accent-ink: #0c100e;
  --wave: rgba(255, 255, 255, 0.26);
  --tint: #2f4337;
  --radius: 14px;
  --mini-h: 0px;
  --kara: #4d7059;
  --ly-future: #0d1610;
  --ly-past: rgba(255, 255, 255, 0.72);
  color-scheme: dark;
}
body[data-track="cinema-dans-ma-tete"] { --tint: #3d5c48; --kara: #4d7059; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--tint) 0, #1a2620 340px, var(--bg) 640px) no-repeat, var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(var(--mini-h) + env(safe-area-inset-bottom));
}
body.has-mini { --mini-h: 68px; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: #c8f2d3; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 20; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }

.top { max-width: 920px; margin: 0 auto; padding: 18px 20px 0; }
.top-home { color: var(--text); opacity: 0.8; text-decoration: none; font-size: 0.85rem; letter-spacing: 0.04em; }
.top-home:hover { opacity: 1; color: var(--text); }

main { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* ---- En-tête du titre ---- */
.hero { display: grid; gap: 22px; padding: 26px 0 8px; justify-items: center; text-align: center; }
.hero-cover { width: min(72vw, 340px); aspect-ratio: 1; height: auto; border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); object-fit: cover; }
.kind { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 4px 0 6px; font-size: clamp(2rem, 7vw, 3.6rem); line-height: 1.04; letter-spacing: -0.02em; font-weight: 800; }
.meta { margin: 0; font-weight: 600; }
.meta span:first-child { color: var(--text); }
.genre { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 300px 1fr; align-items: end; justify-items: start; text-align: left; padding-top: 40px; gap: 32px; }
  .hero-cover { width: 300px; }
}

/* ---- Lecteur ---- */
.player { padding: 18px 0 6px; }
.player-row { display: flex; align-items: center; gap: 18px; }
.play-big, .mini-play {
  flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.play-big { width: 64px; height: 64px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.play-big svg { width: 30px; height: 30px; fill: currentColor; }
.play-big:hover, .mini-play:hover { background: #c3f0cf; transform: scale(1.04); }
.play-big:active, .mini-play:active { transform: scale(0.97); }
.i-pause { display: none !important; }
.is-playing .i-play { display: none !important; }
.is-playing .i-pause { display: block !important; }
.wave-wrap { flex: 1; min-width: 0; }
.wave { position: relative; height: 64px; cursor: pointer; touch-action: none; border-radius: 6px; }
.wave canvas { width: 100%; height: 100%; }
.times { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
.player-extra { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 14px; min-height: 28px; }
.player-extra .hint { margin-left: auto; }
.volume { display: none; align-items: center; gap: 10px; color: var(--muted); }
.volume svg { width: 22px; height: 22px; fill: currentColor; }
.volume input { width: 120px; accent-color: var(--accent); }
.hint { display: none; margin: 0; font-size: 0.78rem; color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .volume { display: flex; }
  .hint { display: block; }
}

/* ---- Blocs ---- */
.block { border-top: 1px solid var(--line); padding: 22px 0; }
h2 { margin: 0 0 14px; font-size: 1.2rem; font-weight: 700; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: var(--bg-2);
  color: var(--text); text-decoration: none; font-weight: 600; cursor: pointer;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn small { color: var(--muted); font-weight: 500; }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn-ghost { background: transparent; }
.dl { display: flex; flex-wrap: wrap; gap: 12px; }
.note { margin: 12px 0 0; font-size: 0.85rem; color: var(--muted); }
.status { min-height: 1.5em; margin: 8px 0 0; font-size: 0.9rem; color: var(--accent); }

.clip-soon { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--bg-2); display: grid; place-items: center; }
.clip-soon img { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(28px) brightness(0.45); }
.clip-soon p { position: relative; margin: 0; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.9rem; }
.clip video { width: 100%; border-radius: var(--radius); background: #000; }

.lyrics summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; border-radius: 8px; margin-bottom: 14px; }
.lyrics summary::-webkit-details-marker { display: none; }
.lyrics summary h2 { margin: 0; }
.lyrics summary svg { width: 24px; height: 24px; transition: transform 0.2s ease; color: var(--muted); }
.lyrics[open] summary svg { transform: rotate(180deg); }

/* ---- Paroles synchronisées (carte et karaoké plein écran) ---- */
.btn-small { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; }
.ly-card { position: relative; border-radius: var(--radius); background: var(--kara); overflow: hidden; }
.ly-scroll {
  height: min(420px, 62vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 26px 24px 46vh; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 60px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 60px), transparent 100%);
}
.ly-scroll::-webkit-scrollbar { display: none; }
.ly-scroll:focus-visible { outline-offset: -4px; }
.ly-line {
  margin: 0 0 0.5em; font-size: clamp(1.35rem, 4.2vw, 1.9rem); line-height: 1.22; font-weight: 800; letter-spacing: -0.01em;
  color: var(--ly-future); cursor: pointer; transition: color 0.25s ease, opacity 0.25s ease;
}
.ly-line .w { transition: color 0.18s ease; }
.ly-line.is-past { color: var(--ly-past); }
.ly-line.is-current { color: var(--ly-future); }
.ly-line.is-current .w.on, .ly-line.is-current.no-words { color: #fff; }
.ly-line:hover { color: #fff; }
.ly-gap { display: flex; gap: 8px; height: 1.6em; align-items: center; cursor: default; }
.ly-gap i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.ly-gap.is-current { color: #fff; }
.ly-gap.is-current i { animation: ly-dot 1.2s ease-in-out infinite; }
.ly-gap.is-current i:nth-child(2) { animation-delay: 0.2s; }
.ly-gap.is-current i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ly-dot { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }
.ly-plain .ly-line { cursor: default; font-size: 1.15rem; font-weight: 600; color: #fff; margin: 0; }
.ly-plain .ly-para { margin: 0 0 1.1em; }
.resync {
  position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 2;
  border: 0; border-radius: 999px; padding: 9px 16px; background: #fff; color: #0c100e; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.ly-full { position: absolute; right: 14px; bottom: 14px; background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.3); }
.ly-full svg, .btn-small svg { width: 18px; height: 18px; }

.kara {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--kara); color: #fff; overflow: hidden;
}
.kara[open] { display: flex; flex-direction: column; }
.kara::backdrop { background: rgba(0, 0, 0, 0.6); }
.kara-top { display: flex; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 18px 10px; max-width: 920px; width: 100%; margin: 0 auto; }
.kara-top img { width: 48px; height: 48px; border-radius: 6px; flex: none; }
.kara-id { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.kara-id span { color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.25); color: #fff; cursor: pointer; flex: none; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(0, 0, 0, 0.45); }
.kara-scroll { flex: 1; height: auto; max-width: 920px; width: 100%; margin: 0 auto; padding: 18vh 22px 45vh; }
.kara-scroll .ly-line { font-size: clamp(1.7rem, 5.4vw, 2.9rem); margin-bottom: 0.55em; }
.kara .resync { bottom: 150px; }
.kara-bottom { padding: 10px 18px max(18px, env(safe-area-inset-bottom)); max-width: 920px; width: 100%; margin: 0 auto; }
.kara-progress { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; }
.kara-progress input { flex: 1; accent-color: #fff; height: 28px; }
.kara-controls { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 8px; }
.kara .play-big { background: #fff; color: #0c100e; }
.mini-mic { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; flex: none; }
.mini-mic svg { width: 22px; height: 22px; }
body.kara-open { overflow: hidden; }

/* ---- Mini-barre fixe ---- */
.mini {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(20, 26, 23, 0.94); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.mini[hidden] { display: none; }
.mini img { width: 44px; height: 44px; border-radius: 6px; flex: none; }
.mini-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.mini-text strong, .mini-text span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-text span { color: var(--muted); font-size: 0.85rem; }
.mini-time { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-play { width: 44px; height: 44px; }
.mini-play svg { width: 22px; height: 22px; fill: currentColor; }
.mini-progress { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: transparent; }
.mini-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---- Accueil ---- */
.home h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 28px 0 22px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.card { display: grid; gap: 10px; padding: 12px; border-radius: var(--radius); background: var(--bg-2); color: var(--text); text-decoration: none; border: 1px solid transparent; }
.card:hover { border-color: var(--line); background: #1a221e; color: var(--text); }
.card img { width: 100%; aspect-ratio: 1; height: auto; border-radius: 8px; object-fit: cover; }
.card strong { display: block; }
.card span { color: var(--muted); font-size: 0.88rem; }

.gone { padding: 80px 0; text-align: center; }

.foot { max-width: 920px; margin: 0 auto; padding: 26px 20px 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.foot p { margin: 0 0 8px; }

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