/* Pelland — carte de pointage lisible en plein soleil, une main, gros boutons.
   Mise en page : barre du haut, contenu défilant, dock vocal fixé en bas. */
:root {
  --bg: #eef2ee;
  --surface: #ffffff;
  --ink: #12201a;
  --muted: #5b6b62;
  --line: #d3ddd6;
  --green: #1d6a45;
  --green-ink: #ffffff;
  --flag: #e3a90c;
  --flag-ink: #1d1600;
  --red: #b3372b;
  --birdie: #1d6a45;
  --bogey: #8a5a12;
  --bar: #14231b;
  --bar-ink: #f1f5f2;
  --shade: rgba(10, 20, 15, .45);
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 10px;
  --team0: #c62828;
  --team1: #1f5fbf;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1511; --surface: #16211b; --ink: #e8efea; --muted: #97a89e; --line: #2a3a31;
    --green: #3fa772; --green-ink: #06140c; --flag: #f0bb2a; --flag-ink: #1d1600; --red: #ec6a5c;
    --birdie: #5cc48e; --bogey: #e0a85a; --bar: #0a110d; --bar-ink: #e8efea; --shade: rgba(0,0,0,.6); --team0: #ff6b5e; --team1: #6aa4ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1511; --surface: #16211b; --ink: #e8efea; --muted: #97a89e; --line: #2a3a31;
  --green: #3fa772; --green-ink: #06140c; --flag: #f0bb2a; --flag-ink: #1d1600; --red: #ec6a5c;
  --birdie: #5cc48e; --bogey: #e0a85a; --bar: #0a110d; --bar-ink: #e8efea; --shade: rgba(0,0,0,.6); --team0: #ff6b5e; --team1: #6aa4ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font: 17px/1.45 var(--body);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}
body.no-dock { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; line-height: 1.1; margin: 0; text-wrap: balance; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* Barre du haut */
.bar {
  position: sticky; top: 0; z-index: 20; background: var(--bar); color: var(--bar-ink);
  display: flex; align-items: center; gap: 10px; min-height: 52px;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
}
.bar-back { background: none; border: 0; font-size: 34px; line-height: 1; padding: 0 8px 4px 0; color: var(--bar-ink); }
.bar-title { font-family: var(--display); font-size: 22px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-badge { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }

main { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }

/* Accueil */
.hero { padding: 8px 0 4px; }
.hero h1 { font-size: 44px; }
.hero p { margin: 4px 0 0; color: var(--muted); }
.tiles { display: grid; gap: 10px; }
.tile {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.tile strong { display: block; font-family: var(--display); font-size: 22px; }
.tile span { color: var(--muted); font-size: 15px; }
.tile .pin { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--green-ink); font-family: var(--display); font-size: 20px; flex: none; }
.tile.primary { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.tile.primary span { color: inherit; opacity: .85; }
.tile.primary .pin { background: var(--flag); color: var(--flag-ink); }
.note { font-size: 14px; color: var(--muted); }
.warn { background: color-mix(in srgb, var(--flag) 18%, var(--surface)); border: 1px solid var(--flag); border-radius: var(--r); padding: 12px 14px; font-size: 15px; }

/* Formulaires */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.card h2 { font-size: 24px; }
.step { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); font-weight: 500; }
input[type=text], input[type=number], input[type=url], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  background: var(--bg); color: var(--ink); font-size: 17px;
}
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { min-height: 52px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); text-align: left; padding: 8px 12px; }
.seg button b { display: block; font-family: var(--display); font-size: 19px; }
.seg button small { color: var(--muted); font-size: 13px; }
.seg button[aria-pressed=true] { border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--surface)); box-shadow: inset 0 0 0 1px var(--green); }
.prow { display: grid; grid-template-columns: 1fr 86px 108px; gap: 8px; align-items: end; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.prow:last-of-type { border-bottom: 0; padding-bottom: 0; }
.prow .resp { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.prow .resp input { width: 22px; height: 22px; accent-color: var(--green); }
.btn { min-height: 54px; border-radius: 10px; border: 0; background: var(--green); color: var(--green-ink); font-family: var(--display); font-size: 21px; font-weight: 700; padding: 0 20px; width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { min-height: 42px; font-size: 17px; width: auto; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

.preview { overflow-x: auto; }
.preview table { border-collapse: collapse; width: 100%; font-size: 15px; }
.preview th, .preview td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.preview td.n { text-align: right; font-family: var(--display); font-size: 18px; font-variant-numeric: tabular-nums; }

/* Partie */
.hole-card { background: var(--bar); color: var(--bar-ink); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; }
.hole-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.hole-no { font-family: var(--display); font-size: 54px; font-weight: 700; line-height: .9; }
.hole-meta { font-family: var(--display); font-size: 20px; opacity: .9; }
.hole-meta b { color: var(--flag); }
.hole-nav { margin-left: auto; display: flex; gap: 6px; }
.hole-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: transparent; color: var(--bar-ink); font-size: 22px; }
.hole-players { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hp { background: rgba(255,255,255,.07); border-radius: 8px; padding: 8px; min-width: 0; }
.hp .nm { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp .sc { font-family: var(--display); font-size: 30px; line-height: 1; }
.hp .dots { color: var(--flag); letter-spacing: 2px; font-size: 13px; min-height: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--flag); color: var(--flag-ink); }
.chip.alt { background: transparent; color: inherit; border: 1px solid currentColor; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-width: 0; }
.tot .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tot .big { font-family: var(--display); font-size: 28px; line-height: 1.05; }
.tot .sub { font-size: 13px; color: var(--muted); }
.tot.lead { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

.card-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table.sc { border-collapse: collapse; width: 100%; min-width: 360px; font-variant-numeric: tabular-nums; }
table.sc th, table.sc td { border-bottom: 1px solid var(--line); padding: 0; text-align: center; height: 44px; }
table.sc thead th { font-size: 13px; color: var(--muted); font-weight: 600; height: 34px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
table.sc .h { font-family: var(--display); font-size: 19px; font-weight: 700; width: 40px; }
table.sc .m { font-size: 14px; color: var(--muted); width: 34px; }
table.sc tr.cur { background: color-mix(in srgb, var(--flag) 16%, transparent); }
table.sc tr.sum td { font-family: var(--display); font-size: 18px; font-weight: 700; background: color-mix(in srgb, var(--green) 8%, transparent); }
.cell { width: 100%; height: 44px; border: 0; background: none; display: grid; place-items: center; position: relative; font-family: var(--display); font-size: 21px; }
.cell .d { position: absolute; top: 3px; right: 5px; color: var(--flag); font-size: 10px; letter-spacing: 1px; line-height: 1; }
.cell .nt { position: absolute; bottom: 2px; right: 5px; color: var(--muted); font-size: 11px; font-family: var(--body); }
.cell.birdie > span { color: var(--birdie); border: 2px solid var(--birdie); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.cell.bogey > span { color: var(--bogey); }
.ev { font-size: 11px; font-weight: 700; display: flex; gap: 2px; justify-content: center; flex-wrap: wrap; padding: 0 2px; }
.ev i { font-style: normal; border-radius: 4px; padding: 1px 4px; background: var(--line); }
.ev i.p { background: var(--ink); color: var(--bg); }
.ev i.s { background: var(--flag); color: var(--flag-ink); }
.ev i.t { background: var(--green); color: var(--green-ink); }
.legend { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }

/* Dock vocal */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  display: grid; gap: 8px; box-shadow: 0 -6px 20px rgba(0,0,0,.08);
}
.dock-lines { min-height: 40px; max-width: 760px; margin: 0 auto; width: 100%; }
.heard { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply { font-size: 16px; font-weight: 600; }
.dock-row { display: flex; gap: 8px; align-items: center; max-width: 760px; margin: 0 auto; width: 100%; }
.dock-row input { flex: 1; min-width: 0; }
.mic { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--green); color: var(--green-ink); display: grid; place-items: center; flex: none; }
.mic.on { background: var(--red); color: #fff; animation: pulse 1.2s infinite; }
.wake { display: flex; align-items: center; gap: 6px; height: 46px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); padding: 0 12px; font-family: var(--display); font-size: 17px; flex: none; }
.wake-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.wake[aria-pressed=true] { border-color: var(--green); }
.wake[aria-pressed=true] .wake-dot { background: var(--green); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
@media (prefers-reduced-motion: reduce) { .mic.on, .wake[aria-pressed=true] .wake-dot { animation: none; } }

/* Feuille modale */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: var(--shade); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; max-height: 88vh; overflow-y: auto; }
.sheet h3 { font-size: 24px; }
.pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pad button { height: 54px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-family: var(--display); font-size: 24px; }
.pad button.par { border-color: var(--green); }
.toggles { display: grid; gap: 8px; }
.toggles .tg { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.toggles .tg > span { width: 100%; font-size: 14px; color: var(--muted); font-weight: 600; }
.pill { min-height: 42px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); padding: 0 14px; }
.pill[aria-pressed=true] { background: var(--green); color: var(--green-ink); border-color: var(--green); }

.list { display: grid; gap: 8px; }
.item { display: grid; gap: 2px; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.item b { font-family: var(--display); font-size: 20px; }
.item span { font-size: 14px; color: var(--muted); }

.holes-edit { display: grid; grid-template-columns: 40px 1fr 1fr; gap: 6px 8px; align-items: center; }
.holes-edit .hh { font-family: var(--display); font-size: 18px; font-weight: 700; }
.holes-edit .lbl { font-size: 13px; color: var(--muted); }
.tee-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 44px; gap: 6px; align-items: end; }
.tee-row .x { height: 46px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(160px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--bar); color: var(--bar-ink); padding: 10px 16px; border-radius: 99px; font-size: 15px; max-width: calc(100% - 32px); }

@media (max-width: 420px) {
  .hole-players, .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prow { grid-template-columns: 1fr 76px 96px; }
}

/* Équipes */
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.team { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.team b { font-family: var(--display); font-size: 20px; line-height: 1.15; }
.team .note { font-size: 13px; }
.card .team { background: var(--bg); }
.tm { font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: var(--line); color: var(--ink); vertical-align: 2px; }

.team .tp { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; color: var(--green); }
.team .tp small { font-size: 14px; color: var(--muted); font-weight: 500; }
.team.lead { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.ev i.pts { background: transparent; color: var(--ink); font-family: var(--display); font-size: 14px; padding: 0 2px; }

.team .tp .money { color: var(--ink); font-weight: 600; }

/* Couleurs d'équipe : Rouges / Bleus */
.tc0 { color: var(--team0) !important; }
.tc1 { color: var(--team1) !important; }
.hole-card .tc0 { color: #ff8a80 !important; }
.hole-card .tc1 { color: #8ab8ff !important; }
.team.t0 { border-top: 4px solid var(--team0); }
.team.t1 { border-top: 4px solid var(--team1); }
.team.t0 .tn { color: var(--team0); }
.team.t1 .tn { color: var(--team1); }
.tm.t0 { background: var(--team0); color: #fff; }
.tm.t1 { background: var(--team1); color: #fff; }
.ev i.tb0 { background: var(--team0); color: #fff; }
.ev i.tb1 { background: var(--team1); color: #fff; }
.chip.team.t0 { background: var(--team0); color: #fff; }
.chip.team.t1 { background: var(--team1); color: #fff; }
.pill.team-pill.t0[aria-pressed=true] { background: var(--team0); border-color: var(--team0); color: #fff; }
.pill.team-pill.t1[aria-pressed=true] { background: var(--team1); border-color: var(--team1); color: #fff; }
.pill.team-pill.t0 { border-color: var(--team0); }
.pill.team-pill.t1 { border-color: var(--team1); }
.team.t0 b { color: var(--team0); }
.team.t1 b { color: var(--team1); }

/* Carte : colonnes Statut, Calcul, Bleu, Rouge, Total */
table.sc { min-width: 560px; }
table.sc th.h, table.sc thead th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
table.sc tr.cur th.h { background: color-mix(in srgb, var(--flag) 16%, var(--surface)); }
table.sc td.stat { min-width: 96px; padding: 2px 4px; }
table.sc td.calc { min-width: 92px; max-width: 130px; text-align: left; font-size: 12px; line-height: 1.3; color: var(--muted); padding: 4px 6px; white-space: normal; }
table.sc td.tp0, table.sc td.tp1, table.sc td.tot { font-family: var(--display); font-size: 19px; font-weight: 700; min-width: 48px; }
table.sc td.tp0 { color: var(--team0); }
table.sc td.tp1 { color: var(--team1); }
table.sc td.tot { min-width: 64px; }
.ev i { white-space: nowrap; }

/* Saisie des 4 scores */
button.hp { border: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.allscores { display: grid; gap: 10px; }
.as-row { display: grid; gap: 4px; }
.as-name { font-weight: 600; font-size: 16px; }
.as-k { color: var(--flag); letter-spacing: 1px; }
.as-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.as-n { width: 42px; height: 46px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-family: var(--display); font-size: 21px; }
.as-n.par { border-color: var(--green); }
.as-n[aria-pressed=true] { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.as-n.more { color: var(--muted); }

/* Chiffre choisi bien visible */
.as-n[aria-pressed=true] { background: var(--flag); color: var(--flag-ink); border: 3px solid var(--ink); font-weight: 700; transform: scale(1.08); }
.as-row.done .as-n:not([aria-pressed=true]):not(.more) { opacity: .45; }
.as-row.done .as-name::after { content: " ✓"; color: var(--green); }

/* Carte du trou : joueurs groupés par équipe, bouton Press / Reroll sous l'équipe */
.team-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-block { display: grid; gap: 6px; align-content: start; border-radius: 10px; padding: 6px; }
.team-block.t0 { border: 2px solid #ff8a80; background: rgba(255,138,128,.08); }
.team-block.t1 { border: 2px solid #8ab8ff; background: rgba(138,184,255,.08); }
.tb-name { font-family: var(--display); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 2px 0; }
.team-block.t0 .tb-name { color: #ff8a80; }
.team-block.t1 .tb-name { color: #8ab8ff; }
.hole-players.two { grid-template-columns: 1fr 1fr; }
.tb-btn { display: grid; place-items: center; min-height: 46px; border-radius: 10px; border: 2px solid currentColor; background: transparent; font-family: var(--display); font-size: 20px; font-weight: 700; }
.tb-btn.t0 { color: #ff8a80; }
.tb-btn.t1 { color: #8ab8ff; }
.tb-btn.on.t0 { background: var(--team0); border-color: var(--team0); color: #fff; }
.tb-btn.on.t1 { background: var(--team1); border-color: var(--team1); color: #fff; }
.tb-btn:disabled { opacity: .7; }
@media (max-width: 420px) { .hole-players.two { grid-template-columns: 1fr 1fr; gap: 4px; } .hole-players.two .hp { padding: 6px 4px; } .team-blocks { gap: 6px; } .team-block { padding: 4px; } }

.pl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-row b { flex: 1; }
.pl-row .row { flex-wrap: nowrap; flex: none; }
.pl-row.dup { border-color: var(--flag); }
.dup-flag { font-family: var(--body); font-size: 12px; font-weight: 700; background: var(--flag); color: var(--flag-ink); border-radius: 99px; padding: 2px 8px; vertical-align: 3px; }
.pl-row b { white-space: normal; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
#missingNote:empty { display: none; }
#missingNote { color: var(--red); font-weight: 600; }
.lead-line { font-family: var(--display); font-size: 20px; }
.lead-line b { font-weight: 700; }

/* Résumé des équipes : Bleus à gauche, Rouges à droite */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--r); overflow: hidden; border: 2px solid var(--bar); }
.sm-team { display: grid; grid-template-rows: 1fr auto; color: #fff; min-width: 0; }
.sm-team.t1 { background: #185e83; }
.sm-team.t0 { background: #e10600; }
.sm-players { display: grid; grid-template-columns: 1fr 1fr; }
.sm-p { padding: 10px 6px 12px; text-align: center; border-right: 1px solid rgba(0,0,0,.35); min-width: 0; display: grid; gap: 2px; align-content: start; }
.sm-n { font-weight: 600; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.sm-i { font-size: 12px; opacity: .9; }
.sm-s { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.1; margin-top: 6px; }
.sm-foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(0,0,0,.35); }
.sm-foot > div { padding: 10px 6px; text-align: center; font-size: 15px; border-right: 1px solid rgba(0,0,0,.35); }
.sm-foot b { font-family: var(--display); font-size: 24px; }
@media (max-width: 420px) { .sm-n { font-size: 13px; } .sm-s { font-size: 28px; } .sm-i { font-size: 11px; } }
.hole-players.two .hp .nm { white-space: normal; overflow-wrap: anywhere; line-height: 1.15; font-size: 13px; }
.hole-players.two .hp .sc { font-size: 26px; }
.hole-players.two .hp .dots { font-size: 11px; letter-spacing: 0; }
.hole-players.two .hp .nm { overflow-wrap: normal; word-break: keep-all; font-size: 12px; min-height: 2.4em; }
.hole-players.two .hp { align-content: start; }
button.hp { display: grid; align-content: start; }

/* Une case par joueur : nom + index, score du trou, brut/net/trous ; points et $ sous le bouton */
.hp-idx { font-weight: 400; opacity: .75; font-size: .9em; white-space: nowrap; }
.hp-tot { font-size: 11px; opacity: .85; margin-top: 4px; line-height: 1.25; }
.tb-foot { text-align: center; font-size: 15px; padding: 4px 0 2px; }
.tb-foot b { font-family: var(--display); font-size: 22px; }
.team-block.t0 .tb-foot { color: #ff8a80; }
.team-block.t1 .tb-foot { color: #8ab8ff; }
.hp-tot b { font-family: var(--display); font-size: 15px; }

/* Case du meneur */
.lead-box { display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; border: 2px solid rgba(255,255,255,.3); text-align: center; }
.lead-box.lb0 { border-color: #ff8a80; background: rgba(225,6,0,.25); }
.lead-box.lb1 { border-color: #8ab8ff; background: rgba(24,94,131,.45); }
.lb-l { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.lb-t { font-family: var(--display); font-size: 24px; font-weight: 700; }
.lead-box.lb0 .lb-t, .lead-box.lb0 .lb-p { color: #ffb3ab; }
.lead-box.lb1 .lb-t, .lead-box.lb1 .lb-p { color: #b5d3ff; }
.lb-p { font-family: var(--display); font-size: 30px; font-weight: 700; }
.lb-p small { font-size: 15px; font-weight: 500; }
.lb-c { flex-basis: 100%; font-size: 14px; opacity: .9; }
.lb-c b { font-family: var(--display); font-size: 18px; }
.hp .hp-idx { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
@media (min-width: 421px) { .hole-players.two .hp .nm { min-height: 0; } }

/* En-tête du trou : mise initiale (après la normale) et changements de meneur (avant les flèches) */
.hole-money, .hole-changes { font-family: var(--display); font-size: 18px; opacity: .95; }
.hole-money b, .hole-changes b { color: var(--flag); font-size: 22px; }
.hole-changes { margin-left: auto; text-align: right; }
.hole-changes + .hole-nav { margin-left: 0; }
@media (max-width: 420px) { .hole-money, .hole-changes { font-size: 15px; } .hole-money b, .hole-changes b { font-size: 18px; } .hole-changes { margin-left: 0; text-align: left; flex-basis: 100%; order: 3; } }

/* Vue partie : toute la largeur, en-tête sur une ligne */
body.view-game main { max-width: 1280px; }
.hole-top { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; column-gap: 14px; row-gap: 6px; }
.hole-top .hole-meta { min-width: 0; }
.hole-top .hole-changes { margin-left: 0; text-align: right; white-space: nowrap; }
.hole-top .hole-nav { margin-left: 0; }
@media (max-width: 700px) {
  .hole-top { grid-template-columns: auto 1fr auto; grid-template-areas: "no changes nav" "meta meta meta"; }
  .hole-top .hole-no { grid-area: no; } .hole-top .hole-meta { grid-area: meta; } .hole-top .hole-changes { grid-area: changes; white-space: normal; text-align: right; flex-basis: auto; order: 0; } .hole-top .hole-nav { grid-area: nav; }
  .hole-top .hole-nav button { width: 40px; height: 40px; }
}
/* Carte : remplir la largeur disponible */
table.sc { width: 100%; }
table.sc td.calc { max-width: none; }
table.sc .pc { width: 58px; min-width: 50px; max-width: 64px; }
table.sc td.stat { width: 90px; }
table.sc td.tp0, table.sc td.tp1 { width: 64px; }
.hp-tot { white-space: nowrap; }
@media (max-width: 420px) { .hp-tot { font-size: 10.5px; } .hp-tot b { font-size: 13px; } }
.hp-strk { font-size: 11px; line-height: 1.3; opacity: .85; white-space: normal; margin-bottom: 2px; }
.hp-strk b { color: var(--flag); font-weight: 700; }
.hole-players.two .hp .nm { word-break: normal; overflow-wrap: break-word; }

.game-actions { margin-top: 6px; align-items: center; }
.item.hist { display: flex; align-items: center; gap: 8px; }
.hist-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; display: grid; gap: 2px; color: inherit; font: inherit; }
.hist-open b { font-family: var(--display); font-size: 20px; }
.hist-open > span { font-size: 14px; color: var(--muted); }
.hist-st { font-weight: 700; color: var(--green); }
.item.hist.done .hist-st { color: var(--muted); }

/* Encadrés vert (mise initiale) et jaune (changements de meneur) */
.money-boxes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mbox { border: 3px solid; border-radius: 10px; padding: 8px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mbox span { font-size: 14px; opacity: .9; }
.mbox b { font-family: var(--display); font-size: 24px; }
.mbox.green { border-color: #2fb36b; } .mbox.green b { color: #5fd897; }
.mbox.yellow { border-color: #f0c419; } .mbox.yellow b { color: #f6d65a; }
@media (max-width: 420px) { .mbox { padding: 6px 8px; } .mbox span { font-size: 12px; } .mbox b { font-size: 20px; } }
.mbox { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; }

/* Feuille de saisie : tout visible, bouton Enregistrer toujours accessible */
.sheet { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0; }
.as-opts { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.as-n { width: auto; min-width: 0; height: 44px; }
.as-n[aria-pressed=true] { transform: none; }
.sheet-foot { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px; background: var(--surface); padding: 10px 0 calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); margin-top: 4px; }
.sheet-foot .btn { min-height: 50px; }
@media (min-width: 600px) { .as-row { grid-template-columns: 170px 1fr; align-items: center; } .sheet { max-width: 640px; } }
@media (max-width: 360px) { .as-n { height: 40px; font-size: 18px; } .sheet h3 { font-size: 20px; } }
/* Messages en haut, pour ne pas cacher la feuille */
.toast { bottom: auto; top: calc(64px + env(safe-area-inset-top, 0px)); }

/* Carrés Points / Argent sous chaque équipe */
.tb-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 0; }
.tbox { border: 2px solid currentColor; border-radius: 10px; padding: 6px 8px; display: grid; justify-items: center; }
.tbox span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.tbox b { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.ball { width: 1em; height: 1em; vertical-align: -0.12em; display: inline-block; filter: drop-shadow(0 0 1px rgba(0,0,0,.35)); }
.dots .ball { width: 14px; height: 14px; margin-right: 1px; }
.cell .d .ball { width: 11px; height: 11px; }
.legend .ball { width: 14px; height: 14px; }
.hp-strk .ball { width: 12px; height: 12px; }
.money-in { display: flex; align-items: center; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding-right: 12px; }
.money-in input { flex: 1 1 0; min-width: 0; width: 1px; border: 0; background: transparent; min-height: 44px; padding-right: 6px; text-align: right; font-variant-numeric: tabular-nums; outline: none; }
.money-in i { flex: none; font-style: normal; color: var(--muted); font-weight: 600; pointer-events: none; }
/* Brouillon de François : joueur | Points ; joueur | Gain */
.tb-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; align-items: stretch; }
.tb-grid .hp { min-width: 0; }
.tb-grid .tbox { border: 3px solid currentColor; border-radius: 10px; display: grid; align-content: center; justify-items: center; padding: 8px 4px; }
.team-block.t0 .tb-grid .tbox { color: #ff8a80; }
.team-block.t1 .tb-grid .tbox { color: #8ab8ff; }
.tb-grid .tbox span { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.tb-grid .tbox b { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.tb-grid .hp .nm { min-height: 0 !important; white-space: normal; }
@media (max-width: 420px) { .tb-grid { grid-template-columns: minmax(0, 1fr) 76px; gap: 6px; } .tb-grid .tbox b { font-size: 20px; } .tb-grid .tbox span { font-size: 11px; } }
/* Téléphone : une équipe par ligne pour que joueur | Points / joueur | Gain tiennent */
@media (max-width: 560px) {
  .team-blocks { grid-template-columns: 1fr; }
  .tb-grid { grid-template-columns: minmax(0, 1fr) 110px; }
  .tb-grid .tbox b { font-size: 26px; }
  .tb-grid .hp .nm { font-size: 15px; }
  .hole-players.two .hp .nm, .tb-grid .hp .nm { min-height: 0; }
}
.toast { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.ydot { color: var(--flag); font-size: 1em; line-height: 1; }
.cell .d .ydot { font-size: 10px; }
/* Carte compacte : colonnes serrées, pas d'étirement */
table.sc { width: auto; min-width: 0; }
table.sc td.calc { min-width: 120px; max-width: 220px; }
table.sc th, table.sc td { padding-left: 4px; padding-right: 4px; }
.card-scroll { width: fit-content; max-width: 100%; }
/* Nom du joueur sur toute la largeur, index et tertre en dessous */
.prow { grid-template-columns: 1fr 1fr; }
.prow > label:first-child { grid-column: 1 / -1; }
.invite-btn { background: var(--flag); color: var(--flag-ink); min-height: 48px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--green); text-decoration: underline; font: inherit; }
.pl-row .row .btn.small { padding: 0 10px; font-size: 15px; min-height: 38px; }
input[type=tel] { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--bg); color: var(--ink); font-size: 17px; }
.hole-card .game-actions { margin-top: 0; }
.hole-card .btn.ghost { color: var(--bar-ink); border-color: rgba(255,255,255,.35); }
.note.light { color: rgba(241,245,242,.75); }
label:has(> .money-in) { min-width: 0; }
.row:has(> label > .money-in) { align-items: flex-end; }
/* Carte de pointage : tout tient dans la largeur du iPhone */
table.sc tr.calc-row td { height: auto; padding: 2px 8px 6px; text-align: left; font-size: 12px; line-height: 1.35; color: var(--muted); }
table.sc tr.calc-row i { font-style: normal; font-weight: 600; font-size: 11px; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--line); margin-right: 4px; color: var(--ink); }
table.sc tr.calc-row i.p { background: var(--flag); border-color: var(--flag); color: #1b1b1b; }
table.sc tr.has-sub > * { border-bottom: 0; }
/* même carte compacte sur iPhone et sur ordinateur */
@media all {
  .card-scroll { width: 100%; max-width: 640px; overflow-x: hidden; }
  table.sc { width: 100%; min-width: 0; table-layout: fixed; }
  table.sc .col-wide { display: none; }
  table.sc th, table.sc td { padding-left: 1px; padding-right: 1px; }
  table.sc thead th { font-size: 12px; padding: 0 1px; max-width: none; }
  table.sc thead th:nth-child(1), table.sc th.h { width: 11%; }
  table.sc thead th:nth-child(2) { width: 11%; }
  table.sc thead th:nth-child(3) { width: 10%; }
  table.sc thead th.pc { width: 10.5%; }
  table.sc thead th:nth-last-child(1), table.sc thead th:nth-last-child(2) { width: 13%; }
  table.sc .pc { min-width: 0; max-width: none; }
  table.sc thead th { text-overflow: clip; }
  table.sc td.tp0, table.sc td.tp1 { min-width: 0; width: auto; font-size: 18px; }
  table.sc tr.sum td { font-size: 16px; }
  table.sc tr.sum td:first-child { font-size: 14px; }
  .cell { font-size: 20px; }
  .cell .d { right: 2px; } .cell .nt { right: 2px; }
  .cell.birdie > span { width: 28px; height: 28px; }
}
.hole-card > .invite-btn:first-child { width: 100%; margin-bottom: 12px; }
/* Téléversement de la carte de pointage */
.upload-btn { display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.card-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; }
.card-thumbs button { flex: none; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.card-thumbs img { display: block; height: 110px; width: auto; }
.card-view { overflow: auto; max-height: 75dvh; -webkit-overflow-scrolling: touch; }
.card-view img { display: block; width: 100%; height: auto; }
#cardStatus:empty { display: none; }
.coups-calc { display: grid; gap: 2px; margin: 6px 0; } .coups-calc span { display: block; }
.bottom-actions { justify-content: center; gap: 10px; }
/* Texte plus gros sous le nom des joueurs (carte du trou) */
.tb-grid .hp .hp-idx { font-size: 15px; opacity: .85; margin-top: 3px; }
.tb-grid .hp .hp-strk { font-size: 15px; line-height: 1.35; opacity: .95; }
.tb-grid .hp .hp-strk .ydot { font-size: 13px; }
.tb-grid .hp .dots { font-size: 16px; min-height: 20px; }
.tb-grid .hp .hp-tot { font-size: 14px; line-height: 1.35; white-space: normal; opacity: .95; }
.tb-grid .hp .hp-tot b { font-size: 18px; }
.tb-grid .hp .nm { font-size: 17px; font-weight: 600; }
table.sc tr.calc-row td:first-child { padding: 0; }
/* Détail d'un trou */
table.sc tr.calc-row { cursor: pointer; }
table.sc tr.calc-row td:last-child::after { content: ' ›'; color: var(--muted); font-weight: 700; }
.detail-t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.detail-t th { font-size: 13px; color: var(--muted); font-weight: 600; text-align: center; padding: 4px; }
.detail-t td { text-align: center; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 17px; }
.detail-t th:first-child, .detail-t td:first-child { text-align: left; }
.detail-t td:first-child { font-weight: 600; }
.detail-lines p { margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
/* Meneurs : entre les équipes et la carte de pointage */
.leader-box { display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); }
.leader-box.t0 { border-color: var(--team0); }
.leader-box.t1 { border-color: var(--team1); }
.leader-box > span { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.leader-box b { font-family: var(--display); font-size: 26px; font-weight: 700; }
.leader-box small { font-family: var(--display); font-size: 22px; font-weight: 700; }
.leader-box.t0 small { color: var(--team0); } .leader-box.t1 small { color: var(--team1); }
.leader-box > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.leader-box.even small { font-size: 16px; color: var(--muted); }
/* Case du joueur : le contenu occupe toute la largeur */
.tb-grid .hp { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 2px; align-content: space-between; }
.tb-grid .hp .nm { grid-column: 1 / -1; }
.tb-grid .hp .hp-idx { grid-column: 1; grid-row: 2; margin-top: 0; }
.tb-grid .hp .dots { grid-column: 2; grid-row: 2; justify-self: end; min-height: 0; }
.tb-grid .hp .hp-strk { grid-column: 1 / -1; }
.tb-grid .hp .hp-tot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tb-grid .hp .hp-n { opacity: .8; }
.money-boxes .mbox { align-items: stretch; } .money-boxes .mbox b { align-self: center; text-align: center; margin: auto 0; }
.tb-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.lb-pts { display: flex; gap: 16px; font-size: 16px; margin-top: 4px; }
.lb-pts b { font-family: var(--display); font-size: 20px; }
.lb-money { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.lb-money span { font-size: 15px; font-weight: 600; }
.lb-money b { font-family: var(--display); font-size: 28px; }
.lb-detail { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-detail i { font-style: normal; }
.sms-btn { background: #2f7cf6; color: #fff; width: 100%; max-width: 640px; }
/* Présences */
.presence h2 { display: flex; justify-content: space-between; align-items: baseline; }
.presence h2 small { font-size: 15px; color: var(--muted); font-weight: 600; }
.pres-list { display: grid; gap: 6px; }
.pres { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; font-size: 17px; }
.pres b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: var(--line); color: var(--muted); }
.pres.yes b { background: #2fb36b; color: #fff; } .pres.no b { background: var(--red); color: #fff; }
.pres small { color: var(--muted); font-size: 14px; }
.pres-btns { margin-top: 10px; gap: 8px; } .pres-btns .btn { flex: 1; }
.pres-btns .on-no { border-color: var(--red); color: var(--red); }
.toast { top: calc(72px + env(safe-area-inset-top, 0px)); bottom: auto; }
.quat-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; } .item.quat { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .item.quat span { display: block; font-size: 14px; color: var(--muted); }
/* Offres de parties */
.offre-form { display: grid; gap: 8px; } .offre-form .lbl { font-size: 14px; color: var(--muted); font-weight: 500; }
.offre-form input[type=date], .offre-form input[type=datetime-local] { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--bg); color: var(--ink); font-size: 17px; }
.offre-form .x { height: 46px; width: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.offre { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; display: grid; gap: 8px; }
.offre-h { display: grid; } .offre-h small { color: var(--muted); font-size: 14px; }
.offre-d { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.offre-d span:not(.cnt) { display: block; font-size: 14px; color: var(--muted); }
.offre-d .cnt { font-family: var(--display); font-weight: 700; font-size: 20px; min-width: 28px; text-align: center; border-radius: 99px; background: var(--line); padding: 2px 8px; }
.offre-d .cnt.ok { background: #2fb36b; color: #fff; }
.dispo { display: grid; gap: 8px; margin: 8px 0; }
.dispo-d { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 10px; text-align: left; min-height: 54px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 17px; }
.dispo-d b { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.dispo-d[aria-pressed=true] { border-color: #2fb36b; } .dispo-d[aria-pressed=true] b { background: #2fb36b; border-color: #2fb36b; color: #fff; }
.offre-acts { margin: -2px 0 6px; gap: 8px; }
.auto-groups { display: grid; gap: 8px; }
.auto-g { border: 2px solid #2fb36b; border-radius: 10px; padding: 8px 12px; display: grid; gap: 2px; }
.auto-g span { font-size: 16px; } .auto-g.wait { border-color: var(--line); color: var(--muted); }
/* Le 9 points */
.team-block.neuf { border: 2px solid rgba(255,255,255,.25); }
.team-block.neuf .hp .nm { color: #fff; }
.hp-pts { grid-column: 1 / -1; font-size: 15px; margin-top: 2px; } .hp-pts b { font-family: var(--display); font-size: 22px; color: var(--flag); }
.leader-box.neuf { border-color: var(--green, #1f6b46); }
.nf-r { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 4px 0; }
.nf-r b { font-size: 18px; } .nf-r small { font-family: var(--display); font-size: 20px; font-weight: 700; }
.nf-r em { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 20px; min-width: 70px; text-align: right; }
.nf-r em.pos { color: #1f9d55; } .nf-r em.neg { color: var(--red); }
table.sc.neuf thead th.pc { width: 15%; }
.leader-box > .nf-r { display: grid; grid-template-columns: 1fr auto 76px; gap: 10px; align-items: baseline; }
.offre-d span.grp { color: var(--ink); font-weight: 600; margin-top: 2px; }
.fixed-course { display: grid; gap: 2px; margin: 4px 0 0; } .fixed-course b { font-size: 19px; }
.fixed-course { display: grid; gap: 2px; margin: 4px 0 0; } .fixed-course b { font-size: 19px; }
.opt { font-weight: 400; color: var(--muted); font-size: 12px; }
.dispo-btns { gap: 8px; } .dispo-btns .btn { flex: 1; }
/* Choix du jeu */
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.games button { min-height: 48px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--ink); }
.games button[aria-pressed=true] { background: var(--green, #1f6b46); color: #fff; border-color: transparent; }
.wolf-tag { font-size: 12px; background: var(--flag); color: #1b1b1b; border-radius: 99px; padding: 1px 8px; vertical-align: middle; }
.pair { color: var(--flag); }
.detail-desc { font-size: 16px; line-height: 1.4; margin: 4px 0; }
.bar-badge.offline { color: #1b1b1b; background: var(--flag); padding: 2px 8px; border-radius: 99px; }
.holes-seg { grid-template-columns: 1fr 1fr 1fr; margin-bottom: 8px; } .holes-seg button { min-height: 44px; text-align: center; } .holes-seg b { font-size: 15px; }
label.check { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--ink); }
label.check input { width: 22px; height: 22px; }
.offre-h .place { color: var(--ink); font-size: 14px; }
.pl-n { color: var(--muted); font-weight: 600; margin-right: 2px; } .pl-count { margin: 0; color: var(--muted); } .pl-count b { color: var(--ink); font-size: 18px; }
.owner-tag { font-size: 12px; font-weight: 600; background: var(--flag); color: #1b1b1b; border-radius: 99px; padding: 1px 8px; vertical-align: middle; }
.role-chip { font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 99px; padding: 2px 8px; vertical-align: middle; cursor: pointer; }
.role-chip.on, .org-tag { border: 1px solid #2fb36b; color: #1f8a50; background: transparent; }
.org-tag { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 1px 8px; vertical-align: middle; }
.pl-row b { overflow: visible; } .pl-row b .owner-tag, .pl-row b .org-tag, .pl-row b .role-chip { display: inline-block; white-space: nowrap; margin-top: 4px; }
/* Les jeux */
.jeux { display: grid; gap: 10px; }
.jeu summary { cursor: pointer; list-style: none; display: grid; gap: 2px; position: relative; padding-right: 28px; }
.jeu summary::-webkit-details-marker { display: none; }
.jeu summary::after { content: '+'; position: absolute; right: 0; top: 0; font-family: var(--display); font-size: 26px; color: var(--green); }
.jeu[open] summary::after { content: '−'; }
.jeu summary b { font-family: var(--display); font-size: 22px; }
.jeu summary span { color: var(--muted); font-size: 15px; }
.jeu h3 { font-size: 15px; margin: 14px 0 4px; }
.jeu ul { margin: 0; padding-left: 20px; } .jeu li { margin: 4px 0; }
/* Petit « i » d'explication */
.info { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: inherit; opacity: .7; font: italic 700 13px/1 Georgia, serif; padding: 0; margin-left: 6px; vertical-align: middle; cursor: pointer; text-transform: none; letter-spacing: 0; }
.info:hover { opacity: 1; }
.tb-btn + .info { margin: 8px 0 0 8px; }
.info-list { margin: 0; padding-left: 20px; } .info-list li { margin: 6px 0; line-height: 1.4; }
.jeux-h { font-family: var(--display); font-size: 24px; margin: 18px 0 8px; }
.name-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.hero-edit { vertical-align: middle; margin-left: 8px; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 3px 10px; font: 600 13px var(--body, inherit); color: inherit; opacity: .75; cursor: pointer; }
.handoff-row { justify-content: space-between; align-items: center; margin: 14px 0 8px; gap: 10px; }
.handoff-row .note { margin: 0; }
.mbox .mbox-sub { align-self: center; text-align: center; font-size: 12px; opacity: .8; margin-top: -2px; }
.money-boxes.editable { cursor: pointer; }
textarea { font-family: inherit; line-height: 1.4; resize: vertical; }
.pl-head { justify-content: space-between; align-items: center; }
.pl-head .pl-count { margin: 0; }
.sel-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.sel-bar .note { margin: 0; }
.sel-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.sel-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green, #1f6b46); flex: none; }
.sel-lock { width: 22px; text-align: center; color: var(--muted, #8a948e); flex: none; }
.import-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.import-row .note { margin: 0; }
.imp-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; }
.imp-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.imp-row:last-child { border-bottom: 0; }
.imp-row input { width: 22px; height: 22px; flex: none; accent-color: #1f6b46; }
.imp-row span { display: flex; flex-direction: column; }
.imp-row small { color: var(--muted, #6b756f); font-size: 14px; }
.imp-row.warnrow small { color: #b3402b; }
.tp-more { margin: 10px 0; } .tp-more summary { cursor: pointer; font-weight: 600; color: var(--green, #1f6b46); padding: 6px 0; }
.rem-opt { width: 100%; text-align: left; } .rem-opt.on { outline: 2px solid #1f6b46; }
