/* ASC Tsingoni Handball — feuille de style principale
   Couleurs du club : modifier uniquement les variables ci-dessous. */
:root {
  --ink: #111111;
  --ink-2: #1b1b1d;
  --ink-3: #2a2a2e;
  --red: #e30613;
  --red-dark: #b0000e;
  --gold: #c9a54a;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --hover: #fafafa;
  --line-strong: #d0d0d4;
  --strong: #111111;          /* fond des éléments actifs (puce, page, bouton sombre) */
  --on-strong: #ffffff;
  --ok-bg: #e6f6ec; --ok-fg: #11743a;
  --ko-bg: #fde8eb; --ko-fg: #a8000d;
  --draw-bg: #fff5d6; --draw-fg: #8a6400;
  --sk-1: #ebebeb; --sk-2: #f5f5f5;
  color-scheme: light;
  --text: #111111;
  --muted: #6b6b70;
  --line: #e6e6e6;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);
  --font-title: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1240px;
}

/* ---------- Thème sombre : automatique (réglage de l'appareil) ou forcé via data-theme ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0f; --surface: #18181b; --hover: #202024;
    --text: #ececef; --muted: #a1a1aa; --line: #2a2a2e; --line-strong: #3f3f46;
    --strong: #f2f2f4; --on-strong: #111111;
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --ok-bg: #12341f; --ok-fg: #6ee7a0;
    --ko-bg: #3b1117; --ko-fg: #ff8593;
    --draw-bg: #3a2f0b; --draw-fg: #f5c84c;
    --sk-1: #1f1f23; --sk-2: #2a2a2e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0d0f; --surface: #18181b; --hover: #202024;
  --text: #ececef; --muted: #a1a1aa; --line: #2a2a2e; --line-strong: #3f3f46;
  --strong: #f2f2f4; --on-strong: #111111;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --ok-bg: #12341f; --ok-fg: #6ee7a0;
  --ko-bg: #3b1117; --ko-fg: #ff8593;
  --draw-bg: #3a2f0b; --draw-fg: #f5c84c;
  --sk-1: #1f1f23; --sk-2: #2a2a2e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
/* L'attribut hidden doit toujours l'emporter sur les display: flex/grid des composants. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-title); text-transform: uppercase; line-height: 1.05; margin: 0; letter-spacing: .01em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Bandeau démo ---------- */
.demo-banner {
  background: var(--gold); color: var(--ink); text-align: center;
  font-size: 13px; font-weight: 600; padding: 6px 12px;
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: #fff;
  box-shadow: 0 2px 0 var(--red);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.brand-text strong { display: block; font-family: var(--font-title); font-size: 24px; text-transform: uppercase; line-height: 1; letter-spacing: .02em; }
.brand-text span { font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: #b3b3b8; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  font-family: var(--font-title); font-size: 18px; font-weight: 600; text-transform: uppercase;
  padding: 8px 12px; border-radius: 6px; position: relative; color: #e6e6ea; letter-spacing: .03em;
  white-space: nowrap;
}
/* Écrans moyens : 8 liens à faire tenir sur une ligne avant le passage au menu burger. */
@media (min-width: 1261px) and (max-width: 1440px) {
  .header-inner { gap: 18px; }
  .main-nav { gap: 0; }
  .main-nav a { font-size: 16px; padding: 8px 9px; letter-spacing: .02em; }
  .main-nav a::after { left: 9px; right: 9px; }
}
.main-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px;
  background: var(--red); transform: scaleX(0); transition: transform .2s;
}
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.header-cta { display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-title); font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 11px 22px; border-radius: 999px; border: 2px solid transparent; transition: .2s;
  white-space: nowrap;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: currentColor; color: inherit; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-navy { background: var(--strong); color: var(--on-strong); }
