:root {
  --pitch: #0e3b2e;
  --pitch-deep: #0a2c22;
  --volt: #d8f24a;
  --paper: #f4f1e8;
  --card: #fffdf7;
  --ink: #12201b;
  --muted: #56655e;
  --rule: #d9d5c6;
  --on-pitch: #f4f1e8;
  --on-pitch-muted: #b4c7bd;
  --win: #16704a;
  --loss: #b23a2a;
  --void: #6b7570;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ol { margin: 0; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; box-shadow: 0 0 0 4px var(--ink); border-radius: 4px; }

.wrap { width: min(1160px, 100%); margin-inline: auto; padding-inline: 24px; }

/* ---------- En-tête ---------- */
.stage {
  position: relative;
  overflow: hidden;
  background: var(--pitch);
  color: var(--on-pitch);
  padding-bottom: 40px;
}
.pitch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  opacity: .07;
  pointer-events: none;
}
.stage > *:not(.pitch) { position: relative; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px;
}
.brand {
  font: 800 30px/1 var(--display);
  letter-spacing: .01em;
  text-decoration: none;
}
.brand { white-space: nowrap; }
.brand span { color: var(--volt); }
.topbar nav { display: flex; gap: 24px; }
.topbar nav a {
  color: var(--on-pitch-muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}
.topbar nav a:hover { color: var(--on-pitch); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  padding-block: 40px 56px;
}
.eyebrow {
  color: var(--volt);
  font: 700 18px/1 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
h1 {
  font: 800 clamp(46px, 6.2vw, 78px)/.98 var(--display);
  letter-spacing: -.005em;
  text-wrap: balance;
}
.lede {
  max-width: 48ch;
  margin-top: 22px;
  color: var(--on-pitch-muted);
  font-size: 18px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-block;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  font: 700 15px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-solid { background: var(--volt); color: var(--ink); }
.btn-solid:hover { background: #e6fb6b; }
.btn-ghost { border-color: rgba(244, 241, 232, .4); color: var(--on-pitch); }
.btn-ghost:hover { border-color: var(--on-pitch); }
.btn-outline { background: none; border-color: var(--ink); color: var(--ink); margin-top: 20px; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.hero-pick-label {
  font: 700 18px/1 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--on-pitch-muted);
}

/* ---------- Ticket ---------- */
.ticket {
  --notch: 11px;
  --stub: 92px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  color: var(--ink);
  border-radius: 12px;
  /* Découpe les deux encoches au niveau du pointillé */
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub)), transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub)), transparent 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub)), transparent 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub)), transparent 98%, #000) right / 51% 100% no-repeat;
}
.ticket-main { flex: 1; padding: 20px 22px 18px; }
.ticket-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}
.ticket-meta b { color: var(--ink); font-weight: 700; }
.ticket-teams {
  margin-top: 14px;
  font: 700 30px/1.05 var(--display);
}
.ticket-teams i { color: var(--muted); font-style: normal; font-weight: 600; font-size: .7em; padding-inline: 3px; }
.ticket-pick {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 9px;
  background: var(--pitch);
  color: var(--on-pitch);
  border-radius: 4px;
  font-size: 14.5px;
  font-weight: 700;
}
.ticket details { margin-top: 14px; font-size: 14.5px; }
.ticket summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
}
.ticket summary:hover { color: var(--ink); }
.ticket details p { margin-top: 8px; }
.ticket-stub {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  height: var(--stub);
  padding-inline: 22px;
  border-top: 2px dashed var(--rule);
}
.ticket-stub div { min-width: 0; }
.ticket-stub dt, .ticket-stub .k { display: block; color: var(--muted); font-size: 12.5px; }
.ticket-stub .v { display: block; font: 600 19px/1.3 var(--mono); }
.ticket-stub .odds .v { font-size: 25px; line-height: 1.2; }
.ticket-stub .edge .v { color: var(--win); }
.ticket-stub .edge.neg .v { color: var(--loss); }

.ticket--hero .ticket-teams { font-size: clamp(34px, 4vw, 44px); }

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
  align-items: start;
}
.ticket-wrap { filter: drop-shadow(0 1px 1px rgba(18, 32, 27, .14)); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(244, 241, 232, .22);
}
.stats > div { padding: 22px 24px 4px 0; }
.stats > div + div { border-left: 1px solid rgba(244, 241, 232, .22); padding-left: 24px; }
.stats dt { color: var(--on-pitch-muted); font-size: 14px; }
.stats dd {
  margin-top: 2px;
  font: 800 50px/1.05 var(--display);
  font-variant-numeric: tabular-nums;
}
.stats small { display: block; color: var(--on-pitch-muted); font: 400 13.5px/1.4 var(--body); }
.form { display: flex; gap: 5px; height: 53px; align-items: center; }
.form span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  font: 700 18px/1 var(--display);
}
.form .gagne { background: var(--volt); color: var(--ink); }
.form .perdu { background: none; box-shadow: inset 0 0 0 1.5px var(--on-pitch-muted); color: var(--on-pitch); }
.form .rembourse { background: rgba(244, 241, 232, .16); color: var(--on-pitch); }

