/* =========================================================
   Carte du parcours, éditeur de coup, gestion des trous
   ========================================================= */

.tall-cta { min-height: 50px; font-size: 15px; }

/* ---------- Nouveau trou ---------- */
.new-hole {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.nh-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.nh-hint { font-size: 12px; color: var(--muted); line-height: 15px; margin-top: 2px; }
.nh-stepper { display: flex; align-items: center; gap: 4px; background: var(--chip); border-radius: 4px; padding: 4px; flex: none; }
.nh-stepper button {
  width: 40px; height: 40px; border-radius: 4px;
  background: var(--card); border: 1.5px solid var(--line);
  font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1;
}
.nh-stepper span { min-width: 40px; text-align: center; font-family: var(--display); font-size: 20px; font-weight: 600; }

/* ---------- Cartes de trou ---------- */
.hole-cards { display: flex; flex-direction: column; gap: 9px; }
.hole-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hole-card.live { border: 2px solid var(--green); box-shadow: 0 0 0 4px rgba(127, 127, 127, 0.12); }
.hc-head { display: flex; align-items: center; gap: 9px; padding: 9px 6px 8px 11px; }
.hc-badge {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 4px;
  background: var(--slate); color: #fff;
  font-family: var(--display); font-size: 16px; font-weight: 600;
}
.hole-card.live .hc-badge { background: var(--primary); }
.hc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hc-title b { font-family: var(--display); font-size: 15px; line-height: 19px; }
.hc-title small { font-size: 12px; color: var(--muted); }
.state { font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.state.live { background: var(--green-soft); color: var(--green-ink); }
.state .pulse { width: 6px; height: 6px; animation: breathe 1.8s ease-in-out infinite; }
.hc-menu { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 4px; color: var(--muted); }
.hc-menu svg { stroke-width: 3; }
.hc-empty { margin: 0; padding: 0 12px 12px; color: var(--muted); font-size: 13px; }

.shot-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.shot-list li + li { border-top: 1px solid var(--line); }
.shot-row {
  width: 100%;
  min-height: 44px;
  display: grid; grid-template-columns: 24px 1fr auto 15px; align-items: center; gap: 8px;
  padding: 6px 9px 6px 11px;
  text-align: left;
}
.shot-row:active { transform: none; background: var(--chip); }
.sr-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--chip); color: var(--muted);
  font-family: var(--display); font-size: 12px; font-weight: 600;
}
.sr-main { display: flex; flex-direction: column; min-width: 0; }
.sr-main b { font-family: var(--display); font-size: 14px; line-height: 17px; }
.sr-main small { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.sr-main .dot { width: 7px; height: 7px; }
.sr-dist { display: flex; flex-direction: column; align-items: flex-end; }
.sr-dist b { font-family: var(--display); font-size: 14px; line-height: 17px; font-variant-numeric: tabular-nums; }
.src { font-size: 10px; color: var(--muted-2); }
.src.man { color: #677169; }
.shot-row > svg { width: 16px; height: 16px; color: var(--muted-2); }
.hc-play {
  width: 100%; min-height: 41px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border-top: 1px solid var(--line);
  background: #F5F6F2; color: var(--primary-dark);
  font-family: var(--display); font-size: 14px; font-weight: 600;
}
.hc-play svg { width: 16px; height: 16px; }

/* ---------- Coups du trou dans l'écran « choix du club » (discret) ---------- */
.shot-strip .sn { font-family: var(--display); font-size: 10px; font-weight: 600; color: var(--muted-2); }
.strip-hint { margin: -6px 0 0; font-size: 10px; color: var(--muted-2); letter-spacing: 0.02em; }

/* ---------- Feuilles (éditeur de coup, gestion du trou) ---------- */
.sheet.tall { max-height: calc(100dvh - 40px); overflow-y: auto; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.close-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--chip); color: var(--ink); }
.close-btn svg { width: 18px; height: 18px; }
.se-label { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin-top: 4px; }

.se-clubs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.se-clubs button {
  min-height: 40px; padding: 0 4px; border-radius: 4px;
  background: var(--card); border: 1.5px solid var(--line);
  font-family: var(--display); font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.se-clubs button.on { background: var(--slate); border-color: var(--green); color: #FFFFFF; }

.se-quality { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.se-quality button {
  min-height: 41px; border-radius: 4px;
  background: var(--card); border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 13px; font-weight: 500;
}
.se-quality button.on.q1 { background: var(--red-soft); border-color: var(--red); color: var(--red-ink); }
.se-quality button.on.q2 { background: var(--amber-soft); border-color: var(--amber); color: #111713; }
.se-quality button.on.q3 { background: var(--green-soft); border-color: var(--green); color: var(--green-ink); }

.link-btn.left { align-self: flex-start; min-height: 31px; font-size: 13px; }
.se-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.se-actions .btn-secondary, .se-actions .btn-danger { font-size: 13px; min-height: 40px; }

.btn-danger {
  min-height: 41px; width: 100%;
  border-radius: 4px;
  border: 1.5px solid #FCA5A5;
  background: var(--card); color: var(--red-ink);
  font-family: var(--display); font-size: 14px; font-weight: 600;
}
.btn-danger.confirm { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Trous repliables (compacts par défaut) ---------- */
.hole-cards { gap: 6px; }
.hole-card { border-radius: 4px; }
.hc-head { padding: 0; }
.hc-toggle {
  width: 100%;
  min-height: 45px;
  display: flex; align-items: center; gap: 9px;
  padding: 6px 9px 6px 8px;
  text-align: left;
}
.hc-toggle:active { transform: none; background: var(--chip); }
.hc-badge { width: 32px; height: 32px; font-size: 15px; border-radius: 4px; }
.hc-title b { font-size: 14px; line-height: 17px; }
.hc-title small { font-size: 11px; line-height: 14px; }
.hc-dots { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: 96px; }
.hc-dots .dot { width: 7px; height: 7px; }
.hc-chev { width: 20px; height: 20px; display: grid; place-items: center; color: var(--muted-2); transition: transform 0.15s ease; flex: none; }
.hc-chev svg { width: 16px; height: 16px; }
.hole-card.open .hc-chev { transform: rotate(90deg); }
.hole-card.live { box-shadow: 0 0 0 3px rgba(127, 127, 127, 0.12); }
.hc-body { border-top: 1px solid var(--line); }
.hc-body .shot-list { border-top: 0; }
.hc-body .hc-empty { padding: 9px 12px; }
.hc-foot { display: flex; border-top: 1px solid var(--line); }
.hc-foot .hc-play { border-top: 0; flex: 1.4; }
.hc-foot .hc-menu {
  flex: 1; width: auto; height: auto; min-height: 40px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 0;
  font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--muted);
}
.hc-foot .hc-play + .hc-menu { border-left: 1px solid var(--line); }
.hc-foot .hc-menu svg { width: 16px; height: 16px; }

/* ---------- Accueil ---------- */
.home-recap { display: flex; flex-direction: column; gap: 9px; }
.home-recap:empty { display: none; }
.recap-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 4px;
  padding: 11px 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 9px;
}
.recap-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.recap-card h3 { margin: 2px 0 0; font-family: var(--display); font-size: 15px; line-height: 19px; }
.link-pill {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  min-height: 31px; padding: 0 6px 0 9px; border-radius: 999px;
  background: var(--chip); color: var(--primary-dark);
  font-family: var(--display); font-size: 12px; font-weight: 600;
}
.link-pill svg { width: 14px; height: 14px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.mini-stats div { background: var(--canvas); border-radius: 4px; padding: 6px 4px; text-align: center; display: flex; flex-direction: column; }
.mini-stats b { font-family: var(--display); font-size: 17px; line-height: 22px; }
.mini-stats b small { font-size: 11px; color: var(--muted); }
.mini-stats span { font-size: 10px; line-height: 12px; color: var(--muted); }
.ref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ref-grid div { background: var(--canvas); border-radius: 4px; padding: 6px 8px; display: flex; flex-direction: column; }
.ref-grid span { font-family: var(--display); font-size: 12px; font-weight: 600; color: var(--muted); }
.ref-grid b { font-family: var(--display); font-size: 16px; line-height: 21px; }
.ref-grid b small { font-size: 11px; color: var(--muted); margin-left: 1px; }

/* ---------- Parcours sans partie ---------- */
.empty-hero { text-align: center; padding: 25px 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-mark { width: 54px; height: 54px; border-radius: 4px; }
.empty-hero h2 { font-size: 18px; }
.empty-hero p { max-width: 300px; }

/* ---------- Carte de profil (accueil) ---------- */
.profile-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 4px;
  padding: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 11px;
}
.pc-head { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 41px; height: 41px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #111713, #111713); color: #fff;
  font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: 0.02em;
}
.avatar svg { width: 22px; height: 22px; }
.pc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-id b { font-family: var(--display); font-size: 16px; line-height: 21px; cursor: pointer; }
.pc-id small { font-size: 12px; color: var(--muted); }
.pc-best {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px;
  background: var(--slate); color: #fff; border-radius: 4px; padding: 9px 11px;
}
.pc-best .eyebrow { color: #FFFFFF; grid-column: 1; }
.pc-best b { font-family: var(--display); font-size: 16px; line-height: 21px; grid-column: 1; }
.pc-score { grid-column: 2; grid-row: 1 / span 2; font-family: var(--display); font-size: 23px; font-weight: 600; color: #FFFFFF; }
.pc-score small { font-size: 13px; color: #A8B8AC; }
.traits { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.trait { border-radius: 4px; padding: 8px 9px; display: flex; flex-direction: column; gap: 2px; border: 1.5px solid transparent; }
.trait b { font-family: var(--display); font-size: 13px; line-height: 16px; }
.trait small { font-size: 11px; line-height: 14px; }
.trait.good { background: #F5F6F2; border-color: #DCE2DC; color: var(--green-ink); }
.trait.good small { color: #000000; }
.trait.work { background: var(--amber-soft); border-color: #DCE2DC; color: #111713; }
.trait.work small { color: #677169; }
.pc-empty { margin: 0; font-size: 13px; color: var(--muted); background: var(--canvas); border-radius: 4px; padding: 9px; }

/* ---------- Forme & records ---------- */
.delta { flex: none; font-family: var(--display); font-weight: 600; font-size: 13px; padding: 4px 8px; border-radius: 999px; }
.delta.up { background: var(--green-soft); color: var(--green-ink); }
.delta.down { background: var(--red-soft); color: var(--red-ink); }
.form-bars { display: flex; align-items: flex-end; gap: 6px; height: 84px; padding-top: 4px; }
.fb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.fb:active { transform: none; }
.fb-bar { width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; background: #DCE2DC; }
.fb.last .fb-bar { background: var(--primary); }
.fb-val { font-family: var(--display); font-size: 11px; font-weight: 600; color: var(--muted); }
.fb.last .fb-val { color: var(--ink); }
.fb-date { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.records { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.record { text-align: left; background: var(--canvas); border-radius: 4px; padding: 8px 9px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.record span { font-size: 11px; color: var(--muted); }
.record b { font-family: var(--display); font-size: 19px; line-height: 26px; }
.record b small { font-size: 12px; color: var(--muted); margin-left: 1px; }
.record small { font-size: 10px; color: var(--muted); }

/* ---------- Profil : formulaire ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.field input {
  min-height: 41px; padding: 0 11px; border-radius: 4px;
  border: 1.5px solid var(--line); background: var(--card);
  font: inherit; font-size: 14px; color: var(--ink); outline: none;
}
.field input:focus { border-color: var(--green); }

/* ---------- Stats : liste des parties & détail ---------- */
.round-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.round-item {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 1fr auto 15px; align-items: center; gap: 9px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 4px;
  padding: 9px 9px 9px 12px; box-shadow: var(--shadow);
}
.round-item:active { transform: none; background: var(--chip); }
.ri-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ri-main b { font-family: var(--display); font-size: 14px; line-height: 18px; }
.ri-main small { font-size: 11px; color: var(--muted); }
.ri-main .qseg { height: 5px; margin-top: 2px; }
.ri-main .qseg span { border-radius: 3px; cursor: default; }
.ri-score { text-align: right; font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--primary-dark); line-height: 21px; }
.ri-score small { font-size: 12px; }
.ri-score i { display: block; font-style: normal; font-size: 10px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.round-item > svg { width: 16px; height: 16px; color: var(--muted-2); }

.back-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; padding: 0 9px 0 5px; border-radius: 999px;
  background: var(--chip); font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink);
}
.back-link svg { width: 16px; height: 16px; }
.round-hud .hole-title { font-size: 16px; line-height: 22px; white-space: normal; }
.pods.four { grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pods.four .pod .v { font-size: 18px; line-height: 26px; }
.pods.four .pod.main .v { font-size: 21px; line-height: 29px; }
.scorecard .sc-badge {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 4px;
  background: var(--slate); color: #fff; font-size: 12px;
}
.scorecard td.sc-dots { text-align: left; white-space: normal; min-width: 60px; }
.scorecard td.sc-dots .dot { display: inline-block; width: 7px; height: 7px; margin: 0 2px 0 0; }
.scorecard td.sc-long { color: var(--muted); font-size: 11px; }

/* =========================================================
   Accueil : profil en haut, puis cartes-raccourcis
   ========================================================= */
.home-hero .hh-main { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.hh-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.hh-id .avatar { box-shadow: 0 0 0 3px rgba(127, 127, 127, 0.35); }
.hh-names { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hh-names .hud-title { margin: 0; font-size: 20px; line-height: 28px; }
.hh-names small { font-size: 12px; line-height: 15px; color: #A8B8AC; }
.hh-edit {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08); color: #DCE2DC;
}
.hh-edit svg { width: 18px; height: 18px; }
.home-hero .hud-text { margin: 0; }

.profile-card > .eyebrow { margin-bottom: -4px; }
#pc-body { display: flex; flex-direction: column; gap: 8px; }

.home-feat-head { flex-wrap: wrap; row-gap: 0; }
.home-feat-head .muted { font-size: 12px; }
.feat-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }

.feat {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 4px;
  padding: 11px 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; min-width: 0; text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.feat:active { transform: scale(0.99); }
.feat:focus-visible { outline: 3px solid rgba(127, 127, 127, 0.45); outline-offset: 2px; }
.feat-top { display: grid; grid-template-columns: 37px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.feat-top h3 { margin: 1px 0 0; font-family: var(--display); font-size: 15px; line-height: 20px; }
.feat-icon { width: 40px; height: 40px; border-radius: 4px; display: grid; place-items: center; background: var(--green-soft); color: var(--primary-dark); }
.feat-go {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 27px; padding: 0 5px 0 9px; border-radius: 999px;
  background: var(--chip); color: var(--primary-dark);
  font-family: var(--display); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.feat-go svg { width: 14px; height: 14px; }
.feat-desc { margin: 0; font-size: 13px; line-height: 17px; color: var(--muted); }
.feat-preview { border-top: 1px solid var(--line); padding-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.feat-empty { margin: 0; font-size: 12px; color: var(--muted); background: var(--canvas); border-radius: 4px; padding: 8px 9px; }
.feat .steps { margin: 0; }

/* Jouer : carte sombre, action principale */
.feat-play {
  cursor: default;
  background: linear-gradient(160deg, #111713 0%, #111713 75%);
  border-color: #111713; color: #fff;
}
.feat-play:active { transform: none; }
.feat-play .feat-top { grid-template-columns: 37px minmax(0, 1fr); }
.feat-play .feat-icon { background: rgba(127, 127, 127, 0.2); color: #FFFFFF; }
.feat-play .eyebrow { color: #FFFFFF; }
.feat-play h3 { font-size: 17px; line-height: 22px; }
.feat-play .feat-desc { color: #DCE2DC; }
.feat-play.live { border-color: var(--green); box-shadow: 0 0 0 4px rgba(127, 127, 127, 0.18); }
.feat-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.feat-tags span { padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 11px; font-weight: 500; color: #DCE2DC; }
.feat-play .btn-primary { margin-top: 4px; }

/* Aperçus */
.fp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--muted); }
.form-bars.mini { height: 60px; }
.fp-rounds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.fp-rounds button {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 6px 9px; border-radius: 4px; background: var(--canvas); text-align: left; color: var(--ink);
}
.fp-rounds span { display: flex; flex-direction: column; min-width: 0; }
.fp-rounds b { font-family: var(--display); font-size: 13px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-rounds small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-rounds em { font-style: normal; font-family: var(--display); font-size: 17px; font-weight: 600; display: flex; flex-direction: column; align-items: flex-end; line-height: 21px; }
.fp-rounds em i { font-style: normal; font-family: var(--body); font-size: 10px; font-weight: 400; color: var(--muted); line-height: 11px; }
.fp-kv { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.fp-kv div { display: flex; justify-content: space-between; gap: 8px; background: var(--canvas); border-radius: 4px; padding: 6px 9px; }
.fp-kv dt { font-size: 12px; color: var(--muted); }
.fp-kv dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 13px; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
