/* ==========================================================================
   LFLO — feuille de style principale
   1. Polices        5. En-tête & navigation   9. Annuaire des clubs
   2. Variables      6. Héros                 10. Calendrier
   3. Base           7. Sections d'accueil    11. Fenêtres (dialog)
   4. Composants     8. Carte des clubs       12. Album, contact, 404, impression
   ========================================================================== */

/* 1. Polices (auto-hébergées : aucune requête vers un service tiers)
   ========================================================================== */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bebas-neue-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bebas-neue-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Variables
   ========================================================================== */
:root {
  color-scheme: light;
  accent-color: var(--red-strong);

  /* Couleurs de la LFLO */
  --red: #ed1c24; /* rouge de la marque : décor et grands titres */
  --red-strong: #df181f; /* fond des boutons : texte blanc au contraste AA */
  --red-text: #c8161d; /* petits textes rouges sur fond clair (contraste AA, y compris sur --paper-2) */
  --red-light: #ff5c62; /* rouge lisible sur fond sombre */
  --orange: #fcb843;
  --ink: #333333;
  --ink-2: #4d4d4d;
  --ink-3: #686868;
  --paper: #fffaf0;
  --paper-2: #f5eee1;
  --line: #e6dccb;
  --night: #262626;
  --night-2: #333333;
  --on-dark: #fffaf0;
  --on-dark-2: #d9d3c7;
  --white: #ffffff;

  --gradient: linear-gradient(310deg, var(--orange) 0%, var(--red-strong) 58%);
  /* Liseré aux couleurs de la ligue, sous les photos d'ouverture. */
  --stripe: linear-gradient(90deg, var(--red-strong) 0%, var(--red) 55%, var(--orange) 100%);
  /* Variante claire, posée sur --paper : les textes rouges y restent lisibles. */
  --gradient-soft: linear-gradient(310deg, rgb(252 184 67 / 0.5) 0%, rgb(237 28 36 / 0.22) 75%);

  /* Carte : densité de clubs par province */
  --density-0: #f9d4d5;
  --density-1: #f4878b;
  --density-2: #ed1c24;
  --density-3: #a8121a;
  --density-outside: #e3dccf;

  /* Catégories d'événements */
  --cat-competition: #df181f;
  --cat-stage: #e8900c;
  --cat-formation: #2b6b8c;
  --cat-federation: #333333;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bebas Neue", "Poppins", Impact, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --radius-s: 0.5rem;
  --radius: 1rem;
  --radius-l: 1.5rem;
  --radius-full: 999px;
  --shadow: 0 0.25rem 1rem rgb(0 0 0 / 0.1);
  --shadow-strong: 3px 3px 15px rgb(0 0 0 / 0.2);

  --gutter: clamp(1rem, 4.5vw, 4rem);
  --section: clamp(3.5rem, 8vw, 6rem);
  --content: 82rem;
  --header-h: 4.75rem;
  --focus: var(--ink);
}

/* 3. Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

/* Le navigateur centre les fenêtres <dialog> grâce à « margin: auto » : on le rétablit
   après la remise à zéro ci-dessus. */
dialog {
  margin: auto;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* :where() annule la spécificité : les classes des composants peuvent redéfinir ces valeurs. */
:where(ul[role="list"], ol[role="list"]) {
  list-style: none;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--orange);
  color: var(--night);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.section--alt {
  background: var(--paper-2);
}

.section--dark {
  --focus: var(--orange);
  background: var(--night-2);
  color: var(--on-dark);
}

.section--darker {
  --focus: var(--orange);
  background: var(--night);
  color: var(--on-dark);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-head__text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 44rem;
}

.section-title {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
}

.section-lead {
  font-size: 1.05rem;
  color: var(--ink-2);
}

.section--dark .section-lead,
.section--darker .section-lead {
  color: var(--on-dark-2);
}

.accent {
  color: var(--red);
}

.section--dark .accent,
.section--darker .accent {
  color: var(--red-light);
}

.kicker {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--red-text);
}

.section--dark .kicker,
.section--darker .kicker,
.page-hero .kicker {
  color: var(--orange);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid #efd189;
  border-radius: var(--radius);
  background: #fff5db;
  color: var(--ink);
}

.notice .icon {
  margin-top: 0.15rem;
  color: #9a6500;
}

/* 4. Composants
   ========================================================================== */
.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-s);
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.button--primary {
  background: var(--red-strong);
  color: var(--white);
}

