/* Kyo Yu Kan Aïkido Club, Braine-l'Alleud
   Tout part du logo du club : la vague d'Hokusai devant un soleil rouge, et les trois kanji
   共有館, « la maison du partage ». La palette en est tirée : l'encre, le bleu-vert profond de la
   mer, l'écume, le vermillon du soleil. Le soleil est réservé à ce qui compte : le bandeau,
   les boutons d'action, le prochain cours. Une seule famille, Bricolage Grotesque, dont on
   joue sur la largeur et la taille optique : étroite et lourde pour les titres, ouverte pour le texte. */

/* latin-ext avant latin : les plages se chevauchent, la dernière déclarée l'emporte. */
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  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;
}

:root {
  --encre: #0f1b1a;
  --gris: #4a5654;
  --papier: #ffffff;
  --ecume: #eaf1ef;
  --ecume-trait: #cfdeda;
  --mer: #1e4048;
  --mer-fonce: #152f35;
  --vague: #4f7975;
  --vague-clair: #a9c4c0;
  --soleil: #d23917;
  --soleil-fonce: #b52d10;
  --creme: #f7edcd;

  --police: "Bricolage", "Segoe UI", system-ui, sans-serif;

  /* Échelle typographique, rapport 1,25 sur un corps de 18 px */
  --t-0: 1rem;
  --t-1: 1.125rem;
  --t-2: 1.406rem;
  --t-3: 1.758rem;
  --t-4: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem);
  --t-5: clamp(2.9rem, 1.6rem + 4.4vw, 5.8rem);

  /* Rythme : multiples de 0,5 rem */
  --e-1: 0.5rem;
  --e-2: 1rem;
  --e-3: 1.5rem;
  --e-4: 2rem;
  --e-6: 3rem;
  --e-8: 4rem;
  --e-12: clamp(4rem, 3rem + 4vw, 7rem);

  --largeur: 76rem;
  --gouttiere: clamp(1.25rem, 0.8rem + 2.4vw, 3rem);
  --rayon: 0.5rem;
  --entete: 4.75rem;

  /* Seigaiha, le motif des vagues : des écailles concentriques, une rangée sur deux décalée */
  --seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cdefs%3E%3Cg id='e'%3E%3Ccircle r='39' fill='%231e4048' stroke='%234f7975' stroke-width='3'/%3E%3Ccircle r='29' fill='none' stroke='%234f7975' stroke-width='3'/%3E%3Ccircle r='19' fill='none' stroke='%234f7975' stroke-width='3'/%3E%3Ccircle r='9' fill='none' stroke='%234f7975' stroke-width='3'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23e' x='0' y='0'/%3E%3Cuse href='%23e' x='80' y='0'/%3E%3Cuse href='%23e' x='40' y='20'/%3E%3Cuse href='%23e' x='0' y='40'/%3E%3Cuse href='%23e' x='80' y='40'/%3E%3C/svg%3E");
  --seigaiha-clair: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cdefs%3E%3Cg id='e'%3E%3Ccircle r='39' fill='%23eaf1ef' stroke='%23cfdeda' stroke-width='2'/%3E%3Ccircle r='29' fill='none' stroke='%23cfdeda' stroke-width='2'/%3E%3Ccircle r='19' fill='none' stroke='%23cfdeda' stroke-width='2'/%3E%3Ccircle r='9' fill='none' stroke='%23cfdeda' stroke-width='2'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23e' x='0' y='0'/%3E%3Cuse href='%23e' x='80' y='0'/%3E%3Cuse href='%23e' x='40' y='20'/%3E%3Cuse href='%23e' x='0' y='40'/%3E%3Cuse href='%23e' x='80' y='40'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--entete) + 1rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--police);
  font-size: var(--t-1);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  color: var(--encre);
  background: var(--papier);
  font-variant-numeric: lining-nums;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
p { margin: 0 0 var(--e-2); }
h1, h2, h3, h4 { margin: 0; font-weight: 800; font-stretch: 78%; line-height: 1; letter-spacing: -0.01em; text-wrap: balance; }
strong { font-weight: 700; }
sup { font-size: 0.62em; line-height: 0; }

:focus-visible { outline: 3px solid var(--soleil); outline-offset: 3px; border-radius: 2px; }

.planche { position: absolute; width: 0; height: 0; overflow: hidden; }
.kanji-trace { display: block; fill: currentColor; }
.kanji-texte { display: block; font-family: "Yu Mincho", "MS Mincho", serif; line-height: 1; }

.evitement {
  position: absolute; left: var(--e-2); top: -10rem; z-index: 100;
  padding: var(--e-1) var(--e-2); background: var(--encre); color: var(--papier); font-weight: 700;
}
.evitement:focus { top: var(--e-2); }

/* ---------- Boutons ---------- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e-1);
  min-height: 3rem; padding: 0.7rem 1.5rem;
  font-family: var(--police); font-size: 1.125rem; font-weight: 700; font-stretch: 88%; line-height: 1.1;
  text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.bouton:hover { text-decoration: none; }
.bouton:active { transform: translateY(1px); }
.bouton--soleil { background: var(--soleil); color: var(--papier); }
.bouton--soleil:hover { background: var(--soleil-fonce); }
.bouton--ligne { border-color: currentColor; color: var(--encre); background: transparent; }
.bouton--ligne:hover { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.bouton--ligne-clair { border-color: var(--mer); color: var(--mer); background: var(--papier); }
.bouton--large { width: 100%; }

.lien-fichier { font-weight: 700; color: var(--mer); }

/* ---------- Annonce ---------- */

