/* Club de natation Opti-Plus — feuille de style commune à toutes les pages.
   Identité : bassin (marine profond, bleu piscine), vert du casque du club, câbles de couloir.
   Pour changer une couleur partout, modifiez le bloc :root ci-dessous. */

@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,600;0,700;0,800;1,700;1,800;1,900&family=Barlow:wght@400;500;600;700&display=swap");

:root {
  --navy: #0a1a33;      /* fond du bassin, texte principal */
  --navy-2: #12294b;
  --pool: #0f8fd1;      /* bleu piscine : liens, accents */
  --aqua: #7fd8f2;      /* reflets d'eau */
  --green: #22c06e;     /* vert du casque du club : boutons */
  --green-dark: #138a4c;
  --paper: #f5f9fc;     /* fond clair */
  --tile: #e6f0f6;      /* surfaces douces */
  --line: #d6e3ec;
  --muted: #56677d;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font: "Barlow", system-ui, sans-serif;
  --wrap: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10,26,51,.06), 0 12px 28px -14px rgba(10,26,51,.3);

  /* Câble de couloir (flotteurs) */
  --rope: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='12'%3E%3Crect x='1' y='1' width='22' height='10' rx='5' fill='%2322c06e'/%3E%3Crect x='25' y='1' width='22' height='10' rx='5' fill='%23ffffff'/%3E%3Crect x='49' y='1' width='22' height='10' rx='5' fill='%230f8fd1'/%3E%3Crect x='73' y='1' width='22' height='10' rx='5' fill='%23ffffff'/%3E%3C/svg%3E");
  /* Reflets lumineux au fond de l'eau */
  --caustics: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%237fd8f2' stroke-opacity='.10' stroke-width='2'%3E%3Cpath d='M0 40q30-25 60 0t60 0 60 0 60 0'/%3E%3Cpath d='M0 120q30-25 60 0t60 0 60 0 60 0'/%3E%3Cpath d='M0 200q30-25 60 0t60 0 60 0 60 0'/%3E%3Cpath d='M30 80q30-20 60 0t60 0 60 0' stroke-opacity='.06'/%3E%3Cpath d='M30 160q30-20 60 0t60 0 60 0' stroke-opacity='.06'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--navy); background: var(--paper); }
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pool); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
#header { min-height: 4.5rem; background: var(--navy); }  /* réserve la place de l'en-tête pendant son chargement */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ---------- Typographie ---------- */

h1, h2, h3 { margin: 0 0 .5em; line-height: 1; }
h1, h2 { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; }
h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: .01em; }
p { margin: 0 0 1em; max-width: 66ch; }
.lead { font-size: 1.2rem; color: var(--muted); }
.kicker { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; color: var(--pool); margin-bottom: .75rem; }
.kicker::before { content: ""; width: 1.5rem; height: 4px; background: var(--green); border-radius: 2px; transform: skewX(-20deg); }
.outline { color: transparent; -webkit-text-stroke: 2px currentColor; }

/* Câble de couloir : séparateur signature */
.rope { height: 12px; background: var(--rope) repeat-x center / 96px 12px; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.5rem; border: 0; cursor: pointer;
  font-family: var(--display); font-weight: 800; font-style: italic; font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  color: var(--navy) !important; background: var(--green); text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background-color .15s, transform .15s;
}
.btn:hover { background: #4fd68e; transform: translateX(3px); }
.btn-ghost { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); clip-path: none; border-radius: 4px; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-dark { background: var(--navy); color: #fff !important; }
.btn-dark:hover { background: var(--pool); }

/* ---------- En-têtes de page ---------- */

.page-head { position: relative; background: var(--navy) var(--caustics); color: #fff; overflow: hidden; }
.page-head .wrap { position: relative; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); margin-bottom: .2em; }
.page-head p { color: #bcd0e4; margin: 0; }
.page-head .kicker { color: var(--aqua); }
/* lignes de fond de piscine en arrière-plan */
.page-head::after, .hero::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: min(45%, 34rem); pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 10px), rgba(127,216,242,.13) calc(25% - 10px) 25%);
  mask-image: linear-gradient(90deg, transparent, #000 40%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
}

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-tiles { background-color: #fff; background-image: linear-gradient(var(--tile) 1px, transparent 1px), linear-gradient(90deg, var(--tile) 1px, transparent 1px); background-size: 28px 28px; border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.label { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-family: var(--display); font-size: 1.6rem; font-weight: 800; font-style: italic; text-transform: uppercase; margin: 3rem 0 1.25rem; }
.label:first-child { margin-top: 0; }
.badge { font-family: var(--font); font-style: normal; font-size: .78rem; font-weight: 700; text-transform: none; letter-spacing: 0; padding: .25rem .7rem; border-radius: 999px; background: var(--tile); color: var(--navy-2); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* En construction */
.soon { text-align: center; padding: clamp(3rem, 8vw, 6rem) 1rem; }
.soon-icon { width: 5rem; height: 5rem; margin: 0 auto 1.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--tile); color: var(--pool); }
.soon-icon .i { width: 2.3rem; height: 2.3rem; }
.soon h2 { margin-bottom: .3em; }
.soon p { margin: 0 auto 1.5rem; color: var(--muted); }

/* ---------- Formulaires ---------- */

.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.field label { font-weight: 700; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; color: inherit; padding: .75rem .9rem; border: 2px solid var(--line); border-radius: 10px; background: var(--paper); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pool); background: #fff; }
.field textarea { min-height: 9rem; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Apparition au défilement ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
  .reveal.visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
