/* ARCQ — feuille de style commune à toutes les pages (publiques, calendrier généré, administration).
   Les jetons :root sont la source unique de vérité : src/generate_calendar.py ne les redéfinit plus. */

:root {
  --ice: #eef3f7;
  --sheet: #ffffff;
  --sheet-2: #f6f9fb;
  --ink: #10202c;
  --muted: #56697a;
  --line: #dde5ec;
  --accent: #1d5fae;
  --brand: #0f2f55;
  --brand-ink: #ffffff;
  --stone: #b8332c;

  --cat-regional: #b8332c;
  --cat-regional-confirme: #1c8a4c;
  --cat-club: #2c6e8e;
  --cat-club-incertain: #c08a21;
  --cat-provincial: #6a5a8c;
  --cat-autre: #d81e2c;

  --sem-ok-bg: #e2f3e7; --sem-ok-fg: #1c6b3c;
  --sem-warn-bg: #fbeeda; --sem-warn-fg: #965a06;
  --sem-bad-bg: #fbe3e2; --sem-bad-fg: #a3352c;
  --sem-todo-bg: #e8ebf0; --sem-todo-fg: #454f60;

  --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ice: #0d1620; --sheet: #141f2b; --sheet-2: #182534; --ink: #e7edf3; --muted: #93a2b2;
    --line: #253242; --accent: #6fa4e0; --brand: #e7edf3; --brand-ink: #0b2140; --stone: #e2695f;
    --cat-regional: #e2695f; --cat-regional-confirme: #4bc281; --cat-club: #5fa8cc; --cat-club-incertain: #d9a94b; --cat-provincial: #a595c9; --cat-autre: #ff5a52;
    --sem-ok-bg: #163a26; --sem-ok-fg: #7fd6a0; --sem-warn-bg: #3d2e10; --sem-warn-fg: #eab463;
    --sem-bad-bg: #3a1c1a; --sem-bad-fg: #f0968c; --sem-todo-bg: #232e3d; --sem-todo-fg: #b7c2cf;
  }
}
:root[data-theme="dark"] {
  --ice: #0d1620; --sheet: #141f2b; --sheet-2: #182534; --ink: #e7edf3; --muted: #93a2b2;
  --line: #253242; --accent: #6fa4e0; --brand: #e7edf3; --brand-ink: #0b2140; --stone: #e2695f;
  --cat-regional: #e2695f; --cat-regional-confirme: #4bc281; --cat-club: #5fa8cc; --cat-club-incertain: #d9a94b; --cat-provincial: #a595c9; --cat-autre: #ff5a52;
  --sem-ok-bg: #163a26; --sem-ok-fg: #7fd6a0; --sem-warn-bg: #3d2e10; --sem-warn-fg: #eab463;
  --sem-bad-bg: #3a1c1a; --sem-bad-fg: #f0968c; --sem-todo-bg: #232e3d; --sem-todo-fg: #b7c2cf;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--ice); color: var(--ink); font-family: var(--font-body); font-size: 14.5px; line-height: 1.5; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; padding-block: 32px 64px; }
.wrap-narrow { max-width: 820px; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: .01em; text-wrap: balance; margin: 0; }
h1 { font-weight: 700; font-size: 34px; }
h2.section { font-weight: 600; font-size: 20px; margin-bottom: 4px; }
h3 { font-weight: 600; font-size: 17px; }
.subtitle { color: var(--muted); }
.section-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.eyebrow { font-family: var(--font-body); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
code { background: var(--sheet-2); padding: 1px 6px; border-radius: 5px; font-family: var(--font-mono); font-size: .9em; }

/* Bilingue : le contenu porte data-lang="fr" | "en" ; seule la langue active est visible. */
html[data-lang="fr"] [data-lang="en"] { display: none !important; }
html[data-lang="en"] [data-lang="fr"] { display: none !important; }

/* --- En-tête --- */
.site-header { background: var(--sheet); color: var(--brand); border-bottom: 3px solid var(--accent); box-shadow: 0 1px 0 var(--line); }
.site-header .bar { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; margin-right: auto; }
.brand-mark { width: 56px; height: 56px; flex: none; object-fit: contain; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; letter-spacing: .02em; }
.brand-full { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; padding: 8px 11px; border-radius: 8px; }
.site-nav a:hover { background: var(--sheet-2); }
.site-nav a[aria-current="page"] { background: var(--accent); color: #fff; }
.site-tools { display: flex; align-items: center; gap: 8px; }
.site-search { display: flex; align-items: center; background: var(--sheet-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: var(--ink); }
.site-search input { border: none; background: transparent; color: inherit; font: inherit; font-size: 13px; padding: 7px 10px; width: 160px; }
.site-search input::placeholder { color: inherit; opacity: .6; }
.site-search button { border: none; background: transparent; color: inherit; padding: 6px 9px; cursor: pointer; display: flex; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; color: var(--ink); }
.lang-switch button { font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: inherit; background: transparent; border: none; padding: 6px 9px; cursor: pointer; opacity: .7; }
.lang-switch button[aria-pressed="true"] { background: var(--brand); color: #fff; opacity: 1; }
.nav-toggle { display: none; font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-top: 6px; border-top: 1px solid var(--line); }
  .site-header.nav-open .site-nav { display: flex; }
  .site-tools { margin-left: auto; }
  .site-search input { width: 110px; }
}

/* --- Pied de page --- */
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; color: var(--muted); font-size: 12.5px; }
.site-footer .bar { max-width: 1180px; margin: 0 auto; padding: 22px 20px 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: inherit; }

/* --- Blocs communs --- */
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 24px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tile { min-width: 0; background: var(--sheet-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tile h3 { font-size: 16.5px; }
.tile .meta { color: var(--muted); font-size: 12.5px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-weight: 700; font-size: 13.5px; text-decoration: none; border-radius: 9px; padding: 10px 16px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--sheet); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--sheet-2); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--sem-ok-bg); color: var(--sem-ok-fg); }
.badge.warn { background: var(--sem-warn-bg); color: var(--sem-warn-fg); }
.badge.bad { background: var(--sem-bad-bg); color: var(--sem-bad-fg); }
.badge.todo { background: var(--sem-todo-bg); color: var(--sem-todo-fg); }
.notice { background: var(--sem-warn-bg); border: 1px solid color-mix(in srgb, var(--sem-warn-fg) 35%, transparent); color: var(--ink); border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; font-size: 13px; }
.notice strong { color: var(--sem-warn-fg); }
.fine { color: var(--muted); font-size: 12px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.table-scroll { overflow-x: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Accueil --- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: stretch; margin-bottom: 28px; }
.hero-text { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.hero-text h1 { font-size: 44px; line-height: 1.02; }
.hero-text .lede { font-size: 16px; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-next { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.hero-next h2 { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; font-family: var(--font-body); font-size: 11.5px; }
.ev { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); align-items: start; }
.ev:last-child { border-bottom: none; }
.ev-date { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1; color: var(--accent); }
.ev-date small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 3px; }
.ev-label { font-weight: 600; }
.ev-type { color: var(--muted); font-size: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.cat-regional { background: var(--cat-regional); }
.dot.cat-regional-confirme { background: var(--cat-regional-confirme); }
.dot.cat-club { background: var(--cat-club); }
.dot.cat-club-incertain { border: 1px dashed var(--cat-club-incertain); }
.dot.cat-provincial { background: var(--cat-provincial); }
.dot.cat-autre { background: var(--cat-autre); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-text h1 { font-size: 34px; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head a.more { font-size: 13px; font-weight: 600; text-decoration: none; }

/* Nouvelles */
.news-item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: none; }
.news-date { font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.news-item h3 { font-size: 17px; margin-bottom: 4px; }
.news-item p { margin: 0; max-width: 68ch; }
@media (max-width: 520px) { .news-item { grid-template-columns: 1fr; gap: 4px; } }

/* Affiches / publicité */
.poster { display: grid; grid-template-rows: auto 1fr; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; }
.poster:hover { border-color: var(--accent); }
.poster-img { aspect-ratio: 4 / 3; max-width: 100%; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--sheet-2)), var(--sheet-2)); display: flex; align-items: center; justify-content: center; }
.poster-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-img .ph { font-family: var(--font-display); font-weight: 700; font-size: 34px; color: var(--accent); opacity: .55; letter-spacing: .04em; text-align: center; padding: 12px; }
.poster-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.poster-body h3 { font-size: 16.5px; }

/* Clubs */
.club { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.club-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.club > div { min-width: 0; }
.club h3 { font-size: 16px; }
.club .meta { color: var(--muted); font-size: 12.5px; }
.club a { font-size: 12.5px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }

/* Conseil d'administration */
.member { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.member:last-child { border-bottom: none; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--sheet-2); border: 1px solid var(--line); overflow: hidden; flex: none; display: flex; align-items: flex-end; justify-content: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 80%; height: 80%; fill: var(--muted); opacity: .55; }
.member > div { min-width: 0; }
.member .name { font-weight: 700; }
.member .role { color: var(--muted); font-size: 12.5px; }
.member .club-tag { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); background: var(--sheet-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }

/* Régionaux */
.reg-table td:first-child { font-weight: 600; }
.tabs-inline { display: flex; gap: 4px; flex-wrap: wrap; background: var(--sheet-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.tabs-inline button { flex: 1 1 auto; font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--muted); background: transparent; border: none; border-radius: 9px; padding: 9px 12px; cursor: pointer; }
.tabs-inline button.active { background: var(--sheet); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.empty { color: var(--muted); font-size: 13px; padding: 14px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

/* Règlements */
.rules article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rules article:last-child { border-bottom: none; }
.rules h3 { font-size: 17px; margin-bottom: 6px; }
.rules p, .rules li { max-width: 72ch; }
.rules ul, .rules ol { margin: 6px 0 8px; padding-left: 22px; }
.rules li { margin: 3px 0; }
.rules p { margin: 6px 0; }
.rules h4 { font-size: 15px; margin: 14px 0 4px; }
.rules h5 { font-size: 13.5px; margin: 12px 0 2px; color: var(--muted); }
.rules section { scroll-margin-top: 80px; }
.rules article { scroll-margin-top: 80px; }
.rules .rules-group { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 0; }
.rules .rules-group:first-child { margin-top: 0; }
.rules .rules-note { max-width: 72ch; font-size: 13px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; }
.rules .rules-ref { font-size: 12px; color: var(--muted); }
.rules .rules-ref a { text-decoration: none; }
.rules-bracket { margin: 8px 0 12px; max-width: 480px; }
.rules-bracket svg { width: 100%; height: auto; display: block; }
.rules-bracket .ln path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.rules-bracket text { fill: var(--ink); font-size: 12px; text-anchor: middle; font-family: var(--font-body); }
.rules-sources { margin-top: 18px; }
.rules-sources h2 { font-size: 14px; margin-bottom: 4px; }
.rules-sources ol { padding-left: 22px; margin: 0; }
.rules-sources li { scroll-margin-top: 80px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.toc a { font-size: 12.5px; font-weight: 600; text-decoration: none; background: var(--sheet-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; }

/* Recherche */
.search-form { display: flex; gap: 8px; margin-bottom: 18px; }
.search-form input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--sheet); color: var(--ink); }
.result { padding: 12px 0; border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: none; }
.result .kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.result h3 { font-size: 16px; }
.result h3 a { text-decoration: none; }
.result p { margin: 4px 0 0; color: var(--muted); font-size: 13px; max-width: 72ch; }
mark { background: color-mix(in srgb, var(--cat-club-incertain) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

/* Administration */
.login-box { max-width: 380px; margin: 40px auto; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13px; }
.field input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--sheet); color: var(--ink); }
.error-msg { color: var(--sem-bad-fg); background: var(--sem-bad-bg); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.error-msg[hidden] { display: none; }
.admin-tile { text-decoration: none; color: inherit; }
.admin-tile:hover { border-color: var(--accent); }
.admin-tile .soon { align-self: flex-start; }

/* Logo complet (page À propos) : PNG sur fond blanc, encadré pour rester propre en mode sombre. */
.logo-full { display: block; max-width: 260px; background: #fff; border-radius: 12px; padding: 8px; margin: 0 0 14px; }
