/* Setwise · styles de l'application (Analyse, Compétitions, Historique, Profil).
   S'appuie sur styles.css de la page d'accueil (jetons, boutons, pastilles, écussons, courts, apparitions). */

:root {
  --pa: var(--green-500); /* joueur A */
  --pb: #3e5c86; /* joueur B */
  --pa-soft: rgba(18, 128, 74, 0.12);
  --pb-soft: rgba(62, 92, 134, 0.12);
  --tabbar-h: 64px;
  --bad: #b4462f;
}

/* ---------- Coquille ---------- */
.app-body { padding-top: var(--nav-h); background: var(--white); }
.app-nav { background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); }
.app-nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.app-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.app-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ink-2);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.app-tabs a svg { width: 18px; height: 18px; }
.app-tabs a:hover { color: var(--ink); }
.app-tabs a.is-active { background: var(--white); color: var(--green-600); box-shadow: var(--shadow-sm); }
.app-me { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; font-size: 14px; font-weight: 550; color: var(--ink-2); transition: background-color 0.2s ease; }
.app-me:hover, .app-me.is-active { background: var(--paper); }
.app-me .avatar--alt { background: var(--green-500); color: var(--on-accent); }

/* Apparitions de l'app : fondu et léger glissé, sans flou (un flou animé sur de grandes sections saccade le défilement). */
html.js [data-reveal] { filter: none; transition: opacity 0.7s var(--ease-out) var(--d, 0s), transform 0.7s var(--ease-out) var(--d, 0s); }

.view { min-height: calc(100vh - var(--nav-h)); outline: none; transition: opacity 0.16s ease, filter 0.16s ease, transform 0.16s ease; }
.view.is-leaving { opacity: 0; filter: blur(4px); transform: translateY(6px); }

.tabbar { display: none; }

/* Badge du profil : analyses complètes restantes aujourd'hui */
.me-wrap { position: relative; display: inline-flex; flex: none; }
.quota {
  position: absolute; top: -6px; right: -8px; z-index: 1; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--green-500); color: #fff; box-shadow: 0 0 0 2px var(--white);
  font-family: var(--font-display); font-size: 11.5px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  animation: q-in 0.45s var(--ease-out) both;
}
.quota[hidden] { display: none; }
.me-wrap .quota { top: -7px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10.5px; }
.quota.is-empty { background: var(--faint); }
.quota.is-pop { animation: q-pop 0.6s var(--ease-out); }
@keyframes q-in { from { opacity: 0; transform: scale(0.4); } }
@keyframes q-pop { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* ---------- Barre latérale (ordinateur) ---------- */
.side { display: none; }
@media (min-width: 861px) {
  :root { --nav-h: 0px; --side-w: 260px; }
  html.side-compact { --side-w: 76px; }
  .app-nav { display: none; }
  .app-body { padding-left: var(--side-w); transition: padding-left 0.3s var(--ease-out); }
  .toast { left: calc(50% + var(--side-w) / 2); }

  .side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: var(--side-w);
    padding: 18px 14px 14px;
    background: var(--paper);
    box-shadow: inset -1px 0 0 var(--line);
    overflow: hidden;
    transition: width 0.3s var(--ease-out);
  }
  .side__label { white-space: nowrap; }
  .side__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 4px 0 10px; }
  .side__logo { font-size: 20px; }
  .side__logo .logo__mark { flex: none; }
  .side__toggle { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
  .side__toggle svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }
  .side__toggle:hover { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }

  .side__nav { display: grid; gap: 4px; }
  .side__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 550;
    color: var(--ink-2);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }
  .side__link svg { flex: none; width: 20px; height: 20px; }
  .side__link::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 11px;
    bottom: 11px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--green-500);
    transform: scaleY(0);
    transition: transform 0.3s var(--ease-out);
  }
  .side__link:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); }
  .side__link.is-active { background: var(--white); color: var(--green-600); box-shadow: var(--shadow-sm); }
  .side__link.is-active::before { transform: scaleY(1); }
  .side__count { display: grid; place-items: center; min-width: 22px; height: 22px; margin-left: auto; padding: 0 7px; border-radius: 999px; background: var(--green-100); color: var(--green-700); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .side__count[hidden] { display: none; }

  .side__sub { display: grid; gap: 2px; margin: 0 0 6px 22px; padding-left: 13px; box-shadow: inset 1px 0 0 var(--line-2); }
  .side__sub a { display: flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: background-color 0.2s ease, color 0.2s ease; }
  .side__sub a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.7); }
  .side__sub a.is-active { color: var(--green-600); font-weight: 600; background: rgba(18, 128, 74, 0.08); }

  .side__scroll { display: grid; align-content: start; gap: 20px; flex: 1; min-height: 0; margin: 0 -14px; padding: 0 14px 4px; overflow-y: auto; scrollbar-width: thin; }
  .side__scroll::-webkit-scrollbar { width: 8px; }
  .side__scroll::-webkit-scrollbar-track { background: transparent; }
  .side__scroll::-webkit-scrollbar-thumb { border-width: 2px; border-color: var(--paper); background: var(--line-2); }
  .side__group[hidden] { display: none; }
  .side__title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 0 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: var(--faint); }
  .side__pulse { position: relative; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); }
  .side__pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green-500); animation: ping 2s var(--ease-out) infinite; }
  .side__list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
  .side__list li { animation: rise 0.45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
  .side__item { display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 7px 10px; border-radius: 12px; color: var(--ink-2); transition: background-color 0.2s ease, box-shadow 0.2s ease; }
  .side__item:hover { background: rgba(255, 255, 255, 0.7); }
  .side__item.is-active { background: var(--white); box-shadow: var(--shadow-sm); }
  .side__item .side__label, .side__me-text { display: grid; min-width: 0; line-height: 1.3; }
  .side__item b, .side__item small, .side__me-text b, .side__me-text small { overflow: hidden; text-overflow: ellipsis; }
  .side__item b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
  .side__item small, .side__me-text small { font-size: 12px; color: var(--muted); }
  .tbadge--side { --s: 30px; flex: none; }

  .side__me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s ease; }
  .side__me:hover { box-shadow: var(--shadow-md); }
  .side__me.is-active { box-shadow: inset 0 0 0 1.5px var(--green-500); }
  .side__me .avatar { flex: none; }
  .side__me-text b { font-size: 14px; font-weight: 600; color: var(--ink); }
  .side__me-gear { flex: none; width: 16px; height: 16px; margin-left: auto; color: var(--faint); }

  /* Repliée : icônes seules (choix du profil, et toujours sous 1 180 px) */
  html.side-compact .side { padding-inline: 12px; }
  html.side-compact .side__label, html.side-compact .side__sub, html.side-compact .side__me-gear, html.side-compact .side__pulse { display: none; }
  html.side-compact .side__head { flex-direction: column; padding: 0; }
  html.side-compact .side__toggle svg { transform: rotate(180deg); }
  html.side-compact .side__link { justify-content: center; padding: 0; }
  html.side-compact .side__link::before { left: -12px; }
  html.side-compact .side__count { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; }
  html.side-compact .side__title { height: 1px; margin: 0 10px 10px; padding: 0; font-size: 0; background: var(--line-2); }
  html.side-compact .side__item { justify-content: center; padding: 7px 0; }
  html.side-compact .side__me { justify-content: center; padding: 8px 0; }
}
@media (min-width: 861px) and (max-width: 1180px) {
  .side__toggle { display: none; }
}

.page { padding: 56px 0 120px; }
.page-head { max-width: 760px; margin-bottom: 36px; }
.page-head--center { margin-inline: auto; text-align: center; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 1.3rem + 3.2vw, 3.9rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.048em;
  color: var(--ink);
  text-wrap: balance;
}
.page-title em { color: var(--green-500); }
.page-lead { margin-top: 16px; max-width: 620px; font-size: 18px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.section-head { margin: 64px 0 22px; }
.section-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; color: var(--ink); }
.section-sub { margin-top: 6px; font-size: 15px; color: var(--muted); }
.muted { font-size: 14px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
}
button.chip { border: 0; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
button.chip:hover { background: var(--green-50); }
button.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); box-shadow: none; }
.chip b { font-weight: 700; }

/* Contrôle segmenté */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.seg__opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s var(--ease-out), transform 0.16s var(--ease-out);
}
.seg__opt:hover { color: var(--ink); }
.seg__opt:active { transform: scale(0.97); }
.seg__opt[aria-checked="true"], .seg__opt[aria-current="page"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg__opt .surface-dot { width: 9px; height: 9px; }

/* État vide, chargement, notification */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 520px; margin: 40px auto; padding: 48px 28px; border-radius: var(--radius-xl); background: var(--paper); text-align: center; }
.empty__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-md); color: var(--green-500); }
.empty__icon .icon { width: 28px; height: 28px; }
.empty__title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.035em; color: var(--ink); }
.empty__text { max-width: 400px; color: var(--muted); }
.empty .btn, .empty .ready__btn { margin-top: 8px; }

.skel { display: grid; gap: 12px; }
.skel__row { height: 72px; border-radius: var(--radius); background: linear-gradient(90deg, var(--paper) 0%, #eef1ed 50%, var(--paper) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--white);
  font-size: 14.5px;
  font-weight: 500;
  box-shadow: 0 12px 32px -12px rgba(11, 31, 21, 0.5);
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* Pastilles de forme (V/D) */
.pills { display: inline-flex; gap: 3px; }
.pill-r {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}
.pill-r--w { background: var(--green-500); color: var(--on-accent); }
.pill-r--l { background: var(--line-2); color: var(--ink-2); }
.pills--lg .pill-r { width: 26px; height: 26px; border-radius: 8px; font-size: 11.5px; cursor: help; }

.avatar--lg { width: 64px; height: 64px; font-size: 20px; }
.avatar--xl { width: 88px; height: 88px; font-size: 26px; }

/* ---------- Analyse : le court ---------- */
.an .page-head { max-width: 860px; }
.an-event { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 8px 14px; border-radius: 12px; background: var(--green-50); color: var(--green-700); font-size: 14px; font-weight: 550; animation: rise 0.5s var(--ease-out); }
.an-event[hidden] { display: none; }

.arena {
  --in: #3d6aa3;
  --out: #5381bb;
  position: relative;
  padding: clamp(28px, 4.5vw, 56px) clamp(28px, 6vw, 84px);
  border-radius: 34px;
  background: var(--out);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 2px 4px rgba(11, 31, 21, 0.06), 0 36px 72px -32px rgba(11, 31, 21, 0.45);
  transition: background-color 0.6s var(--ease-out), transform 0.5s var(--ease-out), opacity 0.5s ease, filter 0.5s ease;
  isolation: isolate;
}
.arena:focus-within { z-index: 5; } /* liste de joueurs ouverte : au-dessus des boutons qui suivent */
.arena[data-surface="indoor"] { --in: #44546d; --out: #5a6a86; }
.arena[data-surface="clay"] { --in: #c0663c; --out: #d07c51; }
.arena[data-surface="grass"] { --in: #3d8753; --out: #519a66; }
.arena::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 60%);
  pointer-events: none;
}
.arena__court {
  position: relative;
  aspect-ratio: 2377 / 1097;
  background: var(--in);
  transition: background-color 0.6s var(--ease-out);
}
.arena__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: rgba(255, 255, 255, 0.92); stroke-width: 9; pointer-events: none; }
.arena__lines--v { display: none; }
.arena__net {
  position: absolute;
  top: -5%;
  bottom: -5%;
  left: 50%;
  width: 10px;
  margin-left: -5px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0 2px, transparent 2px 5px),
    rgba(11, 31, 21, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 6px 0 14px rgba(11, 31, 21, 0.25);
}
.arena__net::before, .arena__net::after { content: ""; position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 4px; background: #e9eef0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); }
.arena__net::before { top: -10px; }
.arena__net::after { bottom: -10px; }

.camp {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 50%;
  padding: 18px 3%;
}
.camp--a { left: 0; }
.camp--b { right: 0; }
.camp__tag {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 31, 21, 0.28);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.camp--a .camp__tag { left: 14px; }
.camp--b .camp__tag { right: 14px; }
.camp.is-shake { animation: shake 0.45s var(--ease-out); }

.pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(320px, 100%); }
.camp.is-filled .pick { display: none; }
.camp__none { display: none; width: min(300px, 100%); padding: 18px; border-radius: 20px; background: var(--white); box-shadow: 0 2px 4px rgba(11, 31, 21, 0.08), 0 24px 48px -20px rgba(11, 31, 21, 0.55); text-align: center; animation: pop 0.45s var(--ease-out); }
.camp__none p { margin: 0 0 12px; font-size: 14.5px; font-weight: 550; line-height: 1.4; color: var(--ink); }
.camp.is-none .camp__none { display: block; }
.camp.is-none .pick { display: none; }
/* La carte nomme déjà le joueur : l'étiquette du camp s'efface pour ne jamais passer dessous. */
.camp.is-filled .camp__tag { display: none; }
.pick__add {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 2px dashed rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--on-accent);
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), background-color 0.2s ease;
}
.pick__add:hover { transform: scale(1.06) rotate(90deg); background: rgba(255, 255, 255, 0.18); }
.pick__add .icon { width: 30px; height: 30px; }
.pick__field { position: relative; width: 100%; }
.pick__icon { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); pointer-events: none; }
.pick__input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  border: 0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(11, 31, 21, 0.1), 0 10px 26px -10px rgba(11, 31, 21, 0.45);
  font-size: 15.5px;
  color: var(--ink);
  outline: none;
  transition: box-shadow 0.2s ease;
}
.pick__input::placeholder { color: var(--faint); }
.pick__input:focus { box-shadow: 0 0 0 3px var(--ball), 0 10px 26px -10px rgba(11, 31, 21, 0.45); }
.dropdown--court { top: calc(100% + 8px); z-index: 30; max-height: 320px; }

