:root {
  color-scheme: dark;

  --night: #0c0c0e;          /* fond de scène */
  --night-raised: #17171a;
  --asphalt: #222226;
  --bone: #ede6d6;           /* texte */
  --bone-soft: #a9a39a;
  --line: rgba(237,230,214,0.14);
  --blood: #c4271d;          /* rouge Hellfest */
  --ember: #f07a2a;          /* braise */
  --gold: #f2b84b;
  --steel: #8fa3ad;          /* chrome */
  --refrain-bg: #2a0f0c;

  --font-metal: 'Metal Mania', 'UnifrakturCook', fantasy;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;

  --lyrics-scale: 1;
}

* { box-sizing: border-box; }
html { font-size: clamp(16px, 0.35vw + 15px, 19px); }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 40% at 60% 110%, rgba(196,39,29,0.22), transparent 70%),
    var(--night);
  background-attachment: fixed;
  color: var(--bone);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.layout {
  display: grid;
  grid-template-columns: 21rem 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: #050506;
  border-right: 1px solid #000;
  box-shadow: inset -1px 0 0 rgba(196,39,29,0.35);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { position: relative; padding: 2.2rem 1.8rem 1.6rem; overflow: hidden; }
.brand-pattern { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--bone); }
.brand-content { position: relative; }
.emblem-link { display: inline-block; border-radius: 50%; }
.emblem { width: 3.6rem; height: 3.6rem; color: var(--ember); margin-bottom: 0.9rem; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .emblem { animation: spin 40s linear infinite; }
  .is-playing .emblem { animation-duration: 3s; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.brand-eyebrow, .songlist-label {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-soft);
}
.brand-title {
  margin: 0;
  font-family: var(--font-metal);
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--bone);
  text-shadow: 0 0 18px rgba(240,122,42,0.45), 0 2px 0 var(--blood);
}
.brand-sub { margin: 0.6rem 0 0; font-size: 0.9rem; color: var(--bone-soft); }