.annonce {
  display: flex; align-items: center; justify-content: center; gap: var(--e-2);
  padding: var(--e-1) var(--gouttiere); background: var(--soleil); color: var(--papier); text-align: center;
}
.annonce__texte { margin: 0; font-weight: 700; }
.annonce__texte a { color: inherit; }
.annonce__fermer {
  flex: none; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%;
  background: transparent; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.annonce__fermer:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------- En-tête ---------- */

.entete {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: var(--e-3);
  min-height: var(--entete); padding: 0.5rem var(--gouttiere);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 var(--ecume-trait);
}
@supports (backdrop-filter: blur(8px)) {
  .entete { background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(10px) saturate(1.2); }
}
.marque { display: flex; align-items: center; gap: 0.7rem; flex: none; margin-right: auto; text-decoration: none; border-radius: 999px; }
.marque__logo { width: 3.5rem; height: 3.5rem; transition: transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1); }
.marque:hover .marque__logo { transform: rotate(-8deg); }
.marque__nom { font-size: 1.3rem; font-weight: 800; font-stretch: 78%; letter-spacing: 0.01em; }

.entete__nav { display: flex; align-items: center; }
.menu { display: flex; gap: var(--e-3); margin: 0; padding: 0; list-style: none; }
.menu a {
  position: relative; display: block; padding: 0.35rem 0;
  font-size: 1.0625rem; font-weight: 650; font-stretch: 85%;
  text-decoration: none;
}
.menu a::after {
  content: ""; position: absolute; left: 50%; bottom: -0.2rem; width: 0.45rem; height: 0.45rem;
  border-radius: 50%; background: var(--soleil); transform: translateX(-50%) scale(0); transition: transform 0.2s;
}
.menu a:hover::after, .menu a[aria-current="true"]::after { transform: translateX(-50%) scale(1); }
.entete__tel { font-weight: 700; font-stretch: 85%; font-size: 1.0625rem; text-decoration: none; white-space: nowrap; }
.entete__tel:hover { color: var(--soleil-fonce); }

.bascule { display: none; }

@media (max-width: 62rem) {
  .entete__tel { display: none; }
  .bascule {
    display: inline-flex; align-items: center; gap: 0.6rem;
    min-height: 2.75rem; padding: 0 0.9rem; border: 2px solid var(--encre); border-radius: 999px;
    background: transparent; color: var(--encre);
    font-family: var(--police); font-weight: 700; font-size: 1rem; cursor: pointer;
  }
  .bascule__barres, .bascule__barres::before, .bascule__barres::after {
    display: block; width: 1.1rem; height: 2px; background: currentColor; transition: transform 0.2s;
  }
  .bascule__barres { position: relative; }
  .bascule__barres::before, .bascule__barres::after { content: ""; position: absolute; left: 0; }
  .bascule__barres::before { top: -6px; }
  .bascule__barres::after { top: 6px; }
  .bascule[aria-expanded="true"] .bascule__barres { background: transparent; }
  .bascule[aria-expanded="true"] .bascule__barres::before { transform: translateY(6px) rotate(45deg); }
  .bascule[aria-expanded="true"] .bascule__barres::after { transform: translateY(-6px) rotate(-45deg); }

  .menu {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; gap: 0;
    padding: var(--e-1) var(--gouttiere) var(--e-3);
    background: var(--papier); border-bottom: 4px solid var(--mer);
    box-shadow: 0 1.5rem 2rem -1.5rem rgba(15, 27, 26, 0.35);
  }
  .menu--ouvert { display: flex; }
  .menu a { padding: 0.8rem 0; font-size: 1.4rem; border-bottom: 1px solid var(--ecume-trait); }
  .menu a::after { display: none; }
}
@media (max-width: 36rem) {
  .marque__nom { display: none; }
}
@media (max-width: 30rem) {
  .entete { gap: var(--e-2); }
  .marque__logo { width: 3rem; height: 3rem; }
  .entete__cta { padding-inline: 1rem; }
}

/* ---------- Bandeau : le soleil se lève sur la mer ---------- */

