:root {
  --primary: #004aad;
  --primary-dark: #00285e;
  --accent: #8fb8ff;
  --ink: #14202b;
  --muted: #5d6b75;
  --bg: #ffffff;
  --bg-alt: #f1f5fc;
  --line: #dbe3f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 40, 94, .10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.75rem; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-head a { font-weight: 600; text-decoration: none; }
.muted { color: var(--muted); }
.text-lg { font-size: 1.08rem; }
.empty { color: var(--muted); padding: 24px; background: var(--bg-alt); border-radius: var(--radius); text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* En-tête */
.site-header { background: var(--primary-dark); color: #fff; position: sticky; top: 0; z-index: 50; }
.nav-bar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { background: #fff; border-radius: 50%; padding: 2px; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-family: Georgia, serif; font-size: 1.25rem; letter-spacing: .5px; }
.brand small { color: var(--accent); font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: #e3ecfb; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; }
.nav-links a:hover { background: rgba(255,255,255,.1); }
.nav-links a.active { background: #fff; color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* Accueil */
.hero {
  background: radial-gradient(circle at 80% 20%, rgba(143,184,255,.30), transparent 45%),
              linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 72px 0;
}
.hero-inner { display: flex; align-items: center; gap: 40px; }
.hero-logo { background: #fff; border-radius: 50%; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); flex-shrink: 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .25em; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; font-size: .85rem; margin: 0 0 8px; }
.lead { font-size: 1.2rem; opacity: .92; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: .95rem; }
.btn-light { background: #fff; color: var(--primary); }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.stats { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.stats div { background: var(--bg-alt); border-radius: var(--radius); padding: 14px 20px; min-width: 120px; }
.stats strong { display: block; font-size: 1.8rem; color: var(--primary); font-family: Georgia, serif; }
.stats span { color: var(--muted); font-size: .9rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 4px; }
.card-accent { border-top: 5px solid var(--primary); }
.schedule { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.schedule li { display: flex; gap: 14px; align-items: center; }
.schedule .ico { font-size: 1.4rem; width: 44px; height: 44px; display: grid; place-items: center; background: var(--bg-alt); border-radius: 12px; }
.schedule small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; }
.next-event { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); display: grid; }
.next-event small { color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: 1px; }

/* En-têtes de page */
.page-head { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; padding: 48px 0; }
.page-head h1 { font-size: 2.4rem; margin-bottom: .2em; }
.page-head p { margin: 0; opacity: .9; }
.filters { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.filters a { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; }
.filters a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Membres */
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.member-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s; }
.member-card:hover { transform: translateY(-4px); }
.member-photo { position: relative; aspect-ratio: 1; background: var(--bg-alt); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.jersey { position: absolute; right: 10px; bottom: 10px; background: var(--primary); color: #fff; border: 2px solid #fff; font-weight: 800; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; }
.member-info { padding: 14px 16px 18px; }
.member-info h3 { font-size: 1.1rem; margin: 6px 0 2px; }
.member-info p { margin: 0; font-size: .9rem; }
.nickname { color: var(--primary); font-style: italic; }
.member-info .work { font-size: .82rem; color: var(--ink); margin-top: 2px; }
.role { display: inline-block; background: rgba(0,74,173,.1); color: var(--primary); font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .5px; }
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 40px; margin-top: 16px; }
.profile-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.profile h1 { font-size: 2.2rem; margin-top: 8px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 20px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 600; }
.back { display: block; width: fit-content; text-decoration: none; font-weight: 600; margin-bottom: 8px; }
.back-light { color: #fff; opacity: .85; }

/* Événements */
.event-card { padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s; }
.event-card:hover { transform: translateY(-4px); }
.event-cover { height: 170px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)) center/cover; position: relative; }
.event-body { padding: 16px 20px 20px; }
.event-body h3 { font-size: 1.15rem; margin: 4px 0 6px; }
.vs { margin: 0 0 8px; font-weight: 600; }
.vs span { color: var(--muted); font-weight: 400; margin: 0 4px; }
.badge { position: absolute; top: 12px; left: 12px; font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .5px; background: var(--primary); color: #fff; }
.event-hero .badge { position: static; display: inline-block; margin-bottom: 10px; }
.badge-sortie { background: #fff; color: var(--primary); }
.badge-autre { background: #d6e4ff; color: var(--primary-dark); }
.result { display: inline-block; font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 6px; }
.result.win { background: #d9f2e2; color: #0b6b3a; }
.result.loss { background: #fbe1df; color: #a3271d; }
.result.draw { background: #eceff1; color: #455a64; }
.event-hero { background: linear-gradient(135deg, var(--primary-dark), var(--primary)) center/cover; color: #fff; padding: 56px 0; }
.event-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .2em; }
.scoreboard { display: inline-flex; align-items: center; gap: 20px; margin-top: 16px; background: rgba(0,0,0,.3); padding: 14px 26px; border-radius: var(--radius); font-weight: 600; }
.scoreboard strong { font-size: 2rem; color: var(--accent); font-family: Georgia, serif; }

/* Galerie */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.media-item { position: relative; display: block; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.media-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
a.media-item:hover img { transform: scale(1.05); }
.media-video video, .media-video iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }
.media-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-size: .85rem; pointer-events: none; }
.media-video .media-caption { position: static; display: block; background: var(--primary-dark); padding: 6px 12px; }
.media-video:has(.media-caption) { aspect-ratio: auto; }
.media-video:has(.media-caption) video, .media-video:has(.media-caption) iframe { aspect-ratio: 4/3; height: auto; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 100; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 85vh; border-radius: 8px; }
.lightbox p { color: #fff; margin-top: 12px; }

/* Pied de page */
.site-footer { background: var(--primary-dark); color: #c9d7ef; padding: 40px 0 16px; margin-top: 0; }
.site-footer strong { color: #fff; }
.site-footer a { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 16px; font-size: .85rem; }

@media (max-width: 820px) {
  .grid-2, .profile { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-logo { width: 110px; height: 110px; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--primary-dark); flex-direction: column; padding: 8px 16px 16px; }
  .nav-open .nav-links { display: flex; }
  .profile-photo { max-width: 320px; }
}

/* Statistiques */
.stats-filter { background: var(--bg-alt); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 28px; }
.stats-filter .filters { margin-bottom: 14px; }
.pill { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; }
.pill input { display: none; }
.pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.filter-fields label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.filter-fields label[hidden] { display: none; }
.filter-fields input, .filter-fields select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.filter-fields .btn { padding: 9px 18px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 28px 0 40px; }
.highlight { padding: 18px; border-top: 5px solid var(--primary); }
.highlight > small { color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: 1px; }
.highlight > p { margin: 10px 0 0; }
.highlight-who { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.highlight-who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.highlight-who div { display: grid; line-height: 1.35; }
.highlight-who strong { font-size: 1.05rem; }
.highlight-who a { color: var(--ink); text-decoration: none; }
.highlight-who .muted { font-size: .85rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.stats-table th, .stats-table td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stats-table th { background: var(--primary-dark); color: #fff; font-weight: 600; font-size: .85rem; }
.stats-table th a { color: #fff; text-decoration: none; }
.stats-table th.sorted { background: var(--primary); }
.stats-table td.sorted { background: rgba(0,74,173,.06); font-weight: 700; color: var(--primary); }
.stats-table .left { text-align: left; }
.stats-table tbody tr:last-child td { border-bottom: 0; }
.stats-table .rank { font-weight: 700; color: var(--muted); width: 40px; }
.stats-table .top-1 .rank { color: #b8860b; }
.stats-table .top-2 .rank { color: #7d8790; }
.stats-table .top-3 .rank { color: #a0522d; }
.stats-table .who { display: flex; gap: 10px; align-items: center; }
.stats-table .who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.stats-table .who a { color: var(--ink); font-weight: 600; text-decoration: none; }
.stats-table .zero { color: #c3cbd6; }
.stats-table tr.total td { font-weight: 700; background: var(--bg-alt); }
.profile h2 { font-size: 1.3rem; margin-top: 28px; }
.profile .stats { margin: 0 0 16px; }
.match-facts { margin-top: 28px; }
.match-facts ul { list-style: none; padding: 0; margin: 0; }
.match-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.match-facts li:last-child { border-bottom: 0; }
.match-facts a { color: var(--ink); font-weight: 600; text-decoration: none; }

@media (max-width: 600px) {
  .stats-table th, .stats-table td { padding: 8px 7px; font-size: .88rem; }
  .stats-table .who img, .stats-table .who .nickname { display: none; }
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  .page-head { background: none; color: var(--ink); padding: 0 0 12px; }
  .section { padding: 16px 0; }
  .card, .table-wrap { box-shadow: none; }
  .stats-table th { background: #e6edf8 !important; color: var(--ink); }
  .stats-table th a { color: var(--ink); }
}