.button--primary:hover {
  background: var(--orange);
  color: var(--night);
}

.button--dark {
  background: var(--ink);
  color: var(--paper);
}

.button--dark:hover {
  background: var(--orange);
  color: var(--night);
}

.button--ghost {
  border-color: currentColor;
  color: var(--ink);
}

.button--ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.button--light {
  background: var(--paper);
  color: var(--ink);
}

.button--light:hover {
  background: var(--orange);
}

.button--outline-light {
  border-color: rgb(255 250 240 / 0.75);
  color: var(--on-dark);
}

.button--outline-light:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.button--small {
  min-height: 2.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--red-text);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link .icon {
  transition: transform 0.2s ease;
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.icon-button:hover {
  border-color: var(--ink);
  background: var(--white);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.3rem 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.chip:has(.chip__count) {
  padding-right: 0.4rem;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.chip__count {
  min-width: 1.75rem;
  padding: 0.05rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--paper-2);
  font-size: 0.8rem;
  text-align: center;
}

.chip[aria-pressed="true"] .chip__count {
  background: var(--red-strong);
  color: var(--white);
}

.chip__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--cat);
}

[data-category="competition"] {
  --cat: var(--cat-competition);
  --cat-bg: #fde4e5;
  --cat-ink: #a3121a;
}

[data-category="stage"] {
  --cat: var(--cat-stage);
  --cat-bg: #fff0d4;
  --cat-ink: #774500;
}

[data-category="formation"] {
  --cat: var(--cat-formation);
  --cat-bg: #e1eef5;
  --cat-ink: #1f5068;
}

[data-category="federation"] {
  --cat: var(--cat-federation);
  --cat-bg: #ebe5da;
  --cat-ink: #333333;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--cat-bg, var(--paper-2));
  color: var(--cat-ink, var(--ink));
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-s);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-transform: uppercase;
}


.badge--tentative {
  background: #fff0d4;
  color: #774500;
}

.badge--cancelled {
  background: var(--ink);
  color: var(--paper);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links__link {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--on-dark);
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.social-links__link:hover {
  background: rgb(255 250 240 / 0.12);
  color: var(--orange);
}

.social-links__link .icon {
  width: 1.6rem;
  height: 1.6rem;
}

/* 5. En-tête & navigation
   ========================================================================== */
.site-header {
  --focus: var(--orange);
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  color: var(--on-dark);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.is-solid,
.site-header.is-nav-open {
  background: rgb(38 38 38 / 0.97);
  box-shadow: 0 2px 18px rgb(0 0 0 / 0.25);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header.is-solid:not(.is-nav-open) {
    background: rgb(38 38 38 / 0.86);
    backdrop-filter: blur(10px);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(100% - 2 * var(--gutter), var(--content));
  min-height: var(--header-h);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--on-dark);
  text-decoration: none;
}

.brand__logo {
  width: 2.9rem;
  height: auto;
}

.brand__arms {
  fill: #e6e6e6;
}

.brand__body {
  fill: var(--red);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__short {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.06em;
}

.brand__long {
  max-width: 12rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--on-dark-2);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.site-nav__list {
  display: flex;
  gap: clamp(1.25rem, 2.2vw, 2.25rem);
}

.site-nav__link {
  display: inline-block;
  padding-block: 0.4rem;
  background: linear-gradient(var(--red), var(--red)) left bottom / 0 3px no-repeat;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-size 0.3s ease;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  background-size: 100% 3px;
}

.nav-toggle {
  display: none;
}

@media (max-width: 64em) {
  .brand__long {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 2px solid rgb(255 250 240 / 0.4);
    border-radius: var(--radius-s);
    background: transparent;
    color: var(--on-dark);
  }

  .nav-toggle .icon {
    width: 1.6rem;
    height: 1.6rem;
  }

  .nav-toggle__close,
  .nav-toggle[aria-expanded="true"] .nav-toggle__open {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__close {
    display: block;
  }

  .site-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 0.5rem var(--gutter) 2rem;
    background: var(--night);
    box-shadow: 0 18px 24px rgb(0 0 0 / 0.3);
  }

  .site-header.is-nav-open .site-nav {
    display: flex;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgb(255 250 240 / 0.12);
    background: none;
    font-size: 1.15rem;
  }

  .site-nav__link[aria-current="page"] {
    color: var(--red-light);
  }
}

/* 6. Héros
   ========================================================================== */
.hero,
.page-hero {
  --focus: var(--orange);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--night);
  color: var(--on-dark);
}

.hero__media,
.page-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 0.375rem;
  background: var(--stripe);
}

.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
}