.camp__card { width: min(352px, 100%); }
.camp__card:empty { display: none; }
/* La carte s'adapte à sa propre largeur (requêtes de conteneur) : rien ne déborde, rien ne se chevauche. */
.pcard {
  position: relative;
  container-type: inline-size;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 2px 4px rgba(11, 31, 21, 0.08), 0 24px 48px -20px rgba(11, 31, 21, 0.55);
  animation: pop 0.55s var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
.pcard__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "face id change"; align-items: center; gap: 12px; }
.pcard__top > .avatar { grid-area: face; }
.pcard__id { grid-area: id; min-width: 0; }
.pcard__name { font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); overflow-wrap: break-word; text-wrap: balance; }
.pcard__meta { margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--muted); overflow-wrap: break-word; }
.pcard__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "elo streak" "form form"; gap: 8px; margin: 16px 0 0; }
.pcard__elo { grid-area: elo; }
.pcard__form { grid-area: form; }
.pcard__streak { grid-area: streak; }
.pcard__stats > div { min-width: 0; padding: 9px 10px; border-radius: 12px; background: var(--paper); }
.pcard__stats dt { font-family: var(--font-label); font-size: 10px; font-weight: 600; line-height: 1.2; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); overflow-wrap: break-word; }
.pcard__stats dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.pcard__form dd { justify-content: space-between; }
.pcard__stats .pills { flex-wrap: wrap; gap: 3px; }
.pcard__stats dd small { font-family: var(--font-body); font-size: 11px; font-weight: 500; white-space: nowrap; color: var(--muted); }
.pcard__stats .pill-r { width: 14px; height: 14px; border-radius: 4px; font-size: 8px; }
.pcard__change {
  grid-area: change;
  align-self: start;
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
/* Assez large : les trois chiffres sur une ligne, la forme prend la place de ses pastilles. */
@container (min-width: 300px) {
  .pcard__stats { grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.8fr); grid-template-areas: "elo form streak"; }
  .pcard__form dd { justify-content: flex-start; }
}
/* Étroite : « Changer » passe à côté de la photo, le nom prend toute la largeur dessous. */
@container (max-width: 279px) {
  .pcard__top { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "face change" "id id"; gap: 10px; }
  .pcard__change { align-self: center; justify-self: end; }
}
@container (max-width: 179px) {
  .pcard__stats { grid-template-columns: minmax(0, 1fr); grid-template-areas: "elo" "streak" "form"; }
}
.pcard__change:hover { background: var(--green-50); color: var(--green-700); }

.an-go { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; margin-top: 30px; }
.an-go__btn { border: 0; padding: 0; background: none; font: inherit; }
/* Toujours bien visible : sans les deux joueurs, un clic secoue le camp vide et y place le curseur. */
.an-go__btn > span { height: 56px; padding: 0 30px 0 26px; font-size: 18px; }
.an-go__btn .ready__ball { width: 56px; height: 56px; }
/* Match absent du programme : bouton grisé, la balle aussi */
html[data-look] .an-go__btn.is-locked { cursor: not-allowed; }
html[data-look] .an-go__btn.is-locked > span { background: var(--paper); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); transform: none; }
html[data-look] .an-go__btn.is-locked .ready__ball { filter: grayscale(1); opacity: 0.6; transform: none; }
.an-go__btn.is-ready .ready__ball { animation: nudge 2.6s var(--ease-out) infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-5px) rotate(40deg); } 90% { transform: translateY(0) rotate(80deg); } }
.an-swap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.an-swap:hover:not(:disabled) { background: var(--green-50); }
.an-swap:disabled { opacity: 0.4; cursor: default; }
.an-go__hint { flex-basis: 100%; text-align: center; font-size: 14.5px; color: var(--muted); }
.an-go__btn[aria-busy="true"] { pointer-events: none; }
.an-go__btn[aria-busy="true"] .ready__ball { animation: spin 0.8s linear infinite; }

/* Pendant l'analyse */
.an.is-running .an-go, .an.is-running .an-next, .an.is-running .an-event, .an.is-running .page-head { opacity: 0.25; pointer-events: none; transition: opacity 0.4s ease; }
.an.is-running .pcard__change, .an.is-running .camp__tag { opacity: 0; }
.pcard { transition: transform 0.7s var(--ease-out); }
.an.is-running .camp--a .pcard { transform: translateX(-24%) scale(0.88); transform-origin: left center; }
.an.is-running .camp--b .pcard { transform: translateX(24%) scale(0.88); transform-origin: right center; }
.arena.is-done { transform: scale(1.04); opacity: 0; filter: blur(8px); }

.rally { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.rally__ball, .rally__shadow { position: absolute; left: 0; top: 0; opacity: 0; }
.is-rallying .rally__ball, .is-rallying .rally__shadow { opacity: 1; }
.rally__ball {
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3ff9a, var(--ball) 55%, #b8cf2c);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
  z-index: 2;
}
.rally__shadow { width: 18px; height: 8px; margin: -4px 0 0 -9px; border-radius: 50%; background: rgba(11, 31, 21, 0.45); filter: blur(1.5px); }
.rally__mark { position: absolute; left: 0; top: 0; z-index: 1; width: 26px; height: 12px; margin: -6px 0 0 -13px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); pointer-events: none; animation: mark 0.9s var(--ease-out) forwards; }
@keyframes mark { from { opacity: 1; scale: 0.4; } to { opacity: 0; scale: 1.8; } }

.board {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: min(370px, 86%);
  padding: 16px 18px 14px;
  border-radius: 20px;
  background: rgba(13, 26, 19, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px -16px rgba(0, 0, 0, 0.6);
  color: var(--on-accent);
  transform: translate(-50%, -50%);
  animation: board-in 0.5s var(--ease-out);
}
.board[hidden] { display: none; }
@keyframes board-in { from { opacity: 0; transform: translate(-50%, -40%) scale(0.96); } }
.board__head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.board__live { display: inline-flex; align-items: center; gap: 7px; }
.board__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ball); animation: blink 1.2s ease-in-out infinite; }
.is-final .board__live i { animation: none; }
.board__row { display: grid; grid-template-columns: 1fr auto auto 1fr; align-items: center; gap: 12px; margin-top: 12px; }
.board__name { overflow: hidden; font-family: var(--font-display); font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.85); }
.board__name--b { text-align: right; }
.board__val { min-width: 76px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); font-family: var(--font-mono); font-size: 19px; font-weight: 600; text-align: center; color: var(--on-accent); }
.board__val.is-lead { background: var(--ball); color: var(--ink); }
.is-tick .board__val, .is-tick .board__label { animation: tick 0.45s var(--ease-out); }
@keyframes tick { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
.board__label { margin-top: 10px; text-align: center; font-size: 13.5px; color: rgba(255, 255, 255, 0.78); }
.board__bar { display: block; height: 4px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.14); }
.board__bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ball); transition: width 0.7s var(--ease-out); }
.is-final .board__val { font-size: 24px; }

