/* ==========================================================
   sebastiendelage.fr — habillage VHS (prototype v3.6)
   Drama Queen Music — encodage UTF-8
   Police : VT323 (SIL Open Font License) partout
   ========================================================== */

@font-face { font-family: "VT323"; src: url("../fonts/vt323.woff2") format("woff2"); font-display: swap; }

:root {
  --osd: "VT323", ui-monospace, Menlo, monospace;
  --blanc: #f4f2ea;
  --voile: rgba(0, 0, 0, .8);
  --ombre: 1px 1px 0 #000;   /* seule ombre : 1 px, sur le texte posé sur la vidéo */
  --haut: 50px;              /* en-tête */
  --bas: 32px;               /* pied de page, toujours visible */
  --utile: calc(100vh - var(--haut) - var(--bas) - 36px);   /* hauteur disponible pour le contenu */
  --grille: minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, .9fr); /* LES 3 colonnes, identiques sur toutes les pages */
  --ecart: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: #000; color: var(--blanc);
  font-family: var(--osd); font-size: 19px; line-height: 1.25;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(a, button, input):focus-visible { outline: 2px solid var(--blanc); outline-offset: 2px; }

/* ---------- La télé : fond vidéo, neige, lignes ---------- */
.tv { position: fixed; inset: 0; z-index: 0; background: #000 center / cover no-repeat; overflow: hidden; }
.tv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s linear; }
.tv video.on { opacity: 1; }
.tv canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .12s linear; }
.tv.neige canvas { opacity: .88; }
.tv video.zap { z-index: 1; transition: opacity .04s linear; }
.tv.zapping video.zap { opacity: .9; }
.tv::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ---------- En-tête : nom · chaînes · MERCH ---------- */
.osd {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--haut);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px;
  padding: 0 20px; background: rgba(0,0,0,.88);
}
.osd-nom { font-size: 26px; line-height: 1; letter-spacing: .03em; white-space: nowrap; }
.osd-merch { justify-self: end; font-size: 26px; white-space: nowrap; padding: 0 6px; }
.osd-nom { justify-self: start; }
.osd-merch:hover { background: var(--blanc); color: #000; }
.chaines { display: flex; align-items: center; gap: 16px; }
.chaines ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px 26px; }
.chaines ul a { display: inline-block; padding: 0 6px; font-size: 22px; white-space: nowrap; }
.chaines ul a:hover, .chaines a[aria-current="page"] { background: var(--blanc); color: #000; }
.chaines .zap { display: inline-flex; justify-content: center; align-items: center; padding: 0; width: 28px; height: 26px; font-size: 22px; border: 1px solid var(--blanc); }
.chaines .zap:hover { background: var(--blanc); color: #000; }
.zap-nom, .chaines-fermer { display: none; }

/* ---------- Pied de page : réseaux, animations, mentions ---------- */
.pied {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; min-height: var(--bas);
  display: flex; align-items: center; justify-content: space-between; gap: 4px 18px; flex-wrap: wrap;
  padding: 0 20px; font-size: 16px; background: rgba(0,0,0,.88); border-top: 1px solid rgba(244,242,234,.15);
}
.reseaux { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.pied a, .btn-animations { padding: 0 3px; }
.pied a:hover, .btn-animations:hover { background: var(--blanc); color: #000; }
.pied-droite { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.btn-animations { background: transparent; border: 1px solid rgba(244,242,234,.6); font-size: 15px; cursor: pointer; }
.pied .copy { opacity: .7; font-size: 14px; }

/* ---------- Contenu ---------- */
main {
  position: relative; z-index: 10; flex: 1;
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: calc(var(--haut) + 18px) 24px calc(var(--bas) + 18px); outline: none;
}
.texte { background: var(--voile); padding: 10px 14px; }
.texte p { margin: 0 0 .7em; }
.texte p:last-child { margin: 0; }
.discret { opacity: .85; font-size: 16px; }
.btn { display: inline-block; font-size: 19px; background: #000; color: var(--blanc); border: 2px solid var(--blanc); padding: 1px 10px; cursor: pointer; text-align: center; }
.btn:hover { background: var(--blanc); color: #000; }
.pochette { display: block; border: 2px solid var(--blanc); background: #000; }
.pochette img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }

/* Colonnes : 3 colonnes, chacune avec son en-tête (même taille, même typo partout) */
.colonnes { display: grid; grid-template-columns: var(--grille); gap: var(--ecart); align-items: start; }
.entete {
  display: block; margin: 0 0 10px; padding: 1px 10px; font-weight: 400; font-size: 22px; line-height: 1.25;
  text-transform: uppercase; letter-spacing: .03em; background: #000; color: var(--blanc);
}
a.entete:hover { background: var(--blanc); color: #000; }

/* ---------- Musique (accueil) : la discographie sur une ligne ---------- */
.grille {
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  align-content: start;
  width: min(1330px, 100vw - 36px); margin: 0 0 0 50%; transform: translateX(-50%);   /* un peu plus large que les autres pages */
}
.carte { display: block; }
.carte-nom { display: block; max-width: max-content; margin-top: 6px; font-size: clamp(15px, 1.27vw, 19px); line-height: 1.15; background: #000; padding: 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-info { display: inline-block; margin-top: 3px; font-size: 15px; background: var(--blanc); color: #000; padding: 0 5px; }
.carte:hover .carte-nom { background: var(--blanc); color: #000; }
.grille .btn { margin-top: 8px; font-size: 17px; }

/* Léger zoom au survol des pochettes et photos (le cadre ne bouge pas) */
.pochette { overflow: hidden; }
.pochette img { transition: transform .25s ease; }
a.pochette:hover img, .carte:hover .pochette img, a.pochette:focus-visible img { transform: scale(1.04); }

/* Flèches précédent / suivant (albums, vidéos) */
.fil { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 40px; margin: 0 0 18px; text-shadow: var(--ombre); }
.fil a, .fil button { justify-self: start; background: transparent; color: var(--blanc); padding: 0; border: 0; cursor: pointer; font-size: 18px; white-space: nowrap; }
.fil > :last-child { justify-self: end; }
.fil a:hover, .fil button:hover { text-decoration: underline; text-underline-offset: 4px; }
.fil-titre { margin: 0; font-weight: 400; font-size: 34px; line-height: 1; letter-spacing: .04em; text-align: center; white-space: nowrap; }

/* ---------- Page d'album ---------- */
.legende { margin: 4px 0 0; font-size: 14px; opacity: .8; text-shadow: var(--ombre); }
.fiche .btn { margin-top: 10px; }
.pistes { list-style: none; margin: 0; padding: 0; background: var(--voile); }
.pistes li + li { border-top: 1px dashed rgba(244,242,234,.22); }
.piste {
  display: grid; grid-template-columns: 1.9em 1fr auto; gap: 6px; align-items: baseline;
  width: 100%; font-size: 19px; background: transparent; border: 0; padding: 3px 10px; text-align: left;
}
button.piste { cursor: pointer; }
button.piste:hover { background: var(--blanc); color: #000; }
.piste.grise { opacity: .38; }
.piste-num, .piste-duree { opacity: .7; }
.piste-duree { font-size: 16px; }
.clips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.clip { display: block; background: #000; border: 1px solid var(--blanc); }
.clip-img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.clip-img img { width: 100%; height: 100%; object-fit: cover; }
.clip-img::after { content: "▶"; position: absolute; left: 6px; bottom: 2px; font-size: 18px; text-shadow: 1px 1px 0 #000; }
.clip-nom { display: block; padding: 1px 6px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip:hover { background: var(--blanc); color: #000; }

/* ---------- Lecteur vidéo (toujours 16/9, chargé au clic) ---------- */
.lecteur { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border: 2px solid var(--blanc); overflow: hidden; }
.lecteur iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lecteur-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.lecteur-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.lecteur-facade span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 72px; line-height: 1; color: var(--blanc); text-shadow: 0 0 12px rgba(0,0,0,.6), 2px 2px 0 #000; transition: transform .15s ease; }
.lecteur-facade:hover span { transform: translate(-50%, -50%) scale(1.12); }
.lecteur-vide { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; font-size: 22px; }
.lecteur-note { font-size: 14px; opacity: .7; margin: 4px 0 0; }

/* ---------- Page Vidéo ---------- */
.liste-videos { list-style: none; margin: 0; padding: 0; background: var(--voile); max-height: calc(var(--utile) - 112px); overflow-y: auto; }
.liste-videos li + li { border-top: 1px dashed rgba(244,242,234,.22); }
.liste-videos button { width: 100%; display: block; text-align: left; background: transparent; border: 0; padding: 3px 10px; font-size: 18px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste-videos button:hover, .liste-videos button[aria-current="true"] { background: var(--blanc); color: #000; }

.credits { background: var(--voile); padding: 8px 12px; font-size: 16px; max-height: calc(var(--utile) - 112px); overflow-y: auto; }
.credits p { margin: 0 0 .45em; }

/* ---------- Concerts : tableau qui défile dans son cadre ---------- */
.concerts-boite { background: rgba(0,0,0,.5); }
.concerts-boite .entete { margin: 0; display: grid; grid-template-columns: 128px minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; padding: 1px 10px; }
.dates { list-style: none; margin: 0; padding: 0; max-height: calc(var(--utile) - 106px); overflow-y: auto; }
.dates li { display: grid; grid-template-columns: 128px minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; padding: 4px 10px; font-size: 19px; line-height: 1.3; white-space: nowrap; }
.dates li:nth-child(even) { background: rgba(244,242,234,.07); }
.dates li > span { overflow: hidden; text-overflow: ellipsis; }
.dates li > span:last-child { opacity: .8; }
.dates li:hover { background: var(--blanc); color: #000; }
.dates li:hover > span:last-child { opacity: 1; }
.dates li:hover .ville, .dates li:hover .complet { background: #000; color: var(--blanc); }
/* variante B : une phrase par date */
.concerts-b .entete { grid-template-columns: 128px auto auto; justify-content: start; }
.concerts-b .dates li { display: flex; align-items: center; gap: 0; }
.concerts-b .dates li > span:nth-child(2) { flex: 0 1 auto; }
.btn-date { margin-left: auto; flex: none; font-size: 16px; border: 1px solid currentColor; padding: 0 8px; }
.btn-date:hover { background: var(--blanc); color: #000; }
.dates li:hover .btn-date:hover { background: #000; color: var(--blanc); }
.concerts-b .dates li > span { display: inline; overflow: visible; }
.concerts-b .dates li > span:first-child { display: inline-block; width: 146px; }
.concerts-b .dates li > span:nth-child(3):not(:empty)::before { content: "\00a0\00a0—\00a0\00a0"; opacity: .6; }
.concerts-b .dates li > span:nth-child(3) { opacity: .8; }
.dates .ville, .dates .complet { background: var(--blanc); color: #000; padding: 0 4px; }
.dates .ville { margin-right: 6px; }
.dates .complet { margin-left: 8px; }


/* ---------- Bio : photo + texte sur deux colonnes ---------- */
.bio .texte { grid-column: 2 / span 2; }
.bio figure { margin: 0; }
.bio .pochette img { aspect-ratio: auto; max-height: calc(var(--utile) - 30px); object-fit: cover; }
.bio figcaption { font-size: 14px; margin-top: 4px; opacity: .75; }
.bio .texte { columns: 2; column-gap: 28px; font-size: 19px; line-height: 1.3; }
.bio .texte p { orphans: 3; widows: 3; }
.signature { text-align: right; }

/* ---------- Contact ---------- */
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.champs .large { grid-column: 1 / -1; }
.newsletter input::placeholder { color: #8a8880; opacity: 1; }
.lignes { list-style: none; margin: 0; padding: 0; background: var(--voile); }
.lignes > li { padding: 4px 10px; }
.lignes > li + li { border-top: 1px dashed rgba(244,242,234,.22); }
.contact a { text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.newsletter label { display: block; }
.newsletter { padding: 0; }
.newsletter input[type="email"], .newsletter input[type="text"] { width: 100%; background: #000; border: 2px solid var(--blanc); padding: 3px 8px; font-size: 19px; }
.newsletter .accord { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin: 0; }
.newsletter .accord input { margin-top: 3px; accent-color: var(--blanc); }
.newsletter .accord a { white-space: nowrap; text-decoration: underline; }
.newsletter .piege { display: none; }
.newsletter-message { font-size: 17px; margin-left: 10px; }
.newsletter .nl-intro { font-size: 19px; }
.newsletter .nl-rgpd { font-size: 14px; line-height: 1.2; opacity: .75; }
.contact .newsletter .nl-rgpd a { white-space: nowrap; word-break: normal; }
.newsletter button[disabled] { opacity: .5; cursor: wait; }

/* ---------- Mentions légales ---------- */
.legal .lignes > li { font-size: 16px; }
.legal .a-completer { background: var(--blanc); color: #000; padding: 0 4px; }

/* ---------- Pages cachées (fanzine, téléchargement, pro) ---------- */
.credits-fanzine .chip { display: table; background: #000; padding: 0 5px; margin: 0 0 2px; }
.credits-fanzine h3 { font-weight: 400; font-size: 19px; margin: 12px 0 4px; }

/* ---------- Visionneuse (paroles, pochettes, vidéos) ---------- */
dialog.visionneuse { width: min(620px, 92vw); max-height: 86vh; padding: 0; overflow: hidden; color: var(--blanc); background: #000; border: 2px solid var(--blanc); }
dialog.visionneuse.large { width: min(960px, 94vw); }
dialog.visionneuse::backdrop { background: rgba(0,0,0,.82); }
.visionneuse-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 12px; border-bottom: 1px solid rgba(244,242,234,.3); }
.visionneuse-tete h2 { margin: 0; font-weight: 400; font-size: 24px; text-transform: uppercase; }
.visionneuse-fermer { font-size: 18px; background: #000; border: 2px solid var(--blanc); padding: 0 8px; cursor: pointer; }
.visionneuse-fermer:hover { background: var(--blanc); color: #000; }
.visionneuse-corps { padding: 12px 16px 16px; overflow-y: auto; max-height: calc(86vh - 46px); }
.paroles p { margin: 0 0 1em; font-size: 20px; line-height: 1.28; }
.paroles .credit { font-size: 16px; opacity: .75; margin-top: 1.2em; }
.visionneuse-corps > img { margin: 0 auto; max-height: 72vh; width: auto; }

/* ---------- Écrans moyens ---------- */
@media (max-width: 1180px) {
  .osd { gap: 10px; padding: 0 14px; }
  .osd-nom, .osd-merch { font-size: 21px; }
  .chaines ul a { font-size: 19px; padding: 0 4px; }
  .chaines ul { gap: 2px 14px; }
  .grille { grid-template-columns: repeat(3, minmax(0, 220px)); justify-content: center; width: auto; margin: 0; transform: none; }
  .carte-nom { font-size: 18px; }
  .reseaux { gap: 2px 8px; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 860px) {
  :root { --haut: 88px; --bas: 34px; }
  body { font-size: 18px; }
  .osd { display: flex; flex-wrap: wrap; justify-content: space-between; height: var(--haut); align-content: center; row-gap: 8px; }
  .osd-nom { font-size: 22px; order: 1; }
  .osd-merch { font-size: 20px; order: 2; }
  .chaines { order: 3; width: 100%; justify-content: space-between; }
  .chaines ul { display: none; }
  .zap-nom { display: block; flex: 1; text-align: center; font-size: 21px; background: transparent; border: 1px solid rgba(244,242,234,.5); padding: 0 6px; cursor: pointer; }
  .chaines .zap { width: 40px; height: 30px; }
  .chaines.ouvert ul {
    display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    position: fixed; inset: 0; z-index: 50; padding: 70px 28px 28px; background: rgba(0,0,0,.95);
  }
  .chaines.ouvert ul a { font-size: 30px; padding: 4px 12px; border: 1px solid rgba(244,242,234,.35); }
  .chaines.ouvert .chaines-fermer { display: block; position: fixed; top: 14px; right: 14px; z-index: 51; font-size: 22px; background: #000; border: 2px solid var(--blanc); padding: 0 10px; }
  .pied { flex-wrap: nowrap; justify-content: flex-start; gap: 10px; padding: 0 0 0 10px; font-size: 15px; }
  .reseaux { flex-wrap: nowrap; gap: 0 10px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .reseaux::-webkit-scrollbar { display: none; }
  .pied-droite { padding-right: 8px; }
  .btn-animations { font-size: 13px; }
  .pied .copy { display: none; }
  .videos > div:nth-child(2) { order: -1; }          /* le lecteur d'abord */
  .lecteur { scroll-margin-top: calc(var(--haut) + 10px); }

  main { padding: calc(var(--haut) + 12px) 14px calc(var(--bas) + 14px); }
  .colonnes { grid-template-columns: 1fr; gap: 18px; }
  .bio .texte { grid-column: auto; }
  .dates li, .concerts-boite .entete { grid-template-columns: 104px 1fr; gap: 2px 10px; white-space: normal; }
  .dates li > span:last-child { grid-column: 2; font-size: 16px; }
  .concerts-boite .entete span:last-child { display: none; }
  .concerts-b .entete { display: none; }
  .concerts-b .dates li { flex-wrap: wrap; }
  .concerts-b .dates li > span:first-child { display: block; width: 100%; font-size: 16px; opacity: .8; }
  .grille { width: auto; margin: 0; transform: none; }
  .fil-titre { font-size: 22px; white-space: normal; }
  .fil:empty { display: none; }
  .fil a, .fil button { font-size: 15px; white-space: normal; }
  .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; min-height: 0; }
  .fiche .pochette, .bio figure { max-width: 300px; }
  .bio .texte { columns: 1; }
  .liste-videos, .credits, .dates { max-height: none; }
}

/* ---------- Animations coupées (bouton du pied de page ou réglage du système) ---------- */
.sans-animations .tv canvas, .sans-animations .tv video { display: none; }
@media (prefers-reduced-motion: reduce) {
  .tv video, .carte .pochette { transition: none; }
}