.hero::before {
  background: rgb(0 0 0 / 0.6);
}

/* Sur grand écran, le voile s'éclaircit vers la droite : le texte reste lisible à gauche
   et la photo garde son relief. */
@media (min-width: 48.0625em) {
  .hero::before {
    background: linear-gradient(90deg, rgb(10 10 10 / 0.82) 0%, rgb(10 10 10 / 0.6) 45%, rgb(10 10 10 / 0.3) 100%);
  }
}

.hero .kicker {
  margin-bottom: -1rem;
  color: var(--orange);
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
  padding-block: calc(var(--header-h) + 3rem) 5rem;
}

.hero__title {
  max-width: 18ch;
  font-size: clamp(2.4rem, 1.1rem + 5.4vw, 5rem);
  font-weight: 400;
  line-height: 1.08;
}

.hero__title .accent {
  font-weight: 700;
  color: var(--red);
}

.hero__tagline {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__social {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  transform: translateY(-50%);
}

.hero__social .social-links {
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 48em) {
  .hero__social {
    position: static;
    transform: none;
    width: min(100% - 2 * var(--gutter), var(--content));
    margin: -3rem auto 2rem;
  }

  .hero__social .social-links {
    flex-direction: row;
  }

  .hero {
    flex-direction: column;
    justify-content: center;
  }
}

.page-hero {
  padding-block: calc(var(--header-h) + clamp(2.5rem, 7vw, 5.5rem)) clamp(2.5rem, 6vw, 4.5rem);
}

.page-hero::before {
  background: linear-gradient(100deg, rgb(20 20 20 / 0.94) 15%, rgb(20 20 20 / 0.6) 100%);
}

.page-hero__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.page-hero__title {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);
}

.page-hero__lead {
  max-width: 42rem;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
  color: var(--on-dark-2);
}

/* 7. Sections de l'accueil
   ========================================================================== */
.about__body {
  font-size: clamp(1.15rem, 0.9rem + 1vw, 1.55rem);
  font-weight: 700;
  line-height: 1.5;
}

.about__label {
  display: inline;
  margin-right: 0.5rem;
  font-size: 1.1rem;
  color: var(--red-text);
  vertical-align: 0.15em;
}

.about__text {
  display: inline;
}

/* Grand écran : titre à gauche, texte à droite (longueur de ligne confortable). */
@media (min-width: 64em) {
  .about__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: clamp(2rem, 4vw, 4rem);
  }

  .about__label {
    display: block;
    margin: 0;
    padding-top: 0.75rem;
    border-top: 4px solid var(--red);
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.05;
    vertical-align: baseline;
  }

  .about__text {
    display: block;
  }
}

/* « C'est quoi la lutte ? » */
.wrestling {
  --focus: var(--night);
  background: var(--gradient);
  color: var(--white);
}

.wrestling__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(8rem, auto);
  gap: clamp(1.25rem, 3.5vw, 4rem);
}

.wrestling__intro {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  grid-column: 1 / 3;
  grid-row: 1;
}

.wrestling__intro p {
  max-width: 46rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.wrestling__tall {
  grid-column: 3;
  grid-row: 1 / 3;
}

.wrestling__wide {
  grid-column: 1 / 3;
  grid-row: 2 / 4;
  min-height: 18rem;
}

.wrestling__outro {
  display: flex;
  align-items: flex-end;
  grid-column: 3;
  grid-row: 3;
  font-size: 1.1rem;
  font-weight: 700;
}

.wrestling__figure img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.styles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.style-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-strong);
}

.style-card h3 {
  font-size: 1.35rem;
}

@media (max-width: 48em) {
  .wrestling__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wrestling__intro,
  .wrestling__tall,
  .wrestling__wide,
  .wrestling__outro {
    grid-column: auto;
    grid-row: auto;
  }

  .wrestling__figure {
    aspect-ratio: 4 / 3;
  }

  .wrestling__wide {
    min-height: 0;
  }

  /* Sur mobile, ce texte tombe au milieu du dégradé : en grand corps, le blanc reste lisible. */
  .wrestling__outro {
    color: var(--white);
    font-size: 1.25rem;
  }
}

/* Chiffres clés */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 3rem 2rem;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.stat__icon {
  width: auto;
  height: 5rem;
}

