:root {
  --g900: #0f2a1d;
  --g800: #153625;
  --g700: #1d4a33;
  --g500: #2f7d4f;
  --g300: #8fc49f;
  --cream: #f6f2e7;
  --paper: #fffdf7;
  --sand: #e6d7a9;
  --gold: #e9c46a;
  --gold-d: #b98a22;
  --ink: #14201a;
  --muted: #5d6b62;
  --line: #e3ddcb;
  --bogey: #d98b3a;
  --double: #8a4b2a;
  --radius: 18px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--cream); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 12px clamp(16px, 4vw, 48px); background: rgba(15, 42, 29, .94); backdrop-filter: blur(8px); color: var(--cream); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.brand em { font-style: italic; color: var(--gold); }
.nav nav { display: flex; gap: 26px; margin-left: auto; }
.nav nav a { text-decoration: none; font-size: .95rem; opacity: .85; }
.nav nav a:hover { opacity: 1; color: var(--gold); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-sm { padding: 9px 18px; font-size: .92rem; }
.btn-gold { background: var(--gold); color: var(--g900); }
.btn-gold:hover { background: #f2d488; }
.btn-ghost { border-color: rgba(246, 242, 231, .45); color: var(--cream); background: transparent; }
.btn-ghost:hover { border-color: var(--cream); }
.btn-green { background: var(--g700); color: var(--cream); }
.btn-green:hover { background: var(--g500); }
.btn-line { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn-line:hover { border-color: var(--g500); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding: clamp(40px, 7vw, 96px) clamp(16px, 6vw, 96px) clamp(48px, 7vw, 104px); color: var(--cream); background: radial-gradient(1100px 600px at 85% 10%, #245c3f 0%, transparent 60%), linear-gradient(170deg, var(--g800), var(--g900)); overflow: hidden; }
.eyebrow { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--gold); margin-bottom: 16px; }
.eyebrow.dark { color: var(--gold-d); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
.hero h1 span { font-style: italic; color: var(--gold); }
.lead { margin-top: 22px; font-size: clamp(1.02rem, 1.5vw, 1.2rem); max-width: 34em; opacity: .88; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-facts { list-style: none; padding: 0; margin: 44px 0 0; display: flex; flex-wrap: wrap; gap: 14px 36px; font-size: .92rem; opacity: .9; }
.hero-facts li { display: flex; align-items: baseline; gap: 10px; max-width: 12.5em; }
.hero-facts strong { font-family: var(--display); font-size: 2rem; color: var(--gold); line-height: 1; }

.hero-visual { position: relative; justify-self: center; width: min(100%, 380px); }
.hero-hole { border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); transform: rotate(2.5deg); }
.hero-hole svg { display: block; width: 100%; height: auto; }
.float-card { position: absolute; background: var(--paper); color: var(--ink); border-radius: 14px; padding: 12px 16px; box-shadow: 0 14px 30px rgba(0, 0, 0, .28); display: grid; gap: 2px; min-width: 168px; }
.float-card small { color: var(--muted); font-size: .74rem; }
.float-card b { font-family: var(--display); font-size: 1.5rem; line-height: 1.1; color: var(--g700); }
.float-card span { font-size: .8rem; color: var(--muted); }
.float-card .bar { display: block; height: 6px; background: var(--line); border-radius: 6px; margin-top: 6px; }
.float-card .bar i { display: block; height: 100%; background: var(--g500); border-radius: 6px; }
.fc-1 { left: -34px; top: 16%; }
.fc-2 { right: -22px; bottom: 12%; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) clamp(16px, 6vw, 96px); }
.section-dark { background: var(--g900); color: var(--cream); }
.steps, .offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.steps article { padding: 28px; border-top: 2px solid var(--g700); }
.steps .num { font-family: var(--display); font-size: 3rem; color: var(--gold-d); line-height: 1; display: block; margin-bottom: 14px; }
.steps p, .offers p { margin-top: 10px; color: var(--muted); }

.offers article { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; }
.offers .featured { background: var(--g700); color: var(--cream); border-color: var(--g700); }
.offers .featured p { color: rgba(246, 242, 231, .82); }
.offers .price { font-family: var(--display); font-size: 2.3rem; color: var(--ink); margin-top: 14px; line-height: 1; }
.offers .featured .price { color: var(--gold); }
.offers .price small { font-family: var(--body); font-size: .9rem; color: var(--muted); }
.offers .featured .price small { color: rgba(246, 242, 231, .7); }
.tag { position: absolute; top: -12px; left: 28px; background: var(--gold); color: var(--g900); font-size: .74rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

.contact { text-align: center; padding: clamp(56px, 8vw, 96px) 16px; background: linear-gradient(170deg, var(--g700), var(--g900)); color: var(--cream); }
.contact p { margin-top: 12px; opacity: .85; }
.contact .hero-cta { justify-content: center; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 20px clamp(16px, 6vw, 96px); background: #0a1d14; color: rgba(246, 242, 231, .6); font-size: .84rem; }

/* ---------- Carnet (application) ---------- */
.carnet-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.sync { font-size: .8rem; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(246, 242, 231, .3); display: inline-flex; align-items: center; gap: 8px; }
.sync::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa; }
.sync.on::before { background: #5fd38a; }
.sync.off::before { background: var(--gold); }

.app { background: var(--paper); color: var(--ink); border-radius: 24px; padding: clamp(16px, 3vw, 36px); box-shadow: 0 30px 70px rgba(0, 0, 0, .35); max-width: 1080px; margin: 0 auto; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.tabs { display: flex; gap: 6px; background: var(--cream); padding: 5px; border-radius: 999px; width: fit-content; margin-bottom: 26px; }
.tabs button { border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--muted); }
.tabs button.on { background: var(--g700); color: var(--cream); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.panel-title { font-size: 1.6rem; margin-bottom: 6px; }
.sub { color: var(--muted); font-size: .95rem; }
.field { display: grid; gap: 6px; margin-top: 18px; }
.field label { font-size: .84rem; font-weight: 700; color: var(--muted); }
.field input, .field select, .inline-select { padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f3ecd4; font-size: .9rem; }
.note.ok { background: #dff1e4; }

.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.box h4 { margin: 0 0 12px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.course-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.course-meta div { display: grid; }
.course-meta b { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; }
.course-meta span { font-size: .8rem; color: var(--muted); }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); font-size: .93rem; }
.tbl th { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--cream); }
.rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cream); font-size: .8rem; font-weight: 700; }
tr:first-child .rank { background: var(--gold); }
.linkbtn { border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: .84rem; padding: 4px; }
.linkbtn:hover { color: #a03020; }

/* Trou en cours */
.hole-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hole-top h3 { font-size: clamp(2rem, 5vw, 2.8rem); }
.hole-top .meta { color: var(--muted); margin-top: 4px; }
.running { text-align: right; }
.running b { font-family: var(--display); font-size: 1.9rem; display: block; line-height: 1; }
.running span { font-size: .84rem; color: var(--muted); }
.hole-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: clamp(18px, 3vw, 36px); align-items: start; }
.hole-pic { border-radius: 20px; overflow: hidden; }
.hole-pic svg { display: block; width: 100%; height: auto; }

.ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ctl-label b { display: block; }
.ctl-label small { color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.stepper button:hover:not([disabled]) { border-color: var(--g500); background: #eef7f0; }
.stepper button[disabled] { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 52px; text-align: center; font-family: var(--display); font-size: 2rem; line-height: 1; }
.seg { display: flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 12px 14px; cursor: pointer; font-size: .9rem; }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button.on { background: var(--g700); color: var(--cream); }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--cream); }
.chip.c-eagle, .chip.c-birdie { background: #d4eedb; color: #155a30; }
.chip.c-bogey { background: #f8e3c8; color: #7a4510; }
.chip.c-double { background: #edd3c4; color: #5e2b12; }
.chip.yes { background: #d4eedb; color: #155a30; }
.chip.no { background: #eee9da; color: var(--muted); }

.hole-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.dots { display: grid; grid-template-columns: repeat(18, 1fr); gap: 4px; margin-top: 22px; }
.dots button { height: 34px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font-size: .78rem; cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; }
.dots button[disabled] { opacity: .4; cursor: default; }
.dots button.cur { border-color: var(--ink); border-width: 2px; font-weight: 700; }
.dots .d-eagle, .dots .d-birdie { background: #bfe5c9; }
.dots .d-par { background: #ece7d8; }
.dots .d-bogey { background: #f5d3a6; }
.dots .d-double { background: #d9a98d; }

/* Carte et statistiques */
.result-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.bigscore { display: flex; align-items: baseline; gap: 12px; }
.bigscore b { font-family: var(--display); font-size: clamp(3.4rem, 9vw, 5rem); line-height: .9; }
.bigscore span { font-size: 1.2rem; font-weight: 700; color: var(--g500); }
.bigscore span.over { color: var(--bogey); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { background: var(--cream); border-radius: 14px; padding: 14px 16px; }
.tile small { display: block; color: var(--muted); font-size: .78rem; }
.tile b { font-family: var(--display); font-size: 1.8rem; line-height: 1.15; }
.tile em { font-style: normal; font-size: .8rem; color: var(--muted); display: block; }

.scroll { overflow-x: auto; }
.card-tbl { min-width: 620px; }
.card-tbl th, .card-tbl td { text-align: center; padding: 8px 4px; font-size: .9rem; border-bottom: 1px solid var(--line); }
.card-tbl th:first-child, .card-tbl td:first-child { text-align: left; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding-right: 10px; }
.card-tbl .tot { background: var(--cream); font-weight: 700; }
.card-tbl thead th { background: var(--g700); color: var(--cream); font-weight: 500; }
.card-tbl thead th:first-child { color: var(--cream); border-radius: 8px 0 0 8px; }
.card-tbl thead th:last-child { border-radius: 0 8px 8px 0; }
.sc { display: inline-grid; place-items: center; width: 28px; height: 28px; font-weight: 700; }
.sc.s-birdie { border: 1.5px solid var(--g500); border-radius: 50%; color: var(--g500); }
.sc.s-eagle { border: 1.5px solid var(--g500); border-radius: 50%; color: var(--g500); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--g500); }
.sc.s-bogey { border: 1.5px solid var(--bogey); color: #9a5a17; }
.sc.s-double { border: 1.5px solid var(--double); color: var(--double); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--double); }

.charts { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-top: 18px; align-items: start; }
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.distrib { display: grid; gap: 9px; }
.distrib div { display: grid; grid-template-columns: 96px 1fr 26px; align-items: center; gap: 8px; font-size: .88rem; }
.distrib span.track { height: 12px; border-radius: 6px; background: var(--cream); overflow: hidden; }
.distrib span.track i { display: block; height: 100%; border-radius: 6px; }
.distrib b { text-align: right; }
.stats-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.inline-select { width: auto; min-width: 200px; }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { width: min(78%, 320px); margin-top: 12px; }
  .fc-1 { left: -8%; }
  .fc-2 { right: -8%; }
  .steps, .offers, .grid2, .charts { grid-template-columns: 1fr; }
  .offers .featured { order: -1; }
}
@media (max-width: 640px) {
  .hole-grid { grid-template-columns: 1fr; }
  .hole-pic { max-width: 240px; margin: 0 auto; }
  .dots { grid-template-columns: repeat(9, 1fr); }
  .seg button { padding: 12px 10px; font-size: .84rem; }
  .app { border-radius: 18px; }
  .hole-nav .btn { flex: 1; padding: 14px 12px; }
  .running { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