/* Matchs à venir */
.an-next .section-head { margin-top: 72px; }
.next-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.next-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.next-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.next-card__when { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); }
.next-card__fav { display: inline-flex; align-items: center; gap: 4px; color: var(--green-600); }
.next-card__fav .icon { width: 13px; height: 13px; fill: currentColor; }
.next-card__players { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.next-card__players > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.next-card__players > span:last-child { justify-content: flex-end; }
.next-card__players b { overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.next-card__players i { font-style: normal; font-size: 12px; color: var(--faint); }
.next-card__event { font-size: 13px; color: var(--muted); }

/* ---------- Rapport ---------- */
.report { padding-bottom: 120px; }
.rep-hero {
  --deep: #10364f;
  position: relative;
  overflow: hidden;
  padding: 44px 0 64px;
  background: var(--deep);
  color: var(--on-accent);
  isolation: isolate;
}
.rep-hero[data-surface="clay"] { --deep: #6e3219; }
.rep-hero[data-surface="grass"] { --deep: var(--court); }
.rep-hero[data-surface="indoor"] { --deep: #263244; }
.rep-hero__court { stroke: rgba(255, 255, 255, 0.12); stroke-width: 4; }
.rep-hero__inner { position: relative; text-align: center; }
.rep-back { position: absolute; left: var(--gutter); top: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 550; color: rgba(255, 255, 255, 0.75); transition: color 0.2s ease; }
.rep-back:hover { color: var(--on-accent); }
.rep-hero__context { margin: 34px auto 18px; max-width: 760px; }
.rep-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 0.3em;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 0.8rem + 7vw, 6.5rem);
  font-weight: 750;
  line-height: 0.95;
  letter-spacing: -0.055em;
}
.rep-title i { font-style: normal; font-weight: 400; color: rgba(255, 255, 255, 0.35); font-size: 0.55em; }
.rep-probs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; max-width: 760px; margin: 46px auto 0; text-align: left; }
.rep-side--b { text-align: right; }
.rep-num { display: inline-flex; align-items: baseline; gap: 4px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.05em; line-height: 1; color: rgba(255, 255, 255, 0.92); }
.rep-num b { font-size: clamp(3.4rem, 2rem + 4.4vw, 6rem); font-weight: 700; }
.rep-num small { font-size: 0.42em; font-size: clamp(1.4rem, 1rem + 1.4vw, 2.4rem); opacity: 0.7; }
.rep-side.is-fav .rep-num { color: var(--ball); }
.rep-who { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rep-side--b .rep-who { flex-direction: row-reverse; }
.rep-who > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.rep-who b { font-size: 15px; font-weight: 600; }
.rep-who small { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); }
.rep-who .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.rep-bar { grid-column: 1 / -1; display: block; height: 12px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.16); }
.rep-bar i { display: block; height: 100%; width: var(--p, 50%); border-radius: 99px; background: var(--ball); transition: width 1.5s var(--ease-out); }
.rep-verdict { margin-top: 28px; font-size: 17px; color: rgba(255, 255, 255, 0.85); }
.rep-badge { display: inline-flex; margin-right: 8px; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ball); vertical-align: 2px; }
.rep-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.rep-actions .btn:hover svg { transform: none; }
.rep-ghost { background: rgba(255, 255, 255, 0.1); color: var(--on-accent); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.rep-ghost:hover { background: rgba(255, 255, 255, 0.16); }

.rep-nav { position: sticky; top: var(--nav-h); z-index: 30; background: var(--white); box-shadow: 0 1px 0 var(--line); }
.rep-nav__inner { display: flex; gap: 4px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.rep-nav__inner::-webkit-scrollbar { display: none; }
.rep-nav a { flex: none; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 550; color: var(--muted); transition: background-color 0.2s ease, color 0.2s ease; }
.rep-nav a:hover { color: var(--ink); }
.rep-nav a.is-on { background: var(--ink); color: var(--white); }

.rep-body { max-width: 1080px; }
.rsec { padding-top: 72px; scroll-margin-top: calc(var(--nav-h) + 60px); }
.rsec__head { max-width: 680px; margin-bottom: 26px; }
.rsec__head .eyebrow { margin-bottom: 10px; }
.rsec__title { font-family: var(--font-display); font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.7rem); font-weight: 750; line-height: 1.05; letter-spacing: -0.045em; color: var(--ink); }
.rsec__sub { margin-top: 10px; font-size: 15.5px; color: var(--muted); text-wrap: pretty; }

.keys { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.key {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--pa);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.key--b { border-left-color: var(--pb); }
.key__icon { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--pa-soft); color: var(--pa); }
.key--b .key__icon { background: var(--pb-soft); color: var(--pb); }
.key__icon .icon { width: 18px; height: 18px; }
.key p { padding-top: 5px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.legend span:not(.avatar, .tbadge) { display: inline-flex; align-items: center; gap: 8px; }
.legend__key { width: 14px; height: 4px; border-radius: 2px; background: var(--pa); }
.legend__key--b { background: var(--pb); }

/* Scénarios du match : bande de toutes les issues (couleur du vainqueur ; pleine en sets secs, claire sinon), puis les
   3 plus probables en lignes à filets, chiffres tabulaires. Pas de carte, pas d'ombre, pas de couleur sans sens. */
.sc-block { max-width: 880px; }
.sc-band { display: flex; gap: 2px; height: 10px; overflow: hidden; border-radius: 5px; }
.sc-seg { min-width: 4px; background: var(--pa); }
.sc-seg--b { background: var(--pb); }
.sc-seg.is-long { background: color-mix(in srgb, var(--pa) 45%, var(--white)); }
.sc-seg--b.is-long { background: color-mix(in srgb, var(--pb) 45%, var(--white)); }
.sc-band__labels { display: flex; gap: 2px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.sc-band__labels > span { min-width: 0; overflow: hidden; text-align: center; white-space: nowrap; }
.sc-band__labels b { font-weight: 650; }
.sc-won--a { color: var(--pa); }
.sc-won--b { color: var(--pb); }
.sc-block .legend { margin-top: 10px; }
.sc-list { margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sc { padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.sc__head { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: baseline; gap: 16px; }
.sc__rank { font-size: 13px; font-weight: 600; color: var(--muted); }
.sc__title { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.025em; color: var(--ink); }
.sc__p { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.035em; color: var(--ink); }
/* frise des sets : un point à la couleur du vainqueur du set, relié par un filet */
.sc-sets { position: relative; display: grid; gap: 14px; margin: 16px 0 0 44px; padding: 0; list-style: none; }
.sc-sets::before { content: ""; position: absolute; top: 9px; bottom: 9px; left: 5px; width: 1px; background: var(--line-2); }
.sc-set { position: relative; padding-left: 26px; }
.sc-set__dot { position: absolute; top: 5px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--pa); }
.sc-set--b .sc-set__dot { background: var(--pb); }
.sc-set__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 14px; color: var(--ink-2); }
.sc-set__head b { font-weight: 650; color: var(--ink); }
.sc-set__head .num { font-weight: 650; color: var(--ink); }
.sc-set__lvl { margin-left: 6px; font-size: 12.5px; color: var(--muted); }
.sc-set__text { margin-top: 3px; max-width: 620px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.sc-set__text b { font-weight: 650; color: var(--ink); }
.sc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; margin: 22px 0 0; }
.sc-facts div { display: grid; gap: 3px; }
.sc-facts dt { font-size: 13px; color: var(--muted); }
.sc-facts dd { margin: 0; font-size: 16px; font-weight: 650; color: var(--ink); }
.sc-facts dd span { margin: 0 4px; color: var(--faint); }
.sc-foot { margin-top: 18px; max-width: 720px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 640px) {
  .sc__head { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; }
  .sc__title { font-size: 17px; }
  .sc__p { font-size: 24px; }
  .sc-sets { margin-left: 30px; }
  .sc-facts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

.notes { display: grid; grid-template-columns: minmax(280px, 440px) minmax(0, 1fr); align-items: center; gap: 24px 48px; }
.notes__radar { display: flex; justify-content: center; }
.radar { overflow: visible; }
.radar__ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.radar__ring:last-of-type { fill: rgba(18, 128, 74, 0.03); }
.radar__spoke { stroke: var(--line); stroke-width: 1; }
.radar__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; fill: var(--muted); }
.radar--sm .radar__label { font-size: 9.5px; letter-spacing: 0.02em; }
.radar__shape { stroke-width: 2.5; stroke-linejoin: round; transform: scale(0); transition: transform 1.2s var(--ease-out) var(--d, 0s); }
.radar__shape.is-in { transform: scale(1); }
.radar__shape--a { fill: rgba(18, 128, 74, 0.16); stroke: var(--pa); }
.radar__shape--b { fill: rgba(62, 92, 134, 0.1); stroke: var(--pb); stroke-dasharray: 6 4; }
.notes__list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.note-row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.note-row:last-child { border-bottom: 0; }
.note-row__v { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--muted); }
.note-row__v--b { text-align: right; }
.note-row__v--a.is-lead { color: var(--pa); }
.note-row__v--b.is-lead { color: var(--pb); }
.note-row__bars { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.note-row__label { font-size: 13.5px; font-weight: 550; color: var(--ink-2); text-align: center; white-space: nowrap; }
.note-row__bar { position: relative; display: block; height: 8px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.note-row__bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: calc(var(--v) * 100%); border-radius: inherit; transition: transform 1.1s var(--ease-out) 0.15s; }
.note-row__bar--a::after { right: 0; background: var(--pa); transform-origin: right center; }
.note-row__bar--b::after { left: 0; background: var(--pb); transform-origin: left center; }
html.js [data-bars]:not(.is-in) .note-row__bar::after { transform: scaleX(0); }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.col { padding: 22px; border-radius: 24px; background: var(--white); box-shadow: var(--shadow-md); border-top: 4px solid var(--pa); }
.col--b { border-top-color: var(--pb); }
.col__who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.col__who b { font-size: 16px; font-weight: 650; color: var(--ink); }
.col .pills { flex-wrap: wrap; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 18px 0 0; }
.figs div { padding: 12px 14px; border-radius: 14px; background: var(--paper); }
.figs dt { font-size: 12.5px; color: var(--muted); }
.figs dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.figs dd small { display: block; font-family: var(--font-body); font-size: 11.5px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.sbars { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.sbars li { display: grid; grid-template-columns: 112px 1fr 52px; align-items: center; gap: 10px; font-size: 13.5px; }
.sbars__label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.sbars__track { display: block; height: 8px; overflow: hidden; border-radius: 99px; background: var(--paper); }
.sbars__track i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--green-500); transform-origin: left center; transition: transform 1.1s var(--ease-out) 0.2s; }
.col--b .sbars__track i { background: var(--pb); }
html.js .sbars__track:not(.is-in) i { transform: scaleX(0); }
.sbars__val { text-align: right; font-weight: 600; color: var(--ink); }

.h2h { padding: 26px; border-radius: 28px; background: var(--paper); }
.h2h__score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.h2h__side { display: flex; align-items: center; gap: 12px; min-width: 0; }
.h2h__side--b { justify-content: flex-end; }
.h2h__side b { overflow: hidden; font-family: var(--font-display); font-size: 20px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.h2h__nums { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: 56px; font-weight: 750; letter-spacing: -0.05em; color: var(--faint); }
.h2h__nums i { font-style: normal; font-size: 32px; }
.h2h__nums b { font-weight: 750; }
.h2h__nums b.is-lead { color: var(--ink); }
.h2h .chips { justify-content: center; margin-top: 16px; }
.h2h .chip { background: var(--white); }
.meetings { display: grid; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.meeting { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--white); }
.meeting__event { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.meeting__event b { overflow: hidden; font-size: 14.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.meeting__event small { font-size: 12.5px; color: var(--muted); }
.meeting__score { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); }
.meeting__win { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.meeting__win--a { background: var(--pa-soft); color: var(--pa); }
.meeting__win--b { background: var(--pb-soft); color: var(--pb); }
.h2h-empty { display: flex; align-items: center; gap: 14px; padding: 22px; border-radius: 22px; background: var(--paper); color: var(--muted); }
.h2h-empty .icon { width: 26px; height: 26px; color: var(--green-500); }

.chart-box { position: relative; padding: 14px 10px 6px; border-radius: 24px; background: var(--white); box-shadow: var(--shadow-md); touch-action: pan-y; }
.chart { display: block; overflow: visible; }
.chart__band { fill: var(--paper); }
.chart__y, .chart__x { font-family: var(--font-display); font-size: 13px; font-weight: 500; fill: var(--faint); font-variant-numeric: tabular-nums; }
.chart__x.is-now { font-weight: 700; fill: var(--ink); }
.chart__line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart__line--a { stroke: var(--pa); }
.chart__line--b { stroke: var(--pb); }
.chart__stop--a { stop-color: var(--pa); stop-opacity: 0.22; }
.chart__stop--b { stop-color: var(--pb); stop-opacity: 0.07; }
.chart__stop--end { stop-color: var(--white); stop-opacity: 0; }
.chart__area, .chart__end, .chart__pill { opacity: 0; transition: opacity 1s ease var(--d, 0s); }
.chart__area.is-in, .chart__end.is-in, .chart__pill.is-in { opacity: 1; }
.chart__dot { stroke: var(--white); stroke-width: 2.5; }
.chart__dot--a { fill: var(--pa); }
.chart__dot--b { fill: var(--pb); }
.chart__halo { opacity: 0.18; }
.chart__halo--a { fill: var(--pa); }
.chart__halo--b { fill: var(--pb); }
.chart__end.is-in .chart__halo { animation: halo 2.4s ease-in-out 2.2s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 50% { transform: scale(1.35); opacity: 0.08; } }
.chart__pill rect { filter: drop-shadow(0 4px 10px rgba(11, 31, 21, 0.18)); }
.chart__pill--a rect { fill: var(--pa); }
.chart__pill--b rect { fill: var(--pb); }
.chart__pill text { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; fill: var(--white); }
.chart__hover { stroke: var(--white); stroke-width: 2.5; opacity: 0; pointer-events: none; }
.chart__hover.is-on { opacity: 1; }
.chart__cursor { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.chart__cursor.is-on { opacity: 1; }
.chart__tip[hidden] { display: none; }
.chart__tip { position: absolute; top: 10px; z-index: 2; display: grid; gap: 4px; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--white); font-size: 12.5px; transform: translateX(-50%); pointer-events: none; }
.chart__tip > b { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: capitalize; color: rgba(255, 255, 255, 0.6); }
.chart__tip-row { display: flex; align-items: center; gap: 7px; }
.chart__tip-row b { margin-left: auto; padding-left: 10px; }
.chart__key { width: 10px; height: 3px; border-radius: 2px; background: var(--pa); }
.chart__key--b { background: var(--pb); }
.chart-empty { padding: 40px 12px; text-align: center; color: var(--muted); }

.mirror-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mirror-head span:not(.avatar, .tbadge) { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; color: var(--ink); }
.mirror-head small { margin-left: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.mirrors { margin: 0; padding: 0; list-style: none; }
.mirror { display: grid; grid-template-columns: 64px 1fr minmax(150px, auto) 1fr 64px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mirror__v { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--muted); }
.mirror__v--b { text-align: right; }
.mirror__v.is-lead { color: var(--pa); }
.mirror__v--b.is-lead { color: var(--pb); }
.mirror__label { text-align: center; font-size: 13.5px; color: var(--ink-2); }
.mirror__bar { position: relative; display: block; height: 10px; overflow: hidden; border-radius: 99px; background: var(--paper); }
.mirror__bar i { position: absolute; top: 0; bottom: 0; width: calc(var(--v) * 100%); border-radius: inherit; transition: transform 1.1s var(--ease-out) 0.1s; }
.mirror__bar--a i { right: 0; background: var(--pa); transform-origin: right center; }
.mirror__bar--b i { left: 0; background: var(--pb); transform-origin: left center; }
html.js .mirror__bar:not(.is-in) i { transform: scaleX(0); }

.table-wrap { margin-top: 28px; overflow-x: auto; border-radius: 20px; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 14.5px; }
.table caption { padding: 16px 18px 6px; text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.table th, .table td { padding: 12px 18px; border-top: 1px solid var(--line); text-align: left; }
.table thead th { font-size: 13px; font-weight: 600; color: var(--muted); border-top: 0; }
.table tbody th { font-weight: 550; color: var(--ink-2); }
.table td { font-weight: 600; color: var(--ink); }
.table td small { font-weight: 500; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.tiles div { padding: 12px; border-radius: 14px; background: var(--paper); }
.tiles dt { font-size: 12px; color: var(--muted); }
.tiles dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ink); }
.tone { margin-left: auto; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tone--good { background: var(--green-50); color: var(--green-700); }
.tone--warn { background: #fbefe4; color: #9a4a1c; }
.tone--neutral { background: var(--paper); color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; margin-top: 18px; }
.strip i { height: 22px; border-radius: 4px; background: var(--paper); }
.strip i.is-match { background: var(--pa); }
.col--b .strip i.is-match { background: var(--pb); }
.strip__legend { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }

.titles { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.titles li { display: flex; align-items: center; gap: 12px; }
.titles span:not(.avatar, .tbadge) { display: flex; flex-direction: column; line-height: 1.3; }
.titles b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.titles small { font-size: 12.5px; color: var(--muted); }

.rep-end { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin-top: 72px; }

/* ---------- Verdict : plein écran entre l'échange de balles et le rapport ---------- */
html.vd-open, html.vd-open body { overflow: hidden; }
.vd {
  --v-bg: var(--white); --v-fg: var(--ink); --v-soft: var(--ink-2); --v-faint: var(--muted); --v-accent: var(--green-500); --v-on-accent: #fff; --v-logo: #577c55;
  --v-track: var(--line-2); --v-chip: var(--paper); --v-chip-line: var(--line); --v-court: var(--green-100); --v-halo: rgba(18, 128, 74, 0.14);
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; isolation: isolate;
  padding: calc(64px + env(safe-area-inset-top)) 0 calc(104px + env(safe-area-inset-bottom));
  background: var(--v-bg); color: var(--v-fg);
}
.vd--terre {
  --v-bg: #c4653b; --v-fg: #fff; --v-soft: rgba(255, 255, 255, 0.88); --v-faint: rgba(255, 255, 255, 0.72); --v-accent: #fff; --v-on-accent: #9a4423; --v-logo: #fff;
  --v-track: rgba(0, 0, 0, 0.16); --v-chip: rgba(0, 0, 0, 0.12); --v-chip-line: rgba(255, 255, 255, 0.16); --v-court: rgba(255, 255, 255, 0.45); --v-halo: rgba(255, 255, 255, 0.22);
}
.vd--terre::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #b2552d 0%, rgba(196, 101, 59, 0) 60%); }
.vd__court { position: absolute; left: 50%; bottom: -12%; z-index: -1; width: 210%; transform: translateX(-50%); fill: none; stroke: var(--v-court); stroke-width: 5; }
.vd__top { position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vd__brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 19px; font-weight: 750; letter-spacing: -0.03em; }
.vd__logo { width: 28px; height: 28px; color: var(--v-logo); }
.vd__done { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--v-chip); box-shadow: inset 0 0 0 1px var(--v-chip-line); font-size: 12.5px; font-weight: 600; }
.vd__done i { width: 7px; height: 7px; border-radius: 50%; background: var(--v-accent); }
.vd__close { display: none; align-items: center; gap: 10px; height: 48px; padding: 0 8px 0 20px; border: 0; border-radius: 999px; background: var(--v-accent); color: var(--v-on-accent); font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; box-shadow: 0 12px 28px -14px rgba(11, 31, 21, 0.55); transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease; }
.vd__close i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); transition: transform 0.25s var(--ease-out); }
.vd--terre .vd__close i { background: rgba(154, 68, 35, 0.12); }
.vd__close .icon { width: 18px; height: 18px; }
.vd__close:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -14px rgba(11, 31, 21, 0.6); }
.vd__close:hover i { transform: translateX(3px); }
.vd__grid { display: flex; flex-direction: column; justify-content: center; gap: 2.2svh; width: 100%; flex: 1; min-height: 0; }
.vd__col { display: flex; flex-direction: column; align-items: center; text-align: center; }
.vd__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--v-faint); }
.vd__face { --f: clamp(84px, 15svh, 150px); position: relative; margin-top: 2svh; }
.vd__face .avatar { width: var(--f); height: var(--f); font-size: calc(var(--f) * 0.3); box-shadow: 0 0 0 5px var(--v-accent), 0 0 0 12px var(--v-halo), 0 24px 44px -16px rgba(11, 31, 21, 0.45); }
.vd__crown { position: absolute; left: 50%; bottom: -13px; padding: 5px 11px; border-radius: 999px; background: var(--v-accent); color: var(--v-on-accent); font-size: 11px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); }
.vd__first { margin-top: 3svh; font-size: clamp(15px, 2.2svh, 20px); font-weight: 550; color: var(--v-soft); }
.vd__name { overflow: hidden; font-family: var(--font-display); font-size: clamp(2.3rem, min(12.5vw, 7.4svh), 4.6rem); font-weight: 850; line-height: 0.92; letter-spacing: -0.06em; text-transform: uppercase; overflow-wrap: anywhere; }
.vd__name span { display: inline-block; }
.vd__pct { font-family: var(--font-display); font-size: clamp(4.4rem, min(28vw, 15.5svh), 9rem); font-weight: 850; line-height: 0.85; letter-spacing: -0.065em; color: var(--v-accent); }
.vd__pct small { margin-left: 0.04em; font-size: 0.42em; letter-spacing: -0.02em; vertical-align: 0.95em; }
.vd__lead { margin-top: 0.8svh; font-size: clamp(14px, 2svh, 16px); font-weight: 550; color: var(--v-soft); }
.vd__duel { width: 100%; margin-top: 2svh; }
.vd__who { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.vd__who span { display: inline-flex; align-items: center; gap: 8px; }
.vd__lose { color: var(--v-faint); }
.vd__lose .avatar { filter: grayscale(1); }
.vd__bar { display: flex; gap: 4px; height: 12px; margin-top: 10px; }
.vd__bar i { border-radius: 99px; }
.vd__bar i:first-child { background: var(--v-accent); transform-origin: left center; }
.vd__bar i:last-child { background: var(--v-track); }
.vd__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 1.6svh; }
.vd__chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--v-chip); box-shadow: inset 0 0 0 1px var(--v-chip-line); font-size: 13px; font-weight: 550; white-space: nowrap; }
.vd__chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--v-accent); }
.vd__chip--score { background: transparent; box-shadow: inset 0 0 0 1.5px var(--v-accent); color: var(--v-accent); font-weight: 650; }
.vd--terre .vd__chip--score { color: #fff; }
.vd__chip--score b { font-family: var(--font-display); font-size: 16px; }
/* Téléphone : deux boutons ronds en bas, au centre (partager l'image, voir le rapport) */
.vd__dock { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; gap: 16px; transform: translateX(-50%); }
.vd__round { display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: var(--v-chip); box-shadow: inset 0 0 0 1px var(--v-chip-line), 0 10px 24px -12px rgba(11, 31, 21, 0.4); color: var(--v-fg); cursor: pointer; transition: transform 0.2s var(--ease-out); }
.vd__round .icon { width: 24px; height: 24px; }
.vd__round:active { transform: scale(0.94); }
.vd__round:disabled { opacity: 0.5; }
.vd__round--go { background: var(--v-accent); color: var(--v-on-accent); box-shadow: 0 12px 28px -10px rgba(11, 31, 21, 0.45); }
.vd__round--go .icon { transform: rotate(90deg); }
@media (max-width: 899px) {
  .vd__chip:nth-child(n + 3) { display: none; }
  .vd__done { order: 2; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .vd__chip:nth-child(n + 2), .vd__first, .vd__lead { display: none; }
  .vd__name { margin-top: 22px; }
}
@media (min-width: 900px) {
  .vd { padding: 96px 0 60px; }
  .vd__top { top: 28px; left: 40px; right: 40px; justify-content: flex-start; gap: 16px; }
  .vd__close { display: inline-flex; margin-left: auto; }
  .vd__dock { display: none; }
  .vd__court { width: 120%; bottom: -44%; }
  .vd__grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
  .vd__col { align-items: flex-start; text-align: left; }
  .vd__face { margin-top: 20px; }
  .vd__face { --f: clamp(150px, 22vh, 210px); }
  .vd__crown { left: calc(var(--f) / 2); }
  .vd__first { margin-top: 28px; font-size: 24px; }
  .vd__name { font-size: clamp(4.5rem, min(8.5vw, 13vh), 7.75rem); }
  .vd__pct { font-size: clamp(9rem, min(17vw, 28vh), 15.6rem); }
  .vd__lead { font-size: 20px; margin-top: 10px; }
  .vd__duel { margin-top: 26px; }
  .vd__chips { justify-content: flex-start; margin-top: 18px; }
}

/* Apparition : court tracé, puis chaque élément à son tour (--d), le chiffre monte (JS), la barre se remplit */
.vd { animation: v-fade 0.35s ease both; }
.vd__court path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.vd.is-in .vd__court path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease-in-out); }
.vd [style*="--d"] { opacity: 0; }
.vd.is-in [style*="--d"] { animation: v-rise 0.7s var(--ease-out) var(--d) both; }
.vd.is-in .vd__face { animation-name: v-pop; animation-duration: 0.8s; }
.vd.is-in .vd__crown { animation-name: v-crown; }
.vd.is-in .vd__name span { animation-name: v-up; animation-duration: 0.8s; }
.vd.is-in .vd__pct { animation-name: v-zoom; animation-duration: 0.9s; }
.vd.is-in .vd__dock { animation-name: v-dock; }
.vd.is-in .vd__bar i:first-child { animation: v-fill 1.1s var(--ease-out) 1.4s both; }
.vd.is-in .vd__face .avatar { animation: v-halo 2.8s ease-in-out 2.6s infinite; }
@keyframes v-fade { from { opacity: 0; } }
@keyframes v-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes v-pop { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes v-crown { from { opacity: 0; transform: translate(-50%, 10px) scale(0.9); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes v-up { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
@keyframes v-zoom { 0% { opacity: 0; transform: scale(0.82); filter: blur(6px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes v-dock { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes v-fill { from { transform: scaleX(0); } to { transform: none; } }
@keyframes v-halo { 50% { box-shadow: 0 0 0 5px var(--v-accent), 0 0 0 22px transparent, 0 24px 44px -16px rgba(11, 31, 21, 0.45); } }
.vd.is-leaving { opacity: 0; transform: scale(1.02); transition: opacity 0.3s ease, transform 0.3s ease; }
.vd.is-still, .vd.is-still [style*="--d"] { opacity: 1; animation: none; }
.vd.is-still .vd__court path { stroke-dashoffset: 0; }
html.reduce-motion .vd, html.reduce-motion .vd [style*="--d"] { opacity: 1; animation: none !important; }
@media (prefers-reduced-motion: reduce) { .vd, .vd [style*="--d"] { opacity: 1; animation: none !important; } .vd__court path { stroke-dashoffset: 0; } }

/* Verdict flouté : « Qui va gagner ? », les deux joueurs, un faux pourcentage illisible, le bouton vers les forfaits */
.vd__pair { display: flex; align-items: center; gap: clamp(14px, 4vw, 26px); margin-top: 2svh; }
.vd__pl { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--font-display); font-size: clamp(15px, 2.2svh, 19px); font-weight: 750; letter-spacing: -0.02em; }
.vd__pl .avatar { --f: clamp(70px, 11.5svh, 118px); width: var(--f); height: var(--f); font-size: calc(var(--f) * 0.3); box-shadow: 0 0 0 4px var(--v-bg), 0 0 0 6px var(--v-track), 0 20px 40px -18px rgba(11, 31, 21, 0.45); }
.vd__vs { font-family: var(--font-mono); font-size: 12px; font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; color: var(--v-faint); }
.vd__ask { position: relative; z-index: 1; margin-top: 2.6svh; font-size: clamp(2.1rem, min(10.5vw, 6.4svh), 4rem); text-transform: none; letter-spacing: -0.045em; word-spacing: 0.06em; }
.vd__fog { display: inline-block; filter: blur(0.16em); opacity: 0.85; user-select: none; }
.vd__who.vd__fog, .vd__bar.vd__fog { display: flex; filter: blur(5px); }
.vd__unlock { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 2.2svh; }
.vd__unlock p { font-size: 13px; color: var(--v-faint); }
.vd__cta { display: none; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 999px; background: var(--v-accent); color: var(--v-on-accent); font-size: 16px; font-weight: 700; box-shadow: 0 14px 30px -14px rgba(11, 31, 21, 0.6); transition: transform 0.25s var(--ease-out); }
.vd__cta .icon { width: 18px; height: 18px; }
.vd__cta:hover { transform: translateY(-1px); }
.vd--teaser .vd__close { background: var(--v-chip); color: var(--v-fg); box-shadow: inset 0 0 0 1px var(--v-chip-line); }
.vd--teaser .vd__close i { background: var(--v-track); }
.vd__dock--teaser { align-items: center; }
.vd__dock--teaser .vd__round .icon { transform: rotate(90deg); }
.vd__pillbtn { display: inline-flex; align-items: center; gap: 9px; height: 60px; padding: 0 26px; border-radius: 999px; background: var(--v-accent); color: var(--v-on-accent); font-size: 16px; font-weight: 700; white-space: nowrap; box-shadow: 0 12px 28px -10px rgba(11, 31, 21, 0.45); }
.vd__pillbtn .icon { width: 18px; height: 18px; }
.vd__pillbtn:active { transform: scale(0.97); }
@media (max-width: 899px) {
  .vd--teaser .vd__chip:nth-child(n + 2) { display: inline-flex; }
  .vd--teaser .vd__unlock { margin-top: 1.4svh; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .vd--teaser .vd__chip:nth-child(n + 2), .vd--teaser .vd__unlock p { display: none; }
  .vd--teaser .vd__ask { margin-top: 14px; }
}
@media (min-width: 900px) {
  .vd__pair { margin-top: 24px; gap: 28px; }
  .vd__pl { font-size: 22px; }
  .vd__pl .avatar { --f: clamp(120px, 17vh, 170px); }
  .vd__ask { margin-top: 30px; font-size: clamp(3.4rem, min(5.6vw, 10vh), 5.4rem); }
  .vd__unlock { align-items: flex-start; margin-top: 26px; }
  .vd__cta { display: inline-flex; }
}

/* ---------- Zones floutées (forfaits) : la forme se devine, rien ne se lit ---------- */
.lock { position: relative; isolation: isolate; }
.lock__blur { filter: blur(7px); opacity: 0.75; pointer-events: none; user-select: none; }
.lock--lg .lock__blur { filter: blur(10px); }
/* Cadenas, texte et bouton restent fixes au centre de leur zone : ils défilent avec elle, sans glisser dessus */
.lock__cta { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 20px; }
.lock__card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; text-align: center;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--white) 92%, transparent), color-mix(in srgb, var(--white) 0%, transparent));
}
.lock__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--green-600); box-shadow: var(--shadow-md); }
.lock__icon .icon { width: 20px; height: 20px; }
.lock__title { max-width: 340px; font-family: var(--font-display); font-size: 18px; font-weight: 750; line-height: 1.2; letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.lock__btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 20px; border-radius: 999px; background: var(--green-500); color: var(--on-accent); font-size: 14.5px; font-weight: 650; box-shadow: 0 10px 24px -12px rgba(18, 128, 74, 0.8); transition: background-color 0.2s ease, transform 0.2s var(--ease-out); }
.lock__btn .icon { width: 16px; height: 16px; transition: transform 0.25s var(--ease-out); }
.lock__btn:hover { background: var(--green-600); }
.lock__btn:hover .icon { transform: translateX(3px); }

/* Bannière du rapport sans pronostic, bandeau du forfait */
/* Sans verdict : faux chiffres floutés, jamais lisibles */
.rep-probs--hidden .rep-num { user-select: none; }
.rep-probs--hidden .rep-who { position: relative; z-index: 1; }
.rep-probs--hidden .rep-num b { filter: blur(0.24em); }
.rep-probs--hidden .rep-num small { filter: blur(0.22em); }
.rep-probs--hidden .rep-bar i { filter: blur(3px); }
.hcard__p small.is-fog { filter: blur(5px); user-select: none; }
.board__val.is-fog { filter: blur(9px); user-select: none; }
.rep-badge .icon { width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; }
.rep-plan { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding: 16px 18px; border-radius: 22px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.rep-plan__icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--green-600); box-shadow: var(--shadow-sm); }
.rep-plan__icon .icon { width: 20px; height: 20px; }
.rep-plan__text { flex: 1; min-width: 0; }
.rep-plan__text b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); }
.rep-plan__text p { margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.rep-plan .btn { flex: none; }
.rep-plan .btn[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.rep-plan--credit { background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-200); }
@media (max-width: 640px) {
  .rep-plan { flex-wrap: wrap; }
  .rep-plan .btn { width: 100%; }
}
.verdict--lock { background: var(--paper); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.hcard__result a { font-weight: 650; color: var(--green-600); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Compétitions ---------- */
.comp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.comp-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-block { margin-top: 56px; }
.cat-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cat-block__title { font-family: var(--font-display); font-size: 26px; font-weight: 750; letter-spacing: -0.04em; color: var(--ink); }
.cat-block__count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
/* Un tournoi par ligne : nom, statut, dernier vainqueur, flèche ; colonnes alignées d'une ligne à l'autre. */
.trows { display: grid; gap: 10px; }
.tcard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px minmax(0, 270px) auto;
  grid-template-areas: "top status champ go";
  align-items: center;
  gap: 18px;
  padding: 14px 16px 14px 14px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.tcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tcard__top { grid-area: top; display: flex; align-items: center; gap: 14px; min-width: 0; }
.tcard__top .tbadge { flex: none; }
.tcard__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.25; }
.tcard__name { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.025em; overflow-wrap: break-word; color: var(--ink); }
.tcard__meta { font-size: 13px; color: var(--muted); }
.tcard__status { grid-area: status; justify-self: start; }
.tcard__champ { grid-area: champ; display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); }
.tcard__champ > span { min-width: 0; overflow-wrap: break-word; }
.tcard__champ b { font-weight: 600; color: var(--ink); }
.tcard__champ .avatar { flex: none; }
.tcard__go { grid-area: go; display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--paper); color: var(--ink-2); transition: background-color 0.2s ease, transform 0.25s var(--ease-out); }
.tcard:hover .tcard__go { background: var(--green-500); color: var(--on-accent); transform: translateX(2px); }
.tcard--live { box-shadow: 0 0 0 2px var(--green-500), var(--shadow-sm); }
.tcard--big { padding: 18px 18px 18px 16px; background: var(--court); color: var(--on-accent); box-shadow: var(--shadow-md); }
.tcard--big:hover { box-shadow: var(--shadow-lg); }
.tcard--big .tcard__name { color: var(--on-accent); font-size: 21px; }
.tcard--big .tcard__meta, .tcard--big .tcard__champ { color: rgba(255, 255, 255, 0.7); }
.tcard--big .tcard__champ b { color: var(--on-accent); }
.tcard--big .tcard__go { background: rgba(255, 255, 255, 0.12); color: var(--on-accent); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.status--live { background: var(--green-50); color: var(--green-700); }
.status--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-500); animation: blink 1.4s ease-in-out infinite; }
.tcard--big .status--live { background: var(--ball); color: var(--ink); }
.tcard--big .status--live::before { background: var(--ink); }
.status--upcoming { background: #eef2f8; color: #3e5c86; }
.status--done { background: var(--paper); color: var(--muted); }
.status--absent { background: var(--paper); color: var(--faint); }

/* ---------- Une compétition ---------- */
.t-hero { position: relative; overflow: hidden; padding: 40px 0 44px; background: var(--paper); isolation: isolate; }
/* Court du fond : intérieur transparent, lignes à la couleur dominante du logo du tournoi (--logo-court, posée par
   pages/tournament.js), sinon à celle de la surface (terre battue, gazon, dur, indoor). */
.t-hero { --surf: var(--surface-hard); }
.t-hero[data-surface="clay"] { --surf: var(--surface-clay); }
.t-hero[data-surface="grass"] { --surf: var(--surface-grass); }
.t-hero[data-surface="indoor"] { --surf: var(--surface-indoor); }
.t-hero__court { position: absolute; right: -120px; bottom: -40px; z-index: -1; width: 720px; height: 332px; overflow: visible; }
.t-hero__court .court { fill: none; stroke: var(--logo-court, var(--surf)); stroke-width: 6; stroke-opacity: 0.75; }
.t-hero__back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 550; color: var(--muted); }
.t-hero__back:hover { color: var(--ink); }
.t-hero__id { display: flex; align-items: center; gap: 20px; margin-top: 22px; }
.t-hero__id .tbadge { --s: 76px; border-radius: 22px; }
/* Logo complet du tournoi (au-dessus du titre) : remplace l'écusson une fois chargé ; plaque selon le fond
   (data-pf : c = mode clair, plaque foncée ; s = mode sombre, plaque blanche), variante sombre (tlogo--dark). */