.stat__title {
  font-size: 1.5rem;
}

.stat__number {
  margin-inline: 0.05em;
  font-family: var(--font-display);
  font-size: 2.4em;
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: 0.02em;
  color: var(--orange);
  vertical-align: -0.1em;
}

.stat p {
  color: var(--on-dark-2);
}

/* Bandeau défilant des clubs */
.ticker {
  --focus: var(--orange);
  padding-block: 1.25rem 1.75rem;
  background: var(--night-2);
  color: var(--on-dark);
}

.ticker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.ticker__title {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.ticker__viewport {
  overflow: hidden;
  padding-inline: var(--gutter);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 90s linear infinite;
}

.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track,
.ticker.is-paused .ticker__track {
  animation-play-state: paused;
}

.ticker__group {
  display: flex;
  gap: 4rem;
  padding-right: 4rem;
}

.ticker__group a,
.ticker__group span {
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.3s ease;
}

.ticker__group a:hover {
  color: var(--red-light);
}

.ticker__toggle {
  border-color: rgb(255 250 240 / 0.3);
  color: var(--on-dark);
}

.ticker__toggle:hover {
  border-color: var(--paper);
  background: rgb(255 250 240 / 0.1);
}

.ticker__toggle .icon-play,
.ticker.is-paused .ticker__toggle .icon-pause {
  display: none;
}

.ticker.is-paused .ticker__toggle .icon-play {
  display: block;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__viewport {
    mask-image: none;
  }

  .ticker__track {
    width: auto;
    animation: none;
  }

  .ticker__group {
    flex-wrap: wrap;
    gap: 0.75rem 2.5rem;
    padding: 0;
  }

  .ticker__group[aria-hidden="true"],
  .ticker__toggle {
    display: none;
  }

  .ticker__head {
    min-height: 2.75rem;
  }
}

/* Débuter */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-strong);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  counter-increment: step;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--red);
}

.step h3 {
  font-size: 1.25rem;
}

.step p {
  color: var(--ink-2);
}

/* Entraîneurs */
.coaches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.coach {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.coach__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  border: 3px solid var(--red);
  border-radius: 50%;
  background: var(--night-2);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.coach__name {
  font-weight: 700;
  line-height: 1.3;
}

.coach__clubs {
  font-size: 0.875rem;
  color: var(--ink-3);
}

.coach__clubs a {
  color: var(--red-text);
  font-weight: 600;
  text-decoration: none;
}

.coach__clubs a:hover {
  text-decoration: underline;
}

.coaches-toggle {
  display: none;
  margin-top: 1.5rem;
}

/* Sur petit écran, seuls les premiers entraîneurs sont visibles jusqu'au clic sur « Voir… ». */
@media (max-width: 40em) {
  .coaches:not(.is-expanded) > li:nth-child(n + 7) {
    display: none;
  }

  .coaches-toggle {
    display: inline-flex;
  }
}

/* Prochains événements */
.event-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem;
}

.event-card {
  display: flex;
  gap: 1.25rem;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-top: 5px solid var(--cat);
  border-radius: var(--radius);
  background: var(--white);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.event-card:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-3px);
}

.date-block {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 4.75rem;
  border-radius: var(--radius-s);
  background: var(--night-2);
  color: var(--paper);
}

.date-block__day {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
}

.date-block__month {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.event-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.event-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.event-card__meta {
  font-size: 0.875rem;
  color: var(--ink-3);
}

.empty-state {
  padding: 2rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
  text-align: center;
}

/* Citation, avec le logo de la ligue en filigrane */
.quote {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.quote__text {
  max-width: 50rem;
  font-size: clamp(1.6rem, 0.9rem + 3vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 48.0625em) {
  .quote::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 50%;
    right: max(var(--gutter), (100% - var(--content)) / 2);
    width: clamp(12rem, 24vw, 20rem);
    aspect-ratio: 624.62 / 547.59;
    background: var(--on-dark);
    opacity: 0.07;
    mask: url("../../favicon.svg") center / contain no-repeat;
    transform: translateY(-50%) rotate(-8deg);
  }
}

/* Partenaires */
.partners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 1rem;
}

.partners li {
  display: grid;
  place-items: center;
  min-height: 7.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--paper);
}

.partners img {
  width: auto;
  height: 4.75rem;
  max-width: 100%;
  object-fit: contain;
}

/* 8. Carte des clubs
   ========================================================================== */
