/* Judokan Meylan : « Le tapis du Judokan, par année de naissance »
   Couleurs : logo (noir, jaune), tapis de la photo de stage (rouge, gris-bleu),
   professeurs : même code que le planning officiel (Yves vert, Élise bleu, Olivier rouge).
   Aucune animation, aucun JavaScript. */

:root {
  --noir: #000;
  --encre: #15181a;
  --jaune: #eed808;
  --rouge-tapis: #b42a2e;
  --tapis: #8fa6b5;
  --couture: #5f7c92;
  --tapis-pale: #e4ebef;
  --kimono: #fbfbf9;
  --yves: #1a7029;
  --elise: #0d619c;
  --olivier: #b42a2e;
  --titre: "Russo One", "Arial Black", "DejaVu Sans", sans-serif;
  --texte: "Cabin", "Trebuchet MS", "DejaVu Sans", sans-serif;
  --marge: clamp(1rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 3rem; }
body {
  margin: 0;
  background: var(--kimono);
  color: var(--encre);
  font: 400 1.0625rem/1.55 var(--texte);
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--titre);
  font-weight: 400;
  line-height: 1.08;
  font-synthesis: none;
}
h2 { font-size: clamp(1.7rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible {
  outline: 3px solid var(--noir);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--jaune), 0 0 0 8px var(--jaune);
}
.nu { list-style: none; }

.evitement {
  position: absolute; left: -999px; top: 0; z-index: 30;
  padding: .6rem 1rem; background: var(--jaune); color: var(--noir);
}
.evitement:focus { left: 0; }
.lecteur {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Bannière de démonstration : toujours visible */
.demo {
  position: sticky; top: 0; z-index: 20;
  margin: 0; max-width: none; padding: .3rem var(--marge);
  background: #fff; color: var(--noir);
  border-bottom: 2px solid var(--noir);
  font-size: .875rem; font-weight: 700; line-height: 1.3; text-align: center;
}

/* En-tête */
.tete {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .6rem var(--marge);
  background: var(--noir); color: #fff;
}
.tete-club {
  display: flex; align-items: center; gap: .75rem; margin-right: auto;
  color: #fff; text-decoration: none;
  font-family: var(--titre); font-size: 1.15rem; line-height: 1.1;
}
.tete-club img { width: 58px; height: 58px; }
.tete nav ul { display: flex; flex-wrap: wrap; gap: .1rem 1.4rem; align-items: center; }
.tete nav a {
  display: inline-block; padding: .45rem 0;
  color: #fff; font-weight: 600; text-decoration: none;
  border-bottom: 3px solid transparent;
}
.tete nav a:hover { border-bottom-color: #fff; }
.tete nav a[aria-current] { color: var(--jaune); border-bottom-color: var(--jaune); }
.tete :focus-visible { outline-color: #fff; box-shadow: none; }

/* Bouton d'inscription : noir sur fond jaune, jaune sur fond noir */
.bouton {
  display: inline-block; padding: .85rem 1.3rem;
  background: var(--noir); color: var(--jaune);
  font-family: var(--titre); font-size: 1.1rem; line-height: 1.15; text-decoration: none;
}
.bouton:hover { background: var(--rouge-tapis); color: #fff; }

/* ---------- Accueil : ouverture ---------- */
.ouverture {
  display: grid;
  grid-template-columns: minmax(250px, 24vw) 1fr minmax(320px, 27vw);
  grid-template-areas: "mot photo photo" "titre titre action";
  background: var(--noir);
}
.ouverture-mot { grid-area: mot; display: flex; align-items: center; justify-content: center; padding: 1.75rem var(--marge); }
.ouverture-mot img { width: auto; max-width: 100%; max-height: min(62vh, 560px); }
.ouverture-photo { grid-area: photo; position: relative; min-height: min(66vh, 620px); }
.ouverture-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.ouverture-photo figcaption {
  position: absolute; right: 0; bottom: 0; max-width: 34rem;
  padding: .3rem .7rem;
  background: var(--noir); color: #fff; font-size: .875rem; line-height: 1.35;
}
.ouverture-titre {
  grid-area: titre;
  padding: clamp(1.75rem, 4vw, 3.5rem) var(--marge);
  background: var(--rouge-tapis); color: #fff;
}
.ouverture-titre h1 { font-size: clamp(2.1rem, 5.6vw, 5.2rem); margin-bottom: .45em; }
.ouverture-titre p { font-size: clamp(1.0625rem, 1.5vw, 1.3rem); max-width: 56ch; }
.ouverture-titre a { color: #fff; }
.ouverture-action {
  grid-area: action;
  display: flex; flex-direction: column; justify-content: center; gap: .7rem; align-items: flex-start;
  padding: clamp(1.5rem, 3vw, 3rem) var(--marge) clamp(1.5rem, 3vw, 3rem) clamp(1.25rem, 2.5vw, 2.5rem);
  background: var(--jaune); color: var(--noir);
}
.ouverture-action h2 { font-size: clamp(1.45rem, 2.4vw, 2.1rem); }
.ouverture-action p { font-size: 1rem; line-height: 1.4; }

/* ---------- Le tapis : années de naissance ---------- */
.tapis { padding: clamp(2rem, 5vw, 4.5rem) var(--marge); background: var(--tapis); color: var(--noir); }
.tapis-entete { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1rem 3rem; align-items: end; margin-bottom: clamp(1.25rem, 3vw, 2.25rem); }
.annees {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px;
  background: var(--couture); border: 3px solid var(--couture);
}
.annees a {
  display: flex; flex-direction: column; gap: .35rem; height: 100%;
  padding: clamp(.8rem, 2vw, 1.5rem);
  background: var(--tapis-pale); color: var(--noir); text-decoration: none;
  line-height: 1.25;
}
.annees a:hover { background: var(--jaune); }
.annees b { font: 400 clamp(1.3rem, 3.1vw, 2.6rem)/1.05 var(--titre); }
.annees span { font-size: 1rem; }
.annees :focus-visible { position: relative; z-index: 1; }

/* ---------- Accueil : disciplines et fondateur ---------- */
.disciplines {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2.25rem, 5vw, 5rem) 0 clamp(2.25rem, 5vw, 5rem) var(--marge);
  align-items: start;
}
.disciplines > div > h2 { margin-bottom: 1.25rem; }
.discipline { padding: 1.25rem 0; border-top: 3px solid var(--noir); }
.discipline h3 { margin-bottom: .4rem; }
.discipline-judo h3 { font-size: clamp(2.6rem, 6.5vw, 5.4rem); }
.fondateur { background: var(--noir); color: #fff; }
.fondateur figcaption { padding: .9rem var(--marge) 1.1rem 1.1rem; font-size: 1rem; line-height: 1.4; }
.fondateur b { display: block; color: var(--jaune); font: 400 1.25rem/1.2 var(--titre); margin-bottom: .25rem; }

/* ---------- Accueil : permanences ---------- */
.permanences { padding: clamp(2rem, 4.5vw, 4rem) var(--marge); background: var(--jaune); color: var(--noir); }
.permanences h2 { margin-bottom: .5rem; }
.dates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem); margin: 1.5rem 0; }
.dates li { border-top: 3px solid var(--noir); padding-top: .7rem; line-height: 1.4; }
.dates b { display: block; font: 400 clamp(1.9rem, 4.2vw, 3.6rem)/1.05 var(--titre); margin-bottom: .35rem; }

/* ---------- Pages intérieures ---------- */
.bandeau { width: 100%; height: clamp(62px, 8.1vw, 122px); object-fit: cover; object-position: 50% 50%; }
.entete-page { padding: clamp(1.75rem, 4vw, 3.5rem) var(--marge); background: var(--rouge-tapis); color: #fff; }
.entete-page h1 { font-size: clamp(2.2rem, 6.6vw, 6rem); margin-bottom: .35em; }
.entete-page p { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }
.entete-page a { color: #fff; }
.section { padding: clamp(2.25rem, 5vw, 4.5rem) var(--marge); }
.section > h2 { margin-bottom: .6rem; }
.section-pale { background: var(--tapis-pale); }

/* Professeurs : même code couleur que le planning officiel */
.yves { color: var(--yves); font-weight: 700; }
.elise { color: var(--elise); font-weight: 700; }
.olivier { color: var(--olivier); font-weight: 700; }

/* ---------- Élément signature : le tableau des créneaux ---------- */
.creneaux { width: 100%; border-collapse: collapse; background: var(--kimono); }
.creneaux thead th {
  position: sticky; top: 1.75rem; z-index: 5;
  padding: .55rem .7rem; text-align: left;
  background: var(--noir); color: #fff; font-size: .95rem; font-weight: 600;
}
.creneaux tbody:target .groupe th { background: var(--jaune); }
.creneaux .groupe th {
  padding: 1.3rem .7rem .55rem; text-align: left; font-weight: 400;
  border-bottom: 3px solid var(--noir); scroll-margin-top: 4rem;
}
.creneaux tbody { scroll-margin-top: 5rem; }
.groupe b { font: 400 clamp(1.7rem, 4.6vw, 3.4rem)/1 var(--titre); margin-right: .55rem; }
.groupe span { font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 600; }
.groupe small { display: block; margin-top: .25rem; font-size: 1rem; font-weight: 400; }
.creneaux td {
  padding: .55rem .7rem; vertical-align: top;
  border-bottom: 1px solid var(--tapis); line-height: 1.3;
}
.creneaux td:first-child { font-weight: 700; }
.creneaux .heure { white-space: nowrap; font-family: var(--titre); font-size: 1.05rem; }
.creneaux .heure small { display: block; font: 400 .9rem/1.3 var(--texte); white-space: normal; }
.creneaux-paire { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem clamp(2rem, 4vw, 4rem); }
.note { margin-top: 1.1rem; max-width: 62ch; }
.legende-profs { margin-top: .9rem; padding: .35rem .7rem; display: inline-block; background: var(--kimono); color: var(--encre); }

.dojos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; background: var(--noir); border: 3px solid var(--noir); margin-top: 1.25rem; }
.dojos > div { padding: clamp(1rem, 2.5vw, 2rem); background: var(--kimono); }
.dojos h3 { margin-bottom: .5rem; font-size: clamp(1.4rem, 2.6vw, 2.1rem); }
.dojos p { margin: 0; }

/* ---------- Le club ---------- */
.club-ouverture {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  background: var(--noir); color: #fff;
}
.club-ouverture > div { padding: clamp(2rem, 5vw, 4.5rem) var(--marge); }
.club-ouverture h1 { color: var(--jaune); font-size: clamp(2.5rem, 7.4vw, 6.6rem); margin-bottom: .4em; }
.club-ouverture p { font-size: clamp(1.0625rem, 1.5vw, 1.3rem); }
.club-ouverture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.club-ouverture figure { position: relative; min-height: 22rem; }
.club-ouverture figcaption {
  position: absolute; left: 0; bottom: 0; padding: .3rem .7rem;
  background: var(--noir); color: #fff; font-size: 1rem;
}
.logos { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 1rem 2.5rem; align-items: end; background: #fff; padding: clamp(1.5rem, 3.5vw, 3rem) var(--marge); }
.logos img { width: 100%; }
.logos figcaption { line-height: 1.4; }

.equipes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem clamp(2rem, 5vw, 5rem); }
.registre { margin: 1rem 0 0; }
.registre div { padding: .7rem 0; border-top: 2px solid var(--noir); }
.registre dt { font-family: var(--titre); font-size: 1.2rem; line-height: 1.2; }
.registre dd { margin: .15rem 0 0; overflow-wrap: anywhere; }

.tarifs { width: 100%; margin-top: 1rem; border-collapse: collapse; }
.tarifs th, .tarifs td { padding: .7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--couture); line-height: 1.3; }
.tarifs thead th { background: var(--noir); color: #fff; font-weight: 600; border: 0; }
.tarifs tbody th { font-weight: 700; }
.tarifs tbody th small { display: block; font-size: .95rem; font-weight: 400; }
.tarifs .nb { text-align: right; white-space: nowrap; }
.tarifs td.total { font: 400 clamp(1.3rem, 2.8vw, 2rem)/1 var(--titre); }
.complements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 3vw, 3rem); margin-top: 2.25rem; }
.complements h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.complements ul { padding-left: 1.1rem; }
.complements li { margin-bottom: .35rem; }

.etapes { counter-reset: e; list-style: none; margin-top: 1rem; }
.etapes li { counter-increment: e; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .75rem; padding: 1rem 0; border-top: 3px solid var(--noir); }
.etapes li::before { content: counter(e); font: 400 2.8rem/1 var(--titre); }
.etapes p { margin-bottom: .5em; }

.stages { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); background: var(--rouge-tapis); color: #fff; }
.stages > div { padding: clamp(2rem, 5vw, 4.5rem) var(--marge); }
.stages h2 { margin-bottom: .6rem; }
.stages ul { padding-left: 1.1rem; margin-bottom: 1em; }
.stages figure { position: relative; min-height: 22rem; }
.stages img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 20% 55%; }
.stages figcaption { position: absolute; left: 0; bottom: 0; padding: .3rem .7rem; background: var(--noir); color: #fff; font-size: .95rem; line-height: 1.35; }

.tapis-titre { margin-bottom: 1rem; }
sup { line-height: 0; }

/* Le tableau judo et le planning officiel en regard */
.judo-grille { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; margin-top: 1.25rem; }
.scan { margin-top: 1.25rem; }
.scan img { width: 100%; border: 1px solid var(--couture); background: #fff; }
.scan figcaption { margin-top: .4rem; font-size: 1rem; line-height: 1.4; }
.scan-judo { position: sticky; top: 3rem; margin-top: 0; }

.inscription-grille { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.inscription-grille h2 { margin-bottom: .6rem; }
.inscription-grille .bouton { margin-bottom: .25rem; }

.registre-large { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(1.25rem, 3vw, 2.5rem); }

/* Pied de page */
.pied { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 1.75rem clamp(2rem, 5vw, 4.5rem); padding: clamp(2rem, 4vw, 3rem) var(--marge); background: var(--noir); color: #fff; font-size: 1rem; }
.pied img { width: 112px; height: 112px; }
.pied h2 { font-size: 1.15rem; color: var(--jaune); margin-bottom: .45rem; }
.pied p { margin-bottom: .45em; overflow-wrap: anywhere; }
.pied :focus-visible { outline-color: #fff; box-shadow: none; }

/* ---------- Tablette ---------- */
@media (max-width: 62rem) {
  .ouverture {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "mot" "photo" "titre" "action";
  }
  .ouverture-mot { padding: 1.1rem var(--marge); justify-content: flex-start; }
  .ouverture-mot img { width: min(100%, 420px); max-height: none; }
  .ouverture-photo { min-height: 0; aspect-ratio: 16 / 10; }
  .ouverture-action { padding: 1.5rem var(--marge); }
  .tapis-entete { grid-template-columns: minmax(0, 1fr); }
  .disciplines { grid-template-columns: minmax(0, 1fr); padding-right: var(--marge); }
  .fondateur { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fondateur figcaption { padding: 1rem; }
  .creneaux-paire, .equipes, .judo-grille, .inscription-grille, .logos { grid-template-columns: minmax(0, 1fr); }
  .scan-judo { position: static; }
  .registre-large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .complements { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .club-ouverture, .stages { grid-template-columns: minmax(0, 1fr); }
  .stages figure { aspect-ratio: 16 / 10; min-height: 0; }
  .club-ouverture figure { order: -1; aspect-ratio: 4 / 3; min-height: 0; }
  .club-ouverture img { position: absolute; inset: 0; }
  .pied { grid-template-columns: auto minmax(0, 1fr); }
  .pied > :last-child { grid-column: 1 / -1; }
}

/* ---------- Téléphone ---------- */
@media (max-width: 40rem) {
  body { font-size: 1.03rem; }
  .tete-club img { width: 46px; height: 46px; }
  .tete nav { width: 100%; }
  .tete nav ul { gap: .1rem 1.1rem; }
  .annees { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annees span { font-size: .95rem; }
  .dates { grid-template-columns: minmax(0, 1fr); }
  .dojos { grid-template-columns: minmax(0, 1fr); }
  .complements { grid-template-columns: minmax(0, 1fr); }
  .fondateur { display: block; }
  .jour-fin { display: none; }
  .groupe span { display: block; margin-top: .25rem; }
  .registre-large { grid-template-columns: minmax(0, 1fr); }
  .creneaux thead th { padding: .45rem .4rem; font-size: .9rem; }
  .creneaux .groupe th { padding-inline: .4rem; }
  .creneaux td { padding: .5rem .4rem; font-size: .97rem; }
  .creneaux .heure { font-size: .95rem; }
  .tarifs th, .tarifs td { padding: .55rem .35rem; font-size: .97rem; }
  .pied { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .demo { position: static; }
  .creneaux thead th { position: static; }
}