/* ---------- Sections ---------- */
.section { padding-block: 64px 8px; }
.section:last-of-type { padding-bottom: 72px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 26px;
}
h2 { font: 800 clamp(38px, 5vw, 52px)/1 var(--display); }
.section-note { color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 13px;
  background: none;
  border: 1.5px solid var(--rule);
  border-radius: 99px;
  color: var(--ink);
  font: 500 14px/1.3 var(--body);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Graphique ---------- */
.chart-card {
  margin: 0 0 20px;
  padding: 20px 22px 14px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.chart-card figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; font-size: 15px; }
.chart-card figcaption span { color: var(--muted); font-size: 14px; }
.chart { position: relative; height: 280px; margin-top: 12px; }
.chart svg { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.chart text { font: 500 12.5px var(--mono); fill: var(--muted); }
.chart .end-label { font: 600 14px var(--mono); fill: var(--ink); }
.chart-tip {
  position: absolute;
  top: 6px;
  z-index: 1;
  width: 230px;
  padding: 9px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}
.chart-tip b { display: block; font-size: 14px; }
.chart-tip span { color: #c5cfc9; }

/* ---------- Tableau ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.history { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.history th {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
.history td { padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.history tr:last-child td { border-bottom: 0; }
.history .num { text-align: right; font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.history th.num { font-family: var(--body); font-size: 13px; }
.history .date { color: var(--muted); white-space: nowrap; }
.history .match { font-weight: 700; }
.history .match small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.outcome { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.outcome svg { width: 14px; height: 14px; flex: none; }
.outcome.gagne, .profit.gagne { color: var(--win); }
.outcome.perdu, .profit.perdu { color: var(--loss); }
.outcome.rembourse, .profit.rembourse { color: var(--void); }

/* ---------- Méthode ---------- */
.method {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  list-style: none;
  counter-reset: step;
}
.method li { counter-increment: step; padding-top: 16px; border-top: 2px solid var(--ink); }
.method li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  color: var(--muted);
  font: 600 14px var(--mono);
  margin-bottom: 10px;
}
.method h3 { font: 700 26px/1.1 var(--display); margin-bottom: 8px; }
.method p { color: var(--muted); }
.method code { color: var(--ink); font: 500 .9em var(--mono); white-space: nowrap; }

/* ---------- Pied de page ---------- */
.footer { background: var(--pitch-deep); color: var(--on-pitch-muted); font-size: 14px; padding-block: 40px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
.footer .brand { display: inline-block; color: var(--on-pitch); margin-bottom: 10px; }
.responsible { display: flex; gap: 16px; align-items: flex-start; }
.age {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--on-pitch);
  border-radius: 50%;
  color: var(--on-pitch);
  font: 800 19px/1 var(--display);
}
.responsible a { color: var(--on-pitch); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 24px 44px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n + 3) { border-top: 1px solid rgba(244, 241, 232, .22); margin-top: 18px; }
  .method { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .topbar nav { gap: 14px; }
  .topbar nav a { font-size: 14px; }
  .stats > div { padding-right: 12px; }
  .stats > div + div { padding-left: 16px; }
  .stats > div:nth-child(3) { padding-left: 0; }
  .stats dd { font-size: 42px; }
  .form { gap: 3px; }
  .form span { width: 26px; height: 26px; font-size: 16px; }
  .ticket-grid { grid-template-columns: minmax(0, 1fr); }
  .ticket-main { padding-inline: 18px; }
  .ticket-stub { padding-inline: 18px; }
  .ticket-stub .v { font-size: 17px; }
  .ticket-stub .odds .v { font-size: 22px; }
  .section { padding-top: 48px; }
  .chart-card { padding-inline: 14px; }
  .chart { height: 240px; }
  /* Le tableau devient une liste de cartes pour garder le résultat visible */
  .col-stake { display: none; }
  .history, .history tbody { display: block; }
  .history thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .history tr {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 6px 14px;
    padding: 14px;
    border-bottom: 1px solid var(--rule);
  }
  .history tr:last-child { border-bottom: 0; }
  .history td { display: block; padding: 0; border: 0; }
  .history td.col-stake { display: none; }
  .history .match { grid-area: 1 / 1 / 2 / 4; }
  .history .profit { grid-area: 1 / 4; }
  .history .pick { grid-area: 2 / 1 / 3 / 4; }
  .history .result { grid-area: 2 / 4; text-align: right; }
  .history .date { grid-area: 3 / 1; font-size: 13px; }
  .history .odds, .history .score { color: var(--muted); font-size: 13px; text-align: left; }
  .history .odds { grid-area: 3 / 2; }
  .history .score { grid-area: 3 / 3; }
  .history .odds::before { content: "Cote "; font-family: var(--body); }
  .history .score::before { content: "Score "; font-family: var(--body); }
  .history .empty { grid-column: 1 / -1; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Polices (servies par le site, sans appel à un tiers) ---------- */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("/fonts/dm-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("/fonts/dm-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("/fonts/dm-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

/* ---------- Navigation et bandeaux ---------- */
.topbar nav { align-items: center; }
.topbar nav .nav-cta {
  padding: 7px 14px;
  border: 1.5px solid rgba(244, 241, 232, .4);
  border-radius: 6px;
  color: var(--on-pitch);
}
.topbar nav .nav-cta:hover { border-color: var(--on-pitch); }
.notice-banner { background: var(--ink); color: var(--paper); font-size: 14px; text-align: center; padding: 8px 16px; }
.notice-banner a { color: var(--volt); }
.stage--thin { padding-bottom: 0; }

/* ---------- Tickets réservés ---------- */
.ticket-pick--locked { background: var(--paper); color: var(--muted); }
.ticket-free {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 9px;
  background: var(--volt);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}
.ticket-admin {
  display: block;
  width: fit-content;
  margin-top: 8px;
  padding: 3px 9px;
  background: #f8efcf;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}
.ticket-blur { filter: blur(6px); user-select: none; pointer-events: none; }
.lock-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 20px;
  padding: 16px 22px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.btn-dark { background: var(--pitch); color: var(--on-pitch); white-space: nowrap; }
.btn-dark:hover { background: var(--pitch-deep); }
.btn-danger { background: none; border-color: var(--loss); color: var(--loss); }
.btn-danger:hover { background: var(--loss); color: #fff; }
.btn-full { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .55; cursor: wait; }
.history small.correction { display: block; color: var(--loss); font-size: 12.5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }

/* ---------- Pages compte et formulaires ---------- */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.page-main { flex: 1; padding-block: 48px 72px; }
.page-main--narrow { max-width: 720px; }
.page-main h1 { font: 800 clamp(36px, 5vw, 46px)/1.05 var(--display); margin-bottom: 14px; text-wrap: balance; }
.form-card { width: min(460px, 100%); margin-inline: auto; padding: 28px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; }
.form-card p { margin-bottom: 14px; }
.field { display: block; margin-bottom: 14px; font-size: 14.5px; font-weight: 500; }
.field span { display: block; margin-bottom: 5px; }
.field small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 400; }
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  color: var(--ink);
  font: 400 16px/1.4 var(--body);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--pitch); outline-offset: 0; border-color: var(--pitch); }
input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--pitch); }
.check { display: flex; gap: 10px; margin-bottom: 12px; font-size: 14.5px; line-height: 1.4; }
.form-msg { margin: 0 0 14px; padding: 10px 12px; border-radius: 6px; font-size: 14.5px; }
.form-msg--error { background: #f8e5e1; color: #84281c; }
.form-msg--ok { background: #e0f1e8; color: #0f5436; }
.form-msg--info { background: var(--paper); color: var(--ink); }
.form-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 16px 0 0 !important; font-size: 14.5px; }
.stack { display: grid; gap: 10px; margin-bottom: 14px; }
.stack .btn { margin: 0; }

.offer { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.offer-lede { font-size: 18px; color: var(--muted); max-width: 46ch; }
.offer-list { margin: 24px 0 0; padding: 0; list-style: none; }
.offer-list li { padding: 12px 0; border-top: 1px solid var(--rule); }
.offer-card { margin: 0; width: 100%; }
.offer-price { font: 800 50px/1 var(--display); }
.offer-price span { color: var(--muted); font: 400 15px var(--body); }
.offer-note { margin: 16px 0 0 !important; color: var(--muted); font-size: 13px; }

.account-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 22px; }
.account-head h1 { margin-bottom: 2px; }
.account-head p { color: var(--muted); overflow-wrap: anywhere; }
.account-head .btn { margin: 0; }
.panel { margin-bottom: 16px; padding: 22px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; }
.panel h2 { font: 700 26px/1.1 var(--display); margin-bottom: 12px; }
.panel p { margin-bottom: 12px; }
.panel .btn-outline { margin-top: 0; }
.panel--warn { border-color: var(--ink); }
.panel-note { margin: 12px 0 0 !important; color: var(--muted); font-size: 13.5px; }
.status--ok { color: var(--win); font-weight: 700; }
.status--bad { color: var(--loss); font-weight: 700; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.toggle:first-child { border-top: 0; padding-top: 0; }
.toggle b { display: block; font-size: 15px; }
.toggle small { display: block; color: var(--muted); font-size: 13.5px; }
.legal { max-width: 70ch; margin-inline: auto; }
.legal h2 { font: 700 26px/1.1 var(--display); margin: 28px 0 8px; }
.legal p { margin-bottom: 10px; }

@media (max-width: 860px) {
  .offer { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .nav-section { display: none; }
}
@media (max-width: 640px) {
  .form-card { padding: 20px; }
  .lock-cta { padding-inline: 18px; }
  .history small.correction { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .topbar { gap: 12px; }
  .brand { font-size: 25px; }
  .topbar nav { gap: 10px; }
  .topbar nav .nav-cta { padding: 6px 10px; }
}
@media (max-width: 360px) {
  .topbar nav a[href="/abonnement"] { display: none; }
}