.t-hero__id--logo { flex-direction: column; align-items: flex-start; gap: 16px; }
.tfull { --h: 76px; position: relative; display: inline-flex; flex: none; align-items: center; max-width: min(340px, 100%); border-radius: 16px; }
.tfull__img { position: absolute; left: 0; top: 0; height: var(--h); width: auto; max-width: 100%; object-fit: contain; opacity: 0; pointer-events: none; }
.tfull__img--d { display: none; }
.tfull.has-logo > .tbadge { display: none; }
.tfull.has-logo .tfull__img--l { position: static; opacity: 1; }
html[data-look="sombre"] .tfull.tlogo--dark .tfull__img--l { display: none; }
html[data-look="sombre"] .tfull.tlogo--dark .tfull__img--d { display: block; }
html[data-look="sombre"] .tfull.has-logo.tlogo--dark .tfull__img--d { position: static; opacity: 1; }
html:not([data-look="sombre"]) .tfull.has-logo[data-pf*="c"] { padding: 8px 12px; background: #141c18; }
html[data-look="sombre"] .tfull.has-logo[data-pf*="s"] { padding: 8px 12px; background: #ffffff; }
.t-hero__place { margin: 8px 0 0; font-size: 16px; font-weight: 550; color: var(--muted); }
.t-hero__title { font-family: var(--font-display); font-size: clamp(2.3rem, 1.4rem + 3vw, 3.8rem); font-weight: 750; line-height: 1; letter-spacing: -0.05em; color: var(--ink); }
.t-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.t-hero__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 26px; }
.t-fact { display: flex; flex-direction: column; }
.t-fact dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.t-fact dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ink); }