.hero {
  --mer-h: clamp(4.5rem, 2.5rem + 6vw, 8.5rem);
  --soleil-d: clamp(17rem, 9rem + 26vw, 36rem);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--largeur)) minmax(0, 1fr);
  grid-template-rows: auto var(--mer-h);
  overflow: hidden;
}
.hero__texte {
  grid-column: 2; grid-row: 1;
  position: relative; z-index: 3;
  max-width: 46rem;
  padding: clamp(2rem, 1rem + 3vw, 4rem) var(--gouttiere) clamp(2rem, 1rem + 2vw, 3rem);
}
.hero__ciel {
  grid-column: 2 / 4; grid-row: 1 / 3;
  position: relative; z-index: 1;
  align-self: end; justify-self: end;
  width: calc(var(--soleil-d) + clamp(2rem, 8vw, 10rem));
  display: grid; justify-items: start;
  pointer-events: none;
}
.soleil {
  position: relative;
  width: var(--soleil-d); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #de4a25 0%, var(--soleil) 55%, #c63414 100%);
  color: var(--creme);
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--soleil-d) * 0.02);
  padding-top: calc(var(--soleil-d) * 0.085);
  /* Le bas du disque disparaît derrière la mer */
  margin-bottom: calc(var(--mer-h) * -0.15);
}
.soleil__kanji { height: calc(var(--soleil-d) * 0.18); width: calc(var(--soleil-d) * 0.19); }
.mer {
  grid-column: 1 / -1; grid-row: 2;
  position: relative; z-index: 2;
  background: var(--mer) var(--seigaiha) 0 0 / 5rem 2.5rem repeat;
  /* La crête : une rangée d'écailles complètes au bord supérieur */
  -webkit-mask: radial-gradient(circle at 50% 3rem, #000 calc(2.5rem - 0.5px), transparent 2.5rem) -2.5rem -0.5rem / 5rem 3rem repeat-x,
                linear-gradient(#000, #000) 0 2.45rem / 100% 100% no-repeat;
          mask: radial-gradient(circle at 50% 3rem, #000 calc(2.5rem - 0.5px), transparent 2.5rem) -2.5rem -0.5rem / 5rem 3rem repeat-x,
                linear-gradient(#000, #000) 0 2.45rem / 100% 100% no-repeat;
}

.hero__h1 { margin: 0; font: inherit; letter-spacing: normal; }
.hero__lieu {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-bottom: var(--e-2);
  font-weight: 700; font-stretch: 88%; font-size: var(--t-1);
  color: var(--mer);
}
.hero__lieu::before { content: ""; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--soleil); }
.hero__titre {
  display: block; font-size: var(--t-5); font-weight: 800; font-stretch: 84%; line-height: 0.92; letter-spacing: -0.03em;
  margin-bottom: var(--e-3);
}
.hero__ligne { display: block; }
.hero__intro { max-width: 32em; font-size: var(--t-2); line-height: 1.45; }
.hero__accroche { max-width: 34em; color: var(--gris); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--e-2); margin: var(--e-4) 0 var(--e-3); }

.prochain {
  display: inline-flex; align-items: center; gap: 0.65rem;
  margin: 0; padding: 0.5rem 1rem 0.5rem 0.8rem;
  background: var(--ecume); border-radius: 999px;
  font-weight: 700; font-size: var(--t-0);
}
.prochain__pastille { flex: none; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--mer); }
.prochain--maintenant .prochain__pastille { background: var(--soleil); box-shadow: 0 0 0 0.25rem rgba(210, 57, 23, 0.2); }

.pastille-essai {
  position: absolute; left: 0; top: 8%; z-index: 2;
  display: grid; place-items: center;
  width: 8.5rem; height: 8.5rem; margin: 0; padding: 1rem;
  border-radius: 50%; background: var(--mer); color: var(--papier);
  font-weight: 800; font-stretch: 80%; font-size: 1.1rem; line-height: 1.05; text-align: center;
  transform: rotate(-9deg);
}

/* Écran large : le texte à gauche, le soleil à droite.
   En dessous de 56 rem, le soleil passe derrière le texte, plus petit, à moitié dans la mer. */
@media (max-width: 56rem) {
  .hero { --soleil-d: min(78vw, 22rem); grid-template-columns: 0 minmax(0, 1fr) 0; }
  .hero__texte { padding-bottom: calc(var(--soleil-d) * 0.72); }
  .hero__ciel { grid-column: 1 / -1; justify-self: end; width: auto; margin-right: calc(var(--soleil-d) * -0.18); }
  .soleil { margin-bottom: calc(var(--mer-h) * -0.25); }
}
@media (max-width: 30rem) {
  .hero__actions .bouton { flex: 1 1 100%; }
}

/* Le seul moment de mise en scène : au chargement, le soleil se lève derrière la mer,
   puis les trois kanji s'encrent l'un après l'autre, de haut en bas, comme au pinceau.
   Pur CSS : rien n'attend le script, rien ne clignote. */
@media (prefers-reduced-motion: no-preference) {
  .soleil { animation: lever 1.5s cubic-bezier(0.16, 0.8, 0.3, 1) 0.1s both; }
  .soleil__kanji { animation: encrer 0.55s cubic-bezier(0.6, 0, 0.3, 1) both; }
  .soleil__kanji:nth-child(1) { animation-delay: 1s; }
  .soleil__kanji:nth-child(2) { animation-delay: 1.18s; }
  .soleil__kanji:nth-child(3) { animation-delay: 1.36s; }
}
@keyframes lever {
  from { transform: translateY(42%); }
  to { transform: none; }
}
@keyframes encrer {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Sections ---------- */

.section { padding: var(--e-12) var(--gouttiere); }
.section > * { max-width: var(--largeur); margin-inline: auto; }
.section__tete { margin-bottom: var(--e-6); }
.titre { font-size: var(--t-4); font-weight: 800; font-stretch: 75%; margin-bottom: var(--e-2); max-width: 18ch; }
.section__tete .titre { max-width: none; }
.titre--clair { color: var(--papier); }
.chapo { max-width: 38em; font-size: var(--t-2); line-height: 1.45; margin: 0; }
.chapo p:last-child { margin-bottom: 0; }
.sous-titre { font-size: var(--t-3); font-stretch: 80%; margin-bottom: var(--e-2); }
.sous-titre--petit { font-size: var(--t-2); margin-top: var(--e-4); }
.note { color: var(--gris); max-width: 40em; margin: 0; }

/* ---------- La semaine ---------- */

.section--cours { background: var(--mer); color: var(--papier); padding-top: var(--e-8); }
.section--cours .chapo { color: var(--ecume); }

.semaine {
  --col: minmax(0, 1fr);
  display: grid; gap: var(--e-2);
}
.semaine__echelle, .jour__piste { display: grid; grid-template-columns: repeat(var(--colonnes), var(--col)); }
.semaine__echelle { margin-left: 10rem; font-weight: 700; font-stretch: 85%; font-size: 0.95rem; color: var(--vague-clair); }
.semaine__heure { grid-column: var(--col) / span 2; border-left: 2px solid rgba(169, 196, 192, 0.5); padding-left: 0.4rem; }
.jour {
  display: grid; grid-template-columns: 10rem minmax(0, 1fr); align-items: stretch;
  padding-block: 0.5rem;
  border-top: 1px solid rgba(169, 196, 192, 0.25);
}
.jour__nom { align-self: center; font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.6rem); font-weight: 800; font-stretch: 75%; }
.jour__piste { grid-template-rows: repeat(var(--lignes), minmax(5.25rem, auto)); gap: 0.4rem 0; }

.creneau {
  grid-column: var(--debut) / var(--fin); grid-row: var(--ligne);
  display: flex; flex-direction: column; justify-content: center; gap: 0.1rem;
  margin-right: 0.4rem; padding: 0.7rem 1.1rem;
  border-radius: var(--rayon);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.creneau:hover { transform: translateY(-3px); box-shadow: 0 0.4rem 0 rgba(0, 0, 0, 0.22); }
.creneau__titre { font-size: var(--t-2); font-weight: 800; font-stretch: 78%; line-height: 1.05; }
.creneau__heure { font-weight: 600; }
.creneau__note { font-size: var(--t-0); }
.creneau--enfants, .creneau--ados, .creneau--tous { background: var(--ecume); color: var(--encre); }
.creneau--adultes { background: var(--papier); color: var(--encre); box-shadow: inset 0.4rem 0 0 var(--encre); }
.creneau.est-prochain { outline: 4px solid var(--soleil); outline-offset: 3px; }

.cours-pied { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--e-2) var(--e-4); margin-top: var(--e-6); }
.cours-pied .note { color: var(--ecume); }
.section--cours .lien-fichier { color: var(--papier); }

@media (max-width: 48rem) {
  .semaine__echelle { display: none; }
  .jour { grid-template-columns: minmax(0, 1fr); gap: var(--e-1); }
  .jour__piste { display: flex; flex-direction: column; gap: var(--e-1); }
  .creneau { margin-right: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: var(--e-2); }
}

/* Les créneaux arrivent de gauche à droite : on lit que l'axe horizontal est le temps. */
.js-anim [data-echelonne] > * { opacity: 0; transform: translateX(-1.25rem); }
.js-anim [data-echelonne].vu > * { animation: creneau 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 110ms) both; }
.js-anim [data-echelonne].direct > * { opacity: 1; transform: none; }
@keyframes creneau { to { opacity: 1; transform: none; } }

