/* Améliorations visuelles (page de vote, écran de la salle, page musicien). Chargé après site.css. */

/* ---- Boutons : texte plus gros et plus lisible (finies les majuscules minuscules très espacées) ---- */
.btn { font-size: .92rem; font-weight: 600; letter-spacing: .04em; }
.btn--small { font-size: .82rem; letter-spacing: .03em; }
.tab { font-size: .88rem; font-weight: 600; letter-spacing: .05em; }
.btn-vote { min-width: 124px; min-height: 50px; font-size: 1rem; }
.chip { font-size: .92rem; }

/* ---- Page de vote : bandeau compact pour voir les chansons tout de suite ---- */
body[data-page="vote"] .hero { min-height: 320px; }
@media (max-width: 700px) {
  body[data-page="vote"] .hero { min-height: 0; margin: 10px 12px 0; }
  body[data-page="vote"] .hero-in { padding: 22px 18px 18px; }
  body[data-page="vote"] .hero h1 { font-size: 2.3rem; margin-top: 10px; }
  body[data-page="vote"] .hero .lead { display: none; }
  body[data-page="vote"] .hero .sub { font-size: 1rem; }
  body[data-page="vote"] .hero-actions { margin-top: 10px; }
  body[data-page="vote"] .hero-actions .btn { display: none; } /* la liste est juste en dessous */
  body[data-page="vote"] .marquee { display: none; }
  body[data-page="vote"] .controls { padding-top: 10px; }
}

