/* Polices Inter et Inter Tight hébergées chez nous (licence OFL, public/fonts/), aucun appel externe */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-tight-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-tight-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/inter-tight-latin-800.woff2") format("woff2"); }
/* Blind Test FR : thème sombre unique (choix volontaire : le logo Deezer fourni est en texte blanc,
   et l'ambiance « salle de concert » sert le jeu). Couleurs en jetons. */
:root {
  --fond: #0f0c1d;
  --fond-2: #181430;
  --carte: #221c40;
  --carte-2: #2c2552;
  --trait: rgba(255, 255, 255, .10);
  --texte: #f6f3ff;
  --texte-2: #b9b1d9;
  --texte-3: #8a82ad;
  --accent: #ff5a36;
  --accent-2: #ffc23c;
  --bon: #2ed47a;
  --faux: #ff4d6d;
  --moyen: #ffc23c;
  --degrade: linear-gradient(135deg, #ff5a36 0%, #ff8a2b 45%, #ffc23c 100%);
  --rayon: 18px;
  --ombre: 0 10px 30px rgba(0, 0, 0, .35);
  --police: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  background-image: radial-gradient(120% 60% at 50% -10%, #2a1d5c 0%, rgba(15, 12, 29, 0) 60%);
  background-attachment: fixed;
  color: var(--texte);
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
a { color: var(--accent-2); }
[hidden] { display: none !important; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) 16px 0;
}
.ecran { display: none; flex: 1; flex-direction: column; animation: entree .25s ease-out; }
.ecran[data-actif] { display: flex; }
@keyframes entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* En-tête */
.entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.marque { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; display: flex; align-items: center; gap: 10px; }
.marque b { background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marque-pastille { width: 26px; height: 26px; border-radius: 50%; background: var(--degrade); box-shadow: 0 0 0 5px rgba(255, 138, 43, .18); position: relative; }
.marque-pastille::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--fond); }
.btn-icone {
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--trait);
  background: var(--fond-2); display: grid; place-items: center; cursor: pointer; flex: none;
}
.btn-icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-icone:active { transform: scale(.94); }

