/* =========================================================
   GolfTrack — le jaune est la couleur de la saisie
   Règle unique : dès que le joueur doit renseigner quelque chose, la zone est jaune,
   les choix possibles sont blancs et le choix fait est sombre.
   Pour une nouvelle zone de saisie : l'ajouter à chaque liste :is(...) ci-dessous.
   ========================================================= */
:root { --saisie: #A8B8AC; --saisie-bord: #A8B8AC; --saisie-ombre: rgba(120, 53, 15, 0.7); --saisie-texte: #451A03; }

/* ---------- Les zones ---------- */
:is(.new-hole, .easy-panel, .shot-panel, .shot-panel.ready, .club-zone, .par-line.compact, #setup .setup-block, #scores-sheet .sheet, #shot-sheet .sheet, #hole-sheet .sheet) {
  background: var(--saisie); border: 2px solid var(--saisie-bord); border-style: solid; color: var(--slate);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.club-zone { display: flex; flex-direction: column; gap: 8px; border-radius: 4px; padding: 9px; }
.par-line.compact { border-radius: 4px; padding: 4px 6px; box-shadow: none; }
#scores-sheet .sheet, #shot-sheet .sheet, #hole-sheet .sheet { box-shadow: none; border-width: 0; }

/* La saisie attendue tout de suite : le par à choisir */
.new-hole { animation: nh-call 2.4s ease-in-out infinite; }
@keyframes nh-call { 0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3); } 50% { box-shadow: 0 0 0 9px rgba(245, 158, 11, 0.14); } }
@media (prefers-reduced-motion: reduce) { .new-hole { animation: none; } }

/* Reprendre un trou : on repart vers de la saisie */
#btn-resume-hole { background: var(--saisie); color: var(--slate); border: 2px solid var(--saisie-bord); box-shadow: 0 8px 16px -8px var(--saisie-ombre); }