/* ---- Barre « votes restants » fixe en bas de l'écran ---- */
.quota-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #111113; color: #fff; font-size: 1.05rem; box-shadow: 0 -4px 18px rgba(0,0,0,.3); }
.quota-bar b { font: 700 1.5rem/1 var(--title); color: #fff; margin: 0 2px; }
.quota-bar.zero { background: #7a2300; }
.quota-pts { display: inline-flex; gap: 6px; }
.quota-pts i { width: 14px; height: 14px; border-radius: 50%; background: var(--rust); border: 2px solid var(--rust); }
.quota-pts i.used { background: transparent; border-color: #6b6b72; }
body[data-page="vote"] { padding-bottom: 76px; }
body[data-page="vote"] .toast { bottom: 92px; }

/* ---- Avant / après le concert : grand message centré ---- */
.etat-ferme { margin: 18px 0 8px; padding: 34px 20px; text-align: center; background: var(--panel); border: 2px solid var(--rust); }
.etat-ferme .etat-ico { font-size: 3rem; line-height: 1; }
.etat-ferme h2 { margin: 12px 0 8px; font: 800 clamp(1.8rem, 6vw, 2.6rem)/1.05 var(--title); text-transform: uppercase; }
.etat-ferme p { margin: 0 auto; max-width: 34ch; color: var(--muted); font-size: 1.05rem; }

/* ---- Écran de la salle : TOP 10 en gros caractères, qui tient dans l'écran sans défiler ---- */
body.stage .stage-grid { padding-top: clamp(12px, 2vh, 28px); padding-bottom: clamp(12px, 2vh, 28px); }
body.stage h1 { font-size: clamp(2rem, 6.2vh, 4.2rem); margin: 6px 0 2px; }
body.stage ul.songs { margin-top: clamp(6px, 1.2vh, 14px); }
body.stage .song { padding: clamp(3px, .75vh, 12px) 4px; }
body.stage .song .info { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: .7em; }
body.stage .song .t { font-size: clamp(1.15rem, 3.3vh, 2.6rem); line-height: 1.15; }
body.stage .song .a { margin: 0; font-size: clamp(.85rem, 1.9vh, 1.3rem); }
body.stage .song .bar { grid-column: 1 / -1; height: clamp(3px, .6vh, 7px); margin-top: clamp(3px, .6vh, 8px); }
body.stage .rank, body.stage .votes b { font-size: clamp(1.6rem, 4.2vh, 3.2rem); }
body.stage .votes { display: flex; align-items: baseline; gap: .3em; min-width: 0; }
body.stage .votes b { display: inline; line-height: 1; }
body.stage .votes small { font-size: clamp(.6rem, 1.3vh, .85rem); }
body.stage .meta-line { font-size: clamp(.85rem, 1.8vh, 1.15rem); }
.autres { margin-top: clamp(8px, 1.6vh, 20px); color: #a9a9b0; }
.autres h2 { margin: 0 0 8px; font: 600 clamp(.8rem, 1.6vh, 1rem) var(--text); letter-spacing: .12em; text-transform: uppercase; color: #8b8b92; }
.autres span { display: inline-block; margin: 0 8px 6px 0; padding: 3px 10px; background: #1c1c20; color: #d0d0d6; font-size: clamp(.8rem, 1.7vh, 1.1rem); }
.autres span.plus { background: transparent; color: #8b8b92; }

/* ---- En-tête : une seule barre sobre (logo à gauche, liens discrets et bouton de thème à droite) ---- */
.sh { background: var(--paper); border-bottom: 1px solid var(--line); align-items: center; }
.sh-logo, .sh .sh-logo { background: transparent; }
.sh-burger { display: none !important; }
.sh-nav, .sh .sh-nav { flex: 0 1 auto; margin: 0 0 0 auto; padding: 0 6px; background: transparent; display: flex; flex-direction: row; justify-content: flex-end; gap: 4px; position: static; border: 0; }
.sh-nav a { color: var(--ink); font-size: .88rem; font-weight: 600; letter-spacing: 0; padding: 8px 14px; border: 0; border-radius: 999px; text-decoration: none; }
.sh-nav a:hover { background: var(--panel); text-decoration: none; }
.sh-nav a[aria-current] { background: var(--ink); color: var(--paper); text-decoration: none; }
.theme-btn, .sh .theme-btn { width: 44px; height: 44px; margin: 0 8px 0 auto; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.sh-nav + .theme-btn { margin-left: 0; }
.theme-btn:hover { background: var(--panel); }
.theme-btn:focus:not(:focus-visible) { outline: none; }
@media (max-width: 900px) {
  .sh, .sh .sh { background: var(--paper); }
  .sh-nav a { padding: 8px 10px; font-size: .8rem; border-top: 0; }
  .sh-logo { padding: 0 10px; }
}
@media (max-width: 640px) { .sh:has(.sh-nav) .sh-logo .brand-txt { display: none; } }

/* ---- Écran de la salle : avant le concert = un seul beau message, sans liste ni répétitions ---- */
.attente { display: none; }
body.etat-attente .attente { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 78vh; gap: clamp(10px, 2.4vh, 28px); }
body.etat-attente #etiquette, body.etat-attente #titre, body.etat-attente #meta-line, body.etat-attente #liste, body.etat-attente #autres { display: none; }
.attente-logo { height: clamp(90px, 22vh, 220px); width: auto; }
.attente-titre { margin: 0; font: 800 clamp(2.6rem, 11vh, 7rem)/.98 var(--title); text-transform: uppercase; letter-spacing: -.01em; }
.attente-texte { margin: 0; max-width: 24em; color: #c9c9ce; font-size: clamp(1.1rem, 3vh, 2rem); line-height: 1.35; }
body.etat-attente .qr-card { align-self: center; }

/* ---- Petit lien discret en bas de la page de vote ---- */
.pied-vote { margin: 28px 0 0; padding: 18px 16px 110px; text-align: center; }
.pied-vote a { color: var(--muted); font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Barre « votes restants » : alignée à gauche, pour ne pas passer sous le badge « Powered by Netlify » (en bas à droite) ---- */
.quota-bar { justify-content: flex-start; padding-left: 18px; padding-right: 190px; gap: 12px; font-size: 1rem; }
@media (min-width: 700px) { .quota-bar { justify-content: center; padding-right: 190px; padding-left: 190px; } }
@media (max-width: 480px) { .quota-pts { display: none; } .quota-bar { font-size: .98rem; } }

/* ---- Écran de la salle : les chansons du soir, toutes visibles, taille ajustée par --k (resultats.js) ---- */
.autres .puces { display: flex; flex-wrap: wrap; gap: calc(6px * var(--k, 1)); }
.autres span { display: inline-flex; flex-direction: column; margin: 0; padding: calc(4px * var(--k, 1)) calc(10px * var(--k, 1));
  background: #1c1c20; color: #e4e4e8; font-size: calc(clamp(.8rem, 1.7vh, 1.1rem) * var(--k, 1)); line-height: 1.2; }
.autres span b { font-weight: 600; }
.autres span small { display: none; }
.autres h2 { font-size: calc(clamp(.8rem, 1.6vh, 1rem) * var(--k, 1)); }
body.sans-votes #liste { display: none; }
body.sans-votes .autres { margin-top: clamp(14px, 3vh, 34px); }
body.sans-votes .autres h2 { font: 800 calc(clamp(1.3rem, 3.4vh, 2.4rem) * min(var(--k, 1), 1.2)) var(--title); color: #fff; letter-spacing: 0; text-transform: uppercase; margin-bottom: 4px; }
.autres-aide { margin: 0 0 calc(12px * var(--k, 1)); color: #c9c9ce; font-size: calc(clamp(.9rem, 2vh, 1.3rem) * min(var(--k, 1), 1.2)); }
body.sans-votes .autres span { border-left: 3px solid var(--rust); }
body.sans-votes .autres span small { display: block; font-size: .72em; color: #9a9aa2; margin-top: 1px; }

/* ---- Belle fenêtre de confirmation (TILI.boite) ---- */
.boite { width: min(440px, 92vw); padding: 0; border: 0; border-radius: 16px; background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 70px rgba(0,0,0,.45); animation: boite-entree .18s ease-out; overflow: hidden; }
.boite::backdrop { background: rgba(10,10,12,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.boite.sortie { animation: boite-sortie .14s ease-in forwards; }
@keyframes boite-entree { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes boite-sortie { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.boite-form { padding: 26px 24px 20px; text-align: center; }
.boite-ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--ink); font-size: 1.5rem; line-height: 1; }
.boite--danger .boite-ico { background: #fde4dd; color: #b3261e; }
.boite h2 { margin: 0 0 8px; font: 800 1.55rem/1.1 var(--title); text-transform: uppercase; overflow-wrap: anywhere; }
.boite p { margin: 0 auto 18px; max-width: 34ch; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.boite-champ { width: 100%; min-height: 50px; margin: 0 0 18px; padding: 10px 14px; font: 400 1rem var(--text); color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.boite-champ:focus { outline: 2px solid var(--rust); outline-offset: 1px; }
.boite-btns { display: flex; gap: 10px; }
.boite-btns .btn { flex: 1; min-height: 50px; border-radius: 10px; }
.boite--danger .boite-oui { background: #b3261e; border-color: #b3261e; }
.boite--danger .boite-oui:hover { background: #8f1d17; border-color: #8f1d17; }
html[data-theme="dark"] .boite { background: #1c1c20; }
html[data-theme="dark"] .boite-ico { background: #2a2a30; color: #f2f2f4; }
html[data-theme="dark"] .boite--danger .boite-ico { background: #3d1612; color: #ff8a7a; }
html[data-theme="dark"] .boite-champ { background: #111113; border-color: #3a3a40; }
@media (prefers-reduced-motion: reduce) { .boite, .boite.sortie { animation: none; } }

.sh a:focus:not(:focus-visible), .sh button:focus:not(:focus-visible) { outline: none; }

/* ---- Écran de la salle, AVANT les votes : grille de cartes qui remplit l'écran (taille = --k, calculée) ---- */
body.sans-votes .autres .puces { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(200px * var(--k, 1)), 1fr)); gap: calc(8px * var(--k, 1)); }
body.sans-votes .autres span { display: flex; flex-direction: column; justify-content: center; margin: 0;
  padding: calc(8px * var(--k, 1)) calc(12px * var(--k, 1)); border-left: calc(4px * var(--k, 1)) solid var(--rust);
  background: #1c1c20; font-size: calc(1rem * var(--k, 1)); line-height: 1.15; }
body.sans-votes .autres span b { font: 700 1.05em/1.1 var(--title); letter-spacing: .01em; color: #fff; }
body.sans-votes .autres span small { display: block; margin-top: .2em; font-size: .7em; color: #a9a9b0; }
body.sans-votes .autres h2 { font-size: calc(1.5rem * min(var(--k, 1), 1.6)); }
body.sans-votes .autres-aide { font-size: calc(1rem * min(var(--k, 1), 1.6)); }
/* AVEC votes : petites étiquettes sous le classement */
body:not(.sans-votes) .autres span { font-size: calc(.95rem * var(--k, 1)); }
/* avant les votes : pas de « Le public choisit / 0 vote » → plus de place pour les chansons */
body.sans-votes #titre, body.sans-votes #meta-line { display: none; }
body.sans-votes .autres { margin-top: 10px; }
body.sans-votes .autres h2 { font: 800 calc(2rem * min(var(--k, 1), 1.5))/1.05 var(--title); margin: 6px 0 4px; }

/* Fenêtre de confirmation : les boutons ne débordent jamais (texte sur 2 lignes si besoin, empilés sur téléphone) */
.boite-btns .btn { white-space: normal; line-height: 1.2; padding: 12px 14px; min-width: 0; }
@media (max-width: 480px) {
  .boite-btns { flex-direction: column-reverse; }
  .boite-btns .btn { flex: none; width: 100%; }
}

/* ---- Écran de la salle : classement d'origine (toutes les chansons, même à 0 vote) ---- */
body.stage .rank-row.zero .rank { color: #6f6f77; }
body.stage .rank-row.zero .t { color: #d6d6db; }
.autres-reste { margin: clamp(6px, 1.2vh, 14px) 0 0; color: #a9a9b0; font-size: clamp(.9rem, 2vh, 1.25rem); }

/* ---- Écran de la salle : votes terminés → « PROCHAINE CHANSON » en très grand ---- */
.gagnante { display: none; }
body.etat-gagnante .gagnante { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(4px, 1vh, 12px);
  margin: 0 0 clamp(10px, 2.2vh, 28px); padding: clamp(14px, 3vh, 36px) clamp(16px, 2.4vw, 36px);
  background: linear-gradient(135deg, #2a0f06 0%, #1c1c20 70%); border-left: clamp(6px, .8vw, 12px) solid var(--rust); animation: gagnante-entree .5s ease-out; }
@keyframes gagnante-entree { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.gagnante-etiquette { display: inline-block; background: var(--rust); color: #fff; padding: .25em .8em; font: 700 clamp(1rem, 2.6vh, 1.6rem) var(--title); letter-spacing: .14em; text-transform: uppercase; }
.gagnante-titre { margin: .1em 0 0; font: 800 clamp(2.4rem, 11vh, 7rem)/.98 var(--title); text-transform: uppercase; letter-spacing: -.01em; overflow-wrap: anywhere; }
.gagnante-artiste { margin: 0; color: #d9d9de; font: 500 clamp(1.3rem, 4vh, 2.6rem) var(--title); letter-spacing: .06em; text-transform: uppercase; }
.gagnante-votes { margin: 0; color: #ff8a5c; font: 700 clamp(1rem, 2.6vh, 1.7rem) var(--text); }
.gagnante-egalite { margin: 0; color: #a9a9b0; font-size: clamp(.85rem, 2vh, 1.2rem); }
/* le gros « Merci d'avoir voté ! » devient discret : la chanson est la star */
body.etat-gagnante #titre { font-size: clamp(1.1rem, 3vh, 2rem); margin: 4px 0 0; }
body.etat-gagnante #etiquette { display: none; }
body.etat-gagnante ul.songs { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { body.etat-gagnante .gagnante { animation: none; } }

/* Écran de projection : jamais de barre de défilement (tout est ajusté pour tenir dans l'écran) */
html:has(body.projection), body.projection { overflow: hidden; }
@media (max-width: 599px) { html:has(body.projection), body.projection { overflow: auto; } }

/* ---- Écran VERTICAL large (téléviseur tourné, mur LED vertical) : classement en haut, QR code en dessous ---- */
@media (orientation: portrait) and (min-width: 600px) {
  body.stage .stage-grid { grid-template-columns: 1fr; gap: clamp(12px, 2vh, 40px); align-content: start; }
  body.stage .side { position: static; }
  body.stage .qr-card { position: static; width: min(100%, 62%); margin: 0 auto; padding: clamp(14px, 2vh, 36px); }
  body.stage .qr-card #qr img, body.stage .qr-card #qr canvas { max-width: min(100%, 30vh); margin: 0 auto; }
  body.stage .qr-card h2 { font-size: clamp(1.4rem, 2.6vh, 3rem); margin: 8px 0; }
}
/* Écran vertical : les gros textes se règlent sur la LARGEUR (et non sur la hauteur, qui est immense) */
@media (orientation: portrait) and (min-width: 600px) {
  body.etat-attente .attente { min-height: 0; padding: 2vh 0; gap: 1.6vh; }
  .attente-logo { height: clamp(70px, 9vh, 180px); }
  .attente-titre { font-size: clamp(2.2rem, min(6.5vh, 9vw), 6rem); }
  .attente-texte { font-size: clamp(1rem, min(2vh, 2.6vw), 1.8rem); }
  body.etat-gagnante .gagnante { padding: clamp(12px, 2vh, 28px) clamp(14px, 2vw, 30px); }
  .gagnante-titre { font-size: clamp(2rem, min(6.5vh, 9vw), 6rem); }
  .gagnante-artiste { font-size: clamp(1.1rem, min(2.8vh, 3.2vw), 2.2rem); }
  body.stage h1 { font-size: clamp(1.8rem, min(5vh, 7vw), 4rem); }
  body.stage .qr-card #qr img, body.stage .qr-card #qr canvas { max-width: min(100%, 24vh); }
}

.theme-btn { flex: none; }
@media (max-width: 340px) { .sh-nav { padding: 0 2px; gap: 0; } .sh-nav a { padding: 8px 6px; font-size: .74rem; } }


/* ---- Logo = simple titre (pas cliquable) ; menu avec libellés courts sur petit téléphone ---- */
.sh-logo { cursor: default; user-select: none; }
.sh-nav a .c { display: none; }
@media (max-width: 640px) { .sh-nav a .l { display: none; } .sh-nav a .c { display: inline; } }

/* ---- Écran de la salle : barre de commandes (Plein écran + ← Mon espace) dans une bande réservée en bas ---- */
body.projection .stage-grid { padding-bottom: max(64px, 6vh); }
.commandes-ecran { position: fixed; left: 16px; bottom: 12px; z-index: 60; display: flex; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none; transition: opacity .25s; }
.commandes-ecran.visible { opacity: 1; pointer-events: auto; }
.quitter-ecran { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px 0 12px; border-radius: 999px;
  background: #26262b; color: #fff; border: 1px solid #55555e; font: 600 .9rem var(--text); text-decoration: none; }
.quitter-ecran:hover, .quitter-ecran:focus-visible { background: #3a3a42; outline: 2px solid var(--rust); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .commandes-ecran { transition: none; } }

/* ---- Bouton « Se déconnecter » dans l'en-tête (musicien connecté) ---- */
.deco { display: inline-flex; align-items: center; gap: 8px; flex: none; align-self: center; height: 40px; padding: 0 14px; margin: 0 4px 0 6px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 600 .85rem var(--text); cursor: pointer; }
.deco:hover { background: var(--panel); border-color: var(--rust); color: var(--rust); }
.sh-nav ~ .theme-btn { margin-left: 0; }
@media (max-width: 900px) { .deco { width: 40px; padding: 0; justify-content: center; } .deco span { display: none; } }
@media (max-width: 340px) { .deco { margin: 0 2px; width: 36px; height: 36px; } }

/* ---- Animation d'accueil avec le logo (page de vote, à l'ouverture) ---- */
#intro { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: #111113; transition: opacity .4s ease; }
#intro.fin { opacity: 0; pointer-events: none; }
.intro-logo { position: relative; display: flex; align-items: center; justify-content: center; }
.intro-logo img { height: clamp(110px, 22vh, 190px); width: auto; animation: intro-logo .75s cubic-bezier(.2, .9, .3, 1.25) both; }
.intro-onde { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
  border: 2px solid #d33a00; opacity: 0; animation: intro-onde 1.3s .3s ease-out both; }
.intro-onde::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #d33a00; opacity: .6; animation: intro-onde 1.3s .55s ease-out both; }
.intro-nom { margin: 0; font: 700 1.5rem var(--title); letter-spacing: .16em; text-transform: uppercase; color: #fff; opacity: 0; animation: intro-nom .55s .5s ease-out forwards; }
@keyframes intro-logo { from { opacity: 0; transform: scale(.55) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes intro-onde { 0% { opacity: .85; transform: scale(.55); } 100% { opacity: 0; transform: scale(2.8); } }
@keyframes intro-nom { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #intro { display: none; } }

/* =====================================================================
   Page de connexion : 3 décors à comparer  (body[data-deco] = 0 actuel · 1 Scène · 2 Équaliseur · 3 Affiche)
   ===================================================================== */
.deco-fond, .deco-eq, .deco-affiche, .deco-logo { display: none; }

/* Boutons de test (en bas de l'écran, à retirer une fois la version choisie) */
.deco-choix { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 80; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px;
  max-width: 96vw; padding: 8px 10px; border-radius: 18px; background: rgba(17,17,19,.92); border: 1px solid #4a4a52; box-shadow: 0 8px 30px rgba(0,0,0,.5); backdrop-filter: blur(6px); }
.deco-choix span { color: #a9a9b0; font: 600 .78rem var(--text); padding: 0 4px; }
.deco-choix button { min-height: 38px; padding: 6px 12px; border: 1px solid #55555e; border-radius: 999px; background: transparent; color: #fff; font: 600 .82rem var(--text); cursor: pointer; white-space: nowrap; }
.deco-choix button:hover { border-color: var(--rust); }
.deco-choix button[aria-pressed="true"] { background: var(--rust); border-color: var(--rust); }
body:not([data-deco]) .deco-choix { display: none; }

/* ---- Éléments communs aux versions 1-3 ---- */
body[data-deco="1"] #login, body[data-deco="2"] #login, body[data-deco="3"] #login { position: relative; }
body[data-deco="1"] .deco-logo, body[data-deco="2"] .deco-logo { display: flex; position: relative; justify-content: center; align-items: center; margin: 0 auto 6px; }
.deco-logo img { height: clamp(96px, 16vh, 150px); width: auto; filter: drop-shadow(0 0 26px rgba(211,58,0,.55)); animation: deco-flotte 4.5s ease-in-out infinite; }


@keyframes deco-flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }


/* ===== Version 1 · SCÈNE : photo de concert floutée + carte en verre dépoli ===== */
body[data-deco="1"] .deco-fond { display: block; position: fixed; inset: 0; z-index: -1; background: #111113 url("photos/vote-public.jpg") center / cover no-repeat; filter: blur(7px) brightness(.55) saturate(1.15); transform: scale(1.08); }
body[data-deco="1"] .deco-fond::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 35%, rgba(17,17,19,0) 0%, rgba(17,17,19,.65) 100%), linear-gradient(180deg, rgba(211,58,0,.18), rgba(17,17,19,.5)); }
body[data-deco="1"] #login { text-align: center; padding: clamp(10px, 4vh, 46px) 0 90px; color: #fff; }
body[data-deco="1"] #login h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); text-shadow: 0 4px 30px rgba(0,0,0,.6); }
body[data-deco="1"] #login .intro { margin-left: auto; margin-right: auto; color: #e4e4e8; }
body[data-deco="1"] #login .mus-card { margin: 18px auto 0; text-align: left; background: rgba(24,24,28,.62); border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 22px;
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 24px 70px rgba(0,0,0,.55); color: #fff; }
body[data-deco="1"] #login .search { background: rgba(10,10,12,.55); border-color: rgba(255,255,255,.25); color: #fff; border-radius: 10px; }
body[data-deco="1"] #login .btn { border-radius: 10px; min-height: 50px; }
body[data-deco="1"] #login a, body[data-deco="1"] #login .oeil { color: #e4e4e8; }

/* ===== Version 2 · ÉQUALISEUR : fond sombre, halo orange, barres animées au fond de l'écran ===== */
body[data-deco="2"] { background: radial-gradient(70% 55% at 50% -5%, rgba(211,58,0,.42), transparent 70%), #111113; }
body[data-deco="2"] #login { text-align: center; padding: clamp(10px, 4vh, 46px) 0 90px; color: #fff; }
body[data-deco="2"] #login h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
body[data-deco="2"] #login .intro { margin-left: auto; margin-right: auto; color: #c9c9ce; }
body[data-deco="2"] #login .mus-card { margin: 18px auto 0; text-align: left; background: #17171b; border: 1px solid #2f2f35; border-top: 4px solid var(--rust); border-radius: 6px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.5); color: #fff; }
body[data-deco="2"] #login .search { background: #0f0f11; border-color: #3a3a40; color: #fff; }
body[data-deco="2"] #login a, body[data-deco="2"] #login .oeil { color: #c9c9ce; }
body[data-deco="2"] .deco-eq { display: flex; align-items: flex-end; gap: clamp(3px, .5vw, 8px); position: fixed; left: 0; right: 0; bottom: 0; height: 42vh; padding: 0 2%; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 15%, transparent 100%); mask-image: linear-gradient(to top, #000 15%, transparent 100%); }
.deco-eq i { flex: 1; height: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(to top, #d33a00, #ff8a5c); opacity: .5; transform-origin: bottom; transform: scaleY(.12);
  animation: deco-eq var(--d, 1s) var(--r, 0s) ease-in-out infinite alternate; }
@keyframes deco-eq { from { transform: scaleY(.12); } to { transform: scaleY(var(--h, .8)); } }

/* ===== Version 3 · AFFICHE : grand titre typographique + rayures, carte « tampon » décalée ===== */
body[data-deco="3"] #login { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); column-gap: clamp(20px, 4vw, 70px); align-items: center; min-height: calc(100vh - var(--header-h) - 150px); padding-bottom: 90px; }
body[data-deco="3"] #login > .label, body[data-deco="3"] #login > h1, body[data-deco="3"] #login > .intro, body[data-deco="3"] #login > form { grid-column: 2; }
body[data-deco="3"] .deco-affiche { display: flex; flex-direction: column; justify-content: center; grid-column: 1; grid-row: 1 / span 6; position: relative; padding: clamp(14px, 3vw, 44px); min-height: 52vh; overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(211,58,0,.20) 0 18px, transparent 18px 38px), #17171b; border: 1px solid #2f2f35; }
body[data-deco="3"] .deco-affiche b { font: 800 clamp(2.6rem, 6.4vw, 6.2rem)/.9 var(--title); text-transform: uppercase; color: #fff; letter-spacing: -.01em; text-shadow: 6px 6px 0 var(--rust); }
body[data-deco="3"] .deco-affiche span { margin-top: clamp(10px, 2vw, 26px); font: 800 clamp(1rem, 2.4vw, 1.9rem) var(--title); letter-spacing: .14em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1.5px #fff; }
body[data-deco="3"] #login h1 { font-size: clamp(2rem, 4vw, 3rem); }
body[data-deco="3"] #login > form { max-width: none; background: var(--white); border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--rust); }
body[data-deco="3"] #login > form .btn { min-height: 52px; font-size: 1rem; }
html[data-theme="dark"] body[data-deco="3"] #login > form { background: #1c1c20; border-color: #f2f2f4; }

@media (max-width: 860px) {
  body[data-deco="3"] #login { display: block; min-height: 0; }
  body[data-deco="3"] .deco-affiche { min-height: 0; margin-bottom: 22px; }
  body[data-deco="3"] .deco-affiche b { font-size: clamp(3rem, 16vw, 5.5rem); }
  body[data-deco="3"] #login > form { box-shadow: 6px 6px 0 var(--rust); }
}
@media (max-width: 520px) { .deco-choix { flex-wrap: nowrap; gap: 3px; padding: 6px; bottom: 84px; } .deco-choix span { display: none; } .deco-choix button { min-height: 34px; padding: 4px 7px; font-size: .68rem; } body[data-deco] #login { padding-bottom: 150px; } }
@media (prefers-reduced-motion: reduce) { .deco-logo img, .deco-eq i { animation: none; } .deco-eq i { transform: scaleY(.4); } }

/* Réseaux sociaux (page de vote) */
.pied-vote .reseaux { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.pied-vote .reseaux span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.pied-vote a.rs { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--rust); color: var(--rust); text-decoration: none; transition: background .15s, color .15s; }
.pied-vote a.rs:hover, .pied-vote a.rs:focus-visible { background: var(--rust); color: #fff; }
.pied-vote .contact { margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.pied-vote .contact a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Réglages avancés (espace musicien) ===== */
.mus-avance { border-radius: 14px; overflow: hidden; border-left: 4px solid var(--rust); }
.mus-avance summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 64px; }
.mus-avance summary::-webkit-details-marker { display: none; }
.mus-avance .sum-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mus-avance .sum-txt b { font: 700 1.1rem 'Oswald', sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.mus-avance .sum-txt small { color: var(--muted); font-size: .85rem; font-weight: 400; }
.mus-avance .chev { width: 11px; height: 11px; border-right: 3px solid var(--rust); border-bottom: 3px solid var(--rust); transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
.mus-avance[open] .chev { transform: rotate(-135deg); }
.mus-avance .ic { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(211,58,0,.14); color: var(--rust); }
.mus-avance .ic-roue svg { transition: transform .5s; }
.mus-avance[open] .ic-roue svg { transform: rotate(90deg); }
.mus-avance-corps { padding: 4px 18px 20px; gap: 16px; }
.mus-avance-corps .mus-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 18px 18px; border-radius: 12px; border-top: 3px solid var(--rust); box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.mus-avance-corps .mus-card .ic { margin-bottom: 8px; }
.mus-avance-corps .mus-card h2 { margin: 0 0 4px; }
.mus-avance-corps .mus-card p { margin: 0 0 12px; }
.mus-avance-corps .mus-card .btn { margin-top: auto; }
.mus-max { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; line-height: 1.35; }
.mus-max > span:first-child { flex-basis: 100%; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper .pas { width: 44px; min-height: 44px; border: 0; background: rgba(211,58,0,.14); color: var(--rust); font: 700 1.4rem 'DM Sans', sans-serif; cursor: pointer; }
.stepper .pas:hover { background: var(--rust); color: #fff; }
.stepper input { width: 64px; min-height: 44px; border: 0; text-align: center; font: 700 1.3rem 'Oswald', sans-serif; background: transparent; color: inherit; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.boite-champ--multi { margin-bottom: 10px; }
.boite-err { margin: 2px 0 14px; color: #ff7a52; font-size: .9rem; font-weight: 600; }
.boite-err[hidden] { display: none; }

/* Filtres de la liste des chansons (espace musicien) */
.mus-filtres { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--rust); border-radius: 10px; background: var(--panel); }
.mus-filtres[hidden] { display: none; }
.mus-filtres .flt { display: flex; flex-direction: column; gap: 4px; min-width: 130px; flex: 1 1 130px; }
.mus-filtres .flt span { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mus-filtres select { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white, #fff); color: inherit; font: 500 .95rem 'DM Sans', sans-serif; width: 100%; }
html[data-theme="dark"] .mus-filtres select { background: #111113; border-color: #3a3a40; }
.mus-filtres select:focus-visible { outline: 2px solid var(--rust); outline-offset: 1px; }
.mus-filtres #flt-effacer { min-height: 44px; }
.mus-filtres #flt-effacer[hidden] { display: none; }
.flt-toggle { display: none; width: 100%; margin: 0 0 12px; min-height: 48px; justify-content: center; }
.flt-toggle[hidden] { display: none !important; }
.flt-toggle[aria-expanded="true"] { border-color: var(--rust); }
@media (max-width: 700px) {
  .flt-toggle:not([hidden]) { display: flex; align-items: center; gap: 8px; }
  .mus-filtres:not(.ouvert) { display: none; }
}

/* =====================================================================
   Espace musicien : 2 présentations à comparer  (body[data-ui] = 0 actuelle · 2 Compacte)
   ===================================================================== */
.ui-choix { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 6px; max-width: 96vw; padding: 7px 9px; border-radius: 18px; background: rgba(17,17,19,.94); border: 1px solid #4a4a52; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.ui-choix span { color: #a9a9b0; font: 600 .78rem 'DM Sans', sans-serif; padding: 0 4px; white-space: nowrap; }
.ui-choix button { min-height: 38px; padding: 6px 12px; border: 1px solid #55555e; border-radius: 999px; background: transparent; color: #fff; font: 600 .82rem 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; }
.ui-choix button[aria-pressed="true"] { background: var(--rust); border-color: var(--rust); }
body.mode-live-actif .ui-choix { display: none; }
@media (max-width: 560px) { .ui-choix { gap: 3px; padding: 5px; bottom: 84px; } .ui-choix span { display: none; } .ui-choix button { padding: 4px 8px; font-size: .7rem; min-height: 34px; } }

/* barre d'outils collante (version compacte) */
body[data-ui="2"] .mus-outils { position: sticky; top: var(--header-h); z-index: 20; background: var(--paper, #111113); padding: 8px 0 2px; margin-bottom: 10px; box-shadow: 0 8px 14px -10px rgba(0,0,0,.6); }
body[data-ui="2"] .mus-outils .mus-onglets { margin-top: 0; }


/* ---------- 2 · COMPACTE : liste serrée style tableau, tout se voit d'un coup ---------- */
body[data-ui="2"] .mus-liste { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
body[data-ui="2"] .mus-liste label { min-height: 48px; padding: 6px 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; gap: 14px; }
body[data-ui="2"] .mus-liste li:last-child label { border-bottom: 0; }
body[data-ui="2"] .mus-liste li:nth-child(even) label { background: rgba(128,128,128,.07); }
body[data-ui="2"] .mus-liste label > span { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; }
body[data-ui="2"] .mus-liste b { font-size: .98rem; }
body[data-ui="2"] .mus-liste li.on label { background: rgba(211,58,0,.16); box-shadow: inset 5px 0 0 var(--rust); border-color: var(--line); }
body[data-ui="2"] .mus-edit { border-radius: 8px; height: 38px; min-width: 38px; }



@media (max-width: 700px) { body[data-ui="2"] .mus-outils { position: static; box-shadow: none; padding: 0; } }

/* Roue dentée + fenêtre Réglages */
.reglages-btn { flex: none; width: 44px; height: 44px; margin: 0 4px 0 auto; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.reglages-btn:hover { background: var(--panel); }
.reglages-btn svg { transition: transform .4s; }
.reglages-btn:hover svg { transform: rotate(60deg); }
.reglages-btn + .theme-btn { margin-left: 0; }
.deco + .reglages-btn { margin-left: 8px; }
.reglages .reglages-corps { text-align: left; }
.reglages h2 { text-align: center; margin-bottom: 14px; }
.reglages .rg { margin: 0 0 16px; }
.reglages .rg > span { display: block; margin-bottom: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.reglages .seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.reglages .seg button { flex: 1; min-height: 46px; border: 0; background: transparent; color: inherit; font: 600 .95rem 'DM Sans', sans-serif; cursor: pointer; }
.reglages .seg button + button { border-left: 1px solid var(--line); }
.reglages .seg button[aria-pressed="true"] { background: var(--rust); color: #fff; }
.reglages .rg-liens { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 18px; }
.reglages .rg-liens .btn { min-height: 48px; border-radius: 10px; text-align: center; justify-content: center; }
/* message « Aucune chanson trouvée » : titre au-dessus du texte, centré */
.mus-liste li.mus-vide { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 34px 14px; text-align: center; }
.mus-liste li.mus-vide b { margin: 0; font-size: 1.2rem; }
/* « Démarrer » grisé tant qu'aucune chanson n'est choisie, mais cliquable (un message explique quoi faire) */
.mus-bas .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.mus-bas .btn[aria-disabled="true"]:hover { transform: none; }