.t-tabs { position: sticky; top: var(--nav-h); z-index: 30; background: var(--white); box-shadow: 0 1px 0 var(--line); }
.t-tabs__inner { display: flex; gap: 4px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.t-tabs__inner::-webkit-scrollbar { display: none; }
.t-tab { flex: none; height: 36px; padding: 0 15px; border: 0; border-radius: 999px; background: transparent; font-size: 14px; font-weight: 550; color: var(--muted); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.t-tab:hover { color: var(--ink); }
.t-tab[aria-selected="true"] { background: var(--ink); color: var(--white); }
.t-panel { padding: 40px 0 0; animation: rise 0.45s var(--ease-out); }
.t-panel[hidden] { display: none; }

.fc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.fc-card { min-width: 0; padding: 22px; border-radius: 24px; background: var(--white); box-shadow: var(--shadow-md); }
.fc-card__title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.fc-card__sub { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.fc-bars { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.fc-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; }
.fc-bar__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fc-bar__who b { overflow: hidden; font-size: 14.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.fc-bar__track { display: block; height: 10px; overflow: hidden; border-radius: 99px; background: var(--paper); }
.fc-bar__track i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--green-500); transform-origin: left center; transition: transform 1.2s var(--ease-out) calc(var(--d, 0s) + 0.1s); }
.fc-bar:first-child .fc-bar__track i { background: var(--ball); box-shadow: inset 0 0 0 1px rgba(11, 31, 21, 0.1); }
html.js .fc-bar__track:not(.is-in) i { transform: scaleX(0); }
.fc-bar__v { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); }
.fc-bar .fc-bar__track { grid-column: 1 / -1; order: 3; }
.fc-lines { display: grid; gap: 8px; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.fc-lines b { color: var(--ink); }
.heat-wrap { margin-top: 18px; overflow-x: auto; }
.heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 13px; }
.heat th { padding: 6px 8px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: center; }
.heat th:first-child { text-align: left; }
.heat td { padding: 7px 6px; border-radius: 8px; text-align: center; font-weight: 600; color: var(--ink); background: rgba(18, 128, 74, calc(var(--v) * 0.85 + 0.04)); }
.heat td.is-hot { color: var(--on-accent); }
.heat td:first-child { background: none; text-align: left; font-weight: 550; white-space: nowrap; }
.heat__who { display: inline-flex; align-items: center; gap: 8px; }
.fc-note { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--paper); font-size: 13px; color: var(--muted); }
.fc-note .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--green-600); }