/* Carte « chanson du jour » : l'action mise en avant de l'accueil */
.carte-jour {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  margin: 14px 0 26px; padding: 22px 20px 20px; border: 0; border-radius: 24px;
  background: var(--degrade); color: #1b0f05; box-shadow: var(--ombre);
  display: flex; flex-direction: column; gap: 6px;
}
.carte-jour:active { transform: scale(.985); }
.carte-jour-sur { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.carte-jour-titre { font-size: 28px; font-weight: 850; line-height: 1.05; letter-spacing: -.02em; max-width: 80%; }
.carte-jour-detail { font-size: 15px; opacity: .8; max-width: 85%; }
.carte-jour-cta {
  margin-top: 12px; align-self: flex-start; background: #1b0f05; color: #fff; font-weight: 750;
  padding: 13px 26px; border-radius: 999px; font-size: 17px;
}
.onde { position: absolute; right: 18px; top: 22px; display: flex; gap: 4px; align-items: center; height: 40px; opacity: .55; }
.onde i { width: 5px; border-radius: 3px; background: #1b0f05; animation: onde 1.1s ease-in-out infinite; }
.onde i:nth-child(1) { height: 30%; animation-delay: -.2s; } .onde i:nth-child(2) { height: 70%; animation-delay: -.5s; }
.onde i:nth-child(3) { height: 45%; animation-delay: -.1s; } .onde i:nth-child(4) { height: 95%; animation-delay: -.7s; }
.onde i:nth-child(5) { height: 55%; animation-delay: -.3s; } .onde i:nth-child(6) { height: 80%; animation-delay: -.9s; }
.onde i:nth-child(7) { height: 35%; animation-delay: -.4s; }
@keyframes onde { 50% { transform: scaleY(.4); } }

.titre-section { margin: 0 0 10px; display: flex; align-items: baseline; justify-content: space-between; }
.titre-section h2 { font-size: 19px; margin: 0; }
.grille-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat {
  border: 1px solid var(--trait); background: var(--carte); border-radius: var(--rayon);
  padding: 14px 14px 12px; min-height: 76px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  transition: background .15s, transform .1s;
}
.cat:active { transform: scale(.97); background: var(--carte-2); }
.cat-nom { font-weight: 750; font-size: 16px; }
.cat-record { font-size: 12.5px; color: var(--texte-3); }
.cat-record b { color: var(--accent-2); }
.cat-melange { grid-column: 1 / -1; background: var(--fond-2); border-style: dashed; min-height: 56px; flex-direction: row; align-items: center; }
.regle { color: var(--texte-3); font-size: 13.5px; text-align: center; margin: 16px 0 8px; }

/* Partie */
.entete-partie { margin-bottom: 4px; }
.progression { flex: 1; display: flex; gap: 4px; }
.progression i { flex: 1; height: 6px; border-radius: 3px; background: var(--carte-2); }
.progression i.bon { background: var(--bon); }
.progression i.faux { background: var(--faux); }
.progression i.moyen { background: var(--moyen); }
.progression i.encours { background: var(--texte-2); }
.score { font-weight: 800; min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; }
.score span { font-size: 20px; }

.lecteur { position: relative; width: 200px; height: 200px; margin: 18px auto 10px; display: grid; place-items: center; }
.disque {
  width: 160px; height: 160px; border-radius: 50%; position: relative; overflow: hidden;
  background: repeating-radial-gradient(circle, #19152d 0 2px, #231d3f 2px 4px);
  box-shadow: inset 0 0 0 6px #120f22, var(--ombre);
}
.disque img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.disque.devoile img { opacity: 1; }
.disque-centre { position: absolute; inset: 58px; border-radius: 50%; background: var(--degrade); box-shadow: 0 0 0 4px #120f22; }
.disque-centre::after { content: ""; position: absolute; inset: 17px; border-radius: 50%; background: var(--fond); }
.disque.tourne { animation: tourne 3s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.minuteur { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.minuteur circle { fill: none; stroke-width: 7; }
.minuteur-fond { stroke: var(--carte); }
.minuteur-arc { stroke: url(#none); stroke: var(--accent-2); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 0; }
.minuteur-arc.rapide { stroke: var(--bon); }
.etat-lecteur { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--texte-2); white-space: nowrap; background: var(--fond); padding: 2px 10px; border-radius: 999px; }

.question { text-align: center; font-size: 21px; font-weight: 800; margin: 14px 0 12px; }
.choix { display: flex; flex-direction: column; gap: 10px; }
.reponse {
  min-height: 58px; padding: 12px 18px; border-radius: 16px; border: 1px solid var(--trait);
  background: var(--carte); text-align: left; font-size: 17px; font-weight: 650; cursor: pointer;
  transition: background .15s, transform .1s, border-color .15s;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.reponse:active { transform: scale(.98); }
.reponse:disabled { cursor: default; }
.reponse.bon { background: rgba(46, 212, 122, .18); border-color: var(--bon); }
.reponse.faux { background: rgba(255, 77, 109, .16); border-color: var(--faux); }
.reponse.eteint { opacity: .45; }
.choix.attente .reponse { opacity: .5; }

.revele { text-align: center; margin-top: 14px; }
.revele-verdict { font-weight: 800; font-size: 18px; margin: 0 0 6px; }
.revele-verdict.bon { color: var(--bon); } .revele-verdict.faux { color: var(--faux); } .revele-verdict.moyen { color: var(--moyen); }
.revele-titre { font-size: 18px; font-weight: 750; margin: 0; }
.revele-artiste { color: var(--texte-2); margin: 2px 0 8px; }
.lien-deezer { font-size: 14px; font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; min-height: 44px; }
.lien-deezer img { height: 16px; width: auto; }

.pied-action { margin-top: auto; padding: 16px 0 12px; position: sticky; bottom: 0; background: linear-gradient(to top, var(--fond) 70%, rgba(15, 12, 29, 0)); }
.pied-colonne { display: flex; flex-direction: column; gap: 10px; }
.ligne-btn { display: flex; gap: 10px; }
.ligne-btn .btn { flex: 1; }
.btn {
  min-height: 56px; width: 100%; border-radius: 16px; border: 0; font-size: 17px; font-weight: 750; cursor: pointer;
  transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-principal { background: var(--degrade); color: #1b0f05; box-shadow: 0 8px 24px rgba(255, 106, 48, .28); }
.btn-second { background: var(--carte); border: 1px solid var(--trait); }

/* Fin de partie */
.fin { text-align: center; padding-top: 20px; }
.fin-cat { color: var(--texte-2); font-weight: 650; margin: 0; }
.fin-score { font-size: 84px; font-weight: 900; line-height: 1; margin: 8px 0 4px; letter-spacing: -.04em; background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fin-score small { font-size: 28px; }
.fin-message { font-size: 20px; font-weight: 750; margin: 6px 0; }
.fin-record { color: var(--accent-2); font-weight: 650; min-height: 1.4em; margin: 0 0 12px; }
.fin-liste { list-style: none; padding: 0; margin: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.fin-liste li { display: flex; gap: 10px; align-items: center; background: var(--fond-2); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.fin-liste .pts { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.fin-liste a { color: var(--texte); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-liste a small { color: var(--texte-3); }

/* Chanson du jour */
.titre-jour { font-size: 18px; margin: 0; text-align: center; flex: 1; }
.essais { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.essais li {
  min-height: 44px; border-radius: 12px; border: 1px solid var(--trait); background: var(--fond-2);
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 15px; color: var(--texte-3);
}
.essais li .pastille { width: 22px; height: 22px; border-radius: 6px; flex: none; background: var(--carte-2); }
.essais li.faux { color: var(--texte); } .essais li.faux .pastille { background: var(--faux); }
.essais li.artiste { color: var(--texte); } .essais li.artiste .pastille { background: var(--moyen); }
.essais li.passe .pastille { background: #4a4468; }
.essais li.bon { color: var(--texte); border-color: var(--bon); } .essais li.bon .pastille { background: var(--bon); }
.essais li.actuel { border-color: var(--texte-3); }
.essais li span.txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.jour-lecteur { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 14px; }
.btn-lecture {
  width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--degrade); color: #1b0f05; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(255, 106, 48, .35);
}
.btn-lecture:active { transform: scale(.95); }
.btn-lecture svg { width: 34px; height: 34px; fill: currentColor; }
.btn-lecture .ic-pause { display: none; }
.btn-lecture.joue .ic-pause { display: block; } .btn-lecture.joue .ic-play { display: none; }
.btn-lecture:disabled { opacity: .5; }
.jour-etat { font-size: 14px; color: var(--texte-2); margin: 0; min-height: 1.4em; text-align: center; }

.zone-reponse { margin-top: auto; padding-bottom: 12px; display: flex; flex-direction: column; gap: 10px; position: sticky; bottom: 0; background: var(--fond); padding-top: 8px; }
.recherche { position: relative; }
.recherche input {
  width: 100%; min-height: 54px; border-radius: 16px; border: 1px solid var(--trait); background: var(--fond-2);
  color: var(--texte); padding: 0 16px; font: inherit; font-size: 17px; outline: none; -webkit-appearance: none; appearance: none;
}
.recherche input:focus { border-color: var(--accent-2); }
.suggestions {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre);
  max-height: 46vh; overflow-y: auto; z-index: 5;
}
.suggestions li { padding: 11px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.suggestions li small { color: var(--texte-3); display: block; font-size: 13px; }
.suggestions li[aria-selected="true"], .suggestions li:active { background: var(--carte-2); }
.suggestions li.vide { color: var(--texte-3); cursor: default; }

.jour-fin { text-align: center; display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; margin-top: auto; }
.jour-carte { display: flex; gap: 14px; align-items: center; text-align: left; background: var(--fond-2); border-radius: var(--rayon); padding: 12px; }
.jour-carte > img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; background: var(--carte); }
.jour-carre { font-size: 26px; letter-spacing: 4px; margin: 4px 0 0; }
.prochaine { color: var(--texte-3); font-size: 14px; margin: 0; font-variant-numeric: tabular-nums; }

/* Attribution Deezer : visible sur tous les écrans */
.attribution {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  padding: 10px 0 max(12px, env(safe-area-inset-bottom)); font-size: 12.5px; color: var(--texte-3);
  border-top: 1px solid var(--trait); margin-top: 8px;
}
.attribution-logo { display: inline-flex; }
.attribution-logo img { height: 21px; width: auto; display: block; }
.attribution nav a { color: var(--texte-3); }

/* Statistiques */
.modale {
  width: min(440px, calc(100% - 32px)); border: 1px solid var(--trait); border-radius: 22px;
  background: var(--fond-2); color: var(--texte); padding: 20px; box-shadow: var(--ombre);
}
.modale::backdrop { background: rgba(5, 4, 12, .7); }
.modale h2 { margin: 0 0 14px; font-size: 20px; }
.modale h3 { font-size: 14px; color: var(--texte-2); margin: 18px 0 8px; font-weight: 650; }
.stats-grille { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.stats-grille div { background: var(--carte); border-radius: 12px; padding: 10px 4px; }
.stats-grille b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.stats-grille span { font-size: 11.5px; color: var(--texte-2); }
.distribution { display: flex; flex-direction: column; gap: 5px; }
.distribution div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.distribution div span:first-child { width: 14px; color: var(--texte-2); }
.distribution .barre { height: 20px; min-width: 22px; border-radius: 5px; background: var(--carte-2); text-align: right; padding: 0 6px; font-weight: 700; line-height: 20px; }
.distribution .barre.fort { background: var(--degrade); color: #1b0f05; }
.records { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 14px; }
.records li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--trait); padding: 4px 0; }
.records b { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.note { color: var(--texte-3); font-size: 12.5px; }

.toast {
  position: fixed; left: 50%; top: calc(68px + env(safe-area-inset-top)); transform: translateX(-50%);
  animation: toast-entre .2s ease-out; pointer-events: none;
  background: var(--texte); color: var(--fond); font-weight: 700; padding: 12px 18px; border-radius: 999px;
  box-shadow: var(--ombre); z-index: 20; max-width: calc(100% - 32px); text-align: center; font-size: 15px;
}

.chargement { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--texte-3); border-top-color: var(--accent-2); animation: tourne .7s linear infinite; vertical-align: -2px; margin-right: 6px; }

/* Ajouts v0.1 : niveaux, saisie libre, paliers, classements */
.entete-droite { display: flex; gap: 8px; }
.lien-discret { background: none; border: 0; padding: 8px 0; color: var(--accent-2); font-weight: 650; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.segments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--fond-2); border: 1px solid var(--trait); border-radius: 14px; padding: 4px; }
.segments.petits { grid-template-columns: repeat(3, 1fr); margin: 10px 0; }
.segments button { min-height: 44px; border: 0; border-radius: 10px; background: none; font-weight: 700; font-size: 14.5px; cursor: pointer; color: var(--texte-2); }
.segments button[aria-checked="true"] { background: var(--carte-2); color: var(--texte); box-shadow: inset 0 0 0 1px rgba(255, 194, 60, .45); }
.niveau-resume { font-size: 13.5px; color: var(--texte-2); margin: 8px 2px 12px; }
.niveau-resume b { color: var(--accent-2); }
.partie-etiquette { text-align: center; font-size: 13px; color: var(--texte-3); margin: 2px 0 0; }

.saisie-libre { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.saisie-libre input { width: 100%; min-height: 56px; border-radius: 16px; border: 1px solid var(--trait); background: var(--fond-2); color: var(--texte); padding: 0 16px; font: inherit; font-size: 17px; outline: none; }
.saisie-libre input:focus { border-color: var(--accent-2); }
.saisie-libre .lien-discret { align-self: center; }

.fin-max { color: var(--texte-3); margin: 0 0 6px; }
.fin-score { font-size: 72px; }
.puce { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--faux); }
.puce.bon { background: var(--bon); } .puce.moyen { background: var(--moyen); }

.paliers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0 4px; }
.palier { border-radius: 12px; border: 1px solid var(--trait); background: var(--fond-2); padding: 8px 2px; text-align: center; color: var(--texte-3); }
.palier b { display: block; font-size: 15px; }
.palier small { font-size: 11px; }
.palier.fait { opacity: .55; }
.palier.actuel { border-color: var(--accent-2); color: var(--texte); background: var(--carte); box-shadow: 0 0 0 3px rgba(255, 194, 60, .15); }
.palier.ouvert { color: var(--texte-2); }
.barre-lecture-fond { width: 100%; height: 6px; border-radius: 3px; background: var(--carte); overflow: hidden; }
.barre-lecture { height: 100%; width: 0; background: var(--degrade); }
.essais li small { margin-left: auto; color: var(--moyen); font-size: 12px; flex: none; }
.jour-points { margin: 0; color: var(--texte-2); }
.jour-points b { color: var(--accent-2); font-size: 18px; }

.bandeau-test { background: rgba(255, 194, 60, .1); border: 1px dashed rgba(255, 194, 60, .5); color: var(--texte-2); border-radius: 12px; padding: 8px 12px; font-size: 13px; margin: 8px 0 0; }
.bandeau-test .lien-discret { padding: 2px 0; font-size: 13px; }
.onglets { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglets button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--trait); background: var(--fond-2); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.onglets button[aria-selected="true"] { background: var(--texte); color: var(--fond); }
.onglets .onglet-plus { border-style: dashed; color: var(--accent-2); }
.groupe-info { display: flex; align-items: center; gap: 12px; background: var(--fond-2); border: 1px solid var(--trait); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.groupe-info div { flex: 1; }
.groupe-info small { display: block; color: var(--texte-3); font-size: 12px; }
.groupe-info .code { font-size: 22px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.btn.petit { min-height: 44px; width: auto; padding: 0 18px; font-size: 15px; }
.classement { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.classement li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: 12px; background: var(--fond-2); }
.classement li.moi { background: var(--carte-2); box-shadow: inset 0 0 0 1px var(--accent-2); }
.classement li.attente { opacity: .6; }
.classement li.vide { justify-content: center; text-align: center; color: var(--texte-3); background: none; flex-wrap: wrap; }
.classement .rang { width: 28px; text-align: center; font-weight: 800; color: var(--texte-2); }
.classement .pseudo { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.classement .pseudo small, .classement .parties { color: var(--texte-3); font-weight: 500; }
.classement b { font-variant-numeric: tabular-nums; }
.moi-pseudo { color: var(--texte-2); font-size: 14px; margin: 14px 0 0; }

.modale-actions { display: flex; gap: 10px; margin-top: 16px; }
.modale-actions .btn { flex: 1; }
.modale p { color: var(--texte-2); }
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--texte-2); margin: 10px 0; }
.champ input { min-height: 50px; border-radius: 12px; border: 1px solid var(--trait); background: var(--fond); color: var(--texte); padding: 0 14px; font: inherit; font-size: 17px; outline: none; }
.champ input:focus { border-color: var(--accent-2); }
.ou { text-align: center; margin: 4px 0; color: var(--texte-3); }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th, .tableau td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--trait); }
.tableau th { color: var(--texte-3); font-weight: 600; font-size: 12.5px; }

/* Pages légales */
.page-legale { max-width: 680px; margin: 0 auto; padding: 24px 16px 48px; }
.page-legale h1 { font-size: 26px; }
.page-legale h2 { font-size: 18px; margin-top: 28px; }
.page-legale p, .page-legale li { color: var(--texte-2); }
.page-legale .a-completer { color: var(--accent-2); font-weight: 650; }

@media (min-width: 520px) {
  .app { padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- v0.2 : mode paliers, transitions, écrans de fin ---------- */
.entete-vide { width: 44px; flex: none; }
.mode-ligne { font-size: 13px; color: var(--texte-3); margin: -4px 2px 12px; }
.mode-ligne b { color: var(--texte-2); }
.mode-ligne .lien-discret { font-size: 13px; padding: 4px 0; }

.bloc-paliers { margin: 10px 0 4px; }
.piste-paliers { position: relative; height: 8px; border-radius: 4px; background: var(--carte); overflow: hidden; margin: 8px 0 2px; }
.piste-avance { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 194, 60, .30); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.piste-lecture { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--degrade); }
.ligne-lecture { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.btn-lecture.moyen { width: 60px; height: 60px; flex: none; }
.btn-lecture.moyen svg { width: 28px; height: 28px; }
.etat-palier { margin: 0; color: var(--texte-2); font-size: 14.5px; }
.palier { transition: background .3s, border-color .3s, opacity .3s, transform .3s; }
.palier.ouvre { animation: ouvre .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes ouvre { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: none; } }

.actions-palier { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 12px; }
.btn-plus {
  position: relative; min-height: 58px; width: 100%; border-radius: 16px; cursor: pointer;
  background: rgba(255, 194, 60, .08); border: 2px solid var(--accent-2); color: var(--texte);
  font-size: 17px; font-weight: 750; transition: transform .1s, background .2s, opacity .2s;
}
.btn-plus b { color: var(--accent-2); }
.btn-plus:active { transform: scale(.98); background: rgba(255, 194, 60, .16); }
.btn-plus:disabled { opacity: .45; cursor: default; }
.btn-plus.dernier { border-color: var(--trait); background: var(--carte); color: var(--texte-2); }
.badge-gain {
  position: absolute; right: 16px; top: -4px; pointer-events: none; font-size: 15px; font-weight: 850;
  color: var(--accent-2); animation: monte .7s ease-out forwards;
}
@keyframes monte { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-26px); } }

.zone-reponse .btn-plus { order: 3; }
.entree-douce { animation: entree .28s ease-out; }
.pulse { animation: pulse .35s ease-out; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.secoue { animation: secoue .3s; }
@keyframes secoue { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.revele-pochette { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; display: block; margin: 0 auto 10px; box-shadow: var(--ombre); background: var(--carte); }
.revele-verdict.grand { font-size: 24px; margin-top: 12px; }
.jour-fin { margin-top: 0; padding-top: 8px; }
.jour-fin .pied-action { position: static; background: none; padding-bottom: 4px; }
.liens-fin { margin: 0; color: var(--texte-3); }
.fin-liste .pal { color: var(--texte-3); flex: none; }
.records li small { color: var(--texte-3); font-size: 11.5px; margin-left: 6px; }
.records li b { margin-left: auto; }
.defile { overflow-x: auto; }
.tableau td, .tableau th { white-space: nowrap; }

@keyframes toast-entre { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.piste-lecture { transition: width .08s linear; }

/* v0.2 bis : modes nommés, coût affiché, « Passer » distinct */
.segments.deux { grid-template-columns: 1fr 1fr; margin-bottom: 6px; }
.segments.deux button { min-height: 48px; font-size: 15.5px; }
.mode-ligne { margin: 4px 2px 12px; }
.btn-plus { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.2; padding: 6px 12px; }
.btn-plus .cout { font-size: 13px; font-weight: 650; color: var(--texte-2); }
.btn-plus .cout b { color: var(--faux); }
.btn-passer {
  margin-top: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: none; border: 1px solid var(--trait); color: var(--texte-3); font-size: 14px; font-weight: 600;
  align-self: center;
}
.btn-passer:active { background: var(--fond-2); }
.zone-reponse .btn-passer { order: 4; }
.aide-plus { margin: 0 0 6px; font-size: 13.5px; color: var(--accent-2); text-align: center; animation: entree .3s ease-out; }
.zone-reponse .aide-plus { order: 2; margin: 2px 0 0; }
.essais li.abandon { color: var(--texte); } .essais li.abandon .pastille { background: var(--faux); }

/* v0.3 : vignettes des choix, défis, série */
.reponse { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; -webkit-line-clamp: unset; }
.reponse .vignette { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--carte-2); }
.reponse .libelle { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.reponse.eteint .vignette { filter: grayscale(1); }
.btn-defi { background: var(--fond-2); border: 1px solid rgba(46, 212, 122, .55); color: var(--texte); }
.fin-defi { background: var(--fond-2); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px; margin: 0 0 12px; text-align: left; }
.fin-defi .verdict-defi { font-size: 19px; font-weight: 800; margin: 0 0 8px; text-align: center; }
.fin-defi .verdict-defi.bon { color: var(--bon); } .fin-defi .verdict-defi.faux { color: var(--faux); }
.duel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.duel li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--carte); font-weight: 650; }
.duel li.moi { box-shadow: inset 0 0 0 1px var(--accent-2); }
.duel li b { font-variant-numeric: tabular-nums; }
.jour-battus { margin: -4px 0 0; font-weight: 750; color: var(--texte); }
.serie { background: var(--fond-2); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.serie .ligne-serie { display: flex; justify-content: space-between; align-items: center; font-weight: 750; font-size: 17px; }
.serie .gels { color: #8fd3ff; }
.serie p { margin: 0; font-size: 13.5px; color: var(--texte-2); }
.serie .sauve { color: #8fd3ff; font-weight: 650; }
.carte-serie { position: absolute; right: 18px; bottom: 22px; background: rgba(27, 15, 5, .85); color: #fff; font-weight: 750; font-size: 14px; padding: 8px 12px; border-radius: 999px; }

/* ---------- v0.4 : salons entre amis ---------- */
.btn-amis { margin: 2px 0 10px; }
.champ select { min-height: 50px; border-radius: 12px; border: 1px solid var(--trait); background: var(--fond); color: var(--texte); padding: 0 12px; font: inherit; font-size: 16px; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.avatars button { min-height: 44px; border-radius: 10px; border: 1px solid var(--trait); background: var(--fond); font-size: 22px; cursor: pointer; }
.avatars button[aria-checked="true"] { border-color: var(--accent-2); background: var(--carte-2); box-shadow: 0 0 0 2px rgba(255, 194, 60, .25); }
.bandeau-salon { background: rgba(255, 194, 60, .1); border: 1px dashed rgba(255, 194, 60, .5); color: var(--texte-2); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; margin: 4px 0 8px; text-align: center; }
.salon-bloc { display: flex; flex-direction: column; flex: 1; }
.salon-aide { color: var(--texte-2); font-size: 14px; text-align: center; margin: 10px 0; min-height: 1.4em; }
.salon-code { display: flex; align-items: center; gap: 12px; background: var(--fond-2); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 14px; margin-top: 8px; }
.salon-code > div { flex: 1; }
.salon-code small { display: block; color: var(--texte-3); font-size: 12px; }
.salon-code b { font-size: 30px; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.salon-reglages { color: var(--texte-2); font-size: 14px; margin: 12px 2px 0; }
.salon-reglages .lien-discret { padding: 0; font-size: 14px; }
.salon-compteur { color: var(--texte-3); font-size: 13px; margin: 10px 2px 6px; }
.salon-joueurs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.salon-joueurs li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border-radius: 12px; background: var(--fond-2); }
.salon-joueurs li.moi { box-shadow: inset 0 0 0 1px var(--accent-2); }
.salon-joueurs li.parti { opacity: .5; }
.salon-joueurs .pseudo { flex: 1; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salon-joueurs .pseudo small { color: var(--texte-3); font-weight: 500; }
.salon-joueurs .lien-discret { padding: 4px 0; font-size: 13px; color: var(--texte-3); }
.avatar { font-size: 22px; width: 28px; text-align: center; flex: none; }
.etiquette { font-size: 11.5px; font-weight: 700; color: #1b0f05; background: var(--accent-2); border-radius: 999px; padding: 2px 8px; flex: none; }
.salon-compte { justify-content: center; align-items: center; }
.salon-grand { font-size: 120px; font-weight: 900; margin: 0; line-height: 1; background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }
.salon-haut { display: flex; justify-content: space-between; align-items: center; color: var(--texte-2); font-weight: 650; margin: 2px 0 2px; }
.salon-chrono { height: 8px; border-radius: 4px; background: var(--carte); overflow: hidden; margin: 12px 0 4px; }
.salon-chrono div { height: 100%; width: 100%; background: var(--degrade); transition: width .15s linear; }
.salon-etat { text-align: center; min-height: 1.4em; margin-top: 8px; }
.salon-verdict { text-align: center; font-weight: 800; font-size: 17px; min-height: 1.4em; margin: 12px 0 0; }
.salon-verdict.bon { color: var(--bon); } .salon-verdict.faux { color: var(--faux); } .salon-verdict.moyen { color: var(--moyen); }
.salon-progres { text-align: center; color: var(--texte-3); font-size: 13.5px; margin: 6px 0; min-height: 1.3em; }
#salon-resultat { gap: 12px; padding-top: 6px; }
#salon-resultat .revele-verdict { text-align: center; font-size: 22px; }
.salon-classement .gain { color: var(--bon); font-weight: 700; flex: none; }
.salon-classement .gain.nul { color: var(--texte-3); }
.salon-classement .avatar { font-size: 20px; width: 24px; }
.salon-podium-titre { text-align: center; font-size: 22px; margin: 12px 0; }

/* ---------- v0.5 : mode streamer (écran du direct) ---------- */
.liens-modale { text-align: center; margin: 6px 0 0; color: var(--texte-3); }
.liens-modale .lien-discret { font-size: 14px; }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--texte-2); margin: 10px 0; }
.case input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--accent-2); }
.salon-qr { background: #fff; border-radius: 14px; padding: 8px; width: min(260px, 70vw); margin: 14px auto 6px; }
.salon-qr svg, .salon-coin-qr svg { display: block; width: 100%; height: auto; }
.salon-rejoindre { text-align: center; color: var(--texte-2); font-size: 14px; margin: 4px 0 0; }
.salon-son { margin: 6px 2px 0; }
.salon-son .lien-discret { padding: 2px 0; font-size: 14px; }
.salon-coin { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 0 0 6px; color: var(--texte-2); }
.salon-coin-qr { width: 64px; background: #fff; border-radius: 8px; padding: 3px; }
.salon-coin b { font-size: 20px; letter-spacing: .12em; color: var(--texte); }
.choix.affiche .reponse:disabled { opacity: 1; }
/* Écran large (ordinateur, télé) : tout plus grand, QR code en coin pendant la partie. */
body.mode-ecran .app { max-width: 1100px; }
@media (min-width: 900px) {
  body.mode-ecran #ecran-salon { position: relative; }
  body.mode-ecran .salon-coin { position: absolute; top: 64px; right: 0; flex-direction: column; gap: 6px; }
  body.mode-ecran .salon-coin-qr { width: 150px; }
  body.mode-ecran #salon-manche, body.mode-ecran #salon-resultat { padding-right: 190px; }
  body.mode-ecran .question { font-size: 34px; }
  body.mode-ecran .reponse { font-size: 22px; min-height: 72px; }
  body.mode-ecran .salon-qr { width: 340px; }
  body.mode-ecran .salon-code b { font-size: 44px; }
  body.mode-ecran .classement li { font-size: 20px; min-height: 56px; }
  body.mode-ecran .salon-joueurs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  body.mode-ecran .salon-progres { font-size: 20px; }
}
@media (min-width: 900px) {
  /* Salle d'attente de l'écran : QR code à gauche, joueurs à droite (tient dans 1280 × 720) */
  body.mode-ecran #salon-attente:not([hidden]) { display: grid; grid-template-columns: 330px 1fr; column-gap: 36px; align-content: start; grid-auto-flow: row dense; }
  body.mode-ecran #salon-attente > * { grid-column: 2; }
  body.mode-ecran #salon-attente > .salon-code, body.mode-ecran #salon-attente > .pied-action { grid-column: 1 / -1; }
  body.mode-ecran #salon-attente > .salon-qr { grid-column: 1; grid-row: 2 / span 5; width: 300px; margin: 14px 0 0; align-self: start; }
  body.mode-ecran #salon-attente > .salon-rejoindre { grid-column: 1; grid-row: 7; text-align: left; }
  body.mode-ecran .salon-joueurs { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Site web (v0.6) : accueil, artistes, classements. Maquette validée par Louay le 28/10
   (« couleurs de l'appli ») : fond violet nuit, dégradé orange vers jaune, accent #FFC23C.
   Polices Inter Tight et Inter hébergées dans public/fonts (repli : police système ; aucune police
   téléchargée chez un tiers : pas de traceur).
   ========================================================================== */
:root {
  --ligne: #2c2552;
  --ligne-2: #3a3168;
  --police-site: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.site { background-image: none; font-family: var(--police-site); }
body.site .app { max-width: none; padding: 0; }
.s-entete { display: none; }
body.site .s-entete {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
  width: 100%; max-width: 1120px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 24px 20px;
}
.logo { font-family: var(--police-titre); font-weight: 800; font-size: 22px; letter-spacing: -.4px; color: var(--texte); text-decoration: none; }
.logo span { color: var(--accent-2); }
.logo.petit { font-size: 19px; }
.s-nav { display: flex; gap: 8px 24px; align-items: center; flex-wrap: wrap; font-weight: 500; font-size: 15px; }
.s-nav a { color: var(--texte-2); text-decoration: none; }
.s-nav a:hover { color: var(--texte); }
.s-nav .s-pseudo { color: var(--texte); border: 1px solid var(--ligne-2); padding: 7px 12px; border-radius: 9px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pseudo-ligne { margin: 0 0 8px; font-size: 13.5px; color: var(--texte-3); text-align: right; }

.ecran-site { width: 100%; }
.s-bloc { width: 100%; max-width: 1120px; margin: 0 auto; padding: 16px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.s-h1 { margin: 0; font-family: var(--police-titre); font-weight: 800; font-size: clamp(40px, 5.5vw, 64px); line-height: 1.04; letter-spacing: -1.5px; text-wrap: balance; }
.s-h2 { margin: 0; font-family: var(--police-titre); font-weight: 800; font-size: 28px; letter-spacing: -.5px; }
.s-h3 { margin: 0; font-family: var(--police-titre); font-weight: 800; font-size: 22px; }
.s-texte { margin: 0; font-size: 15px; line-height: 1.6; color: var(--texte-2); }
.s-petit { margin: 0; font-size: 14px; line-height: 1.55; color: var(--texte-3); }
.s-lien { align-self: flex-start; font-weight: 600; font-size: 15px; color: var(--accent-2); text-decoration: none; }
.s-lien:hover { text-decoration: underline; }
.s-carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: 18px; padding: 24px; min-width: 0; }

/* Boutons du site */
.s-btn-jouer {
  font: inherit; font-family: var(--police-titre); font-weight: 700; font-size: 18px; background: var(--degrade); color: var(--fond);
  border: 0; padding: 16px 36px; border-radius: 12px; cursor: pointer;
}
.s-btn-jouer.large { width: 100%; margin-top: 4px; }
.s-btn-ligne { font: inherit; font-weight: 600; font-size: 16px; background: transparent; color: var(--texte); border: 1px solid var(--ligne-2); padding: 16px 24px; border-radius: 12px; cursor: pointer; }
.s-btn-blanc { font: inherit; font-weight: 600; font-size: 16px; background: var(--texte); color: var(--fond); border: 0; padding: 14px; border-radius: 10px; cursor: pointer; }
.s-btn-accent { font: inherit; font-weight: 600; font-size: 15px; background: transparent; color: var(--accent-2); border: 1px solid var(--accent-2); padding: 14px 22px; border-radius: 10px; cursor: pointer; }
.s-btn-jouer:active, .s-btn-ligne:active, .s-btn-blanc:active, .s-btn-accent:active, .s-mode:active { transform: scale(.98); }
.s-btn-ligne:hover, .s-mode:hover { border-color: var(--ligne-2); }

/* Accroche */
.s-hero { flex-direction: row; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 56px; }
.s-hero-texte { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.s-accroche { margin: 0; font-size: 18px; line-height: 1.6; color: var(--texte-2); max-width: 520px; }
.s-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.s-gratuit { margin: 0; font-size: 14px; color: var(--texte-3); }
.s-jour { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.s-jour-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.s-jour-titre { font-family: var(--police-titre); font-weight: 700; font-size: 18px; }
.s-jour-num { font-size: 13px; color: var(--texte-3); }
.s-jour .carte-serie { position: static; align-self: flex-start; }
.s-paliers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; font-variant-numeric: tabular-nums; }
.s-pal { border: 1px solid var(--ligne-2); color: var(--texte-2); border-radius: 8px; padding: 10px 2px; text-align: center; font-weight: 600; font-size: 13px; animation: pal 6s infinite; }
.s-pal1 { animation-delay: 0s; } .s-pal2 { animation-delay: .9s; } .s-pal3 { animation-delay: 1.8s; } .s-pal4 { animation-delay: 2.7s; } .s-pal5 { animation-delay: 3.6s; }
@keyframes pal { 0%, 8% { border-color: var(--ligne-2); color: var(--texte-2); } 12%, 100% { border-color: var(--accent-2); color: var(--accent-2); } }
.s-ok { margin: 0; font-weight: 600; font-size: 15px; color: var(--bon); animation: ok 6s infinite; }
@keyframes ok { 0%, 70% { opacity: 0; transform: translateY(6px); } 78%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Modes */
.s-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.s-mode {
  font: inherit; text-align: left; text-decoration: none; color: var(--texte); background: var(--carte); border: 1px solid var(--ligne);
  border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 8px; cursor: pointer;
}
.s-mode-nom { font-family: var(--police-titre); font-weight: 700; font-size: 18px; }
.s-mode-texte { font-size: 14px; line-height: 1.55; color: var(--texte-2); }
.s-mode-cta { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 14px; color: var(--accent-2); }

/* Classement du jour */
.s-classements { flex-direction: row; flex-wrap: wrap; gap: 16px; }
.s-top { flex: 1 1 500px; display: flex; flex-direction: column; gap: 6px; padding: 22px; }
.s-top-haut { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.s-bascule { display: flex; gap: 4px; background: var(--fond); border: 1px solid var(--ligne); border-radius: 10px; padding: 3px; }
.s-bascule button { font-weight: 500; font-size: 13px; background: none; color: var(--texte-2); border: 0; padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.s-bascule button[aria-selected="true"] { background: var(--ligne); color: var(--texte); font-weight: 600; }
.s-lignes { list-style: none; margin: 6px 0 8px; padding: 0; }
.s-lignes li { display: flex; align-items: center; gap: 14px; padding: 11px 2px; border-top: 1px solid var(--ligne); font-variant-numeric: tabular-nums; font-size: 15px; }
.s-lignes .rang { width: 22px; color: var(--texte-3); font-weight: 600; }
.s-lignes .pseudo { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-lignes .pseudo small { color: var(--texte-3); }
.s-lignes b { font-weight: 600; }
.s-lignes li.moi .pseudo { color: var(--accent-2); }
.s-lignes li.vide { display: block; color: var(--texte-2); line-height: 1.55; }

/* Artistes */
.s-artistes-haut { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; }
.s-recherche { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--texte-3); min-width: 240px; flex: 0 1 320px; }
.s-recherche input { font: inherit; font-size: 15px; background: var(--carte); border: 1px solid var(--ligne-2); color: var(--texte); padding: 11px 14px; border-radius: 10px; width: 100%; }
.s-recherche input:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.s-grille-artistes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.s-artiste { text-decoration: none; color: var(--texte); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.s-artiste span { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-artiste { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--ligne); border: 1px solid var(--ligne); }
.photo-artiste.ratee { visibility: hidden; }
.s-artiste:hover .photo-artiste { border-color: var(--accent-2); }
.s-puces { display: flex; gap: 8px; flex-wrap: wrap; }
.s-puces button { font-size: 14px; font-weight: 500; background: var(--carte); color: var(--texte-2); border: 1px solid var(--ligne); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.s-puces button[aria-checked="true"] { background: var(--texte); color: var(--fond); border-color: var(--texte); font-weight: 600; }

/* Bandeau streamers */
.s-stream { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding: 28px; }
.s-stream-texte { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* Pages intérieures du site */
.s-page { padding-top: 0; gap: 18px; }
.s-page-etroite { max-width: 560px; }
.s-titre-page { font-size: 22px; text-align: center; flex: 1; }
.s-artiste-tete { display: flex; gap: 18px; align-items: center; }
.photo-artiste.grande { width: 132px; flex: none; border-radius: 16px; }
.s-artiste-nom { font-size: clamp(30px, 6vw, 44px); }
.s-artiste-tete > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.s-note { border-top: 1px solid var(--ligne); padding-top: 14px; }
.ecran-classement { max-width: 640px; margin: 0 auto; padding: 0 24px 40px; }

/* Pied de page (tous les écrans) */
.attribution-dedans { width: 100%; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; align-items: center; }
.attribution-deezer { display: inline-flex; align-items: center; gap: 10px; }
.attribution nav { display: flex; gap: 18px; flex-wrap: wrap; }
body.site .attribution { margin-top: 0; padding: 24px 24px max(24px, env(safe-area-inset-bottom)); font-size: 13px; border-top-color: var(--ligne); }
body.site .attribution-dedans { max-width: 1072px; margin: 0 auto; justify-content: space-between; }

/* Bouton Jouer collé en bas, sur téléphone */
.s-collant { display: none; }
@media (max-width: 700px) {
  body.site .s-entete { padding-left: 16px; padding-right: 16px; }
  .s-nav { gap: 8px 18px; font-size: 14.5px; }
  .s-bloc { padding: 12px 16px 48px; }
  .s-hero { padding-top: 24px; gap: 32px; }
  .s-hero-texte { flex-basis: 100%; }
  .s-jour { flex-basis: 100%; }
  .s-stream-texte { flex-basis: 100%; }
  .s-carte { padding: 20px; }
  .s-stream { padding: 22px; }
  .s-stream .s-btn-accent { width: 100%; }
  .s-recherche { flex-basis: 100%; min-width: 0; }
  .s-actions .s-btn-jouer, .s-actions .s-btn-ligne { flex: 1 1 140px; padding-left: 16px; padding-right: 16px; }
  .ecran-classement { padding: 0 16px 32px; }
  .photo-artiste.grande { width: 104px; }
  body[data-ecran="accueil"] .s-collant { display: block; position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 5; }
  body[data-ecran="accueil"] .s-collant .s-btn-jouer { width: 100%; padding: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
  body[data-ecran="accueil"] .attribution { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .s-pal, .s-ok { animation: none; } .s-pal1 { border-color: var(--accent-2); color: var(--accent-2); } }
#vitrine { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@media (max-width: 1000px) { #vitrine { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  #vitrine { gap: 10px; }
  #vitrine .s-artiste span { font-size: 12.5px; }
  .s-grille-artistes { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
}

/* ==========================================================================
   v0.7 « top UI » : une seule typographie, états de survol, de focus et d'appui partout, barres de
   défilement fines aux couleurs du site, squelettes, et sur ordinateur (≥ 900 px) une vraie mise en page
   de site pour chaque écran : en-tête du site, plateau de jeu centré et large, panneau des scores.
   ========================================================================== */
:root { --police: var(--police-site); --plateau: rgba(34, 28, 64, .55); --duree: .18s; }
body { font-family: var(--police); }
h1, h2, h3, .question, .fin-score, .salon-grand, .carte-jour-titre { font-family: var(--police-titre); letter-spacing: -.01em; }

/* Barres de défilement fines (plus de barre système grise) */
* { scrollbar-width: thin; scrollbar-color: var(--ligne-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ligne-2); border-radius: 10px; border: 3px solid var(--fond); }
::-webkit-scrollbar-thumb:hover { background: #4a3f80; }

/* Focus clavier visible, partout */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 10px; }
input:focus-visible { outline-offset: 0; }

/* Survol, appui, transitions */
.btn, .btn-icone, .cat, .reponse, .segments button, .puces button, .s-puces button, .onglets button, .avatars button,
.s-mode, .s-btn-jouer, .s-btn-ligne, .s-btn-blanc, .s-btn-accent, .s-rejoindre, .lien-discret, .s-artiste .photo-artiste, .s-bascule button {
  transition: background-color var(--duree), border-color var(--duree), color var(--duree), box-shadow var(--duree), transform .1s, filter var(--duree);
}
@media (hover: hover) {
  .btn-principal:hover, .s-btn-jouer:hover { filter: brightness(1.07) saturate(1.05); box-shadow: 0 10px 30px rgba(255, 106, 48, .35); }
  .btn-second:hover, .s-btn-ligne:hover { border-color: var(--ligne-2); background: var(--carte-2); }
  .s-btn-blanc:hover { background: #fff; }
  .s-btn-accent:hover { background: rgba(255, 194, 60, .1); }
  .btn-icone:hover { border-color: var(--ligne-2); background: var(--carte); }
  .cat:hover { border-color: rgba(255, 194, 60, .55); background: var(--carte-2); }
  .reponse:not(:disabled):hover { border-color: rgba(255, 194, 60, .6); background: var(--carte-2); }
  .segments button:not([aria-checked="true"]):hover, .puces button:not([aria-checked="true"]):hover, .s-puces button:not([aria-checked="true"]):hover { color: var(--texte); background: rgba(255, 255, 255, .04); }
  .s-mode:hover { border-color: var(--ligne-2); transform: translateY(-2px); background: #262048; }
  .s-artiste:hover span { color: var(--accent-2); }
  .avatars button:hover { border-color: var(--ligne-2); }
  .lien-discret:hover { color: var(--texte); }
  .s-rejoindre:hover { border-color: var(--accent-2); color: var(--accent-2); }
}
.btn:active:not(:disabled), .s-btn-ligne:active, .s-rejoindre:active, .puces button:active, .segments button:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }

/* Puces (catégories dans les fenêtres) */
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puces button {
  font: inherit; font-size: 14px; font-weight: 600; min-height: 40px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: var(--fond); color: var(--texte-2); border: 1px solid var(--trait);
}
.puces button[aria-checked="true"] { background: var(--texte); color: var(--fond); border-color: var(--texte); }
.modale .champ > span { font-size: 13px; color: var(--texte-3); font-weight: 600; }
.modale .segments { margin: 0; }

/* Fenêtres */
.modale { width: min(520px, calc(100% - 24px)); max-height: min(88vh, 860px); overflow-y: auto; padding: 22px; border-color: var(--ligne); }
.modale[open] { animation: modale .2s ease-out; }
@keyframes modale { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modale::backdrop { backdrop-filter: blur(3px); }
.modale-actions { position: sticky; bottom: -22px; background: var(--fond-2); padding: 12px 0 0; margin-top: 12px; }

/* Rejoindre un salon : grand champ du code */
.code-salon {
  display: block; width: 100%; margin: 14px 0 6px; padding: 14px 8px 14px calc(8px + .5em); border-radius: 16px;
  border: 2px solid var(--ligne-2); background: var(--fond); color: var(--texte); text-align: center;
  font: 800 44px/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .5em; font-variant-numeric: tabular-nums;
}
.code-salon::placeholder { color: var(--ligne-2); }
.code-salon:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(255, 194, 60, .15); }
.code-salon.complet { border-color: var(--bon); }
.code-erreur { min-height: 1.4em; margin: 4px 0 0; color: var(--faux) !important; font-weight: 600; font-size: 14px; text-align: center; }
.s-rejoindre {
  font: inherit; font-weight: 600; font-size: 14.5px; color: var(--texte); background: transparent; cursor: pointer;
  border: 1px solid var(--ligne-2); padding: 7px 12px; border-radius: 9px; white-space: nowrap;
}
.s-rejoindre span[aria-hidden] { color: var(--accent-2); font-weight: 800; }
.ligne-amis { margin-top: 4px; }
.ligne-amis .btn { min-height: 52px; font-size: 15px; }
.qr-grand { background: #fff; border-radius: 16px; padding: 12px; width: min(300px, 80vw); margin: 4px auto 8px; }
.qr-grand svg { display: block; width: 100%; height: auto; }
.code-sous-qr { text-align: center; font: 800 32px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .3em; color: var(--texte) !important; margin: 8px 0; }

/* Salle d'attente : le code en très grand */
.salon-code { flex-direction: column; align-items: stretch; text-align: center; gap: 6px; padding: 18px 16px 16px; border-color: var(--ligne); background: var(--fond-2); }
.salon-code small { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.salon-code b { font: 800 52px/1.05 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .18em; padding-left: .18em; color: var(--texte); }
.salon-code-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.salon-code-actions .btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 12px; font-size: 14.5px; }
.salon-code-aide { margin: 6px 0 0; font-size: 13px; color: var(--texte-3); }
body.mode-ecran .salon-code-actions, body.mode-ecran .salon-code-aide { display: none; }

/* Squelettes de chargement */
.squelette { pointer-events: none; }
.squelette i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--ligne) 0%, #382f66 50%, var(--ligne) 100%); background-size: 200% 100%; animation: squelette 1.2s ease-in-out infinite; }
.squelette i:nth-child(1) { width: 22px; flex: none; } .squelette i:nth-child(2) { flex: 1; max-width: 55%; } .squelette i:nth-child(3) { width: 48px; margin-left: auto; flex: none; }
.classement li.squelette { min-height: 48px; }
@keyframes squelette { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Panneau des scores (ordinateur) */
.salon-cote-haut { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.salon-cote-haut h3 { margin: 0; font-size: 17px; }
.salon-cote-haut small { color: var(--texte-3); font-size: 13px; }
.salon-cote .classement li { min-height: 42px; padding: 6px 10px; font-size: 14.5px; }

/* ---------- Ordinateur : chaque écran est une page du site ---------- */
@media (min-width: 900px) {
  body:not(.mode-ecran) .s-entete {
    display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
    width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 24px;
  }
  body:not(.mode-ecran) .app { max-width: none; padding: 0; }
  body:not(.site):not(.mode-ecran) { background-image: radial-gradient(90% 50% at 50% -10%, #241a4f 0%, rgba(15, 12, 29, 0) 60%); }
  body:not(.site):not(.mode-ecran) .ecran {
    flex: none; width: calc(100% - 48px); max-width: 820px; margin: 4px auto 48px; padding: 20px 40px 28px;
    background: var(--plateau); border: 1px solid var(--ligne); border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  }
  body:not(.mode-ecran) #ecran-choix { max-width: 1000px; }
  body:not(.mode-ecran) #ecran-salon { max-width: 1120px; }
  body:not(.mode-ecran) .ecran .entete-partie { min-height: 56px; margin-bottom: 8px; }
  body:not(.mode-ecran) .pied-action { position: static; background: none; padding-bottom: 0; }
  body:not(.mode-ecran) .pied-action { display: flex; flex-direction: column; align-items: center; gap: 10px; }
  body:not(.mode-ecran) .pied-action > * { width: 100%; max-width: 520px; }
  body:not(.mode-ecran) .pied-action.pied-colonne > * { margin: 0; }
  body:not(.mode-ecran) .zone-reponse { position: static; background: none; }
  body:not(.mode-ecran) #ecran-partie .choix, body:not(.mode-ecran) #salon-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  body:not(.mode-ecran) .reponse { min-height: 68px; font-size: 16.5px; }
  body:not(.mode-ecran) .question { font-size: 26px; margin: 22px 0 18px; }
  body:not(.mode-ecran) #ecran-choix .grille-cats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  body:not(.mode-ecran) #ecran-choix .cat { min-height: 92px; padding: 18px; }
  body:not(.mode-ecran) #ecran-choix .cat-nom { font-size: 17px; }
  body:not(.mode-ecran) #ecran-choix .titre-section h2 { font-size: 26px; }
  body:not(.mode-ecran) .ligne-amis { max-width: 640px; margin: 8px auto 0; }
  body:not(.mode-ecran) .fin-liste, body:not(.mode-ecran) .fin-defi { max-width: 620px; margin-left: auto; margin-right: auto; width: 100%; }
  body:not(.mode-ecran) .jour-jeu, body:not(.mode-ecran) .jour-fin { max-width: 620px; margin: 0 auto; width: 100%; }
  body:not(.mode-ecran) .attribution { padding: 24px 24px max(24px, env(safe-area-inset-bottom)); font-size: 13px; border-top-color: var(--ligne); margin-top: auto; }
  body:not(.mode-ecran) .attribution-dedans { max-width: 1072px; margin: 0 auto; justify-content: space-between; }

  /* Salon : salle d'attente sur deux colonnes, puis plateau + panneau des scores */
  body:not(.mode-ecran) .salon-grille.avec-cote { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
  body:not(.mode-ecran) .salon-cote { background: var(--fond-2); border: 1px solid var(--ligne); border-radius: 18px; padding: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  body:not(.mode-ecran) #salon-attente:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 32px; align-content: start; }
  body:not(.mode-ecran) #salon-attente > * { grid-column: 1; }
  body:not(.mode-ecran) #salon-attente > .salon-code { grid-row: 1; margin-top: 4px; }
  body:not(.mode-ecran) #salon-attente > .salon-reglages { grid-row: 2; }
  body:not(.mode-ecran) #salon-attente > .salon-aide { grid-row: 3; text-align: left; }
  body:not(.mode-ecran) #salon-attente > .pied-action { grid-row: 4; }
  body:not(.mode-ecran) #salon-attente > .pied-action .btn { max-width: none; }
  body:not(.mode-ecran) #salon-attente > .salon-compteur { grid-column: 2; grid-row: 1; align-self: start; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--texte-2); }
  body:not(.mode-ecran) #salon-attente > .salon-joueurs { grid-column: 2; grid-row: 1 / span 4; margin-top: 34px; align-self: start; }
  body:not(.mode-ecran) .salon-code b { font-size: 64px; }
  body:not(.mode-ecran) #salon-compte { min-height: 420px; }
  body:not(.mode-ecran) .salon-grand { font-size: 160px; }
  .modale { padding: 26px 28px; }
  .modale-actions { bottom: -26px; }
}
@media (max-width: 899px) { .salon-cote { display: none !important; } }
@media (max-width: 700px) {
  .s-nav a[data-ancre] { display: none; }
  .s-rejoindre { padding: 6px 10px; font-size: 14px; }
  .code-salon { font-size: 36px; letter-spacing: .4em; }
  .salon-code b { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Pages légales (v0.7) : en-tête du site et page en panneau */
.page-legale { max-width: 760px; margin: 4px auto 48px; padding: 28px 40px 36px; background: var(--plateau); border: 1px solid var(--ligne); border-radius: 24px; line-height: 1.6; }
.page-legale h1 { font-size: clamp(28px, 4vw, 38px); margin: 6px 0 8px; }
.page-legale h2 { font-size: 19px; margin-top: 30px; }
.retour-legal a { color: var(--texte-2); text-decoration: none; font-weight: 600; }
.retour-legal a:hover { color: var(--accent-2); }
@media (max-width: 700px) { .page-legale { margin: 0 12px 32px; padding: 20px 18px 28px; } }
@media (max-width: 700px) {
  body.site .s-entete { gap: 10px 16px; }
  .s-nav { display: contents; }
  .s-entete .s-rejoindre { order: 1; margin-left: auto; }
  .s-entete .s-nav a { order: 2; }
  .s-entete .s-nav a[data-ancre] { display: none; }
}
@media (max-width: 480px) {
  .salon-code-actions #btn-salon-copier { flex-basis: 100%; }
}
@media (min-width: 900px) {
  body:not(.mode-ecran) #ecran-choix .grille-cats { grid-template-columns: repeat(4, 1fr); }
  body:not(.mode-ecran) .ligne-amis { width: 100%; }
  body:not(.mode-ecran) #ecran-choix .entete .logo.petit { visibility: hidden; } /* le logo est déjà dans l'en-tête du site */
}
@media (max-width: 700px) { body.site .s-entete { justify-content: flex-start; } }
.ligne-amis .btn { margin: 0; }
/* v0.7.1 : erreurs dans la fenêtre, sous le champ */
.erreur-champ, .modale-erreur { margin: -4px 0 8px; color: var(--faux) !important; font-weight: 600; font-size: 14px; line-height: 1.4; }
.modale-erreur { margin: 10px 0 0; text-align: center; }
.modale input[aria-invalid="true"] { border-color: var(--faux); box-shadow: 0 0 0 3px rgba(255, 77, 109, .15); }
.modale .toast { position: fixed; }

/* v0.7.2 : boutons du code de salon sur une ligne au téléphone */
.salon-code-actions .btn.petit { white-space: nowrap; flex: 1 1 auto; padding: 0 12px; }
@media (max-width: 420px) { .salon-code-actions .btn.petit { font-size: 14px; padding: 0 10px; } }