.finder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  overflow: hidden;
}

.finder__panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(2rem, 4vw, 4rem) var(--gutter);
  background: var(--gradient-soft), var(--paper);
}

.finder__panel .kicker {
  color: var(--ink);
}

.finder__panel .accent {
  color: var(--red-text);
}

.finder__panel .chip {
  border-color: transparent;
}

.finder__panel .chip[aria-pressed="true"] {
  border-color: var(--ink);
}

.finder__map {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4rem) var(--gutter);
}

.finder__results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.finder__results-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 1.6rem;
}

.finder__results-title span {
  font-size: 1rem;
  font-weight: 600;
}

.finder__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* À côté de la carte, la hauteur de la section ne dépend que de la carte (avec un minimum) :
   `contain: size` empêche le contenu du panneau de l'agrandir. Choisir une province remplit
   donc le panneau sans rien déplacer ; si les clubs sont nombreux, seule la liste défile.
   La marge intérieure de la liste laisse la place à l'anneau de focus et éloigne la barre de
   défilement des noms ; la marge négative garde les noms alignés avec le reste du panneau. */
@media (min-width: 60.0625em) {
  .finder {
    min-height: 46rem;
  }

  .finder__panel {
    contain: size;
  }

  .finder__results {
    flex: 1 1 auto;
    min-height: 0;
  }

  .finder__list {
    flex: 0 1 auto;
    min-height: 0;
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
    margin: -0.5rem -0.75rem -0.5rem -0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgb(51 51 51 / 0.35) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }
}

.finder__club {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  border-radius: 2rem;
  background: var(--paper);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.finder__club:hover {
  background: var(--white);
  box-shadow: 0 1px 6px rgb(0 0 0 / 0.1);
}

/* Seule la flèche se déplace, à l'intérieur de la pastille : aucun débordement. */
.finder__club .icon {
  color: var(--red-text);
  transition: transform 0.2s ease;
}

.finder__club:hover .icon {
  transform: translateX(3px);
}

.finder__club-name {
  font-weight: 700;
}

.finder__club-city {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--ink-3);
  white-space: nowrap;
}

@media (max-width: 60em) {
  .finder {
    grid-template-columns: minmax(0, 1fr);
  }

  .finder__map {
    order: -1;
  }
}

/* Place réservée à la carte avant son affichage par JavaScript : évite tout décalage de la page. */
.club-map-slot:empty {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  aspect-ratio: 1000 / 905;
}

.club-map {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.club-map__frame {
  position: relative;
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
}

.club-map__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.club-map__province {
  stroke: var(--paper);
  stroke-width: 2;
  stroke-linejoin: round;
  transition:
    fill 0.2s ease,
    filter 0.2s ease;
}

.club-map__province[data-density="outside"] {
  fill: var(--density-outside);
}

.club-map__province[data-density="0"] {
  fill: var(--density-0);
}

.club-map__province[data-density="1"] {
  fill: var(--density-1);
}

.club-map__province[data-density="2"] {
  fill: var(--density-2);
}

.club-map__province[data-density="3"] {
  fill: var(--density-3);
}

.club-map__province[tabindex] {
  cursor: pointer;
}

.club-map__province[tabindex]:hover {
  filter: brightness(0.88);
}

.club-map__province[tabindex]:focus {
  outline: none;
}

.club-map__province.is-selected {
  fill: var(--ink);
}

.club-map__ring {
  fill: none;
  stroke: var(--orange);
  stroke-width: 6;
  stroke-linejoin: round;
  opacity: 0;
  pointer-events: none;
}

.club-map__ring.is-visible {
  opacity: 1;
}

.club-map__labels {
  pointer-events: none;
}

.club-map__label {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.04em;
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 6px;
  stroke-linejoin: round;
  paint-order: stroke;
  text-anchor: middle;
  dominant-baseline: central;
}

.club-map__label[data-outside] {
  font-size: 24px;
  fill: #7c7468;
}

.club-map__label.is-selected {
  fill: var(--paper);
  stroke: var(--ink);
}

.club-map__leader {
  stroke: var(--ink);
  stroke-width: 2;
}

.club-map__pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  translate: -50% -50%;
  transition:
    transform 0.15s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.map-pin:not([data-count="1"]) {
  width: 1.65rem;
  height: 1.65rem;
}

.map-pin:hover {
  transform: scale(1.18);
}

.map-pin.is-active {
  background: var(--orange);
  color: var(--night);
}

.map-pin.is-dimmed {
  opacity: 0.4;
}

.club-map__tooltip {
  position: absolute;
  z-index: 2;
  min-width: 8rem;
  max-width: 16rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-s);
  background: var(--night);
  box-shadow: var(--shadow);
  color: var(--on-dark);
  font-size: 0.85rem;
  line-height: 1.45;
  pointer-events: none;
  translate: -50% -100%;
}