/* Gwenn-ha-du : bandes noires et blanches */
.stripe {
  height: 6px;
  background: repeating-linear-gradient(90deg, #050506 0 12px, var(--bone) 12px 24px);
  box-shadow: 0 1px 0 var(--blood), 0 -1px 0 var(--blood);
}

.songlist { padding: 1.5rem 1.2rem 1.4rem; flex: 1; overflow-y: auto; }
.songlist-label { margin: 0 0.6rem 0.7rem; }
.songlist ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.song-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0.2rem;
  padding: 0.65rem 0.6rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.song-link:hover { background: var(--night-raised); }
.song-link.is-active { background: var(--night-raised); border-left-color: var(--blood); }
.song-link .num {
  flex: none;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 50%;
  border: 2px solid var(--steel);
  color: var(--steel);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.song-link.is-active .num { background: var(--blood); border-color: var(--blood); color: var(--bone); }
.titles { display: flex; flex-direction: column; min-width: 0; }
.t-main { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.2; }
.t-sub { font-size: 0.82rem; color: var(--bone-soft); }
.songlist-note {
  margin: 1.2rem 0.6rem 0;
  font-size: 0.82rem;
  color: var(--bone-soft);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.nav-toggle, .backdrop, .topbar { display: none; }

/* ---------- Scène ---------- */
.stage {
  position: relative;
  padding: 3.4rem clamp(1.2rem, 4vw, 4rem) 6rem;
  max-width: 62rem;
}
.textsize { position: absolute; top: 1.2rem; right: clamp(1.2rem, 4vw, 4rem); display: flex; gap: 0.4rem; }
.textsize button {
  background: var(--night-raised);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.25rem 0.6rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--bone-soft);
}
.textsize button:hover { color: var(--bone); border-color: var(--ember); }

.song { display: none; }
.song.is-active { display: block; animation: rise 0.35s ease both; }
@media (prefers-reduced-motion: reduce) { .song.is-active { animation: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.song-head { margin-bottom: 2.2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.song-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
}
.song-title {
  margin: 0;
  font-family: var(--font-metal);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.5rem + 3vw, 4rem);
  line-height: 1.02;
  text-wrap: balance;
  text-shadow: 0 0 22px rgba(196,39,29,0.55);
}
.song-by { margin: 0.6rem 0 0; color: var(--bone-soft); font-size: 0.95rem; }

.player {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2.4rem;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(180deg, #1e1e22, #141417);
  border: 1px solid var(--line);
  border-top-color: rgba(143,163,173,0.4);
  border-radius: 0.6rem;
}
.player-label {
  flex: none;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}
.player audio { flex: 1; min-width: 0; width: 100%; accent-color: var(--blood); }
@media (max-width: 520px) {
  .player { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .player audio { flex: none; }
}

/* ---------- Paroles ---------- */
.song-body { display: flex; flex-direction: column; gap: 2.1rem; }
.stanza-label {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}
.lines {
  margin: 0 0 0.9rem;
  font-size: calc(clamp(1.05rem, 0.95rem + 0.35vw, 1.28rem) * var(--lyrics-scale));
  line-height: 1.65;
}
.lines:last-child { margin-bottom: 0; }
.echo { color: var(--ember); font-style: italic; }

.stanza--spoken { padding-left: 1.1rem; border-left: 2px solid var(--line); }
.stanza--spoken .stanza-label, .stanza--spoken .lines { color: var(--bone-soft); }
.stanza--spoken .lines { font-style: italic; }

.stanza--refrain {
  position: relative;
  background:
    radial-gradient(ellipse 90% 70% at 50% 120%, rgba(240,122,42,0.25), transparent 70%),
    var(--refrain-bg);
  border: 1px solid rgba(196,39,29,0.55);
  border-radius: 0.6rem;
  padding: 1.8rem 1.6rem 2rem;
  text-align: center;
  box-shadow: 0 0 30px rgba(196,39,29,0.18);
}
.stanza--refrain .stanza-label { color: var(--ember); }
.stanza--refrain .lines {
  font-family: var(--font-display);
  font-size: calc(clamp(1.2rem, 1rem + 0.9vw, 1.7rem) * var(--lyrics-scale));
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.45;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(180deg, var(--gold) 0%, var(--ember) 55%, #e2452a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stanza--refrain .echo { color: var(--bone); -webkit-text-fill-color: var(--bone); font-style: normal; }

.shout {
  margin: 0;
  text-align: center;
  font-family: var(--font-metal);
  font-size: calc(clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem) * var(--lyrics-scale));
  color: var(--bone);
  text-shadow: 0 0 16px rgba(240,122,42,0.6);
  line-height: 1.2;
}

.callresponse {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem 1.4rem;
  max-width: 32rem;
  margin: 0 auto 1.2rem;
  text-align: left;
}
.call { font-size: calc(1.1rem * var(--lyrics-scale)); color: var(--bone-soft); align-self: center; }
.response {
  font-family: var(--font-display);
  font-size: calc(1.3rem * var(--lyrics-scale));
  text-transform: uppercase;
  color: var(--ember);
  align-self: center;
}
.stanza--refrain .call { color: var(--bone); -webkit-text-fill-color: var(--bone); }

.stanza--final { text-align: center; }
.road {
  height: 6px;
  margin: 1.8rem auto 0;
  width: min(14rem, 60%);
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, var(--gold) 0 22px, transparent 22px 40px),
    var(--asphalt);
  background-size: 40px 6px, auto;
}
@media (prefers-reduced-motion: no-preference) {
  .road { animation: ride 0.9s linear infinite; }
}
@keyframes ride { to { background-position: -40px 0, 0 0; } }

/* ---------- Accueil ---------- */
.welcome { padding-top: 2rem; }
.welcome-title {
  margin: 0;
  font-family: var(--font-metal);
  font-weight: 400;
  font-size: clamp(3.4rem, 2rem + 8vw, 7.5rem);
  line-height: 0.9;
  color: var(--bone);
  text-shadow: 0 0 30px rgba(240,122,42,0.45), 0 4px 0 var(--blood);
}
.welcome-title span {
  display: block;
  background: linear-gradient(180deg, var(--gold), var(--ember) 50%, var(--blood));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(196,39,29,0.6));
}
.welcome-date {
  margin: 1.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.85rem + 0.7vw, 1.35rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}
.welcome-date span { color: var(--blood); margin: 0 0.4em; }
.welcome-lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem); line-height: 1.6; max-width: 36rem; margin: 1.6rem 0 0; }
.welcome .road { margin: 2.2rem 0; }
.howto { margin: 0 0 2rem; padding-left: 1.3rem; line-height: 1.7; max-width: 36rem; }
.howto li::marker { font-family: var(--font-display); color: var(--ember); }
.only-mobile { display: none; }
.cta {
  background: var(--blood);
  border: none;
  border-radius: 0.4rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(196,39,29,0.45);
}
.cta:hover { background: #d93a2c; }
.kenavo { margin: 2.4rem 0 0; font-family: var(--font-metal); font-size: 1.6rem; color: var(--steel); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .layout { display: block; }
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
    background: #050506;
    border-bottom: 2px solid var(--blood);
    padding: calc(0.8rem + env(safe-area-inset-top, 0px)) 1.1rem 0.8rem;
  }
  .topbar-title { font-family: var(--font-metal); font-size: 1.45rem; text-shadow: 0 0 12px rgba(240,122,42,0.5); }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 2.2rem;
    height: 2.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--bone); transition: transform 0.2s ease, opacity 0.2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .sidebar {
    position: fixed;
    inset: 0 20% 0 0;
    height: auto;
    max-width: 22rem;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 2px 0 24px rgba(0,0,0,0.7);
  }
  .sidebar.is-open { transform: translateX(0); }
  @media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

  .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 25; }

  .stage { padding: 3.2rem 1.1rem 4rem; }
  .textsize { top: 0.8rem; right: 1.1rem; }
  .stanza--refrain { padding: 1.4rem 1rem 1.6rem; }
  .callresponse { grid-template-columns: 1fr; text-align: center; }
  .response { margin-bottom: 0.4rem; }
  .only-mobile { display: inline; }
}

/* lecteur Suno intégré, quand on n'a pas le mp3 */
.player--suno { display: block; padding: 0; overflow: hidden; }
.player--suno iframe { display: block; width: 100%; height: 240px; border: 0; }
.shout + .callresponse { margin-top: 0.8rem; }
.callresponse + .shout { margin-top: 1.6rem; }