/* ---------- Premier cours ---------- */

.etapes {
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--e-4);
  margin: 0 auto; padding: 0; list-style: none;
}
.etapes::before {
  content: ""; position: absolute; left: 2.5rem; right: calc((100% - 3 * var(--e-4)) / 4 - 2.5rem); top: 2.5rem; height: 2px;
  background: repeating-linear-gradient(90deg, var(--vague) 0 0.6rem, transparent 0.6rem 1rem);
}
.etape { position: relative; }
.etape__num {
  position: relative; display: grid; place-items: center;
  width: 5rem; height: 5rem; margin-bottom: var(--e-3);
  border-radius: 50%; background: var(--papier); border: 3px solid var(--mer); color: var(--mer);
  font-size: 2.4rem; font-weight: 800; font-stretch: 75%; line-height: 1;
}
.etape:last-child .etape__num { background: var(--soleil); border-color: var(--soleil); color: var(--papier); }
.etape__titre { font-size: var(--t-3); font-stretch: 80%; margin-bottom: var(--e-1); }
.etape__texte { margin: 0; }

@media (max-width: 62rem) {
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--e-6); }
  .etapes::before { display: none; }
}
@media (max-width: 36rem) {
  .etapes { grid-template-columns: minmax(0, 1fr); gap: var(--e-4); }
  .etape { display: grid; grid-template-columns: 4rem 1fr; column-gap: var(--e-2); }
  .etape__num { grid-row: span 2; width: 3.6rem; height: 3.6rem; font-size: 1.8rem; margin: 0; }
  .etapes::before {
    display: block; left: 1.75rem; right: auto; top: 1rem; bottom: 1rem; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--vague) 0 0.6rem, transparent 0.6rem 1rem);
  }
}

/* ---------- Pour qui ---------- */

