/* Ritchie Dagonia, nageur : carnet de bassin
   Palette : bleu piscine / turquoise / blanc */

:root {
  --bleu-nuit: #083a55;
  --bleu-piscine: #0f7fb6;
  --bleu-clair: #cfeefa;
  --turquoise: #17b5c9;
  --turquoise-doux: #9fe3ec;
  --ecume: #f2fafc;
  --blanc: #ffffff;
  --encre: #10303f;
  --encre-douce: #4b6774;
  --ombre: 0 10px 30px rgba(8, 58, 85, 0.10);
  --rayon: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ecume);
  color: var(--encre);
  font-family: "Nunito", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

h1, h2, h3,
.marque, .bouton, .metrage, .total, .surtitre,
.materiel strong, .etapes strong {
  font-family: "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;
}

h1, h2, h3 {
  line-height: 1.2;
  color: var(--bleu-nuit);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); font-weight: 800; color: var(--blanc); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 700; }
h2 + h2, p + h2 { margin-top: 2rem; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

a { color: var(--bleu-piscine); }
a:hover, a:focus { color: var(--bleu-nuit); }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; }

.conteneur {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- En-tête ---------- */
.site-header {
  background: var(--blanc);
  position: sticky;
  top: 0;
  z-index: 10;
}
.barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  flex-wrap: wrap;
  padding-block: 0.75rem;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--bleu-nuit);
  font-weight: 700;
  font-size: 1.05rem;
}
.marque em { font-style: normal; color: var(--turquoise); font-weight: 600; }
.marque svg { width: 34px; height: 34px; flex: none; }

.site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.site-header nav a {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: var(--bleu-nuit);
}
.site-header nav a:hover,
.site-header nav a:focus { background: var(--bleu-clair); }
.site-header nav a[aria-current="page"] {
  background: var(--bleu-piscine);
  color: var(--blanc);
}

/* Corde de ligne d'eau (flotteurs alternés) */
.corde {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--turquoise) 0 28px,
    var(--blanc) 28px 36px,
    var(--bleu-piscine) 36px 64px,
    var(--blanc) 64px 72px
  );
}

/* ---------- Héros ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--bleu-nuit) 0%, var(--bleu-piscine) 55%, var(--turquoise) 100%);
  color: var(--blanc);
  padding: 4rem 0 6.5rem;
  overflow: hidden;
}
/* Lignes de couloir vues du dessus */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 64px,
    rgba(255, 255, 255, 0.12) 64px 67px
  );
  pointer-events: none;
}
/* Reflets d'eau */
.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -30%;
  width: 55%;
  height: 160%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.16), transparent 60%);
  pointer-events: none;
}
.hero .conteneur { position: relative; z-index: 1; }
.hero--compact { padding-top: 3rem; }

.surtitre {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--turquoise-doux);
  margin-bottom: 0.8rem;
}
.chapo {
  font-size: 1.15rem;
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 1.6rem;
}
.vague {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 72px;
  display: block;
}

.bouton {
  display: inline-block;
  background: var(--blanc);
  color: var(--bleu-nuit);
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--ombre);
  transition: background 0.2s, transform 0.2s;
}
.bouton:hover, .bouton:focus {
  background: var(--turquoise-doux);
  color: var(--bleu-nuit);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
.section { padding-block: 3rem; }
.section--teinte {
  background: var(--blanc);
  border-top: 1px solid var(--bleu-clair);
  border-bottom: 1px solid var(--bleu-clair);
}
.section--teinte .carte,
.section--teinte .materiel li,
.section--teinte .conseils li { background: var(--ecume); }

.appel {
  margin-top: 2rem;
  padding: 1rem 1.3rem;
  border-left: 5px solid var(--turquoise);
  background: var(--bleu-clair);
  border-radius: 0 12px 12px 0;
}
.appel a { font-weight: 700; }

/* ---------- Cartes des nages ---------- */
.grille {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.carte {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 1.4rem;
  box-shadow: var(--ombre);
  border-top: 5px solid var(--turquoise);
}
.carte:nth-child(even) { border-top-color: var(--bleu-piscine); }
.carte h3 { margin-top: 0; }
.carte p:last-child { margin-bottom: 0; }

/* ---------- Matériel ---------- */
.materiel {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.materiel li {
  background: var(--blanc);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  border-left: 5px solid var(--bleu-piscine);
}
.materiel strong { color: var(--bleu-nuit); }

/* ---------- Conseils numérotés ---------- */
.conseils {
  counter-reset: conseil;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}
.conseils li {
  counter-increment: conseil;
  position: relative;
  background: var(--blanc);
  border-radius: 12px;
  padding: 0.9rem 1.2rem 0.9rem 3.4rem;
  box-shadow: 0 2px 10px rgba(8, 58, 85, 0.06);
}
.conseils li::before {
  content: counter(conseil, decimal-leading-zero);
  position: absolute;
  left: 1rem;
  top: 0.85rem;
  font-family: "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--turquoise);
}

/* ---------- Séances (page entraînements) ---------- */
.seance {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 1.6rem;
  margin-bottom: 2rem;
  border-top: 6px solid var(--turquoise);
}
.seance:nth-of-type(2) { border-top-color: var(--bleu-piscine); }
.seance:nth-of-type(3) { border-top-color: var(--bleu-nuit); }
.seance header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--bleu-clair);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
}
.seance h2 { margin: 0; }
.total {
  font-weight: 700;
  color: var(--bleu-piscine);
  white-space: nowrap;
}
.etapes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.etapes li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--bleu-clair);
}
.etapes li:last-child { border-bottom: 0; }
.etapes strong { color: var(--bleu-nuit); }
.metrage {
  font-weight: 700;
  color: var(--bleu-nuit);
  background: var(--bleu-clair);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  text-align: center;
  align-self: start;
  font-size: 0.88rem;
  line-height: 1.3;
}

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--bleu-nuit);
  color: var(--bleu-clair);
  padding: 2.5rem 0 2rem;
  margin-top: 3rem;
  border-top: 8px solid var(--turquoise);
}
.site-footer a { color: var(--blanc); }
.site-footer strong { color: var(--blanc); }
.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.site-footer p { margin: 0.3rem 0; }

/* ---------- Petits écrans ---------- */
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .hero { padding: 2.8rem 0 5rem; }
  .section { padding-block: 2.2rem; }
  .seance { padding: 1.2rem; }
  .etapes li { grid-template-columns: 1fr; gap: 0.35rem; }
  .metrage { justify-self: start; }
  .conseils li { padding-left: 3rem; }
}

/* Encadré « ailleurs sur le web » */
.ailleurs{margin:2.5rem auto 1rem;max-width:46rem;padding:.9rem 1.2rem;border-left:3px solid currentColor;line-height:1.55}
.ailleurs a{text-decoration:underline}

/* photos */
.photos{display:flex;gap:1rem;flex-wrap:wrap;margin:1.5rem 0 2.5rem}.photos figure{margin:0;flex:1 1 260px}.photos img{width:100%;height:auto;display:block;border-radius:14px;aspect-ratio:3/2;object-fit:cover}.photos figcaption{font-size:.85rem;font-style:italic;margin:.45rem 0 0 .2rem;opacity:.8}