.club-map__tooltip.is-below {
  translate: -50% 0;
}

.club-map__tooltip strong {
  display: block;
  font-size: 0.95rem;
}

.club-map__tooltip ul {
  padding: 0;
  margin-top: 0.2rem;
  list-style: none;
}

.club-map__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.club-map__legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.club-map__swatch {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 3px;
}

.club-map__swatch[data-density="outside"] {
  background: var(--density-outside);
}

.club-map__swatch[data-density="0"] {
  background: var(--density-0);
}

.club-map__swatch[data-density="1"] {
  background: var(--density-1);
}

.club-map__swatch[data-density="2"] {
  background: var(--density-2);
}

.club-map__swatch[data-density="3"] {
  background: var(--density-3);
}

/* 9. Annuaire des clubs
   ========================================================================== */
.directory-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
}

.directory-tools__panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.directory-tools__count {
  font-weight: 600;
  color: var(--ink-2);
}

@media (max-width: 60em) {
  .directory-tools {
    grid-template-columns: minmax(0, 1fr);
  }
}

.search-field {
  position: relative;
}

.search-field .icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  color: var(--ink-3);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field .field__input {
  padding-left: 3rem;
}

.directory__group + .directory__group {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.directory__group-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--ink);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.directory__group-count {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-3);
}

.directory__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1.5rem;
}

.directory__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.id-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-strong);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
  transition: box-shadow 0.3s ease;
}

.id-card:focus {
  outline: none;
}

.id-card:target {
  box-shadow:
    0 0 0 4px var(--orange),
    var(--shadow-strong);
}

.id-card__band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1.25rem;
  background: var(--gradient);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.id-card__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.75rem;
}

.id-card__photo {
  display: grid;
  place-items: center;
  flex: none;
  width: 4.25rem;
  aspect-ratio: 35 / 45;
  border-radius: var(--radius-s);
  background:
    radial-gradient(circle at 50% 120%, rgb(237 28 36 / 0.55), transparent 65%),
    var(--night-2);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.04em;
}

.id-card__name {
  font-size: 1.25rem;
  line-height: 1.25;
}

.id-card__place {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-3);
}

.id-card__aka {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-3);
}

.id-card__fields {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.9rem 1rem;
  padding: 0.5rem 1.25rem 1.25rem;
}

.id-card__field--wide {
  grid-column: 1 / -1;
}

.id-card__field dt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  color: var(--red-text);
}

.id-card__field dt .icon {
  width: 1rem;
  height: 1rem;
}

.id-card__field dd {
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.id-card__empty {
  flex: 1;
  padding: 0.25rem 1.25rem 1.25rem;
  color: var(--ink-3);
}

.id-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 1.25rem 1.25rem;
}

.id-card__actions .button {
  flex: 1 1 auto;
  padding-inline: 1rem;
  font-size: 0.92rem;
}

.id-card__pending {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-3);
}

.id-card__machine {
  overflow: hidden;
  padding: 0.5rem 1.25rem;
  background: var(--paper-2);
  color: #6b6458;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* 10. Calendrier
   ========================================================================== */

/* Hauteur réservée pendant le chargement : le pied de page ne saute pas à l'affichage du mois. */
.calendar__views {
  min-height: 34rem;
}

.calendar__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.calendar__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.calendar__title {
  min-width: 14.5ch; /* largeur fixe : les boutons voisins ne bougent pas d'un mois à l'autre */
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem);
  text-align: center;
}

.calendar__filters {
  margin-bottom: 1.5rem;
}

.calendar__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.calendar__footer p {
  max-width: 36rem;
  color: var(--ink-2);
}

.segmented {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: var(--radius-full);
  background: var(--paper-2);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.4rem 1.1rem;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  font-weight: 600;
}

.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.month-grid {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-spacing: 0;
  border-collapse: separate;
  background: var(--white);
  table-layout: fixed;
}