.section--pour { background: var(--ecume); }
.onglets__barre { display: flex; flex-wrap: wrap; gap: var(--e-1); margin-bottom: var(--e-4); }
.onglet {
  min-height: 3rem; padding: 0.6rem 1.4rem;
  border: 2px solid var(--mer); border-radius: 999px;
  background: transparent; color: var(--mer);
  font-family: var(--police); font-size: 1.2rem; font-weight: 750; font-stretch: 85%;
  cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.onglet:hover { background: var(--papier); }
.onglet[aria-selected="true"] { background: var(--mer); color: var(--papier); }

.volet { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--e-6); align-items: center; }
.volet:focus-visible { outline-offset: 8px; }
.volet__titre { font-size: var(--t-4); font-stretch: 75%; font-weight: 800; margin-bottom: var(--e-2); }
.volet__intro { font-size: var(--t-2); line-height: 1.45; }
.atouts { margin: var(--e-3) 0; padding: 0; list-style: none; }
.atouts li { position: relative; padding: 0.45rem 0 0.45rem 2rem; border-bottom: 1px solid var(--ecume-trait); }
.atouts li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.95rem;
  width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--soleil);
}
.volet__quand { font-weight: 750; font-stretch: 85%; font-size: var(--t-2); margin-bottom: var(--e-3); }
.volet__quand::first-letter { text-transform: uppercase; }
.volet__photo { margin: 0; }
.volet__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon); }

.js-anim .volet__photo.vu { animation: volet 0.6s cubic-bezier(0.65, 0, 0.25, 1) both; }
@keyframes volet { from { clip-path: inset(0 100% 0 0 round var(--rayon)); } to { clip-path: inset(0 0 0 0 round var(--rayon)); } }

@media (max-width: 52rem) {
  .volet { grid-template-columns: minmax(0, 1fr); gap: var(--e-4); }
  .volet__photo { order: -1; }
}

/* ---------- L'aïkido et le nom du club ---------- */

.section--aikido { background: var(--mer-fonce); color: var(--papier); }
.aikido { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e-8); align-items: center; }
.aikido__texte p { max-width: 34em; color: var(--ecume); }
.ma-ai { margin: 0; }
.ma-ai__photo { width: 100%; border-radius: var(--rayon); }
.citation { margin-top: var(--e-3); padding-left: var(--e-3); border-left: 4px solid var(--soleil); }
.citation blockquote { margin: 0; }
.citation blockquote p { font-size: var(--t-3); font-weight: 700; font-stretch: 85%; line-height: 1.2; margin-bottom: var(--e-1); color: var(--papier); }
.citation__source { margin: 0; font-size: var(--t-0); color: var(--vague-clair); }

.nom { margin-top: var(--e-12); padding-top: var(--e-6); border-top: 1px solid rgba(169, 196, 192, 0.3); }
.nom__titre { font-size: var(--t-3); font-stretch: 80%; margin-bottom: var(--e-4); }
.kanji { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e-4); margin: 0; padding: 0; list-style: none; }
.kanji__item { display: grid; grid-template-columns: 6rem minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--e-3); align-items: start; }
.kanji__sceau {
  grid-row: span 2;
  display: grid; place-items: center;
  width: 6rem; height: 6rem; border-radius: 50%;
  background: var(--soleil); color: var(--creme);
}
.kanji__signe { width: 3.6rem; height: 3.6rem; font-size: 3.4rem; }
.kanji__lecture { margin: 0.3rem 0 0.2rem; display: flex; gap: var(--e-1); align-items: baseline; flex-wrap: wrap; }
.kanji__lecture > span:first-child { font-size: var(--t-3); font-weight: 800; font-stretch: 75%; }
.kanji__titre { font-weight: 700; color: var(--vague-clair); }
.kanji__texte { margin: 0; color: var(--ecume); }

@media (max-width: 62rem) {
  .aikido { grid-template-columns: minmax(0, 1fr); gap: var(--e-6); }
  .kanji { grid-template-columns: minmax(0, 1fr); gap: var(--e-3); }
}
@media (max-width: 30rem) {
  .kanji__item { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .kanji__sceau { width: 4.5rem; height: 4.5rem; }
  .kanji__signe { width: 2.7rem; height: 2.7rem; font-size: 2.5rem; }
}

/* ---------- Le club ---------- */

.club { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--e-8); align-items: start; }
.club__texte > p:first-child { font-size: var(--t-2); line-height: 1.45; }
.club__affiliation { color: var(--gris); font-size: var(--t-0); }

.profs { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--e-4); margin: 0; padding: 0; list-style: none; }
.profs--seul { grid-template-columns: minmax(0, 1fr); }
.prof { display: grid; gap: var(--e-2); }
.profs--seul .prof { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); align-items: end; column-gap: var(--e-3); }
.prof__photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--rayon); }
.prof__nom { font-size: var(--t-3); font-stretch: 78%; font-weight: 800; }
.prof__grade { margin: 0.3rem 0 var(--e-1); font-weight: 700; color: var(--soleil-fonce); }
.prof__titres { margin: 0; padding: 0; list-style: none; color: var(--gris); font-size: var(--t-0); }
.prof__titres li + li { margin-top: 0.15rem; }