.btn-navy:hover { opacity: .88; }
.btn-sm { font-size: 15px; padding: 7px 16px; }
.icon-link { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: .2s; }
.icon-link:hover { background: var(--red); }
.icon-link svg { width: 18px; height: 18px; fill: currentColor; }
.theme-toggle { border: 0; color: #fff; cursor: pointer; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.burger { display: none; background: none; border: 0; color: #fff; padding: 8px; margin-left: auto; }
.burger svg { width: 28px; height: 28px; }

@media (max-width: 1260px) {
  .burger { display: block; margin-left: 0; }
  .header-cta { margin-left: auto; }
  .header-cta .btn { display: none; }
  .main-nav {
    position: fixed; inset: 74px 0 0 0; background: var(--ink); flex-direction: column;
    padding: 24px 20px; gap: 6px; transform: translateX(100%); transition: transform .25s; margin: 0;
  }
  .main-nav.open { transform: none; }
  .main-nav a { font-size: 26px; padding: 12px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .main-nav a::after { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(1200px 500px at 85% 10%, rgba(227,6,19,.55), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(42,42,46,.9), transparent 60%),
    linear-gradient(135deg, #0a0a0a 0%, var(--ink) 55%, var(--ink-2) 100%);
  min-height: min(88vh, 760px); display: flex; align-items: flex-end;
}
.hero.has-image { background-size: cover; background-position: center; }
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.25), rgba(10,10,10,.92)); z-index: -1; }
.hero-stripes {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(255,255,255,.035) 60px 62px);
}
.hero-word {
  position: absolute; right: -2vw; top: 6%; z-index: -1;
  font-family: var(--font-title); font-weight: 800; font-size: clamp(110px, 22vw, 330px); line-height: .8;
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.09); text-transform: uppercase; user-select: none;
}
.hero-crest { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); width: clamp(150px, 24vw, 320px); height: auto; z-index: -1; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.55); }
@media (max-width: 760px) { .hero-crest { top: 120px; transform: none; right: 20px; width: 110px; } }
.hero-content { padding: 140px 0 70px; max-width: 760px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-title); font-weight: 700; text-transform: uppercase; letter-spacing: .2em; font-size: 15px; color: var(--gold); }
.kicker::before { content: ""; width: 34px; height: 3px; background: var(--red); }
.hero h1 { font-size: clamp(56px, 9vw, 120px); font-weight: 800; margin: 14px 0 10px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { font-size: clamp(17px, 2vw, 20px); color: #d6d6da; max-width: 560px; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.page-hero {
  color: #fff; padding: 90px 0 50px; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(800px 300px at 90% 0%, rgba(227,6,19,.5), transparent 60%), linear-gradient(135deg, #0a0a0a, var(--ink-2));
}
.page-hero h1 { font-size: clamp(48px, 7vw, 88px); font-weight: 800; margin-top: 10px; }
.page-hero p { color: #c8c8cc; max-width: 640px; margin: 10px 0 0; }

/* ---------- Bande partenaires & réseaux ---------- */
.partner-strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.partner-strip .container { display: flex; align-items: center; gap: 16px; overflow-x: auto; padding-top: 18px; padding-bottom: 18px; scrollbar-width: none; }
.partner-strip .label { font-family: var(--font-title); text-transform: uppercase; font-weight: 700; color: var(--muted); letter-spacing: .14em; font-size: 13px; flex-shrink: 0; }
.partner-chip {
  flex-shrink: 0; height: 52px; min-width: 150px; padding: 0 18px; border: 1px dashed var(--line-strong); border-radius: 10px;
  display: grid; place-items: center; color: var(--muted); font-weight: 600; font-size: 13px; transition: .2s; filter: grayscale(1);
}
.partner-chip:hover { filter: none; border-color: var(--red); color: var(--red); }
.partner-chip img { max-height: 36px; max-width: 130px; object-fit: contain; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--surface); }
.section-dark { background: var(--ink); color: #fff; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-title { font-size: clamp(38px, 5vw, 56px); font-weight: 800; }
.section-title::after { content: ""; display: block; width: 56px; height: 5px; background: var(--red); margin-top: 12px; }
.section-head .link-more { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.section-dark .section-head .link-more { color: #fff; }
.link-more::after { content: " →"; }

/* ---------- Prochain match ---------- */
.match-hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 100%); color: #fff; border-radius: 20px;
  padding: 34px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.match-hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 40px, rgba(255,255,255,.03) 40px 42px); pointer-events: none; }
.match-meta { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; color: #bdbdc2; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.match-meta .comp { color: var(--gold); }
.team-side { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.team-side strong { font-family: var(--font-title); font-size: clamp(22px, 3vw, 32px); text-transform: uppercase; line-height: 1.05; }
.crest { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); font-family: var(--font-title); font-weight: 800; font-size: 26px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.crest img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.crest.us { background: none; box-shadow: 0 6px 24px rgba(227,6,19,.45); }
.crest.us img { padding: 0; }
.match-row .crest { width: 34px; height: 34px; font-size: 13px; box-shadow: none; border: 1px solid var(--line); flex-shrink: 0; }
.match-row .crest.us { border: 0; }
.crest.small { width: 44px; height: 44px; font-size: 15px; box-shadow: none; border: 1px solid var(--line); }
.versus { text-align: center; }
.versus .vs { font-family: var(--font-title); font-weight: 800; font-size: 46px; color: var(--red); line-height: 1; }
.versus .when { font-family: var(--font-title); font-size: 24px; text-transform: uppercase; margin-top: 6px; }
.countdown { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.countdown div { background: rgba(255,255,255,.08); border-radius: 10px; padding: 6px 10px; min-width: 58px; }
.countdown b { display: block; font-family: var(--font-title); font-size: 26px; line-height: 1; }
.countdown small { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #bdbdc2; }

/* ---------- Statistiques ---------- */
.stats-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 8px 0 24px; overflow-x: auto; scrollbar-width: none; }
.stats-tabs button {
  border: 0; background: none; padding: 12px 18px; font-family: var(--font-title); font-size: 19px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; position: relative;
}
.stats-tabs button[aria-selected="true"] { color: var(--text); }
.stats-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 4px; background: var(--red); border-radius: 2px; }
.stats-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.stats-toolbar input, .stats-toolbar select { font: inherit; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.stats-toolbar input { flex: 1 1 220px; min-width: 0; }
.stats-toolbar input:focus, .stats-toolbar select:focus { outline: 0; border-color: var(--text); }
.st-count { color: var(--muted); font-size: 14px; margin-left: auto; }
.stats-table td.club b { font-weight: 600; }
.stats-table tr.us td.club b { color: var(--red); font-weight: 800; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.pager button { min-width: 42px; height: 42px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); font-family: var(--font-title); font-weight: 700; font-size: 17px; color: var(--muted); }
.pager button:hover { border-color: var(--text); color: var(--text); }
.pager button[aria-current="page"] { background: var(--strong); border-color: var(--strong); color: var(--on-strong); }
.grid-2.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 920px) { .grid-2.even { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .stats-table th:nth-child(5), .stats-table td:nth-child(5) { display: none; } .st-count { width: 100%; margin: 0; } }

/* ---------- Fiche joueur & graphiques ---------- */
:root { --chart-player: #e30613; --chart-ref: #71717a; }
:root[data-theme="dark"] { --chart-player: #f0303c; --chart-ref: #8b8b94; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart-player: #f0303c; --chart-ref: #8b8b94; } }
[data-player], tr.clickable { cursor: pointer; }
.player[data-player]:focus-visible, .leaders li[data-player]:focus-visible, tr.clickable:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.player[data-player]::before { content: "Voir les stats"; position: absolute; top: 12px; right: 12px; z-index: 1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--red); color: #fff; padding: 4px 8px; border-radius: 999px; opacity: 0; transform: translateY(-4px); transition: .2s; }
.player[data-player]:hover::before, .player[data-player]:focus-visible::before { opacity: 1; transform: none; }
.leaders li[data-player]:hover .who b, tr.clickable:hover td.club b { color: var(--red); }
tr.clickable:hover td { background: var(--hover); }

.player-dialog { border: 0; padding: 0; width: min(780px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; }
.player-dialog::backdrop { background: rgba(10,10,10,.65); backdrop-filter: blur(2px); }
.pd-body { max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; }
.pd-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--hover); color: var(--text); font-size: 26px; line-height: 1; }
.pd-close:hover { background: var(--red); color: #fff; }
.pd-head { display: flex; gap: 20px; align-items: center; margin-bottom: 22px; padding-right: 40px; }
.pd-photo { position: relative; width: 96px; height: 96px; flex-shrink: 0; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, var(--ink-3), var(--ink)); display: grid; place-items: center; }
.pd-photo img { width: 100%; height: 100%; object-fit: cover; }
.pd-photo img.logo { object-fit: contain; padding: 14px; background: #fff; }
.pd-photo span { font-family: var(--font-title); font-weight: 800; font-size: 40px; color: rgba(255,255,255,.35); }
.pd-photo em { position: absolute; left: 8px; bottom: 2px; font-style: normal; font-family: var(--font-title); font-weight: 800; font-size: 30px; color: var(--red); text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.pd-team { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.pd-head h2 { font-size: clamp(28px, 5vw, 40px); margin: 4px 0; }
.pd-head h2 span { color: var(--red); }
.pd-comp { margin: 0; font-size: 13px; color: var(--muted); }
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 26px; }
.pd-kpi { background: var(--bg); border-radius: 12px; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.pd-kpi b { font-family: var(--font-title); font-size: 34px; font-weight: 800; line-height: 1; color: var(--text); }
.pd-kpi b small { font-size: 16px; color: var(--muted); margin-left: 2px; }
.pd-kpi span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pd-kpi > small { font-size: 11px; color: var(--muted); }
.pd-section { margin-bottom: 24px; }
.pd-section h3 { font-size: 24px; margin-bottom: 2px; }
.pd-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.pd-chart { width: 100%; }
.pd-chart svg { display: block; overflow: visible; }
.pd-chart .grid { stroke: var(--line); stroke-width: 1; }
.pd-chart .grid.base { stroke: var(--line-strong); }
.pd-chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.pd-chart .bar { fill: var(--chart-player); }
.pd-chart .bar.ref { fill: var(--chart-ref); }
.pd-chart .value { fill: var(--text); font-size: 13px; font-weight: 700; font-family: var(--font-body); }
.pd-chart .absent { fill: var(--muted); font-size: 16px; font-weight: 700; }
.pd-chart .row-label { fill: var(--muted); font-size: 13px; font-family: var(--font-body); }
.pd-chart .row-label.me { fill: var(--text); font-weight: 700; }
.pd-chart .hit { fill: transparent; outline: none; }
.pd-chart .hit:hover, .pd-chart .hit:focus { fill: var(--text); fill-opacity: .06; }
.chart-tip { position: fixed; z-index: 10; pointer-events: none; max-width: 260px; background: var(--strong); color: var(--on-strong); font-size: 13px; line-height: 1.4; padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow); }
.pd-data { margin: 6px 0 18px; }
.pd-data summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: 14px; }
.pd-data table { margin-top: 10px; font-size: 14px; }
.pd-data td small { color: var(--muted); font-family: var(--font-body); text-transform: none; font-size: 12px; letter-spacing: 0; }
.pd-foot { margin: 0; }
@media (max-width: 560px) {
  .pd-body { padding: 20px 16px; }
  .pd-head { gap: 14px; }
  .pd-photo { width: 72px; height: 72px; }
  .pd-kpi b { font-size: 28px; }
}

/* ---------- Carrousel des matchs de la semaine ---------- */
.section-sub { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.carousel { position: relative; outline: none; }
.carousel:focus-visible { box-shadow: 0 0 0 3px var(--red); border-radius: 22px; }
.carousel-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; border-radius: 20px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.carousel-slide .match-hero { box-shadow: none; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--text); font-size: 30px; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow); transition: .2s; z-index: 2;
}
.carousel-arrow:hover:not(:disabled) { background: var(--red); color: #fff; }
.carousel-arrow:disabled { opacity: 0; pointer-events: none; }
.carousel-arrow.prev { left: -22px; }
.carousel-arrow.next { right: -22px; }
.carousel-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.carousel-count { font-size: 14px; color: var(--muted); font-weight: 600; }
.carousel-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: var(--line-strong); transition: .25s; }
.carousel-dots button[aria-current="true"] { width: 28px; background: var(--red); }
@media (max-width: 760px) {
  .carousel-arrow { display: none; }
  .carousel-nav { justify-content: center; }
  .carousel-count { width: 100%; text-align: center; }
}
.countdown .state { min-width: 0; padding: 6px 14px; }
.countdown .state b { font-size: 20px; }
.countdown .state.live { background: var(--red); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; }
@media (max-width: 920px) { .grid-2 { grid-template-columns: 1fr; } .match-hero { grid-template-columns: 1fr; } }

/* ---------- Listes de matchs ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-pad { padding: 24px; }
.card h3 { font-size: 26px; margin-bottom: 14px; }
.match-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.match-row:last-child { border-bottom: 0; }
.match-date { font-family: var(--font-title); text-transform: uppercase; line-height: 1.1; }
.match-date b { display: block; font-size: 28px; }
.match-date span { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .05em; }
.match-teams { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* Le titre du match passe à la ligne quand la colonne est étroite (noms d'équipes toujours en entier). */
.match-teams strong { font-family: var(--font-title); font-size: 21px; text-transform: uppercase; line-height: 1.15; overflow-wrap: anywhere; text-wrap: balance; }
.match-teams small { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.badge-red { background: rgba(227,6,19,.1); color: var(--red); }
.score { font-family: var(--font-title); font-weight: 800; font-size: 28px; padding: 6px 14px; border-radius: 10px; background: var(--bg); white-space: nowrap; }
.score.win { background: var(--ok-bg); color: var(--ok-fg); }
.score.loss { background: var(--ko-bg); color: var(--ko-fg); }
.score.draw { background: var(--draw-bg); color: var(--draw-fg); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- Tuiles style PSG (Effectif / Calendrier / Palmarès / Club) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  position: relative; border-radius: 18px; overflow: hidden; min-height: 360px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px; isolation: isolate; transition: transform .25s;
}
.tile:hover { transform: translateY(-6px); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--tile-bg); transition: transform .5s; }
.tile:hover::before { transform: scale(1.06); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(10,10,10,.92)); }
.tile .tile-num { position: absolute; top: 18px; right: 22px; font-family: var(--font-title); font-weight: 800; font-size: 90px; line-height: 1; color: rgba(255,255,255,.13); }
.tile h3 { font-size: 40px; font-weight: 800; }
.tile p { font-size: 15px; color: #d6d6da; margin: 8px 0 18px; }
.tile .btn { align-self: flex-start; }

/* ---------- Actualités ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-grid.home { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 1000px) { .news-grid, .news-grid.home { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .news-grid, .news-grid.home { grid-template-columns: 1fr; } }
.news-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.news-card:hover { transform: translateY(-4px); }
.news-card:hover h3 { color: var(--red); }
.news-media { aspect-ratio: 16 / 10; position: relative; overflow: hidden; background: var(--ink); }
.news-media img { width: 100%; height: 100%; object-fit: cover; }
.news-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 60%, var(--red) 140%); }
.news-media .placeholder img { width: 38%; height: auto; opacity: .9; object-fit: contain; }
.news-media .badge { position: absolute; left: 14px; top: 14px; background: var(--red); color: #fff; }
.news-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-body time { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.news-body h3 { font-size: 26px; transition: color .2s; }
.news-body p { margin: 0; color: var(--muted); font-size: 15px; }
.news-grid.home .news-card:first-child { grid-row: span 2; }
.news-grid.home .news-card:first-child .news-media { aspect-ratio: 4 / 3; flex: 1; }
.news-grid.home .news-card:first-child h3 { font-size: 34px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 18px; font-family: var(--font-title); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.active { background: var(--strong); border-color: var(--strong); color: var(--on-strong); }
.section-dark .chip { background: transparent; border-color: rgba(255,255,255,.2); color: #c8c8cc; }
.section-dark .chip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Article ---------- */
.article { max-width: 820px; margin: 0 auto; }
.article-cover { border-radius: 18px; overflow: hidden; margin: -40px 0 34px; box-shadow: var(--shadow); aspect-ratio: 16 / 9; background: var(--ink); position: relative; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 18px; line-height: 1.75; }
.article-body p { margin: 0 0 1.2em; }
.article-body p:first-child { font-size: 21px; font-weight: 500; }

/* ---------- Classement ---------- */
.table-wrap { overflow-x: auto; }
table.standings { width: 100%; border-collapse: collapse; font-size: 15px; }
.standings th { font-family: var(--font-title); text-transform: uppercase; font-size: 14px; letter-spacing: .08em; color: var(--muted); text-align: center; padding: 12px 8px; border-bottom: 2px solid var(--line); }
.standings th.club, .standings td.club { text-align: left; }
.standings td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.standings td.pos { font-family: var(--font-title); font-weight: 800; font-size: 20px; width: 40px; }
.standings td.pts { font-weight: 800; }
.standings tr.us { background: rgba(227,6,19,.07); }
/* Classement complet (modèle ffhandball.fr) */
:root { --form-win: #6cc56f; --form-loss: #ef9b4e; --form-draw: #a3a3e0; }
:root[data-cvd="1"] { --form-win: #0072b2; --form-loss: #e69f00; --form-draw: #9e9e9e; } /* palette Okabe-Ito */
.standings.full th, .standings.compact th { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .06em; padding: 14px 8px; }
.standings.full td.club, .standings.compact td.club { font-family: var(--font-title); font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: .02em; }
.standings.full td.pos, .standings.compact td.pos { font-family: var(--font-body); font-weight: 500; font-size: 15px; color: var(--muted); }
.standings.full td { padding: 16px 8px; white-space: nowrap; }
.standings.full td.club { min-width: 220px; }
.standings tr.us td.pos { color: var(--red); font-weight: 800; }
.form { display: inline-flex; gap: 3px; vertical-align: middle; }
.form span, .standings-legend i { display: inline-block; width: 6px; height: 16px; border-radius: 3px; }
.form-win { background: var(--form-win); }
.form-loss { background: var(--form-loss); }
.form-draw { background: var(--form-draw); }
.form-empty { color: var(--muted); }
.standings-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 18px; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.standings-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.standings-legend i { width: 10px; height: 10px; border-radius: 50%; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin-left: 10px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { order: 2; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; flex-shrink: 0; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--red); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid var(--red); outline-offset: 2px; }
@media (max-width: 640px) { .standings-legend { justify-content: flex-start; } .switch { margin-left: 0; } }
.standings tr.us td.club { font-weight: 800; color: var(--red); }
.link-btn { border: 0; background: none; padding: 0; color: var(--red); font: inherit; font-weight: 700; cursor: pointer; }
.scorers { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.scorers b { color: var(--text); }
.scorers em { font-style: normal; font-weight: 800; color: var(--red); }
.leaders { list-style: none; margin: 0; padding: 0; }
.leaders li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.leaders li:last-child { border-bottom: 0; }
.leaders .rank { font-family: var(--font-title); font-weight: 800; font-size: 24px; color: var(--muted); text-align: center; }
.leaders li:first-child .rank { color: var(--gold); }
.leaders .who { display: flex; flex-direction: column; line-height: 1.25; }
.leaders .who small { color: var(--muted); font-size: 13px; }
.leaders .val { font-family: var(--font-title); font-weight: 800; font-size: 30px; color: var(--red); text-align: right; line-height: 1; }
.leaders .val small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.club-cell { display: inline-flex; align-items: center; gap: 10px; }
.club-cell img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.source-note { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* ---------- Effectif ---------- */
.roster-group { margin-bottom: 48px; }
.roster-group h3 { font-size: 30px; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.roster-group h3::before { content: ""; width: 10px; height: 26px; background: var(--red); border-radius: 2px; }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.player {
  position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 4; color: #fff; isolation: isolate;
  background: linear-gradient(160deg, var(--ink-3), var(--ink) 70%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; transition: transform .2s;
}
.player:hover { transform: translateY(-4px); }
.player img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.player::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(10,10,10,.95)); }
.player .initials { position: absolute; inset: 0; z-index: -2; display: grid; place-items: center; font-family: var(--font-title); font-weight: 800; font-size: 90px; color: rgba(255,255,255,.12); }
.player .num { position: absolute; top: 10px; left: 16px; font-family: var(--font-title); font-weight: 800; font-size: 64px; line-height: 1; color: var(--red); text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.player .first { font-size: 15px; color: #c8c8cc; }
.player .last { font-family: var(--font-title); font-size: 30px; font-weight: 800; text-transform: uppercase; line-height: 1; }
.player .pstats { margin-top: 8px; font-size: 12px; color: #fff; background: rgba(255,255,255,.12); border-radius: 999px; padding: 3px 10px; align-self: flex-start; font-weight: 600; }
.player .pos { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 700; margin-top: 6px; }
.team-info { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 0 0 36px; color: var(--muted); }
.team-info b { color: var(--text); }

/* ---------- Club ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; padding: 28px 12px; border-radius: var(--radius); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.stat b { display: block; font-family: var(--font-title); font-size: 60px; font-weight: 800; line-height: 1; color: #fff; }
.stat span { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: #bdbdc2; font-weight: 600; }
.practices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .practices { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .practices { grid-template-columns: 1fr; } }
.practice { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); border-top: 5px solid var(--red); }
.practice h3 { font-size: 26px; margin-bottom: 8px; }
.practice p { margin: 0; color: var(--muted); font-size: 15px; }
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 3px; background: var(--line); }
.timeline-item { position: relative; margin-bottom: 26px; }
.timeline-item::before { content: ""; position: absolute; left: -29px; top: 6px; width: 17px; height: 17px; border-radius: 50%; background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--gold); }
.timeline-item .year { font-family: var(--font-title); font-weight: 800; font-size: 20px; color: var(--red); }
.timeline-item h4 { font-size: 26px; }
.timeline-item p { margin: 4px 0 0; color: var(--muted); }
.trophy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.trophy { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 26px; }
.trophy .year { font-family: var(--font-title); font-size: 18px; color: var(--gold); font-weight: 700; }
.trophy h4 { font-size: 26px; margin: 6px 0; }
.trophy p { margin: 0; color: #c8c8cc; font-size: 15px; }
.trophy svg { width: 40px; height: 40px; fill: var(--gold); margin-bottom: 12px; }

/* ---------- CTA / Newsletter ---------- */
.cta-band {
  border-radius: 22px; padding: 46px; color: #fff; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center;
  background: radial-gradient(600px 300px at 100% 0%, rgba(201,165,74,.35), transparent 60%), linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
}
.cta-band h2 { font-size: clamp(36px, 5vw, 54px); font-weight: 800; }
.cta-band p { margin: 10px 0 0; color: #ffe2e6; }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; padding: 30px; } }
.inline-form { display: flex; gap: 8px; background: var(--surface); padding: 6px; border-radius: 999px; }
.inline-form input { flex: 1; border: 0; outline: 0; padding: 10px 16px; font: inherit; border-radius: 999px; min-width: 0; background: transparent; color: var(--text); }
.form-msg { font-size: 14px; margin-top: 10px; min-height: 1.4em; }
.cta-band .form-note { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: #ffd0d6; }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.field input, .field textarea, .field select {
  font: inherit; font-weight: 400; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--text); }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; }
.info-list svg { width: 22px; height: 22px; flex-shrink: 0; fill: var(--red); margin-top: 2px; }
.info-list b { display: block; font-family: var(--font-title); text-transform: uppercase; font-size: 18px; }
.info-list span, .info-list a { color: var(--muted); }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 15px; }
.alert-ok { background: var(--ok-bg); color: var(--ok-fg); }
.alert-err { background: var(--ko-bg); color: var(--ko-fg); }

/* ---------- Partenaires (page) ---------- */
.partner-tier { margin-bottom: 40px; }
.partner-tier h3 { font-size: 28px; margin-bottom: 16px; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.partner-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 20px; text-align: center; font-weight: 700; color: var(--muted); border: 2px dashed transparent; transition: .2s; }
.partner-card.placeholder { border-color: var(--line-strong); box-shadow: none; background: transparent; }
.partner-card:hover { border-color: var(--red); color: var(--red); }
.partner-card img { max-height: 80px; object-fit: contain; }
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .offer-grid { grid-template-columns: 1fr; } }
.offer { border-radius: var(--radius); padding: 28px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.offer h4 { font-size: 28px; color: var(--gold); }
.offer ul { margin: 14px 0 0; padding-left: 18px; color: #c8c8cc; }

/* ---------- Pied de page ---------- */
.site-footer { background: #0a0a0a; color: #b3b3b8; padding: 64px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 20px; margin-bottom: 16px; letter-spacing: .06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a:hover { color: #fff; }
.footer-brand p { margin: 14px 0 18px; font-size: 14px; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.footer-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } * { scroll-behavior: auto !important; } }
.skeleton { background: linear-gradient(90deg, var(--sk-1) 25%, var(--sk-2) 50%, var(--sk-1) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; min-height: 120px; }
@keyframes sk { to { background-position: -200% 0; } }