.month-grid th {
  padding: 0.7rem 0.25rem;
  background: var(--night-2);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.month-grid th abbr {
  text-decoration: none;
}

.month-grid td {
  height: 7.5rem;
  padding: 0.35rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  vertical-align: top;
}

.month-grid td:first-child {
  border-left: 0;
}

.month-grid td.is-weekend {
  background: #fffdf7;
}

.month-grid td.is-outside {
  background: var(--paper);
  color: #776f63;
}

.month-grid__number {
  display: inline-grid;
  place-items: center;
  min-width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 600;
}

.month-grid td.is-today .month-grid__number {
  background: var(--red-strong);
  color: var(--white);
}

.month-grid__events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.2rem;
}

.pill {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0.2rem 0.45rem;
  border: 0;
  border-left: 3px solid var(--cat);
  border-radius: 4px;
  background: var(--cat-bg);
  color: var(--cat-ink);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill:hover {
  filter: brightness(0.94);
}

.pill.is-cancelled {
  text-decoration: line-through;
}

.month-grid__dots {
  display: none;
}

@media (max-width: 45em) {
  .month-grid th {
    font-size: 0.95rem;
  }

  .month-grid td {
    height: 3.6rem;
    padding: 0.2rem;
    text-align: center;
  }

  .month-grid__events {
    display: none;
  }

  .month-grid__dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    margin-top: 0.2rem;
  }

  .month-grid__dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--cat);
  }
}

.agenda {
  margin-top: 2.5rem;
}

.agenda__title {
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.agenda__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--cat);
  border-radius: var(--radius-s);
  background: var(--white);
  text-align: left;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.agenda-item:hover {
  box-shadow: var(--shadow);
  transform: translateX(3px);
}

.agenda-item.is-past {
  opacity: 0.7;
}

.agenda-item .date-block {
  width: 3.75rem;
  height: 4.25rem;
}

.agenda-item__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
}

.agenda-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.agenda-item__meta {
  font-size: 0.875rem;
  color: var(--ink-3);
}

.agenda-item .icon {
  margin-left: auto;
  color: var(--ink-3);
}

.list-month + .list-month {
  margin-top: 2.5rem;
}

.list-month__title {
  margin-bottom: 1rem;
  color: var(--red-text);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.calendar__past-toggle {
  margin-top: 2rem;
}

/* 11. Fenêtres (dialog)
   ========================================================================== */
.dialog {
  width: min(100% - 2rem, 40rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.35);
  color: var(--ink);
}

.dialog::backdrop {
  background: rgb(20 20 20 / 0.72);
}

@media (prefers-reduced-motion: no-preference) {
  .dialog[open] {
    animation: dialog-in 0.25s ease-out;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.dialog__panel {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.event-dialog__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-right: 3rem;
}

.event-dialog__title {
  margin-bottom: 1.5rem;
  padding-right: 2rem;
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem);
}

.event-dialog__facts {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.event-dialog__fact {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.75rem;
}

.event-dialog__fact dt {
  padding-top: 0.15rem;
  color: var(--red-text);
}

.event-dialog__fact dd {
  font-weight: 600;
}

.event-dialog__fact dd a {
  color: var(--red-text);
}

.event-dialog__fact small {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-3);
}

.event-dialog__description {
  margin-bottom: 1.5rem;
  color: var(--ink-2);
}

.event-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* 12. Album, contact, 404, impression
   ========================================================================== */
/* Grille de l'album : la taille de chaque vignette dépend du format de la photo
   (voir tileSizes dans assets/js/lib/album.js) ; « dense » comble les trous. */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 15rem;
  grid-auto-flow: dense;
  gap: clamp(1rem, 2.5vw, 2rem);
}

/* Place réservée pendant le chargement : le pied de page ne saute pas. */
.gallery[aria-busy="true"] {
  min-height: 30rem;
}

.gallery__status:not(.visually-hidden, .empty-state) {
  margin-bottom: 1.5rem;
  color: var(--ink-3);
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__item--large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery__link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2); /* visible le temps que la photo arrive */
}

.gallery__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery__link:hover img {
  transform: scale(1.04);
}

/* Sur mobile, une colonne : chaque photo garde son format d'origine, sans recadrage. */
@media (max-width: 48em) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
  }

  .gallery__item--wide,
  .gallery__item--tall,
  .gallery__item--large {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery__link img {
    height: auto;
  }
}

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-dark);
  --focus: var(--orange);
}

.lightbox::backdrop {
  background: rgb(12 12 12 / 0.94);
}