.club__photo { max-width: 40rem; margin: var(--e-8) 0 0; }
.section > .club__photo { margin-inline: max(0px, calc((100% - var(--largeur)) / 2)) auto; }
.club__photo img { width: 100%; border-radius: var(--rayon); }

@media (max-width: 52rem) {
  .club { grid-template-columns: minmax(0, 1fr); gap: var(--e-6); }
}
@media (max-width: 30rem) {
  .profs--seul .prof { grid-template-columns: minmax(0, 1fr); }
  .profs--seul .prof__photo { max-width: 12rem; }
}

/* ---------- En images : la galerie, sur la mer ---------- */

.section--photos { background: var(--mer); color: var(--papier); }
.section--photos .chapo { color: var(--ecume); }
.galerie {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 10rem; grid-auto-flow: dense;
  gap: 0.6rem; margin: 0 auto; padding: 0; list-style: none;
}
.galerie__item { overflow: hidden; border-radius: var(--rayon); background: var(--mer-fonce); }
.galerie__item:first-child { grid-column: span 2; grid-row: span 2; }
.galerie--1 { grid-template-columns: minmax(0, 1fr); grid-auto-rows: clamp(14rem, 40vw, 30rem); }
.galerie--1 .galerie__item:first-child { grid-column: auto; grid-row: auto; }
.galerie--2 .galerie__item:last-child, .galerie--4 .galerie__item:last-child { grid-column: span 2; }
.galerie__lien { display: block; height: 100%; }
.galerie__lien img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease, opacity 0.2s; }
.galerie__lien:hover img { transform: scale(1.04); }
.section--photos :focus-visible { outline-color: var(--creme); }
.cadrage-haut { object-position: center top; }
.cadrage-bas { object-position: center bottom; }
.cadrage-gauche { object-position: left center; }
.cadrage-droite { object-position: right center; }
@media (min-width: 48rem) {
  .galerie { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 13rem; }
  .galerie--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .galerie--2 .galerie__item, .galerie--2 .galerie__item:last-child { grid-column: auto; grid-row: span 2; }
  .galerie--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.section > .visionneuse { max-width: none; }
.visionneuse {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0;
  color: var(--papier); background: rgba(10, 22, 25, 0.96); border: 0;
}
.visionneuse::backdrop { background: rgba(10, 22, 25, 0.8); }
.visionneuse[open] { display: grid; place-items: center; }
.visionneuse__cadre { margin: 0; padding: 4.5rem 4rem 1.5rem; display: grid; justify-items: center; gap: var(--e-2); }
.visionneuse__image { max-width: 100%; max-height: calc(100dvh - 10rem); width: auto; height: auto; object-fit: contain; border-radius: var(--rayon); }
.visionneuse__legende { max-width: 44rem; text-align: center; color: var(--ecume); }
.visionneuse__fermer {
  position: absolute; top: 1rem; right: 1rem; min-height: 2.75rem; padding: 0 1.2rem;
  font: 700 1rem var(--police); color: var(--encre); background: var(--papier); border: 0; border-radius: 999px; cursor: pointer;
}
.visionneuse__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem;
  font-size: 2rem; line-height: 1; color: var(--papier); background: var(--soleil); border: 0; border-radius: 50%; cursor: pointer;
}
.visionneuse__nav:hover { background: var(--soleil-fonce); }
.visionneuse__nav--prec { left: 0.75rem; }
.visionneuse__nav--suiv { right: 0.75rem; }
.visionneuse :focus-visible { outline-color: var(--creme); }
@media (max-width: 40rem) {
  .visionneuse__cadre { padding: 4.5rem 0.75rem 5.5rem; }
  .visionneuse__nav { top: auto; bottom: 1rem; transform: none; }
}

/* ---------- Agenda ---------- */

.section--agenda { background: var(--ecume); }
.agenda { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--e-3); margin: 0 auto; padding: 0; list-style: none; }
.evenement { padding: var(--e-3); background: var(--papier); border-radius: var(--rayon); border-top: 6px solid var(--soleil); }
.evenement__date { display: block; font-weight: 750; font-stretch: 85%; color: var(--soleil-fonce); margin-bottom: var(--e-1); }
.evenement__date::first-letter { text-transform: uppercase; }
.evenement__titre { font-size: var(--t-2); font-stretch: 82%; margin-bottom: var(--e-1); }
.evenement__infos { color: var(--gris); font-weight: 700; }

/* ---------- Le dojo ---------- */

.section--dojo { background: var(--ecume); }
.dojo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e-6); align-items: stretch; }
.dojo__infos .chapo { margin-bottom: var(--e-3); }
.adresse { font-size: var(--t-2); line-height: 1.4; margin-bottom: var(--e-3); }
.adresse strong { font-stretch: 82%; font-weight: 800; }
.transports { margin: 0; padding: 0; list-style: none; }
.transport { display: grid; grid-template-columns: auto 1fr; column-gap: var(--e-2); padding: 0.6rem 0; border-bottom: 1px solid var(--ecume-trait); }
.transport__ligne { grid-row: span 2; align-self: center; padding: 0.15rem 0.6rem; background: var(--mer); color: var(--papier); font-weight: 700; border-radius: 999px; }
.transport__arret { font-weight: 700; }
.transport__detail { color: var(--gris); font-size: var(--t-0); }