/* ---------- Les textes ---------- */
:is(.new-hole, .easy-panel, .shot-panel, .club-zone, .par-line.compact, #setup .setup-block, #scores-sheet .sheet, #shot-sheet .sheet, #hole-sheet .sheet) :is(.eyebrow, .eyebrow.green, .se-label, .sp-label, .sp-shot, .sp-club.none, .muted, .small-note, .nh-hint, .nh-hint small, .par-line > span, .manual-toggle, .manual-help, .link-btn, .link-btn.left) { color: var(--saisie-texte); }
.par-line.compact > span { color: var(--saisie-texte); }
.manual-toggle { text-decoration-color: currentColor; }
.new-hole .nh-big { background: var(--slate); color: var(--saisie); }
.new-hole .nh-hint b { color: var(--slate); font-size: 17px; line-height: 22px; }

/* ---------- Les choix : blancs ---------- */
:is(.new-hole, .easy-panel, .shot-panel, .club-zone, .par-line.compact, #setup .setup-block, #scores-sheet .sheet, #shot-sheet .sheet, #hole-sheet .sheet) :is(.par-tiles button, .par-mini button, .dir-row button, .contact-row button, .club, .se-clubs button, .sr-quick button, .segmented button, .mode-card, .ep-arrow, .sp-x, .close-btn, .step, .nh-stepper button, .pl-del, .soft-pill, .btn-secondary) {
  background: #fff; color: var(--slate); border-color: #fff; opacity: 1;
}
.new-hole .par-tiles button { box-shadow: 0 8px 16px -8px var(--saisie-ombre); }
.new-hole .par-tiles button b { color: var(--slate); }
.dir-row button small { color: var(--muted); }
.dir-row button[data-dir="0"] svg { color: var(--slate); }
.btn-secondary { border-color: var(--slate) !important; }
.segmented { background: rgba(255, 255, 255, 0.45); }
:is(#setup .setup-block, .easy-panel, #scores-sheet .sheet, .manual-box) :is(.score-row, .pl-row) { background: #fff; }
.shot-panel .manual-box, #shot-sheet .manual-box { border-color: #fff; box-shadow: none; }
.manual-box.featured { border-color: #fff; box-shadow: none; }
.manual-box .eyebrow.green { color: var(--saisie-texte); }
.club.last { border: 1.5px dashed var(--slate); }
.club.last::after { color: var(--slate); }
.club.last .badge { background: var(--chip); color: var(--slate); }
/* Champs de texte */
:is(#setup .setup-block, .easy-panel, #scores-sheet .sheet, #shot-sheet .sheet) input:focus { border-color: var(--slate); }

/* ---------- Le choix fait : sombre ---------- */
:is(.new-hole, .easy-panel, .shot-panel, .club-zone, .par-line.compact, #setup .setup-block, #scores-sheet .sheet, #shot-sheet .sheet, #hole-sheet .sheet) :is(.par-mini button.on, .dir-row button.on, .club.picked, .se-clubs button.on, .sr-quick button.on, .segmented button.on, .mode-card.on) {
  background: var(--slate); color: #fff; border-color: var(--slate);
}
.par-mini button.on b, .se-clubs button.on, .sr-quick button.on, .segmented button.on { color: var(--saisie) !important; }
.dir-row button.on svg, .dir-row button[data-dir="0"].on svg { color: var(--saisie); }
.dir-row button.on small { color: #CBD5E1; }
.mode-card.on { box-shadow: none; }
.mode-card.on b { color: var(--saisie); }
.club.picked { outline-color: var(--slate); box-shadow: none; }
html:not([data-device="desktop"]) .club-grid .club.picked { background: var(--slate); }
.club.picked .name, .club.picked .badge { color: var(--saisie); }
.club.picked .badge { background: var(--slate-2); }
/* Le contact garde sa couleur de sens (rouge / orange / vert) ; l'orange est foncé pour se détacher du jaune */
:is(.shot-panel, #shot-sheet .sheet) .contact-row button.q1.on { background: var(--red); border-color: var(--red); color: #fff; }
:is(.shot-panel, #shot-sheet .sheet) .contact-row button.q2.on { background: #677169; border-color: #677169; color: #fff; }
:is(.shot-panel, #shot-sheet .sheet) .contact-row button.q3.on { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---------- Choix posés sur une carte blanche : gris clair, pour rester des boutons ---------- */
:is(.easy-panel, #scores-sheet .sheet) .score-row .sr-quick button { background: var(--chip); border-color: var(--chip); }
:is(.easy-panel, #scores-sheet .sheet) .score-row .sr-quick button.on { background: var(--slate); border-color: var(--slate); color: var(--saisie); }
#play .shot-panel .manual-box .step { background: var(--chip); border-color: var(--chip); }

/* ---------- Dernier club joué : repère pointillé et étiquette au-dessus du nom ---------- */
#play .club-zone .club.last:not(.picked) { border: 1.5px dashed var(--slate); }
html:not([data-device="desktop"]) .club-grid .club.last { padding-top: 12px; }
html:not([data-device="desktop"]) .club.last::after { top: 3px; left: 0; right: 0; text-align: center; font-size: 9px; }

/* ---------- Valider : bouton sombre ---------- */
:is(.easy-panel, .shot-panel, #scores-sheet .sheet, #shot-sheet .sheet, #hole-sheet .sheet) .btn-primary { background: var(--slate); color: #fff; box-shadow: 0 8px 16px -8px var(--saisie-ombre); }
.shot-panel .sp-save:disabled { background: rgba(255, 255, 255, 0.55); color: var(--saisie-texte); box-shadow: none; }

/* ---------- Vos coups modifiés sur place ---------- */
.hole-card.row .hc-body.editing { background: var(--saisie); border-top: 2px solid var(--saisie-bord); border-radius: 0 0 4px 4px; padding-bottom: 6px; }
.hc-body.editing .shot-title b { color: var(--slate); }
.se-done { min-height: 31px; padding: 0 12px; border-radius: 999px; background: var(--slate); color: #fff; font-family: var(--display); font-size: 13px; font-weight: 600; }
.se-saved { margin: 0; padding: 0 8px 5px; font-size: 10px; color: var(--saisie-texte); }
.hc-body.editing .shot-list { border-top: 0; display: flex; flex-direction: column; gap: 5px; padding: 0 6px; }
.hc-body.editing .shot-list li + li { border-top: 0; }
.shot-edit { background: rgba(255, 255, 255, 0.45); border-radius: 4px; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.se-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.shot-edit .sr-num { flex: none; background: var(--slate); color: #fff; }
.se-i-club { flex: 1; min-width: 0; height: 34px; padding: 0 6px; border-radius: 4px; border: 1.5px solid var(--saisie-bord); background: #fff; color: var(--ink); font-family: var(--display); font-size: 13px; font-weight: 600; }
.se-i-dist { flex: none; display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px; border-radius: 4px; border: 1.5px solid var(--saisie-bord); background: #fff; font-size: 12px; color: var(--muted); }
.se-i-dist input { width: 40px; border: 0; outline: 0; padding: 0; background: none; text-align: right; font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--ink); }
.se-i-dist input::placeholder { color: var(--muted); font-weight: 500; }
.se-i-dist:focus-within { border-color: var(--slate); }
.se-i-dist input.bad { color: #B91C1C; }
.se-i-del { flex: none; min-width: 31px; height: 34px; padding: 0 5px; border-radius: 4px; color: var(--saisie-texte); font-size: 13px; }
.se-i-del.confirm { background: #B91C1C; color: #fff; font-family: var(--display); font-size: 11px; font-weight: 600; }
.se-line.choices { align-items: flex-start; gap: 8px; }
.se-group { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.se-group.dirs { flex: 5; }
.se-group.qs { flex: 3; }
.se-group small { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--saisie-texte); }
.se-group > div { display: flex; gap: 4px; }
.se-group button { flex: 1; min-width: 0; height: 34px; border-radius: 4px; background: #fff; border: 1.5px solid var(--saisie-bord); display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; color: var(--ink); white-space: nowrap; }
.se-group button:active { transform: none; }
.se-group.qs button { font-family: var(--display); font-size: 10px; font-weight: 600; }
.se-group .dot { width: 11px; height: 11px; flex: none; }
.se-group.dirs button.on { background: var(--slate); border-color: var(--slate); color: var(--saisie); }
.se-group.qs button.on { color: #fff; }
.se-group.qs button.on .dot { background: #fff; }
.se-group.qs button.q1.on { background: #B91C1C; border-color: #B91C1C; }
.se-group.qs button.q2.on { background: #677169; border-color: #677169; }
.se-group.qs button.q3.on { background: var(--ok); border-color: var(--ok); }