.lightbox__figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 1rem;
  height: 100%;
  padding: 4.5rem clamp(1rem, 7vw, 5.5rem) 1.5rem;
  touch-action: pan-y pinch-zoom; /* les balayages horizontaux changent de photo */
}

.lightbox__image {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-s);
  object-fit: contain;
}

.lightbox__caption {
  max-width: 48rem;
  text-align: center;
}

.lightbox__counter {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--orange);
}

.lightbox .icon-button {
  position: absolute;
  border-color: rgb(255 250 240 / 0.35);
  background: rgb(20 20 20 / 0.5);
  color: var(--on-dark);
}

.lightbox .icon-button:hover {
  border-color: var(--paper);
  background: rgb(20 20 20 / 0.8);
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev {
  left: 1rem;
}

.lightbox__next {
  right: 1rem;
}

@media (max-width: 48em) {
  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  .lightbox__figure {
    padding-bottom: 5rem;
  }
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}

@media (max-width: 60em) {
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form {
  display: grid;
  gap: 1.35rem;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.35rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field__label {
  font-weight: 600;
}

.field__optional {
  font-weight: 400;
  color: var(--ink-3);
}

.field__input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border: 2px solid #cbc1b0;
  border-radius: var(--radius-s);
  background: var(--white);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field__input:hover {
  border-color: #9b9284;
}

.field__input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgb(252 184 67 / 0.6);
}

.field__input[aria-invalid="true"] {
  border-color: var(--red-strong);
}

select.field__input {
  appearance: none;
  padding-right: 2.75rem;
  background: var(--white) url("../img/select-arrow.svg") no-repeat right 1rem center / 1.1rem;
}

textarea.field__input {
  min-height: 10rem;
  resize: vertical;
}

.field__hint {
  font-size: 0.85rem;
  color: var(--ink-3);
}

.field__error {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red-text);
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.form__note {
  flex: 1 1 18rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.contact-result {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid #b7d9b8;
  border-radius: var(--radius);
  background: #eef7ee;
}

.contact-result:focus {
  outline: none;
}

.contact-result__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
}

.contact-result__title .icon {
  color: #2d7a32;
}

.contact-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-result textarea {
  min-height: 8rem;
  font-size: 0.875rem;
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 60em) {
  .contact-aside {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-strong);
}

.info-card__title {
  font-size: 1.2rem;
}

.info-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.info-card__list li {
  display: flex;
  gap: 0.6rem;
}

.info-card__list .icon {
  margin-top: 0.2rem;
  color: var(--red-text);
}

.info-card--dark {
  --focus: var(--orange);
  background: var(--night-2);
  color: var(--on-dark);
}

.info-card--dark p {
  color: var(--on-dark-2);
}

/* Pages de texte (confidentialité) */
.prose {
  max-width: 48rem;
  margin-inline: max(var(--gutter), (100% - var(--content)) / 2) auto;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose > h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

.prose a:not([class]) {
  color: var(--red-text);
  font-weight: 600;
}

.prose__summary {
  margin-bottom: 0.5rem;
}

.prose__updated {
  margin-top: 3rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* 404 */
.not-found {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
}

.not-found__code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 3rem + 14vw, 12rem);
  line-height: 0.9;
  color: var(--red-light);
}

.not-found .hero__actions {
  margin-top: 1rem;
}

/* Pied de page */
.site-footer {
  --focus: var(--orange);
  padding-top: var(--section);
  background: var(--night);
  color: var(--on-dark-2);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}

@media (max-width: 60em) {
  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 30em) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

.site-footer__about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 26rem;
}

.site-footer__title {
  margin-bottom: 1rem;
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--paper);
  text-decoration: underline;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 3.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgb(255 250 240 / 0.12);
  font-size: 0.85rem;
}

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Impression */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .hero__social,
  .ticker,
  .finder__map,
  .calendar__toolbar,
  .calendar__filters,
  .calendar__footer,
  .id-card__actions,
  .id-card__machine {
    display: none !important;
  }

  body {
    background: var(--white);
  }

  .page-hero,
  .hero {
    min-height: 0;
    padding: 1rem 0;
    background: none;
    color: var(--ink);
  }

  .page-hero__media,
  .hero__media,
  .page-hero::before,
  .hero::before,
  .page-hero::after,
  .hero::after {
    display: none;
  }

  .id-card {
    box-shadow: none;
    border: 1px solid var(--line);
    break-inside: avoid;
  }
}