.dojo__carte {
  position: relative; display: grid; place-content: center; justify-items: center; gap: var(--e-1);
  min-height: 22rem; padding: var(--e-4);
  background: var(--ecume) var(--seigaiha-clair) 0 0 / 5rem 2.5rem repeat;
  border: 2px solid var(--ecume-trait); border-radius: var(--rayon);
  overflow: hidden;
  text-align: center;
}
.carte__bouton { background: var(--papier); }
.carte__note { margin: 0; max-width: 24em; padding: 0.3rem 0.8rem; font-size: var(--t-0); background: var(--ecume); border-radius: var(--rayon); }
.dojo__carte iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 52rem) {
  .dojo { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Questions ---------- */

.question { max-width: 56rem; border-bottom: 1px solid var(--vague-clair); }
.question:first-child { border-top: 1px solid var(--vague-clair); }
.question summary {
  position: relative; display: block; padding: 1.15rem 3rem 1.15rem 0;
  font-size: var(--t-2); font-weight: 750; font-stretch: 85%; line-height: 1.2;
  cursor: pointer; list-style: none;
}
.question summary::-webkit-details-marker { display: none; }
.question summary::before, .question summary::after {
  content: ""; position: absolute; right: 0.6rem; top: 50%;
  width: 1.1rem; height: 3px; border-radius: 2px; background: var(--soleil); transition: transform 0.2s;
}
.question summary::after { transform: rotate(90deg); }
.question[open] summary::after { transform: rotate(0deg); }
.question summary:hover { color: var(--mer); }
.question__reponse { padding: 0 0 var(--e-3); max-width: 42em; }
.question__reponse p:last-child { margin-bottom: 0; }

/* ---------- Contact : on finit sous le soleil ---------- */

.section--contact { background: var(--soleil); color: var(--papier); }
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e-8); align-items: start; }
.section--contact .chapo { margin-bottom: var(--e-4); }
.section--contact a { color: inherit; }
.coordonnees, .reseaux { margin: 0 0 var(--e-3); padding: 0; list-style: none; }
.coordonnees li { padding: 0.35rem 0; font-size: var(--t-2); overflow-wrap: anywhere; }
.coordonnees li:first-child { font-size: var(--t-4); font-weight: 800; font-stretch: 75%; line-height: 1.1; }
.coordonnees li:first-child a { text-decoration: none; }
.coordonnees li:first-child a:hover { text-decoration: underline; }
.reseaux a { font-weight: 700; }

.documents { margin-top: var(--e-4); }
.documents__titre { font-size: var(--t-2); font-stretch: 85%; margin-bottom: var(--e-2); }
.documents__liste { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.section--contact .document {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.75rem;
  padding: 0.8rem 1rem; background: var(--soleil-fonce); border-radius: var(--rayon); text-decoration: none;
}
.document::before { content: ""; flex: none; align-self: center; width: 1.1rem; height: 1.35rem; background: var(--papier); clip-path: polygon(0 0, 70% 0, 100% 25%, 100% 100%, 0 100%); }
.document__nom { font-weight: 750; text-decoration: underline; text-underline-offset: 0.18em; }
.document__info { font-size: var(--t-0); opacity: 0.9; }
.section--contact .document:hover { background: var(--encre); }

.formulaire {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--papier); color: var(--encre);
  border-radius: calc(var(--rayon) * 2);
  box-shadow: 0.75rem 0.75rem 0 var(--soleil-fonce);
}
.formulaire a { color: var(--mer); }
.formulaire .bouton--soleil { background: var(--mer); }
.formulaire .bouton--soleil:hover { background: var(--mer-fonce); }
.formulaire__etat { margin-bottom: var(--e-3); padding: var(--e-2); font-weight: 700; border-left: 5px solid var(--mer); background: var(--ecume); border-radius: 0 var(--rayon) var(--rayon) 0; }
.formulaire__etat[data-ok="0"] { border-left-color: var(--soleil); background: #fbe9e4; }
.formulaire__note { margin: var(--e-2) 0 0; font-size: var(--t-0); color: var(--gris); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.champ { display: block; margin: 0 0 var(--e-3); padding: 0; border: 0; }
.champ__label { display: block; margin-bottom: 0.35rem; font-weight: 700; }
.champ__label abbr { color: var(--soleil-fonce); text-decoration: none; }
.champ__option { font-weight: 400; color: var(--gris); font-size: var(--t-0); }
.champ input:not([type="radio"]):not([type="checkbox"]), .champ select, .champ textarea {
  width: 100%; min-height: 3rem; padding: 0.65rem 0.8rem;
  font: inherit; color: var(--encre); background: var(--papier);
  border: 2px solid #7a8784; border-radius: var(--rayon);
}
.champ textarea { resize: vertical; min-height: 7rem; }
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--mer); outline: 3px solid rgba(30, 64, 72, 0.25); outline-offset: 0; }
.champ [aria-invalid="true"] { border-color: var(--soleil) !important; }
.champ__erreur { display: block; margin-top: 0.3rem; color: var(--soleil-fonce); font-weight: 700; font-size: var(--t-0); }
[data-si-essai] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--e-2); }
@media (max-width: 30rem) { [data-si-essai] { grid-template-columns: minmax(0, 1fr); } }