.draw-rounds { display: none; gap: 6px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.draw { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 10px; }
.draw__col { display: flex; flex-direction: column; }
.draw__body { display: flex; flex: 1; flex-direction: column; justify-content: space-around; gap: 10px; }
.draw__head { margin-bottom: 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dm { padding: 8px 10px; border-radius: 14px; background: var(--white); box-shadow: var(--shadow-sm); }
.dm__p { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; color: var(--ink-2); }
.dm__p + .dm__p { border-top: 1px solid var(--line); }
.dm__p b { overflow: hidden; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.dm__p.is-win b { font-weight: 700; color: var(--ink); }
.dm__p.is-out { opacity: 0.55; }
.dm__seed { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }
.dm__score { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.dm__p.is-win .dm__score { color: var(--green-600); }
.dm__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--faint); }
.dm--next { box-shadow: 0 0 0 1.5px var(--green-200), var(--shadow-sm); }

.path { display: grid; gap: 22px; }
.path__group h3 { margin-bottom: 10px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.path__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.path__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--white); box-shadow: var(--shadow-sm); }
.path__item span:not(.avatar, .tbadge) { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.path__item b { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.path__item small { font-size: 12px; color: var(--muted); }
.path__item--alive { box-shadow: 0 0 0 1.5px var(--green-500), var(--shadow-sm); }
.path__item--champ { background: var(--court); color: var(--on-accent); }
.path__item--champ b { color: var(--ball); }
.path__item--champ small { color: rgba(255, 255, 255, 0.7); }

.up-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.up { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 18px; background: var(--white); box-shadow: var(--shadow-sm); }
.up__when { font-family: var(--font-mono); font-size: 12px; line-height: 1.35; color: var(--muted); }
.up__match { display: grid; gap: 8px; min-width: 0; }
.up__row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.up__row b { overflow: hidden; font-size: 14.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.up__vs { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); padding-left: 34px; line-height: 1; }
.dm__go { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; color: var(--green-600); }
.dm__go .icon { width: 13px; height: 13px; transition: transform 0.2s var(--ease-out); }
.dm__go:hover .icon { transform: translateX(2px); }
.fc-note--pro { margin: 0 0 18px; }
.fc-note--pro a { font-weight: 650; color: var(--green-600); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Pronostic : prochains matchs et analyse de toute la compétition ----------
   Parti pris sobre : sections séparées par des filets (pas de carte dans une carte, pas d'ombre), un seul accent,
   confiance en mots avec un indicateur à 3 barres, chiffres tabulaires. Rayons : panneau 16, tuile 12. */
.tp-next { margin-bottom: 40px; }
.tp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tp-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.tp-sub { margin: 4px 0 16px; font-size: 14px; color: var(--muted); }
.tp-more { padding: 0; border: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--green-600); cursor: pointer; white-space: nowrap; }
.tp-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.nm-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.nm { display: grid; gap: 8px; height: 100%; padding: 12px 14px; border-radius: 12px; background: var(--white); color: inherit; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s ease, background-color 0.2s ease; }
a.nm:hover { box-shadow: inset 0 0 0 1px var(--line-2); background: var(--paper); }
a.nm:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }
.nm__meta { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.nm__meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm__meta b { font-weight: 600; color: var(--ink-2); }
.nm__p { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nm__p b { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.nm__go { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--green-600); }
.nm--off .nm__go { font-weight: 500; color: var(--faint); }

/* panneau de lancement */
.cx { display: grid; gap: 28px; }
.cx-launch { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 32px; padding: 24px 26px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.cx-launch__label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.cx-tag { padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.cx-launch__title { margin-top: 6px; font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.03em; color: var(--ink); }
.cx-launch__sub { margin-top: 6px; max-width: 560px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.cx-launch__go { white-space: nowrap; }
.cx-launch__go[hidden], .cx-launch__done[hidden] { display: none; }
.cx-launch__done { font-size: 13px; color: var(--muted); }
.cx-run { grid-column: 1 / -1; display: grid; gap: 10px; }
.cx-run[hidden] { display: none; }
.cx-run__bar { height: 3px; overflow: hidden; border-radius: 3px; background: var(--line-2); }
.cx-run__bar i { display: block; height: 100%; background: var(--green-500); transform: scaleX(0); transform-origin: left center; }
.cx-run__text { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.cx-run__text b { font-weight: 600; color: var(--ink); }
.cx-out:empty { display: none; }

/* résultats */
.cx-res { display: grid; gap: 36px; }
.cx-head { display: flex; align-items: center; gap: 18px; padding-bottom: 24px; border-bottom: 1px solid var(--line); outline: none; }
.cx-head .avatar { flex: none; }
.cx-head__who { flex: 1; min-width: 0; }
.cx-head__label { font-size: 13px; color: var(--muted); }
.cx-head__name { margin-top: 2px; font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.04em; color: var(--ink); }
.cx-head__sub { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.cx-head__stats { display: flex; gap: 28px; margin: 0; }
.cx-head__stats div { display: grid; gap: 2px; text-align: right; }
.cx-head__stats dt { font-size: 12.5px; color: var(--muted); }
.cx-head__stats dd { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.cx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.cx-side { display: grid; gap: 0; }
.cx-side > .cx-sec { padding: 20px 0; border-top: 1px solid var(--line); }
.cx-side > .cx-sec:first-child { padding-top: 0; border-top: 0; }
.cx-sec__title { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.cx-sec--main .cx-sec__title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.cx-sec__sub { margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cx-sec__label { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.cx-empty { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.cx-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* lignes à filets */
.cx-rows { margin: 10px 0 0; padding: 0; list-style: none; }
.cx-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.cx-row:first-child { border-top: 0; }
.cx-row__main { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-row__main b { font-weight: 600; color: var(--ink); }
.cx-row--2 .cx-row__main { display: flex; flex-direction: column; gap: 1px; white-space: normal; }
.cx-row--2 .cx-row__main b, .cx-row--2 .cx-row__main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-row__main small { font-size: 12.5px; color: var(--muted); }
.cx-row__val { font-size: 13px; color: var(--muted); white-space: nowrap; }
.cx-row__val b { font-weight: 600; color: var(--ink); }
.cx-trend { margin-left: 4px; font-size: 9px; font-style: normal; }
.cx-trend--up { color: var(--green-600); }
.cx-trend--down { color: var(--faint); }

/* confiance : indicateur à 3 barres, un seul accent */
.conf { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.conf__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.conf__bars i { width: 3px; border-radius: 1px; background: var(--line-2); }
.conf__bars i:nth-child(1) { height: 5px; }
.conf__bars i:nth-child(2) { height: 7.5px; }
.conf__bars i:nth-child(3) { height: 10px; }
.conf--1 .conf__bars i:nth-child(-n+1),
.conf--2 .conf__bars i:nth-child(-n+2),
.conf--3 .conf__bars i { background: var(--green-500); }

/* tableau prédit : un tour à la fois, tuiles compactes */
.cx-sec .cx-rounds { display: flex; flex-wrap: wrap; margin: 14px 0 0; }
.cx-draw { margin-top: 14px; }
.cx-draw .draw__col { display: none; }
.cx-draw .draw__col.is-on { display: block; }
.cx-draw__head { margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.cx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.cx-more { display: none; width: 100%; margin-top: 8px; padding: 10px; border: 0; border-radius: 12px; background: none; font-size: 13.5px; font-weight: 600; color: var(--green-600); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.cx-more[hidden] { display: none !important; }
.pm { display: grid; padding: 10px 12px; border-radius: 12px; color: inherit; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.2s ease, box-shadow 0.2s ease; }
a.pm:hover { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); }
a.pm:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }
.pm__p { display: flex; justify-content: space-between; gap: 8px; overflow: hidden; padding: 2px 0; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.pm__p.is-win { font-weight: 650; color: var(--ink); }
.pm__p.is-lose { color: var(--muted); }
.pm__p.is-tbd { color: var(--faint); }
.pm__check { font-style: normal; color: var(--green-600); }
.pm__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pm__verdict { color: var(--muted); }
.pm__verdict.is-ok { color: var(--green-600); }

/* parcours des favoris : tableau comparatif, un favori par colonne */
.cx-paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; border-top: 1px solid var(--line); }
.cx-path { min-width: 0; padding: 16px 16px 4px; }
.cx-path + .cx-path { border-left: 1px solid var(--line); }
.cx-path:first-child { padding-left: 0; }
.cx-path__head { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.cx-path__head > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cx-path__head b { overflow: hidden; font-size: 14.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cx-path__head small { font-size: 12.5px; color: var(--muted); }
.cx-path__rows { margin: 12px 0 0; padding: 0; list-style: none; }
.cx-path__rows li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 38px; border-top: 1px solid var(--line); font-size: 13px; }
.cx-path__rows li.is-hard { margin: 0 -8px; padding: 0 8px; border-radius: 8px; background: var(--paper); border-top-color: transparent; }
.cx-path__rows li.is-hard + li { border-top-color: transparent; }
.cx-path__r { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cx-path__opp { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cx-path__opp small { font-weight: 400; color: var(--muted); }
.cx-path__opp.is-muted { font-weight: 400; color: var(--faint); }

/* bilan */
.cx-bilan { margin-top: 8px; font-family: var(--font-display); color: var(--ink); }
.cx-bilan b { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; }
.cx-bilan span { margin-left: 6px; font-size: 20px; font-weight: 600; color: var(--muted); }
.cx-res--bilan { max-width: 640px; }

/* blocs « Favoris pour le titre » et « Qui sort quand » : même retenue (filet, sans ombre) */
.cx-fc .fc-card { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }

@media (max-width: 1100px) {
  .cx-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cx-side > .cx-sec:first-child { padding-top: 20px; border-top: 1px solid var(--line); }
  .cx-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-path:nth-child(3) { padding-left: 0; border-left: 0; }
  .cx-path:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .tp-head { flex-wrap: wrap; }
  /* les 5 prochains matchs en bande qui défile, une tuile et demie visible */
  .nm-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .nm-list::-webkit-scrollbar { display: none; }
  .nm-list > li { scroll-snap-align: start; }
  .cx-launch { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .cx-launch__go { width: 100%; }
  .cx-head { flex-wrap: wrap; gap: 14px; }
  .cx-head .avatar--lg { width: 52px; height: 52px; font-size: 17px; }
  .cx-head__name { font-size: 24px; }
  .cx-head__stats { width: 100%; gap: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
  .cx-head__stats div { text-align: left; }
  .cx-head__stats dd { font-size: 22px; }
  .cx-tiles:not(.is-open) > :nth-child(n+9) { display: none; }
  .cx-more { display: block; }
  .cx-paths { grid-template-columns: minmax(0, 1fr); }
  .cx-path, .cx-path + .cx-path, .cx-path:nth-child(3) { padding-left: 0; padding-right: 0; border-left: 0; }
  .cx-path + .cx-path { border-top: 1px solid var(--line); }
}

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pchip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--white); box-shadow: var(--shadow-sm); }
.pchip span:not(.avatar, .tbadge) { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pchip b { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pchip small { font-size: 12px; color: var(--muted); }
.pchip.is-out { opacity: 0.55; }
a.pchip { transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease; }
a.pchip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.editions { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.edition { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 18px; background: var(--white); box-shadow: var(--shadow-sm); }
.edition__year { font-family: var(--font-display); font-size: 22px; font-weight: 750; letter-spacing: -0.04em; color: var(--ink); }
.edition__champ { display: flex; align-items: center; gap: 10px; min-width: 0; }
.edition__champ span:not(.avatar, .tbadge) { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.edition__champ b { overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.edition__champ small { font-size: 12.5px; color: var(--muted); }
.edition__score { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

/* ---------- Historique ---------- */
.hist-top { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 28px; padding: 26px; border-radius: 28px; background: var(--paper); }
.hist-ring { position: relative; display: grid; place-items: center; }
.hist-ring__v { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.hist-ring__v b { font-family: var(--font-display); font-size: 30px; font-weight: 750; letter-spacing: -0.04em; color: var(--ink); }
.hist-ring__v small { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.ring-chart { transform: rotate(-90deg); }
.ring-chart__track { fill: none; stroke: var(--white); stroke-width: 12; }
.ring-chart__value { fill: none; stroke: var(--green-500); stroke-width: 12; stroke-linecap: round; }
html.js .ring-chart__value[data-draw] { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-out) 0.2s; }
html.js .ring-chart__value[data-draw].is-in { stroke-dashoffset: calc(1 - var(--v)); }
.hist-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.hist-stats div { padding: 14px 16px; border-radius: 16px; background: var(--white); }
.hist-stats dt { font-size: 12.5px; color: var(--muted); }
.hist-stats dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 24px; font-weight: 750; letter-spacing: -0.03em; color: var(--ink); }
.hist-filters { position: relative; z-index: 5; display: grid; gap: 12px; margin: 34px 0 20px; }
.hist-filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
/* Listes déroulantes (niceSelect) : bouton pilule, carte d'options arrondie, coche sur l'option choisie */
.menu__native { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.menu { position: relative; display: inline-block; }
.menu__btn { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px 0 16px; border: 0; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; transition: box-shadow 0.2s ease, background-color 0.2s ease; }
.menu__btn:hover { box-shadow: inset 0 0 0 1px var(--green-200); }
.menu__btn:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--green-500), 0 0 0 3px var(--green-100); }
.menu.is-open { z-index: 2; }
.menu.is-open .menu__btn { box-shadow: inset 0 0 0 1.5px var(--green-500); }
.menu__chev { width: 16px; height: 16px; color: var(--muted); transition: transform 0.25s var(--ease-out); }
.menu.is-open .menu__chev { transform: rotate(180deg); color: var(--green-600); }
.menu__list { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; min-width: max(100%, 220px); max-height: 320px; margin: 0; padding: 6px; overflow-y: auto; list-style: none; border-radius: 18px; background: var(--white); box-shadow: 0 0 0 1px var(--line), 0 18px 44px -14px rgba(11, 31, 21, 0.3); opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); transform-origin: top left; transition: opacity 0.18s ease, transform 0.22s var(--ease-out), visibility 0s linear 0.22s; outline: none; scrollbar-width: thin; }
.menu.is-up .menu__list { top: auto; bottom: calc(100% + 8px); transform-origin: bottom left; transform: translateY(6px) scale(0.98); }
.menu.is-open .menu__list { opacity: 1; visibility: visible; transform: none; transition: opacity 0.18s ease, transform 0.22s var(--ease-out); }
.menu__opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 42px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 550; white-space: nowrap; color: var(--ink-2); cursor: pointer; }
.menu__opt.is-active { background: var(--paper); color: var(--ink); }
.menu__opt[aria-selected="true"] { color: var(--green-700); font-weight: 650; }
.menu__check { flex: none; width: 16px; height: 16px; color: var(--green-500); opacity: 0; }
.menu__opt[aria-selected="true"] .menu__check { opacity: 1; }
@media (max-width: 720px) {
  .hist-filters__row:has(.menu) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hist-filters__row .menu { display: block; min-width: 0; }
  .hist-filters__row .menu__btn { justify-content: space-between; width: 100%; padding: 0 12px 0 14px; font-size: 13.5px; }
  .menu__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu__list { min-width: max(100%, 210px); }
  .hist-filters__row .menu:nth-child(2n of .menu) .menu__list { left: auto; right: 0; transform-origin: top right; }
}
.acct__row { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.acct__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.acct__icon svg { width: 22px; height: 22px; }
.acct__id { display: grid; min-width: 0; }
.acct__id b { overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.acct__id small { font-size: 13px; color: var(--muted); }
.hlist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hcard { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 20px; background: var(--white); box-shadow: var(--shadow-md); }
.hcard__main { display: grid; gap: 10px; min-width: 0; }
.hcard__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.hcard__players { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.hcard__p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hcard__p--b { justify-content: flex-end; text-align: right; }
.hcard__p span:not(.avatar, .tbadge) { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hcard__p b { overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.hcard__p small { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--muted); }
.hcard__p.is-fav small { color: var(--green-600); }
.hcard__p.is-winner b::after { content: " ✓"; color: var(--green-600); }
.hcard__vs { font-size: 12px; color: var(--faint); }
.hcard__result { font-size: 13px; color: var(--ink-2); }
.hcard__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hcard__actions > span { display: flex; gap: 6px; }
.verdict { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.verdict .icon { width: 14px; height: 14px; }
.verdict--ok { background: var(--green-50); color: var(--green-700); }
.verdict--ko { background: #fbece7; color: var(--bad); }
.verdict--wait { background: var(--paper); color: var(--muted); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink-2); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.icon-btn:hover { background: var(--green-50); color: var(--green-700); }
.icon-btn--danger:hover { background: #fbece7; color: var(--bad); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--green-600); cursor: pointer; }
.link-btn:hover { color: var(--green-700); }

/* ---------- Profil ---------- */
.prof { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.prof-card { position: sticky; top: calc(var(--nav-h) + 24px); padding: 28px; border-radius: 28px; background: var(--court); color: var(--on-accent); text-align: center; overflow: hidden; isolation: isolate; }
.prof-card .court { position: absolute; left: -10%; bottom: -24px; z-index: -1; width: 120%; height: auto; aspect-ratio: 1280 / 398; stroke: rgba(255, 255, 255, 0.1); stroke-width: 3; }
.prof-card__avatar { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; background: var(--ball); color: var(--ink); font-family: var(--font-display); font-size: 34px; font-weight: 750; letter-spacing: -0.04em; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1); }
.prof-card__name { margin-top: 16px; font-family: var(--font-display); font-size: 26px; font-weight: 750; letter-spacing: -0.04em; }
.prof-card__since { margin-top: 4px; font-size: 13.5px; color: rgba(255, 255, 255, 0.7); }
.prof-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 0; }
.prof-card__stats div { padding: 12px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); }
.prof-card__stats dt { font-size: 11.5px; color: rgba(255, 255, 255, 0.65); }
.prof-card__stats dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 750; color: var(--on-accent); }
.prof-card__fav { margin-top: 18px; font-size: 13.5px; color: rgba(255, 255, 255, 0.75); }
.prof-card__fav b { color: var(--ball); }
.panel { padding: 26px; border-radius: 28px; background: var(--white); box-shadow: var(--shadow-md); }
.panel + .panel { margin-top: 20px; }
.panel__title { font-family: var(--font-display); font-size: 22px; font-weight: 750; letter-spacing: -0.035em; color: var(--ink); }
.panel__sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.field { display: grid; gap: 8px; margin-top: 20px; }
.field__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field__hint { font-size: 13px; color: var(--muted); }
.input {
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15.5px;
  color: var(--ink);
  outline: none;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.input:focus { background: var(--white); box-shadow: 0 0 0 2px var(--green-500); }
.set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { margin-top: 12px; }
.set-row__text { display: flex; flex-direction: column; gap: 2px; max-width: 360px; }
.set-row__text b { font-size: 15px; font-weight: 600; color: var(--ink); }
.set-row__text small { font-size: 13px; color: var(--muted); }
.fav-pick { position: relative; margin-top: 18px; }
.fav-pick .search__icon { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); }
.fav-pick .input { width: 100%; padding-left: 44px; }
.fav-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.fav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--paper); }
.fav span:not(.avatar, .tbadge) { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fav b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.fav small { font-size: 12.5px; color: var(--muted); }
.fav__actions { display: flex; gap: 6px; }
.data-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn--danger { background: #fbece7; color: var(--bad); }
.btn--danger:hover { background: #f6dcd3; }
.about { display: grid; gap: 10px; margin-top: 14px; font-size: 14.5px; color: var(--ink-2); }
.about a { color: var(--green-600); font-weight: 600; }

/* ---------- Forfaits ---------- */
.plans .page-head { max-width: 720px; }
.plans .page-lead { margin-inline: auto; }
/* Cartes : styles.css (communs avec l'accueil). Ici, les états propres à l'app */
.plans-wrap { max-width: 1120px; margin: 0 auto; }
.plan.is-wanted:not(.plan--pro):not(.plan--lifetime) { box-shadow: 0 0 0 2px var(--green-500), var(--shadow-md); }
.plan.is-wanted:not(.plan--pro):not(.plan--lifetime) .plan__btn { background: var(--green-500); color: #fff; box-shadow: 0 12px 26px -14px rgba(18, 128, 74, 0.9); }
.plan__btn[aria-busy="true"] { pointer-events: none; opacity: 0.7; }
.plan__btn[aria-busy="true"] .icon { animation: spin 0.8s linear infinite; }
.plan__own { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; margin-top: auto; border-radius: 16px; background: var(--green-50); color: var(--green-700); font-size: 15px; font-weight: 700; }
.plan--pro .plan__own, .plan--lifetime .plan__own { background: rgba(255, 255, 255, 0.12); color: #fff; }
.plan__own .icon { width: 18px; height: 18px; }
.plan__own--muted { background: var(--paper); color: var(--muted); font-weight: 600; }
.plan__note { margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--muted); text-align: center; }
.plan--pro .plan__note, .plan--lifetime .plan__note { color: rgba(255, 255, 255, 0.7); }
.plan-status { display: flex; align-items: center; gap: 16px; max-width: 1120px; margin: 0 auto 22px; padding: 16px 18px; border-radius: 22px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.plan-status > div { flex: 1; min-width: 0; }
.plan-status b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); }
.plan-status p { margin-top: 2px; font-size: 14px; color: var(--muted); }
.plan-status--ok { background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-200); }
.plan-status__icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--green-600); box-shadow: var(--shadow-sm); }
.plan-status__icon .icon { width: 20px; height: 20px; }
.plan-status__spin { flex: none; width: 28px; height: 28px; margin: 8px; border: 3px solid var(--green-100); border-top-color: var(--green-500); border-radius: 50%; animation: spin 0.8s linear infinite; }
.plan-compare { max-width: 1120px; margin: 64px auto 0; }
.plan-compare .section-title, .plan-faq .section-title { margin-bottom: 18px; }
.plan-table th[scope="row"] { font-weight: 550; color: var(--ink-2); text-align: left; }
.plan-table td, .plan-table thead th { text-align: center; }
.plan-yes { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green-50); color: var(--green-600); }
.plan-yes .icon { width: 15px; height: 15px; }
.plan-no { color: var(--faint); }
.plan-faq { max-width: 1120px; margin: 56px auto 0; }
.plan-faq dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.plan-faq dl > div { padding: 20px; border-radius: 20px; background: var(--paper); }
.plan-faq dt { font-weight: 700; color: var(--ink); }
.plan-faq dd { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) {
  .plan-faq dl { grid-template-columns: 1fr; }
  .plan-status { flex-wrap: wrap; }
  .plan-status .btn { width: 100%; }
}

/* Animations du paywall (celles des cartes sont dans styles.css) : reflet des boutons, cadenas, verdict */
.lock__btn, .vd__cta, .vd__pillbtn { position: relative; overflow: hidden; isolation: isolate; }
.lock__btn::after, .vd__cta::after, .vd__pillbtn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-130%); animation: shine 4.2s ease-in-out 1.6s infinite;
}
.lock__btn::after { animation-duration: 5s; animation-delay: 2.2s; }
.plan.is-wanted:not(.plan--pro):not(.plan--lifetime).is-in { animation: plan-ring 2.2s ease-out 1.2s 2; }
.lock__icon { animation: lock-bob 3.2s ease-in-out infinite; }
.vd--teaser .vd__cta, .vd--teaser .vd__pillbtn { animation: cta-pulse 2.6s ease-in-out 2.4s infinite; }
.plan-status--ok .plan-status__icon { animation: plan-badge 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes plan-ring { 0% { box-shadow: 0 0 0 2px var(--green-500), 0 0 0 0 rgba(18, 128, 74, 0.45), var(--shadow-md); } 100% { box-shadow: 0 0 0 2px var(--green-500), 0 0 0 16px rgba(18, 128, 74, 0), var(--shadow-md); } }
@keyframes lock-bob { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 78% { transform: translateY(-3px) rotate(-8deg); } 86% { transform: translateY(-3px) rotate(7deg); } 93% { transform: translateY(0) rotate(-3deg); } }
@keyframes cta-pulse { 0%, 100% { box-shadow: 0 12px 28px -12px rgba(11, 31, 21, 0.5), 0 0 0 0 color-mix(in srgb, var(--v-accent) 45%, transparent); } 50% { box-shadow: 0 12px 28px -12px rgba(11, 31, 21, 0.5), 0 0 0 10px color-mix(in srgb, var(--v-accent) 0%, transparent); } }

/* Profil : forfait en cours */
.plan-mine { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.plan-mine__badge { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--court); color: var(--ball); }
.plan-mine__badge .icon { width: 22px; height: 22px; }
.plan-mine--free .plan-mine__badge { background: var(--paper); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.plan-mine b { display: block; font-size: 15px; font-weight: 650; color: var(--ink); }
.plan-mine small { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Mouvement réduit forcé par le réglage de l'application ---------- */
html.reduce-motion { scroll-behavior: auto; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  transition-delay: 0s !important;
}
html.reduce-motion.js [data-reveal], html.reduce-motion.js .w__i { opacity: 1; transform: none; filter: none; }
html.reduce-motion.js [data-draw] { stroke-dashoffset: 0; }
html.reduce-motion.js .ring-chart__value[data-draw] { stroke-dashoffset: calc(1 - var(--v)); }
html.reduce-motion .radar__shape { transform: scale(1); }
html.reduce-motion .chart__area, html.reduce-motion .chart__end, html.reduce-motion .chart__pill { opacity: 1; }
html.reduce-motion .chart__halo { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .ring-chart__value[data-draw] { stroke-dashoffset: calc(1 - var(--v)); }
  .radar__shape { transform: scale(1); }
  .chart__area, .chart__end, .chart__pill { opacity: 1; }
  .chart__halo { animation: none !important; }
  .view.is-leaving { opacity: 1; filter: none; transform: none; }
  .side__list li, .side__pulse::after { animation: none; }
}
html.reduce-motion .side__list li, html.reduce-motion .side__pulse::after { animation: none; }

/* ---------- Écrans moyens et téléphones ---------- */
@media (max-width: 1100px) {
  .notes { grid-template-columns: minmax(0, 1fr); }
  .prof { grid-template-columns: minmax(0, 1fr); }
  .prof-card { position: relative; top: 0; }
  .fc { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .app-tabs, .app-me { display: none; }
  /* Barre d'onglets flottante : pilule blanche, icônes seules, onglet actif dans un rond vert */
  :root { --tabbar-h: 96px; }
  .app-body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    max-width: 440px;
    height: 68px;
    margin: 0 auto;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--white);
    box-shadow: 0 0 0 1px var(--line), 0 20px 44px -16px rgba(11, 31, 21, 0.4);
  }
  .tabbar a { position: relative; display: grid; place-items: center; justify-self: center; width: 54px; height: 54px; border-radius: 50%; color: var(--ink-2); transition: background-color 0.25s var(--ease-out), color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out); }
  .tabbar a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabbar a svg { width: 23px; height: 23px; }
  .tabbar .quota { top: 5px; right: 4px; }
  .tabbar a.is-active .quota { box-shadow: 0 0 0 2px var(--green-500); background: #fff; color: var(--green-600); }
  .tabbar a.is-active .quota.is-empty { color: var(--muted); }
  .tabbar a:active { transform: scale(0.92); }
  .tabbar a.is-active { background: var(--green-500); color: var(--on-accent); }
  .toast { bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom)); }
  .nav__inner { justify-content: center; }
  .duo { grid-template-columns: minmax(0, 1fr); }
}

/* Court vertical (camp A en haut, camp B en bas) dès que la largeur ne laisse plus deux cartes côte à côte. */
@media (max-width: 960px) {
  .arena { padding: 22px 18px; border-radius: 28px; }
  .arena__court { aspect-ratio: 1097 / 2377; max-height: 760px; margin-inline: auto; }
  .arena__lines--h { display: none; }
  .arena__lines--v { display: block; stroke-width: 10; }
  .arena__net { top: 50%; bottom: auto; left: -6%; right: -6%; width: auto; height: 10px; margin: -5px 0 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px 7px), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.4) 0 2px, transparent 2px 5px), rgba(11, 31, 21, 0.35); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 6px 14px rgba(11, 31, 21, 0.25); }
  .arena__net::before, .arena__net::after { top: 50%; bottom: auto; left: auto; margin: -7px 0 0; }
  .arena__net::before { left: -10px; }
  .arena__net::after { right: -10px; }
  .camp { left: 0; right: 0; width: auto; height: 50%; padding: 40px 12px 18px; }
  .camp--a { top: 0; bottom: auto; }
  .camp--b { top: auto; bottom: 0; padding: 18px 12px 40px; }
  .camp--a .camp__tag { left: 12px; top: 10px; }
  .camp--b .camp__tag { right: auto; left: 12px; top: auto; bottom: 10px; }
  .pcard { padding: 14px; border-radius: 20px; }
  .pcard__name { font-size: 18px; }
  .pcard .avatar--lg { width: 52px; height: 52px; font-size: 17px; }
  .pcard__stats { margin-top: 12px; }
  .pcard__stats dd { font-size: 15px; }
  .board { width: 92%; padding: 12px 14px; }
  .an.is-running .camp--a .pcard, .an.is-running .camp--b .pcard { transform: scale(0.92); transform-origin: center; }
  .board__val { min-width: 64px; font-size: 16px; }
  .board__name { font-size: 13px; }
}

@media (max-width: 720px) {
  .page { padding: 32px 0 80px; }
  .page-head { margin-bottom: 24px; }
  .page-lead { font-size: 16.5px; }
  .an-go { margin-top: 22px; }

  .rep-hero { padding: 26px 0 44px; }
  .rep-back { position: static; }
  .rep-hero__context { margin-top: 18px; }
  .rep-probs { gap: 4px 12px; margin-top: 30px; }
  .rep-who { align-items: flex-start; }
  .rep-who small { display: none; }
  .rsec { padding-top: 52px; }
  .key { font-size: 15px; }
  .note-row { grid-template-columns: 36px 1fr 36px; gap: 8px; }
  .note-row__label { font-size: 12px; white-space: normal; }
  .note-row__bars { grid-template-columns: 1fr minmax(64px, auto) 1fr; gap: 6px; }
  .note-row__v { font-size: 16px; }
  .h2h { padding: 18px; }
  .h2h__nums { font-size: 40px; gap: 8px; }
  .h2h__side b { font-size: 15px; }
  .h2h__side .avatar { display: none; }
  .meeting { grid-template-columns: auto 1fr auto; }
  .meeting__win { grid-column: 2 / -1; justify-self: start; }
  .mirror { grid-template-columns: 50px 1fr 1fr 50px; grid-template-areas: "label label label label" "va ba bb vb"; gap: 6px 8px; }
  .mirror__label { grid-area: label; text-align: left; font-size: 13px; }
  .mirror__v { grid-area: va; }
  .mirror__v--b { grid-area: vb; }
  .mirror__bar--a { grid-area: ba; }
  .mirror__bar--b { grid-area: bb; }
  .mirror__bar { height: 8px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .col { padding: 18px; }
  .sbars li { grid-template-columns: 96px 1fr 44px; }

  .tcard { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top go" "champ status"; gap: 12px 14px; padding: 14px; }
  .tcard__status { justify-self: end; }
  .cat-block { margin-top: 40px; }
  .t-hero__id .tbadge { --s: 58px; border-radius: 17px; }
  .tfull { --h: 58px; }
  .t-hero__court { display: none; }
  .draw-rounds { display: flex; }
  .draw { display: block; }
  .draw__col { display: none; }
  .draw__col.is-on { display: flex; }
  .draw__head { display: none; }
  .up { grid-template-columns: 1fr; gap: 10px; }
  .up__when { display: flex; gap: 8px; }
  .edition { grid-template-columns: 52px 1fr; }
  .edition__score { grid-column: 2; }

  .hist-top { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 22px 16px; }
  .hist-stats { width: 100%; grid-template-columns: repeat(2, 1fr); }
  .hist-stats div:last-child { grid-column: 1 / -1; }
  .hcard { grid-template-columns: 1fr; }
  .hcard__actions { flex-direction: row; justify-content: space-between; align-items: center; }
  .panel { padding: 20px; border-radius: 24px; }
}

@media (max-width: 420px) {
  .camp { padding: 34px 8px 10px; }
  .camp--b { padding: 10px 8px 34px; }
  .camp.is-filled { padding: 10px 8px; }
  .pcard { padding: 12px; border-radius: 18px; }
  .pcard .avatar--lg { width: 44px; height: 44px; font-size: 15px; }
  .pcard__name { font-size: 17px; }
  .pcard__meta { font-size: 12.5px; }
  .pcard__stats { gap: 6px; margin-top: 10px; }
  .pcard__stats > div { padding: 7px 9px; }
  .rep-num b { font-size: 3rem; }
  .h2h__nums { font-size: 34px; }
}

/* Suppression du compte (Profil) */
.acct-del { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.acct-del > p:first-child { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.acct-del > p:first-child b { color: var(--ink); }
.acct-del .field { margin-top: 14px; }
.acct-del__err { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--bad); }
.acct-del__err:empty { display: none; }
.acct-del__err a { color: inherit; font-weight: 650; text-decoration: underline; }
.acct-del .data-actions { margin-top: 14px; }
.acct-del .btn:disabled { opacity: 0.45; cursor: not-allowed; }
