:root {
  --ink: #171614;
  --paper: #f4f0e9;
  --paper-deep: #e9e1d6;
  --muted: #7d766d;
  --line: rgba(23, 22, 20, .14);
  --coral: #e56d52;
  --coral-soft: #f5c6b8;
  --mint: #b9d4bf;
  --yellow: #f1d486;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
  --serif: "Playfair Display", serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--sans); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .25; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E"); z-index: 4; }
.shell { position: relative; max-width: 1220px; margin: auto; padding: 0 44px; }
.ambient { position: absolute; pointer-events: none; border-radius: 50%; filter: blur(1px); }
.ambient-left { width: 440px; height: 440px; top: 80px; left: -250px; background: var(--coral-soft); opacity: .33; }
.ambient-right { width: 360px; height: 360px; top: 560px; right: -190px; background: #bfd8cb; opacity: .4; }
.topbar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 25px 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--coral); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.04em; }
.brand-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--coral); background: var(--coral); font-size: 18px; }
.brand-text { display: flex; flex-direction: column; }
/* Date centrée pile dans la barre (verticalement et horizontalement), quelle que soit la largeur du logo et du bouton. */
.topbar-meta { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--muted); font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; text-box: trim-both cap alphabetic; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(229,109,82,.14); }
.icon-button { border: 1px solid var(--line); width: 32px; height: 32px; border-radius: 50%; background: transparent; color: var(--ink); font-size: 18px; cursor: pointer; transition: background .2s, transform .2s; }
.icon-button:hover { background: var(--coral-soft); transform: rotate(10deg); }
.intro { position: relative; padding: 30px 0 40px; }
.title-lockup { display: flex; align-items: center; gap: clamp(22px, 5vw, 64px); margin-bottom: 30px; }
.mask { flex: 0 0 250px; width: 250px; height: 250px; max-width: 250px; margin-left: auto; display: flex; align-items: center; justify-content: center; }
.mask img { display: block; width: 100%; height: auto; }
.eyebrow, .section-kicker { color: var(--coral); font: 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 17px 0 20px; font-size: clamp(54px, 7.4vw, 92px); line-height: .91; letter-spacing: -.085em; font-weight: 800; }
h1 em { font-family: var(--serif); font-weight: 700; letter-spacing: -.07em; }
.intro-copy { max-width: 400px; margin: 0; color: #635d55; font-size: 14px; line-height: 1.7; }
.streak { display: inline-flex; align-items: center; gap: 7px; margin-top: 30px; padding: 8px 13px 8px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 11px; }
.streak-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ink); background: var(--yellow); }
.streak strong { color: var(--ink); font: 12px var(--mono); }
.game-layout { position: relative; z-index: 1; padding-bottom: 90px; }
.game-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 30px; }
h2 { margin: 8px 0 0; font-size: 25px; letter-spacing: -.055em; }
.attempt-count { color: var(--coral); font: 22px var(--mono); }
.attempt-count small { color: var(--muted); font: 10px var(--mono); }
.guess-form { padding: 22px 0 26px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.guess-form label { display: block; margin-bottom: 12px; color: #625b53; font-size: 12px; }
.input-wrap { display: flex; gap: 9px; }
.input-wrap input { min-width: 0; flex: 1; padding: 15px 17px; border: 1px solid #c8c0b5; border-radius: 2px; outline: none; color: var(--ink); background: rgba(255,255,255,.4); font: 15px var(--sans); }
.input-wrap input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(229,109,82,.14); }
.guess-button { border: 0; border-radius: 2px; color: var(--paper); background: var(--ink); font: 700 12px var(--sans); cursor: pointer; transition: background .2s, transform .2s; }
.guess-button { padding: 0 20px; }
.guess-button span { margin-left: 17px; font-size: 18px; font-weight: 400; }
.guess-button:hover { background: var(--coral); transform: translateY(-2px); }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.keyboard-key { display: inline-grid; place-items: center; width: 20px; height: 17px; border: 1px solid #bdb4a8; border-radius: 2px; font-family: var(--mono); }
.dot-separator { padding: 0 8px; color: var(--coral); }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; margin-top: 8px; }
.suggestion { padding: 5px 9px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); background: rgba(255,255,255,.3); font: 10px var(--mono); cursor: pointer; }
.suggestion:hover { border-color: var(--coral); color: var(--coral); }
.results-header { display: flex; justify-content: space-between; align-items: center; padding: 32px 0 15px; }
.legend { color: var(--muted); font: 9px var(--mono); }.legend i { display: inline-block; width: 7px; height: 7px; margin: 0 4px 0 12px; border-radius: 50%; }.legend-correct { background: #5b9e6c; }.legend-close { background: var(--yellow); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 140px; margin-top: 24px; border: 1px dashed #c9c0b4; color: var(--muted); font-size: 11px; }.soundwave { display: flex; gap: 3px; align-items: center; height: 32px; margin-bottom: 10px; }.soundwave span { display: block; width: 3px; border-radius: 5px; background: var(--coral); animation: wave 1.2s ease-in-out infinite alternate; }.soundwave span:nth-child(1), .soundwave span:nth-child(7) { height: 11px; }.soundwave span:nth-child(2), .soundwave span:nth-child(6) { height: 21px; animation-delay: .2s; }.soundwave span:nth-child(3), .soundwave span:nth-child(5) { height: 29px; animation-delay: .35s; }.soundwave span:nth-child(4) { height: 16px; animation-delay: .5s; }.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font: 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }.footer-tagline { margin: 0; }.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }.footer b { color: var(--coral); }.hidden { display: none !important; }.toast { position: fixed; z-index: 9; left: 50%; bottom: 26px; padding: 12px 18px; border-radius: 2px; color: var(--paper); background: var(--ink); font-size: 11px; opacity: 0; transform: translate(-50%, 16px); transition: .25s; pointer-events: none; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } @keyframes wave { to { transform: scaleY(.5); } }
@media (max-width: 760px) { .shell { padding: 0 20px; }.topbar-meta { position: static; transform: none; margin-top: 5px; font-size: 8.5px; letter-spacing: .08em; }.intro { padding: 30px 0 40px; }.game-layout { display: block; padding-bottom: 56px; }.stat-grid { grid-template-columns: repeat(3, 1fr); }.stat:nth-child(3) { border-right: 0; }.stat:nth-child(n+4) { border-top: 1px solid var(--line); }.footer { flex-direction: column; align-items: center; gap: 14px; padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); text-align: center; }.footer-links { justify-content: center; } }
@media (max-width: 480px) { h1 { font-size: 51px; }.input-wrap { display: block; }.guess-button { width: 100%; margin-top: 8px; padding: 13px; }.game-heading { align-items: start; }.attempt-count { font-size: 17px; }.stat { min-height: 64px; padding: 9px 7px; }.stat-value { font-size: 10px; } }

/* Dark glass surface */
:root {
  --ink: #f1eee9;
  --paper: #080909;
  --paper-deep: #111313;
  --muted: #99958f;
  --line: rgba(255, 255, 255, .14);
  --coral: #1ed760;
  --coral-soft: rgba(30, 215, 96, .15);
  --mint: rgba(30, 215, 96, .11);
  --yellow: #b9f227;
}
html { background: var(--paper); overflow-x: hidden; }
body { width: 100%; min-width: 0; overflow-x: hidden; color: var(--ink); background: #080909; }
body::before { opacity: .12; }
.shell { width: min(100%, 1220px); }
.ambient-left { background: #0c7a3b; opacity: .28; }
.ambient-right { background: #1db954; opacity: .24; }
.topbar { border-color: var(--line); }
.brand-mark { color: var(--paper); background: var(--ink); }
.brand-mark:hover {background: var(--coral); }
.icon-button {background: var(--coral); color: var(--paper); }
.icon-button:hover { background: var(--ink) }
.intro-copy, .guess-form label { color: #aaa59e; }
.title-lockup h1 { margin-bottom: 0; }
.daily-average { display: inline-flex; align-items: center; gap: 9px; margin-top: 30px; padding: 9px 13px 9px 9px; border: 1px solid var(--line); border-radius: 4px; color: #c4bfb8; background: rgba(255,255,255,.06); font-size: 11px; }
.average-icon { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #080909; background: var(--yellow); font: 17px var(--serif); }
.daily-average strong { color: var(--ink); font: 12px var(--mono); }
.daily-average small { padding-left: 8px; border-left: 1px solid var(--line); color: var(--muted); font: 9px var(--mono); }
.guess-form, .empty-state { border-color: var(--line); background: rgba(255,255,255,.055); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.guess-form { padding: 22px 24px 26px; border-top-color: rgba(30, 215, 96, .85); }
.input-wrap input { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,.08); }
.input-wrap input::placeholder { color: #77736e; }
.input-wrap input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(30, 215, 96, .18); }
.guess-button { color: #080909; background: var(--ink); }
.form-note { color: var(--muted); }
.suggestion { border-color: var(--line); color: var(--muted); background: rgba(255,255,255,.07); }
.empty-state { border-style: dashed; }
.footer { border-color: var(--line); }

.live-dot { background: var(--coral); box-shadow: 0 0 0 4px rgba(30, 215, 96, .16); }
.keyboard-key { border-color: rgba(255, 255, 255, .28); }
.empty-state { border-color: rgba(255, 255, 255, .24); }

@media (max-width: 560px) { .title-lockup { flex-wrap: wrap; gap: 0; }.mask { flex: 0 0 100%; width: 100%; max-width: none; height: 160px; }.mask .mask-original { width: 160px; }.daily-average { flex-wrap: wrap; max-width: 290px; }.daily-average small { flex-basis: 100%; padding-left: 32px; border: 0; }.guess-form { padding: 18px 16px 20px; } }

.logo { width: 64px; height: 64px; }

/* Tableau des comparaisons */
:root { --correct: rgba(30, 215, 96, .24); --correct-ink: #8ff0aa; --close: rgba(231, 199, 109, .24); --close-ink: #f1d486; --wrong: rgba(255, 107, 107, .2); --wrong-ink: #ff9b9b; }
.legend-wrong { background: #ff6b6b; }
.results-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.results-table { width: 100%; min-width: 700px; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.results-table thead th { padding: 8px 6px; color: var(--muted); font: 8px var(--mono); text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.results-table thead th:first-child { width: 124px; text-align: left; }
.results-table thead th:nth-child(4), .results-table thead th:nth-child(5) { width: 15%; }
.result-row { animation: slide-in .35s both; }
.artist-cell { display: flex; align-items: center; gap: 8px; padding: 8px 4px; text-align: left; font-weight: 400; }
.artist-cell img, .avatar-fallback { flex: 0 0 30px; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: var(--coral-soft); color: var(--coral); font-weight: 800; }
.artist-cell strong { display: block; font-size: 12px; line-height: 1.2; }
.artist-cell small { color: var(--muted); font: 9px var(--mono); }
.cell { height: 64px; padding: 5px 4px; border: 1px solid transparent; border-radius: 4px; font-size: 11px; font-weight: 700; text-align: center; vertical-align: middle; }
.cell small { color: inherit; font: 9px var(--mono); opacity: .8; }
.cell.correct { background: var(--correct); border-color: rgba(30, 215, 96, .5); color: var(--correct-ink); }
.cell.close { background: var(--close); border-color: rgba(231, 199, 109, .5); color: var(--close-ink); }
.cell.wrong { background: var(--wrong); border-color: rgba(255, 107, 107, .4); color: var(--wrong-ink); }
.cell.unknown { background: rgba(255,255,255,.06); color: var(--muted); }
.cell .arrow { margin-left: 3px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.chip { padding: 2px 5px; border-radius: 3px; font-size: 10px; font-weight: 700; line-height: 1.3; background: rgba(0,0,0,.25); }
.chip.correct { color: var(--correct-ink); box-shadow: inset 0 0 0 1px rgba(30, 215, 96, .6); }
.chip.close { color: var(--close-ink); box-shadow: inset 0 0 0 1px rgba(231, 199, 109, .6); }
.chip.wrong { color: var(--wrong-ink); }
.chip.more { color: var(--muted); cursor: help; }
.suggestion small { margin-left: 4px; opacity: .6; }
.guess-form.loading { opacity: .6; pointer-events: none; }
.reveal { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px; border: 1px solid rgba(30, 215, 96, .5); border-radius: 4px; background: rgba(30, 215, 96, .1); }
.reveal img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.reveal strong { display: block; margin-top: 4px; font-size: 20px; letter-spacing: -.04em; }
.reveal small { color: var(--muted); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
@media (max-width: 760px) {
  /* Sur mobile, chaque proposition devient une carte : nom en en-tête, puis 8 cases sur 2 lignes (pas de défilement latéral). */
  .results-table-wrap { overflow: visible; border: 0; background: none; }
  .results-table, .results-table tbody { display: block; min-width: 0; }
  .results-table thead { display: none; }
  .result-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.04); }
  .artist-cell { grid-column: 1 / -1; padding: 0 0 4px; }
  .cell { display: flex; flex-direction: column; align-items: center; justify-content: center; height: auto; min-height: 60px; padding: 5px 3px; }
  .cell::before { content: attr(data-label); margin-bottom: 4px; font: 7.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
  .chip { font-size: 9px; }
  .results-header { align-items: flex-start; gap: 10px; }
}
@media (max-width: 480px) { .input-wrap input { width: 100%; } }

/* Indices du jour : ligne discrète sous le titre */
.hints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: -12px 0 18px; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
.hint { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px 9px 12px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.03); transition: border-color .2s, background .2s; }
.hint-icon { flex: 0 0 26px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.06); font-size: 11px; }
.hint-body { flex: 1; min-width: 0; }
.hint-title { color: var(--muted); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.hint-body p { margin: 2px 0 0; color: #c4bfb8; font-size: 12px; line-height: 1.4; }
.hint-reveal { flex: 0 0 auto; padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: transparent; font: 700 10px var(--sans); cursor: pointer; transition: background .2s, color .2s; }
.hint-reveal:disabled { opacity: .45; cursor: not-allowed; }
.hint.unlocked { border-color: rgba(30, 215, 96, .45); }
.hint.unlocked .hint-icon { color: #080909; background: var(--coral); }
.hint.unlocked .hint-reveal { border-color: var(--coral); color: #080909; background: var(--coral); }
.hint.revealed .hint-icon { color: var(--coral); background: rgba(30, 215, 96, .14); }
.hint.revealed .hint-body p { color: var(--ink); }
.howto { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.howto strong { color: var(--coral); }
.howto em { color: #e7c76d; font-style: normal; }
.confetti { position: fixed; inset: 0; z-index: 20; width: 100%; height: 100%; pointer-events: none; }
@media (max-width: 900px) { .hints { grid-template-columns: 1fr; margin-top: -8px; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;} }

/* Masque qui se brise pour révéler l'artiste du jour */
.mask { position: relative; }
.mask-shards { position: absolute; pointer-events: none; }
.shard { position: absolute; background-repeat: no-repeat; transition: transform 1.3s cubic-bezier(.35, .1, .65, 1), opacity 1.3s ease-in; will-change: transform, opacity; }
.mask .mask-photo { position: absolute; top: 50%; left: 50%; width: 88%; aspect-ratio: 1; overflow: hidden; border-radius: 50%; box-shadow: 0 0 0 3px var(--coral), 0 0 40px rgba(30, 215, 96, .35); transform: translate(-50%, -50%); animation: photo-reveal 1.1s .6s both cubic-bezier(.2, .9, .3, 1.2); }
.mask .mask-photo-image { display: block; width: 100%; height: 100%; background: center / cover no-repeat; transition: filter 1.6s ease, transform 1.6s ease; }
/* Indice photo : floutée (et légèrement zoomée pour garder des bords nets) jusqu'à la victoire */
.mask .mask-photo.blurred .mask-photo-image { filter: blur(5px) saturate(.85); transform: scale(1.25); }
/* Photo floutée : ni clic, ni sélection, ni menu d'appui long (iOS) */
.mask:has(.mask-photo.blurred) { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mask .mask-photo.blurred { pointer-events: none; }
@keyframes photo-reveal { from { opacity: 0; transform: translate(-50%, -50%) scale(.55); filter: blur(6px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); } }
@media (max-width: 560px) { .mask .mask-photo { box-shadow: 0 0 0 2px var(--coral); } }

/* Les halos décoratifs ne doivent pas élargir la page sur mobile */
body { position: relative; overflow-x: clip; }

/* Bulles d'info (âge) */
.info-tip { padding: 0; border: 0; color: inherit; background: none; font: inherit; cursor: help; }
.age-tip { border-bottom: 1px dotted currentColor; }
thead .info-tip { margin-left: 3px; color: var(--muted); font-size: 10px; vertical-align: -1px; }
thead .info-tip:hover, thead .info-tip:focus-visible { color: var(--coral); }
.tooltip { position: fixed; z-index: 30; max-width: 240px; padding: 9px 11px; border: 1px solid rgba(30, 215, 96, .45); border-radius: 4px; color: var(--ink); background: #111413; box-shadow: 0 8px 24px rgba(0,0,0,.45); font: 500 11px/1.45 var(--sans); text-transform: none; letter-spacing: 0; pointer-events: none; }

/* Sur téléphone, la photo révélée prend sa propre ligne, en grand, sous le titre */
@media (max-width: 560px) {
  .title-lockup { flex-wrap: wrap; }
  .mask.revealed { flex: 0 0 100%; width: 100%; max-width: none; height: 200px; margin: 10px 0 0; }
  .mask.revealed .mask-original { width: 160px; }
  .mask.revealed .mask-photo { width: 180px; box-shadow: 0 0 0 3px var(--coral), 0 0 34px rgba(30, 215, 96, .35); }
}

/* Fenêtres (partage, compte) */
.modal { width: min(400px, calc(100% - 32px)); padding: 26px 24px 24px; border: 1px solid var(--line); border-top: 2px solid var(--coral); border-radius: 6px; color: var(--ink); background: #111413; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.modal::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] { animation: slide-in .25s both; }
.modal h2 { margin: 8px 0 16px; font-size: 26px; letter-spacing: -.05em; }
.modal-close-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.modal-close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; transition: color .2s, border-color .2s; }
.modal-close:hover { color: var(--ink); border-color: var(--ink); }
.share-preview { margin: 0 0 20px; padding: 12px 14px; border-left: 2px solid var(--coral); border-radius: 3px; color: #c4bfb8; background: rgba(255,255,255,.05); font-size: 12px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-option { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: rgba(255,255,255,.06); font: 700 13px var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.share-option i { font-size: 17px; }
.share-whatsapp { border-color: #25d366; color: #080909; background: #25d366; }
.share-whatsapp:hover { background: #1ebe5b; }
.share-copy:hover { border-color: var(--coral); color: var(--coral); }
.share-native { grid-column: 1 / -1; border-color: var(--coral); color: #080909; background: var(--coral); }
.share-native[hidden] { display: none; }
.share-native:hover { filter: brightness(1.08); }
@media (max-width: 400px) { .share-actions { grid-template-columns: 1fr; } }

/* Compte joueur : bouton, menu et fenêtres */
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.account { position: relative; }
.account-button { display: grid; place-items: center; padding: 0; font-size: 14px; }
.account-button.signed-in { font: 800 14px var(--sans); }
.account-button img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.account-button:has(img) { overflow: hidden; }
.account-menu { position: absolute; z-index: 10; top: calc(100% + 10px); right: 0; min-width: 210px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #111413; box-shadow: 0 16px 40px rgba(0,0,0,.55); animation: slide-in .18s both; }
.account-menu-head { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.account-menu-head small { color: var(--muted); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.account-menu-head strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu button, .account-menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 4px; color: var(--ink); background: transparent; font: 600 13px var(--sans); text-align: left; cursor: pointer; }
.account-menu button i, .account-menu a i { width: 16px; color: var(--coral); text-align: center; }
.account-menu button:hover, .account-menu button:focus-visible, .account-menu a:hover, .account-menu a:focus-visible { background: rgba(255,255,255,.07); outline: none; }
.account-menu .account-logout { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 4px 4px; color: var(--muted); }
.account-menu .account-logout i { color: var(--muted); }
.account-menu a { text-decoration: none; }
.account-menu [hidden] { display: none; }
.account-menu-separator { height: 1px; margin: 4px 0; background: var(--line); }
.account-menu .menu-chevron { width: auto; margin-left: auto; color: var(--muted); font-size: 10px; transition: transform .2s; }
.menu-group-toggle[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }
.menu-group { margin: 2px 0 0 14px; padding-left: 6px; border-left: 1px solid var(--line); }
.menu-group button { font-weight: 500; }

.modal-wide { width: min(560px, calc(100% - 32px)); }
.signup-prompt-text { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.signup-prompt-perks { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 13px; line-height: 1.45; }
.signup-prompt-perks li { display: flex; gap: 10px; }
.signup-prompt-perks i { flex: 0 0 16px; margin-top: 2px; color: var(--coral); text-align: center; }
.signup-prompt-actions { display: grid; gap: 8px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 18px; padding: 4px; border-radius: 5px; background: rgba(255,255,255,.06); }
.tab { padding: 9px; border: 0; border-radius: 3px; color: var(--muted); background: transparent; font: 700 12px var(--sans); cursor: pointer; transition: background .2s, color .2s; }
.tab.active { color: #080909; background: var(--coral); }
.account-form { display: flex; flex-direction: column; gap: 14px; }
.account-form label { display: flex; flex-direction: column; gap: 6px; color: #c4bfb8; font: 600 12px var(--sans); }
.account-form label small { color: var(--muted); font: 400 10px var(--mono); }
.account-form input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: rgba(255,255,255,.08); font: 14px var(--sans); outline: none; }
.account-form input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(30, 215, 96, .18); }
.form-error { min-height: 0; margin: -4px 0 0; color: #ff9b9b; font-size: 12px; }
.form-error:empty { display: none; }
.form-submit { padding: 13px; border: 0; border-radius: 3px; color: #080909; background: var(--coral); font: 700 13px var(--sans); cursor: pointer; transition: opacity .2s; }
.form-submit:disabled { opacity: .6; cursor: wait; }
.form-link { align-self: center; padding: 4px; border: 0; color: var(--muted); background: transparent; font: 600 11px var(--sans); text-decoration: underline; cursor: pointer; }
.form-link:hover { color: var(--ink); }
.form-hint { margin: 0; color: #c4bfb8; font-size: 13px; line-height: 1.5; }
.form-danger { align-self: center; padding: 4px; border: 0; color: #ff9b9b; background: transparent; font: 600 11px var(--sans); text-decoration: underline; cursor: pointer; }

.stats-since { margin: -8px 0 18px; color: var(--muted); font: 11px var(--mono); }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.stat-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.04); }
.stat-tile-label { color: var(--muted); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.stat-tile strong { font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.stat-tile strong span { color: var(--muted); font-size: 16px; }
.stat-tile small { color: var(--muted); font-size: 11px; }
.stats-subtitle { margin: 22px 0 10px; color: var(--coral); font: 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.stats-recent { margin: 0; padding: 0; list-style: none; }
.stats-recent li { display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.stats-recent li span, .stats-recent li small { color: var(--muted); font: 11px var(--mono); }
.stats-empty { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.stats-leaderboard { display: block; margin: 12px auto 0; }
.stats-empty .form-link { padding: 0; font-size: 13px; }

/* Classement mensuel et annuel */
.leaderboard-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.leaderboard-nav strong { font-size: 15px; }
.leaderboard-step { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; transition: border-color .2s, opacity .2s; }
.leaderboard-step:hover:not(:disabled) { border-color: var(--coral); }
.leaderboard-step:disabled { opacity: .3; cursor: default; }
.leaderboard { max-height: min(420px, 50vh); margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.leaderboard li { display: grid; grid-template-columns: 28px 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.leaderboard li.me { border-radius: 4px; background: var(--coral-soft); }
.leaderboard li.leaderboard-gap { display: block; padding: 2px 0; border: 0; color: var(--muted); text-align: center; }
.leaderboard-rank { color: var(--muted); font: 500 13px var(--mono); text-align: center; }
.leaderboard-avatar { display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: rgba(255,255,255,.1); font: 800 13px var(--sans); }
.leaderboard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leaderboard-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.leaderboard-name strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-name small { color: var(--muted); font: 10px var(--mono); }
.leaderboard-points { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.leaderboard-points small { color: var(--muted); font: 10px var(--mono); }
.leaderboard-rules { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.leaderboard-rules a { color: var(--ink); }
.reveal-points { display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 99px; color: #080909; background: var(--coral); font-size: 13px; letter-spacing: 0; vertical-align: middle; }
.reveal-signup { padding: 0; font-size: 11px; }

.switch-row {display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.04); cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; gap: 5px; }
.switch-row strong { font-size: 14px; }
.switch-row small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.switch { flex: 0 0 auto; position: relative; width: 42px; height: 24px; margin: 0; border-radius: 99px; background: rgba(255,255,255,.18); appearance: none; -webkit-appearance: none; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .2s; }
.switch:checked { background: var(--coral); }
.switch:checked::after { background: #080909; transform: translateX(18px); }
.switch:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
@media (max-width: 480px) { .stat-tiles { grid-template-columns: 1fr 1fr; } .stats-recent li { grid-template-columns: 1fr auto; } .stats-recent li span { grid-column: 1 / -1; } }

/* Sur téléphone, la moyenne du jour passe dans le bloc de recherche, sous « Deviner » */
.daily-average-inline { display: none; }
@media (max-width: 560px) {
  .intro .daily-average { display: none; }
  .daily-average-inline { display: flex; align-items: center; gap: 9px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
  .daily-average-inline strong { color: var(--ink); font: 12px var(--mono); }
  .daily-average-inline .average-icon { flex: 0 0 auto; }
}

/* Fin de partie : langue au chat et lien Spotify */
.give-up-button { display: block; width: 100%; margin-top: 12px; padding: 11px; border: 1px dashed rgba(255, 107, 107, .55); border-radius: 3px; color: #ff9b9b; background: rgba(255, 107, 107, .06); font: 700 12px var(--sans); cursor: pointer; transition: background .2s, border-color .2s; }
.give-up-button:hover { border-style: solid; background: rgba(255, 107, 107, .14); }
.reveal.gave-up { border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .08); }
.reveal.gave-up .section-kicker { color: #ff9b9b; }
.reveal img { flex: 0 0 56px; }
.reveal > div { flex: 1; min-width: 0; }
.reveal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 2px; }
.reveal-link { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 99px; color: #080909; background: #1ed760; font: 700 12px var(--sans); text-decoration: none; transition: background .2s; }
.reveal-link:hover { background: #3be477; }
.reveal-link i { font-size: 15px; }

/* Publicités — désactivées pour l'instant (AdSense refusé : « contenu à faible valeur informative »).
   Pour les remettre : décommenter ce bloc et réinsérer dans index.html les éléments ci-dessous.

   1) Dans <head> de chaque page (index, a-propos, comment-jouer, confidentialite, mentions-legales) :
      <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3416819354822549" crossorigin="anonymous"></script>

   2) Juste après <body> (bandeaux latéraux, affichés et chargés uniquement sur grand écran ≥ 1600px) :
      <aside class="ad ad-side ad-left" aria-label="Publicité">
        <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-3416819354822549" data-ad-slot="1598353749"></ins>
      </aside>
      <aside class="ad ad-side ad-right" aria-label="Publicité">
        <ins class="adsbygoogle" style="display:inline-block;width:160px;height:600px" data-ad-client="ca-pub-3416819354822549" data-ad-slot="9244734464"></ins>
      </aside>

   3) Dans <main class="shell">, entre la section du jeu et <section class="home-about"> :
      <aside class="ad ad-bottom" aria-label="Publicité">
        <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3416819354822549" data-ad-slot="1031377539" data-ad-format="auto" data-full-width-responsive="true"></ins>
      </aside>

   4) Avant <script src="./scripts/tracking.js"></script> :
      <script>
        // Ne demande les bandeaux latéraux que si l'écran peut les afficher
        const wideScreen = matchMedia("(min-width: 1600px)").matches;
        document.querySelectorAll(".ad ins.adsbygoogle").forEach((ad) => {
          if (ad.closest(".ad-side") && !wideScreen) return;
          (window.adsbygoogle = window.adsbygoogle || []).push({});
        });
      </script>

   Mention affichée seulement quand une annonce est réellement servie ; bloc non rempli (site pas encore
   validé, aucune annonce disponible) : masqué pour ne pas laisser de cadre vide.

.ad:has(ins[data-ad-status="unfilled"]) { display: none !important; }
.ad:has(ins[data-ad-status="filled"])::before { content: "Publicité"; display: block; margin-bottom: 6px; color: var(--muted); font: 8px var(--mono); text-transform: uppercase; letter-spacing: .1em; text-align: center; }
.ad-bottom { min-height: 90px; margin: 0 0 32px; text-align: center; }
.ad-side { display: none; position: fixed; z-index: 5; top: 50%; width: 160px; transform: translateY(-50%); }
.ad-left { right: calc(50% + 634px); }
.ad-right { left: calc(50% + 634px); }
@media (min-width: 1600px) { .ad-side { display: block; } }
@media (max-width: 760px) { .ad-bottom { min-height: 100px; } }
*/

/* Page « À propos » */
.footer a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--coral); padding-bottom: 2px; transition: color .2s; }
.footer a:hover { color: var(--coral); }
a.icon-button { display: grid; place-items: center; font-size: 14px; text-decoration: none; }
.about-intro { padding-bottom: 24px; }
.about-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.about-toc a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: #c4bfb8; background: rgba(255,255,255,.05); font: 11px var(--mono); text-decoration: none; transition: border-color .2s, color .2s; }
.about-toc a:hover { border-color: var(--coral); color: var(--coral); }
.about { max-width: 760px; padding-bottom: 56px; }
.about-section { padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.about-section h2 { margin: 10px 0 16px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.05em; }
.about-section h3 { margin: 28px 0 10px; font-size: 16px; letter-spacing: -.02em; }
.about-section p, .about-section li { color: #c4bfb8; font-size: 14px; line-height: 1.7; }
.about-section p { margin: 0 0 12px; }
.about-section strong { color: var(--ink); }
.about-section a { color: var(--coral); }
.about-note { padding: 10px 14px; border-left: 2px solid var(--coral); background: rgba(255,255,255,.04); font-size: 13px !important; }
.about-steps { margin: 0; padding-left: 20px; }
.about-steps li { margin-bottom: 8px; padding-left: 4px; }
.about-steps li::marker { color: var(--coral); font: 12px var(--mono); }
.about-list { margin: 0; padding-left: 20px; }
.about-list li::marker { color: var(--coral); }
.about-legend, .about-hints { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.about-legend li, .about-hints li { display: flex; align-items: center; gap: 12px; }
.about-legend i { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.about-legend .fa-solid { width: 14px; height: auto; border-radius: 0; color: var(--ink); text-align: center; }
.about-hint-count { display: grid; flex: none; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #080909; background: var(--yellow); font: 500 13px var(--mono); }
.about-hints { margin-bottom: 14px; }
.about-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.about-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.about-table th, .about-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.55; }
.about-table tr:last-child > * { border-bottom: 0; }
.about-table thead th { color: var(--coral); font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.about-table tbody th { width: 140px; color: var(--ink); font-weight: 700; white-space: nowrap; }
.about-table td { color: #c4bfb8; }
.about-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.about-source { padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.05); }
.about-source-name { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; }
.about-source-name i { color: var(--coral); }
.about-source p { margin: 8px 0 0; font-size: 13px; line-height: 1.6; }
.contact-form { margin-top: 18px; padding: 22px 24px 24px; border: 1px solid var(--line); border-top: 2px solid var(--coral); border-radius: 4px; background: rgba(255,255,255,.055); }
.contact-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: rgba(255,255,255,.08); font: 14px/1.6 var(--sans); outline: none; resize: vertical; }
.contact-form textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(30, 215, 96, .18); }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { margin: -4px 0 0; color: var(--coral); font-size: 13px; }
.form-success:empty { display: none; }
@media (max-width: 760px) { .about-sources { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .contact-row { grid-template-columns: 1fr; } .contact-form { padding: 18px 16px 20px; } .about-table tbody th { width: auto; white-space: normal; } }

/* Pied de page commun */
.footer { flex-wrap: wrap; gap: 14px 24px; align-items: baseline; }
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
.footer-cookies, .link-button { padding: 0; border: 0; color: inherit; background: none; font: inherit; cursor: pointer; }
.footer-cookies { padding-bottom: 2px; border-bottom: 1px solid var(--line); color: var(--muted); transition: color .2s; }
.footer-cookies:hover { color: var(--coral); }
.link-button { color: var(--coral); text-decoration: underline; }
@media (max-width: 760px) { .footer-links { justify-content: flex-start; } }

/* Accueil : le jeu en bref */
.home-about { padding: 36px 0 40px; border-top: 1px solid var(--line); }
.home-about h2 { margin: 10px 0 20px; font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -.05em; }
.home-about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.home-about h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: -.02em; }
.home-about p { margin: 0; color: #c4bfb8; font-size: 13px; line-height: 1.7; }
.home-about a { color: var(--coral); }
@media (max-width: 760px) { .home-about-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Comment jouer : FAQ */
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.04); }
.faq summary { position: relative; padding: 14px 44px 14px 16px; color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; top: 50%; right: 16px; color: var(--coral); font: 500 18px var(--mono); transform: translateY(-50%); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 16px 16px; }

/* Jours précédents : calendrier */
.calendar { max-width: 560px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.calendar-header h2 { margin: 0 !important; text-align: center; }
.calendar-arrow { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.05); cursor: pointer; transition: border-color .2s, color .2s; }
.calendar-arrow:hover:not(:disabled) { border-color: var(--coral); color: var(--coral); }
.calendar-arrow:disabled { opacity: .3; cursor: default; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar .weekday { padding-bottom: 4px; color: var(--muted); font: 10px var(--mono); text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.calendar .day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px solid transparent; border-radius: 6px; font: 500 14px var(--mono); text-decoration: none; }
.calendar .day small { font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.calendar .day.off { color: rgba(255,255,255,.18); }
.calendar a.day { border-color: var(--line); color: var(--ink) !important; background: rgba(255,255,255,.05); transition: border-color .2s, transform .2s; }
.calendar a.day:hover { border-color: var(--coral); transform: translateY(-1px); }
.calendar a.day.today { border-color: var(--coral); color: var(--coral) !important; }
.calendar a.day.started { border-color: var(--close-ink); background: var(--close); }
.calendar a.day.won { border-color: var(--correct-ink); background: var(--correct); }
.calendar a.day.gave-up { border-color: var(--wrong-ink); background: var(--wrong); }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; color: var(--muted); font: 11px var(--mono); list-style: none; }
.calendar-legend li { display: flex; align-items: center; gap: 7px; }
.calendar-legend i { width: 10px; height: 10px; border-radius: 50%; }

/* Partie rejouée */
.replay-banner { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 22px; padding: 12px 16px; border: 1px solid var(--close-ink); border-radius: 4px; color: #c4bfb8; background: var(--close); font-size: 13px; line-height: 1.6; }
.replay-banner i { margin-top: 4px; color: var(--close-ink); }
.replay-banner strong { color: var(--ink); }
.replay-banner a { color: var(--ink); }
@media (max-width: 480px) { .calendar-grid { gap: 4px; } .calendar .day { font-size: 12px; } }

/* Indices non utilisés, dévoilés une fois l'artiste trouvé */
.hint.unused { opacity: .5; filter: grayscale(1); }
.hint.unused .hint-title::after { content: " · non utilisé"; }

/* Photo de profil */
.avatar-field { display: flex; align-items: center; gap: 14px; }
.avatar-preview { display: grid; flex: none; width: 56px; height: 56px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.06); font-size: 20px; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-body { display: flex; flex-direction: column; gap: 6px; }
.avatar-label { color: #c4bfb8; font: 600 12px var(--sans); }
.avatar-label small { color: var(--muted); font-weight: 400; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-button { padding: 6px 11px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: transparent; font: 700 11px var(--sans); cursor: pointer; transition: border-color .2s; }
.avatar-button:hover { border-color: var(--coral); }
.avatar-remove { color: var(--muted); }

/* Pages d'erreur (404, 500) */
.error-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 48px; align-items: center; padding: 40px 0 72px; }
.error-intro { padding: 0; }
.error-solo { z-index: 1; max-width: 640px; padding: 70px 0 90px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.error-action { display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.05); font: 700 13px var(--sans); text-decoration: none; transition: border-color .2s, color .2s, transform .2s; }
.error-action:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-2px); }
.error-action.primary { border-color: var(--coral); color: #080909; background: var(--coral); }
.error-action.primary:hover { color: #080909; }
.soundwave-glitch { justify-content: flex-start; margin-bottom: 18px; }
.soundwave-glitch span { background: #ff6b6b; animation: wave-glitch .9s steps(4) infinite alternate; }
.soundwave-glitch span:nth-child(2n) { animation-duration: .6s; }
.soundwave-glitch span:nth-child(3n) { animation-duration: 1.3s; background: var(--coral); }
@keyframes wave-glitch { 0% { transform: scaleY(1); } 50% { transform: scaleY(.2) translateX(1px); } 100% { transform: scaleY(1.6); } }

/* Mini-jeu « Le drop parfait » */
.drop { padding: 22px 24px 20px; border: 1px solid var(--line); border-top-color: rgba(30, 215, 96, .85); border-radius: 6px; background: rgba(255,255,255,.055); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.drop-head { display: flex; align-items: center; justify-content: space-between; }
.drop h2 { margin: 6px 0 8px; }
.drop-sound { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; transition: color .2s, border-color .2s; }
.drop-sound:hover, .drop-sound[aria-pressed="true"] { border-color: var(--coral); color: var(--coral); }
.drop-rules { margin: 0 0 18px; color: #aaa59e; font-size: 12px; line-height: 1.6; }
.drop-rules strong { color: var(--coral); }
.drop-rules em { color: var(--yellow); font-style: normal; font-weight: 700; }
.player { padding: 16px; border-radius: 6px; background: #121414; box-shadow: inset 0 0 0 1px var(--line); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.player-now { position: relative; display: flex; align-items: center; gap: 14px; }
.vinyl { flex: 0 0 64px; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: repeating-radial-gradient(circle, #1a1c1c 0 2px, #0b0c0c 2px 4px); box-shadow: 0 0 0 1px rgba(255,255,255,.08); animation: vinyl-spin 1.8s linear infinite paused; }
.vinyl img { width: 30px; height: 30px; border-radius: 50%; background: var(--coral); object-fit: cover; }
.player.playing .vinyl { animation-play-state: running; }
.player-meta { min-width: 0; }
.player-meta small { color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.player-meta strong { display: block; margin: 3px 0 2px; overflow: hidden; font-size: 16px; letter-spacing: -.03em; white-space: nowrap; text-overflow: ellipsis; }
.player-meta span { color: #aaa59e; font-size: 12px; }
.player-progress { margin-top: 18px; }
.player-track { position: relative; height: 6px; border-radius: 99px; background: rgba(255,255,255,.14); cursor: pointer; }
.player-track::before { content: ""; position: absolute; inset: -12px 0; }
.player-zone { position: absolute; top: -5px; bottom: -5px; border-radius: 4px; background: rgba(30, 215, 96, .28); box-shadow: inset 0 0 0 1px rgba(30, 215, 96, .8), 0 0 14px rgba(30, 215, 96, .35); }
.player-zone::after { content: ""; position: absolute; top: 2px; bottom: 2px; left: 50%; width: 2px; background: var(--yellow); transform: translateX(-50%); opacity: .8; }
.player-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 99px; background: var(--ink); }
.player-knob { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.5); transform: translate(-50%, -50%); }
.player.playing .player-fill { background: var(--coral); }
.player.missed .player-fill, .player.missed .player-knob { background: #ff6b6b; }
.player.missed { animation: player-shake .4s; }
.player-feedback { position: absolute; top: 0; right: 0; padding: 4px 9px; border-radius: 3px; font: 700 11px var(--sans); white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .2s, transform .2s; }
.player-feedback.show { opacity: 1; transform: none; }
.player-feedback.hit { color: #080909; background: var(--coral); }
.player-feedback.perfect { color: #080909; background: var(--yellow); }
.player-feedback.miss { color: #080909; background: #ff6b6b; }
.player-times { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font: 10px var(--mono); }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 8px; color: #5f5c58; font-size: 15px; }
.player-play { display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; color: #080909; background: var(--ink); font-size: 19px; cursor: pointer; transition: transform .1s, background .2s; }
.player-play:hover { background: var(--coral); }
.player-play:active { transform: scale(.92); }
.player-play .fa-play { margin-left: 3px; }
.drop-scores { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border: 1px solid var(--line); border-radius: 4px; }
.drop-scores div { padding: 10px 12px; text-align: center; }
.drop-scores div + div { border-left: 1px solid var(--line); }
.drop-scores small { display: block; color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.drop-scores strong { display: block; margin-top: 4px; font: 500 20px var(--mono); }
.drop-hint { margin: 12px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
@keyframes vinyl-spin { to { transform: rotate(360deg); } }
@keyframes player-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (max-width: 900px) { .error-layout { grid-template-columns: 1fr; gap: 36px; padding-top: 30px; } }
@media (max-width: 480px) { .drop { padding: 18px 14px; }.player { padding: 14px 12px; }.player-controls { gap: 18px; } }
@media (prefers-reduced-motion: reduce) { .vinyl, .player.missed, .soundwave-glitch span { animation: none; } }

/* Footer collé en bas de l'écran quand la page est plus courte que la fenêtre (toutes les pages) */
.shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.shell > .footer { margin-top: auto; }
/* Les halos décoratifs ne doivent pas non plus allonger une page courte sous le footer */
body { overflow-y: clip; }

/* Appli installable et notifications (scripts/pwa.js) */
.app-install { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.04); }
.app-install strong { font-size: 14px; }
.app-install strong i { margin-right: 6px; color: var(--coral); }
.app-install p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.app-install .form-submit i { margin-right: 6px; }
.app-install [hidden] { display: none; }
.app-install .app-install-done { color: var(--ink); }
.app-install-done i { color: #3fb27f; }
.app-push-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.app-push-note:empty { display: none; }
.switch:disabled { opacity: .45; cursor: not-allowed; }

/* Historique des parties et des messages (menu du compte) */
.history-list { display: flex; flex-direction: column; gap: 10px; max-height: min(60vh, 520px); margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.history-day { padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.04); }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.history-date { font: 600 13px var(--sans); }
.history-date small { margin-left: 4px; color: var(--muted); font: 10px var(--mono); text-transform: uppercase; }
.history-badge { flex: 0 0 auto; padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: 10px var(--mono); }
.history-badge.won { border-color: var(--coral); color: var(--coral); }
.history-badge.gave-up { border-color: #c98a3a; color: #e0a458; }
.history-artist { margin: 8px 0 0; font: 700 14px var(--sans); }
.history-artist i { margin-right: 6px; color: var(--coral); }
.history-meta { margin: 2px 0 0; color: var(--muted); font: 11px var(--mono); }
.history-guesses { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; padding-left: 22px; color: #c4bfb8; font-size: 12px; }
.history-squares { margin-right: 8px; font-size: 10px; letter-spacing: 1px; }
.message-text { margin: 6px 0 0; color: #c4bfb8; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Formulaires de contact (menu ☰, scripts/contact-app.js) */
#contactDialog .contact-form { margin-top: 0; padding: 0; border: 0; background: none; }
.contact-form[hidden], .contact-form [hidden] { display: none; }
.contact-intro { margin: -6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.contact-form select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: #1b1e1d; font: 14px var(--sans); outline: none; }
.contact-form select:focus { border-color: var(--coral); }
.contact-success { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }
/* Donnée incorrecte : cases à cocher, la bonne valeur s'affiche sous chaque case cochée */
.data-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0; padding: 0; border: 0; min-width: 0; }
.data-fields legend { margin-bottom: 8px; padding: 0; color: #c4bfb8; font: 600 12px var(--sans); }
.data-fields legend small { color: var(--muted); font: 400 10px var(--mono); }
.data-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.data-field:has(.data-value:not([hidden])) { grid-column: 1 / -1; }
.account-form .data-check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font: 400 14px var(--sans); cursor: pointer; }
.account-form .data-check input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--coral); cursor: pointer; }
.data-value { display: flex; flex-direction: column; gap: 6px; padding-left: 24px; }
.data-value small { color: var(--muted); font: 400 10px var(--mono); }
.data-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.account-form .data-options .data-check { font-size: 13px; }
.data-date { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; }
/* Suggestion d'artiste : mêmes champs, affichés directement (genre, pays, situation sur une ligne) */
.suggest-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.data-wide { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.data-title { color: #c4bfb8; font: 600 12px var(--sans); }
.data-title small { color: var(--muted); font: 400 10px var(--mono); }
@media (max-width: 480px) { .data-fields, .data-options, .suggest-fields { grid-template-columns: 1fr; } }