.radios { display: flex; flex-wrap: wrap; gap: var(--e-1); }
.radio { position: relative; }
.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.45rem 1.1rem;
  border: 2px solid var(--mer); border-radius: 999px; font-weight: 700; color: var(--mer);
}
.radio input:checked + span { background: var(--mer); color: var(--papier); }
.radio input:focus-visible + span { outline: 3px solid var(--soleil); outline-offset: 2px; }

.champ--accord { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.7rem; align-items: start; }
.champ--accord input { width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; accent-color: var(--mer); }
.champ--accord .champ__erreur { grid-column: 2; }

.section--contact :focus-visible { outline-color: var(--papier); }
.section--contact .formulaire :focus-visible { outline-color: var(--soleil); }

@media (max-width: 52rem) {
  .contact { grid-template-columns: minmax(0, 1fr); gap: var(--e-6); }
}

/* ---------- Pied de page ---------- */

.pied {
  display: grid; grid-template-columns: auto 1fr; gap: var(--e-4) var(--e-8); align-items: start;
  padding: var(--e-8) var(--gouttiere) calc(var(--e-4) + env(safe-area-inset-bottom));
  position: relative;
  margin-top: 2.5rem;
  background: var(--mer); color: var(--papier);
}
/* La mer revient au pied de page : le soleil du contact s'y couche. */
.pied::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 5rem;
  background: var(--mer) var(--seigaiha) 0 0 / 5rem 2.5rem repeat;
  -webkit-mask: radial-gradient(circle at 50% 3rem, #000 calc(2.5rem - 0.5px), transparent 2.5rem) -2.5rem -0.5rem / 5rem 3rem repeat-x,
                linear-gradient(#000, #000) 0 2.45rem / 100% 100% no-repeat;
          mask: radial-gradient(circle at 50% 3rem, #000 calc(2.5rem - 0.5px), transparent 2.5rem) -2.5rem -0.5rem / 5rem 3rem repeat-x,
                linear-gradient(#000, #000) 0 2.45rem / 100% 100% no-repeat;
}
.page-texte + .pied { margin-top: 0; }
.page-texte + .pied::before { display: none; }
.pied a { color: inherit; }
.pied__sceau { display: grid; place-items: center; width: 8.5rem; height: 8.5rem; border-radius: 50%; background: var(--papier); }
.pied__logo { width: 7.5rem; height: 7.5rem; }
.pied__adresse { margin: var(--e-2) 0 0; font-size: var(--t-0); color: var(--ecume); }
.pied__nav ul { display: flex; flex-wrap: wrap; gap: var(--e-1) var(--e-3); margin: 0; padding: 0; list-style: none; }
.pied__nav a { font-weight: 700; font-stretch: 88%; text-decoration: none; }
.pied__nav a:hover { text-decoration: underline; }
.pied__legal { grid-column: 1 / -1; margin: 0; padding-top: var(--e-3); border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: var(--t-0); color: var(--ecume); }
.pied :focus-visible { outline-color: var(--papier); }

@media (max-width: 40rem) {
  .pied { grid-template-columns: minmax(0, 1fr); padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
}

/* ---------- Barre mobile ---------- */

.barre-mobile { display: none; }
@media (max-width: 40rem) {
  .barre-mobile {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: auto 1fr; gap: var(--e-1);
    padding: 0.6rem var(--gouttiere) calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--papier); box-shadow: 0 -1px 0 var(--ecume-trait), 0 -0.75rem 1.5rem -1rem rgba(15, 27, 26, 0.3);
    transition: transform 0.25s;
  }
  .barre-mobile--cachee { transform: translateY(110%); }
}

/* ---------- Pages simples : mentions légales, 404, réponse du formulaire ---------- */

.page-texte { max-width: 44rem; margin: 0 auto; padding: var(--e-8) var(--gouttiere); }
.page-texte h1 { font-size: var(--t-4); font-stretch: 75%; margin-bottom: var(--e-4); }
.page-texte h2 { font-size: var(--t-2); font-stretch: 85%; margin: var(--e-4) 0 var(--e-1); }
.page-texte + .pied { grid-template-columns: minmax(0, 1fr); padding-top: var(--e-4); padding-bottom: var(--e-4); }
.page-texte + .pied .pied__legal { border-top: 0; padding-top: 0; }

.page-simple { min-height: 100vh; display: grid; place-items: center; background: var(--mer) var(--seigaiha) 0 0 / 5rem 2.5rem repeat; }
.introuvable { max-width: 34rem; margin: var(--e-4); padding: var(--e-6) var(--e-4); background: var(--papier); border-radius: calc(var(--rayon) * 2); text-align: center; }
.introuvable__logo { width: 10rem; height: auto; margin: 0 auto var(--e-3); }
.introuvable h1 { font-size: var(--t-4); font-stretch: 75%; margin-bottom: var(--e-2); }
.introuvable p { margin-bottom: var(--e-3); }

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .entete, .barre-mobile, .formulaire, .dojo__carte, .mer, .hero__ciel, .visionneuse { display: none; }
  .section { padding: 1.5rem 0; }
  .section--aikido, .section--contact, .section--cours, .pied { background: none; color: var(--encre); }
  .titre--clair, .aikido__texte p, .kanji__texte, .section--cours .chapo { color: var(--encre); }
}
