/* Layout: soirée de gala — grille de portraits, chaque carte porte son écharpe régionale en diagonale */
:root {
  color-scheme: dark;
  --bg: #120f1c;
  --surface: #1c1829;
  --surface-2: #262138;
  --line: #3a3350;
  --fg: #f3eee6;
  --muted: #a69fb8;
  --gold: #e3c27a;
  --gold-deep: #b8913f;
  --sash: #f6f1e7;
  --sash-ink: #2a1f3d;
  --rose: #ef8fa6;
  --danger: #ff8f8f;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
img { max-width: 100%; }
html, body { background: var(--bg); color: var(--fg); }
body { font-family: var(--body); font-size: 15px; line-height: 1.5; padding-inline: 16px; padding-block: 0 48px; }
.wrap { max-width: 1180px; margin: 0 auto; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, .photo:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

header.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-block: 28px 20px; border-bottom: 1px solid var(--line); }
.brand .eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.brand h1 { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 6vw, 54px); line-height: 1; margin: 6px 0 0; text-wrap: balance; }
.brand h1 em { color: var(--gold); font-style: italic; }
.me { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.me .who { font-weight: 600; color: var(--gold); }
.linkbtn { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 0; font-size: 13px; }

.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; }
.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs button { background: none; border: none; padding: 7px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs button[aria-selected="true"] { background: var(--gold); color: var(--sash-ink); }
.progress { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress b { color: var(--fg); }

.notice { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--rose); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-block: 0 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card.rated { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.photo { position: relative; aspect-ratio: 3 / 4; max-width: 100%; background: linear-gradient(160deg, var(--surface-2), var(--bg)); border: none; padding: 0; display: block; width: 100%; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.photo:hover img { transform: scale(1.04); }
.photo .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 54px; color: var(--line); }
/* Écharpe régionale : bandeau sous la photo, pour ne rien cacher du portrait */
.sash { background: var(--sash); color: var(--sash-ink); text-align: center; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: .02em; padding: 5px 10px 6px; border-block: 2px solid var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sash small { display: block; font-family: var(--body); font-style: normal; font-weight: 600; font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); }
.avgpill { position: absolute; top: 8px; right: 8px; background: rgba(18,15,28,.82); color: var(--gold); border-radius: 999px; padding: 3px 9px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.avgpill span { color: var(--muted); font-weight: 500; font-size: 11px; }
.cbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.cname { font-weight: 600; font-size: 14px; min-height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cname.empty { color: var(--muted); font-weight: 400; font-style: italic; }

.scores { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.scores button { background: var(--surface-2); border: 1px solid transparent; border-radius: 7px; padding: 4px 0; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.scores button:hover { border-color: var(--gold-deep); color: var(--fg); }
.scores button.on { background: var(--gold); color: var(--sash-ink); }
.scores button:disabled { cursor: not-allowed; opacity: .5; }
.scores.big { grid-template-columns: repeat(10, 1fr); }
.scores.big button { padding: 8px 0; font-size: 15px; }

/* Classement */
.rank { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 44px 52px minmax(0,1fr) auto; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 8px 8px; text-align: left; width: 100%; }
.row:hover { border-color: var(--gold-deep); }
.row .pos { font-family: var(--display); font-size: 26px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.row.top1 .pos, .row.top2 .pos, .row.top3 .pos { color: var(--gold); }
.row .thumb { width: 52px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .rinfo { min-width: 0; }
.row .rreg { font-family: var(--display); font-style: italic; font-size: 17px; }
.row .rname { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .ravg { text-align: right; font-variant-numeric: tabular-nums; }
.row .ravg b { font-size: 20px; color: var(--gold); }
.row .ravg div { font-size: 12px; color: var(--muted); }
.row .ravg .none { font-size: 13px; color: var(--muted); }

/* Fiche */
.backdrop { position: fixed; inset: 0; background: rgba(8,6,14,.72); display: grid; place-items: center; padding: 16px; z-index: 10; overflow-y: auto; }
/* Fiche en grand : toute la hauteur de l'écran, photo 3:4 entière à gauche, infos à droite */
.sheet { --sheet-h: calc(100dvh - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; width: min(1280px, 100%); height: var(--sheet-h); display: grid; grid-template-columns: minmax(0, calc(var(--sheet-h) * 3 / 4)) minmax(360px, 1fr); overflow: hidden; }
.sheet .sphoto { position: relative; background: var(--bg); min-height: 0; }
.sheet .sphoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sheet .sphoto .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 120px; color: var(--line); }
.sheet .sinfo { padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; min-width: 0; }
.sheet .shead h2 { font-size: clamp(30px, 3.4vw, 44px); }
.sheet .shead .eyebrow { font-size: 13px; }
.sheet .bigavg b { font-size: 60px; }
.sheet .votes li { font-size: 15px; grid-template-columns: minmax(0, 1fr) minmax(90px, 200px) 28px; }
.shead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.shead h2 { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 30px; line-height: 1.1; margin: 2px 0 0; }
.shead .eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.close { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 34px; flex: none; font-size: 18px; line-height: 1; }
.namefield { display: flex; gap: 8px; }
.namefield input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 8px; padding: 8px 10px; font: inherit; }
.btn { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--gold-deep); }
.btn.gold { background: var(--gold); color: var(--sash-ink); border-color: var(--gold); }
.sec-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.bigavg { display: flex; align-items: baseline; gap: 10px; }
.bigavg b { font-family: var(--display); font-size: 44px; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.bigavg span { color: var(--muted); font-size: 14px; }
.votes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.votes li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 28px; align-items: center; gap: 10px; font-size: 14px; }
.votes .vn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.votes .vn.mine { color: var(--gold); font-weight: 600; }
.votes .track { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.votes .fill { height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: 3px; }
.votes .vs { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty-votes { color: var(--muted); font-size: 14px; font-style: italic; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hint { font-size: 12px; color: var(--muted); }

.loginbox { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; width: min(380px, 100%); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.loginbox .shead { margin-bottom: 8px; }
.loginbox label { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.loginbox input { background: var(--bg); border: 1px solid var(--line); color: var(--fg); border-radius: 8px; padding: 10px 12px; font: inherit; }
.loginbox .btn.gold { margin-top: 10px; padding: 11px; font-size: 15px; }
.lg-error { color: var(--danger); font-size: 14px; margin-top: 4px; }
.lg-switch { font-size: 13px; color: var(--muted); text-align: center; margin-top: 4px; }
/* Galerie de la fiche */
.gallery { touch-action: pan-y; user-select: none; }
.gallery img { -webkit-user-drag: none; }
.gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; border: none; background: rgba(18,15,28,.6); color: var(--fg); font-size: 28px; line-height: 1; display: grid; place-items: center; padding: 0 0 4px; z-index: 1; }
.gnav:hover { background: rgba(18,15,28,.85); color: var(--gold); }
.gnav.prev { left: 10px; }
.gnav.next { right: 10px; }
.gcount { position: absolute; top: 10px; right: 10px; background: rgba(18,15,28,.75); color: var(--fg); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gdots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding-inline: 12px; }
.gdots button { width: 8px; height: 8px; border-radius: 999px; border: none; padding: 0; background: rgba(243,238,230,.45); }
.gdots button.on { background: var(--gold); width: 20px; }
.gallery-badge { position: absolute; top: 8px; left: 8px; background: rgba(18,15,28,.82); color: var(--fg); border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* En-tête : soirée affichée + utilisateur */
.me { flex-direction: column; align-items: flex-end; gap: 8px; }
.me-group, .me-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.gname { font-family: var(--display); font-style: italic; font-size: 18px; }
.gcode { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; letter-spacing: .14em; color: var(--gold); border: 1px dashed var(--gold-deep); border-radius: 6px; padding: 2px 7px; }
.btn.small { padding: 4px 10px; font-size: 13px; }
@media (max-width: 640px) { .me { align-items: flex-start; } .me-group, .me-user { justify-content: flex-start; } }

/* Choix de la soirée */
.loginbox.gp { width: min(440px, 100%); }
.gp-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.gp-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.gp-item:hover { border-color: var(--gold-deep); }
.gp-item.on { border-color: var(--gold); }
.gp-item b { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-item span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.gp-entry { display: flex; gap: 6px; align-items: stretch; }
.gp-entry .gp-item { flex: 1; min-width: 0; }
.gp-delete { background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 600; padding: 0 10px; }
.gp-delete:hover { border-color: var(--danger); color: var(--danger); }
.gp-confirm { flex: 1; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--danger) 10%, var(--surface-2)); border: 1px solid var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.gp-row { display: flex; gap: 8px; }
.gp-row input { flex: 1; min-width: 0; }
.gp-row .btn { margin-top: 0 !important; padding: 10px 14px !important; }
.code-input { text-transform: uppercase; letter-spacing: .18em; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* Statut dans l'élection */
.status { font-family: var(--body); font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.status.in { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); border: 1px solid var(--gold-deep); }
.status.out { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.status.winner { background: var(--gold); color: var(--sash-ink); }
.status.on-photo { position: absolute; left: 8px; bottom: 8px; backdrop-filter: blur(4px); }
.status.on-photo.in { background: rgba(18,15,28,.78); }
.status.on-photo.out { background: rgba(18,15,28,.85); color: var(--fg); }
.status.inline { display: inline-block; vertical-align: middle; margin-left: 8px; font-size: 10px; padding: 2px 7px; }
.status.inline.big { display: table; margin: 10px 0 0; font-size: 12px; padding: 4px 11px; }
.card.out .photo img { filter: grayscale(1) brightness(.6); }
.card.out .sash { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.card.out .sash small { color: var(--muted); }
.card.out .cname { color: var(--muted); }
.card.winner { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 10px 40px color-mix(in srgb, var(--gold) 35%, transparent); }
.row.out { opacity: .55; }
.row.out .thumb img { filter: grayscale(1); }
.row.winner { border-color: var(--gold); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.chip span { font-variant-numeric: tabular-nums; color: var(--fg); opacity: .7; }
.chip.on { border-color: var(--gold); color: var(--gold); }
.chip.on span { color: var(--gold); opacity: 1; }

/* Onglet Tours (organisateur) */
.rounds { display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.panel h2 { font-family: var(--display); font-weight: 500; font-style: italic; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; margin: 2px 0 4px; text-wrap: balance; }
.panel p { margin: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.counter { font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter b { font-family: var(--display); font-size: 44px; color: var(--fg); }
.counter.ok b { color: var(--gold); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.pick { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; background: var(--surface-2); border: 2px solid transparent; border-radius: 10px; padding: 6px; }
.pick:hover { border-color: var(--gold-deep); }
.pick.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--surface-2)); }
.pthumb { width: 44px; height: 58px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { min-width: 0; display: flex; flex-direction: column; }
.pinfo b, .pinfo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinfo b { font-size: 14px; }
.pinfo span { font-size: 12px; color: var(--muted); }
.pick.on .pinfo b { color: var(--gold); }
.panel-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger { background: var(--danger); color: var(--sash-ink); border-color: var(--danger); }
.history { display: flex; flex-direction: column; gap: 2px; padding-block: 8px; border-top: 1px solid var(--line); }

/* Lien Instagram dans la fiche */
.ig-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 6px; }
.ig-link:hover { border-color: var(--rose); color: var(--rose); }
.ig-icon { width: 22px; height: 22px; border-radius: 7px; flex: none; position: relative; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ig-icon::before { content: ""; position: absolute; inset: 5px; border: 2px solid #fff; border-radius: 50%; }
.ig-icon::after { content: ""; position: absolute; top: 3px; right: 3px; width: 3px; height: 3px; border-radius: 50%; background: #fff; }
label.sec-label { display: block; }

/* Pronostics */
.pick { position: relative; }
.pick.hit { border-color: var(--gold); }
.pick.miss { opacity: .5; }
.pick.miss .pthumb img { filter: grayscale(1); }
.pplace { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--gold); color: var(--sash-ink); font-family: var(--display); font-weight: 700; font-size: 16px; }
.pick:has(.pplace) .pinfo { padding-right: 34px; }
.aplace { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.pmark { position: absolute; top: 6px; right: 8px; font-size: 12px; font-weight: 700; color: var(--sash-ink); background: var(--gold); border-radius: 999px; padding: 1px 7px; }
.counter .save-state { font-size: 12px; text-align: right; min-height: 18px; }
.others { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip.mini { padding: 3px 10px; font-size: 12px; }
.table-wrap { overflow-x: auto; }
.scores-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.scores-table th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.scores-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.scores-table .num { text-align: right; }
.scores-table .total { font-weight: 700; color: var(--gold); }
.scores-table tr.lead td:first-child { color: var(--gold); font-family: var(--display); font-size: 18px; }
.scores-table tr.is-me td { background: color-mix(in srgb, var(--gold) 8%, transparent); }
.scores-table tr.is-me td:nth-child(2) { color: var(--gold); font-weight: 600; }
details.past { gap: 12px; }
details.past summary { cursor: pointer; font-size: 15px; }
details.past summary b { font-family: var(--display); font-style: italic; font-size: 20px; font-weight: 500; }
.others-picks { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.others-picks p { margin: 0; }
.others-picks .ok { color: var(--gold); font-weight: 600; }
.apred { margin: 0; font-size: 16px; }
.apred b { color: var(--gold); }

/* Annonce d'un tour, affichée chez tout le monde */
.announce { z-index: 16; }
.announce-card { background: var(--surface); border: 1px solid var(--gold-deep); border-radius: 20px; width: min(900px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .35s ease-out; }
.announce-card p { margin: 0; }
.atitle { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 0; text-wrap: balance; }
.atitle em { color: var(--gold); font-style: italic; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.atile { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.atile b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atile span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.athumb { aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--bg); margin-bottom: 4px; }
.athumb img { width: 100%; height: 100%; object-fit: cover; }
.atile.out .athumb img { filter: grayscale(1) brightness(.7); }
.awinner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.awinner img { width: min(320px, 70vw); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 3px var(--gold), 0 0 60px color-mix(in srgb, var(--gold) 45%, transparent); }
.awinner b { font-family: var(--display); font-style: italic; font-size: 26px; }
.announce-card.crowned { text-align: center; }
.announce-card.crowned .agrid { text-align: left; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .announce-card { animation: none; } }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 20; }

@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .backdrop { padding: 8px; place-items: start center; }
  .sheet { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .sheet .sphoto { aspect-ratio: 3 / 4; max-height: 75vh; border-radius: 18px 18px 0 0; overflow: hidden; }
  .sheet .sinfo { overflow: visible; padding: 20px 18px; }
  .sheet .bigavg b { font-size: 48px; }
  .scores.big { grid-template-columns: repeat(5, 1fr); }
  .row { grid-template-columns: 30px 44px minmax(0,1fr) auto; gap: 10px; }
  .row .thumb { width: 44px; height: 54px; }
  .votes li, .sheet .votes li { grid-template-columns: minmax(0, 1fr) 70px 26px; }
}
@media (prefers-reduced-motion: reduce) { .photo img { transition: none; } }

/* Écran de connexion (plein écran tant qu'on n'est pas connecté) */
.gate { min-height: 100vh; display: grid; place-items: center; padding-block: 32px; }
.gate .loginbox { box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.gate-title { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 7vw, 44px); line-height: 1.05; margin: 4px 0 6px; text-wrap: balance; }
.gate-title em { color: var(--gold); font-style: italic; }
.gate .eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.badge { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--gold-deep); color: var(--gold); border-radius: 999px; padding: 2px 8px; }
