@font-face { font-family: "Young Serif"; src: url("/fonts/young-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* aube sur la rivière */
  --nuit-eau: #0E2C35;   /* fond */
  --courant: #17414C;    /* surfaces */
  --berge: #2A5764;      /* filets, bordures */
  --brume: #E6EEEC;      /* texte */
  --lichen: #A9C2BB;     /* texte secondaire */
  --aube: #F2C46D;       /* fenêtre en or : meilleures heures, action principale */
  --rosee: #8CC5A8;      /* score bon */
  --eau-calme: #4E9196;  /* score moyen */
  --eau-froide: #2F6A78; /* score faible */
  --alerte: #F0A08A;

  --titre: "Young Serif", Georgia, serif;
  --texte: "Atkinson Hyperlegible", system-ui, sans-serif;
  --mesure: 36rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--nuit-eau); color: var(--brume);
  font: 400 1.125rem/1.6 var(--texte);
  font-variant-numeric: lining-nums;
}
a { color: var(--brume); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--aube); }
:focus-visible { outline: 3px solid var(--aube); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 400; line-height: 1.12; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7vw, 4.6rem); letter-spacing: -.01em; max-width: 13em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: var(--mesure); }

.colonne { width: min(100% - 2 * var(--gouttiere), 64rem); margin-inline: auto; }
.evitement { position: absolute; left: -999px; top: .5rem; background: var(--aube); color: var(--nuit-eau); padding: .5rem 1rem; z-index: 10; }
.evitement:focus { left: .5rem; }

/* en-tête */
.entete { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  width: min(100% - 2 * var(--gouttiere), 64rem); margin: 0 auto; padding: 1.25rem 0; }
.marque { display: inline-flex; align-items: center; gap: .55rem; font: 400 1.5rem var(--titre); text-decoration: none; }
.marque-signe { width: 2.2rem; height: 1.3rem; stroke: var(--aube); stroke-width: 3; fill: none; stroke-linecap: round; }

/* boutons : gros, faciles à viser au bord de l'eau */
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .75rem 1.5rem;
  border: 2px solid var(--aube); border-radius: 999px; background: var(--aube); color: var(--nuit-eau);
  font: 700 1.05rem/1.2 var(--texte); text-decoration: none; cursor: pointer; }
.bouton:hover { background: #F7D594; color: var(--nuit-eau); }
.bouton-discret { background: transparent; color: var(--brume); border-color: var(--berge); }
.bouton-discret:hover { background: var(--courant); color: var(--brume); border-color: var(--lichen); }
.bouton-large { width: 100%; min-height: 3.75rem; font-size: 1.15rem; }
.bouton[disabled] { opacity: .6; cursor: progress; }

/* ouverture */
.ouverture { padding-top: clamp(1rem, 4vw, 3rem); }
.chapeau { font-size: clamp(1.15rem, 2vw, 1.3rem); color: var(--lichen); max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; max-width: none; }

.direct { margin-top: clamp(2rem, 4vw, 3rem); }
.direct-reglages { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; }
.especes { display: flex; flex-wrap: wrap; gap: .4rem; }
.especes button { min-height: 2.75rem; padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--berge);
  background: transparent; color: var(--lichen); font: 400 1rem var(--texte); cursor: pointer; }
.especes button:hover { color: var(--brume); border-color: var(--lichen); }
.especes button[aria-pressed="true"] { background: var(--brume); border-color: var(--brume); color: var(--nuit-eau); font-weight: 700; }

.recherche { position: relative; flex: 0 1 20rem; display: grid; gap: .3rem; }
.recherche label { font-size: .9rem; color: var(--lichen); }
input, select { width: 100%; min-height: 3rem; padding: .6rem .9rem; border-radius: .6rem; border: 1px solid var(--berge);
  background: var(--courant); color: var(--brume); font: 400 1.05rem var(--texte); }
input::placeholder { color: #7FA09A; }
input:focus-visible, select:focus-visible { outline-offset: 1px; }
.suggestions { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin: .3rem 0 0; padding: .3rem; list-style: none;
  background: var(--courant); border: 1px solid var(--berge); border-radius: .6rem; max-height: 20rem; overflow: auto; }
.suggestions button { width: 100%; text-align: left; padding: .6rem .7rem; border: 0; border-radius: .4rem; background: none;
  color: var(--brume); font: 400 1rem var(--texte); cursor: pointer; }
.suggestions button span { display: block; font-size: .85rem; color: var(--lichen); }
.suggestions button:hover, .suggestions button:focus-visible { background: var(--berge); }

/* la vague : seule pièce démonstrative de la page */
.vague { margin: 1.5rem 0 0; }
#vague { display: block; width: 100%; height: clamp(170px, 22vw, 260px); }
#vague-ligne { stroke: url(#vague-couleur-ligne); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#vague-seuil { stroke: var(--aube); stroke-width: 1; stroke-dasharray: 4 6; opacity: .6; vector-effect: non-scaling-stroke; }
.vague { position: relative; }
.seuil-etiquette { position: absolute; right: var(--gouttiere); color: var(--aube); font-size: .85rem; transform: translateY(-120%); }
.vague.trace #vague-ligne { stroke-dasharray: var(--longueur); stroke-dashoffset: var(--longueur); animation: tracer 1.6s ease-out forwards; }
.vague.trace #vague-aire { opacity: 0; animation: monter .9s .8s ease-out forwards; }
@keyframes tracer { to { stroke-dashoffset: 0; } }
@keyframes monter { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .vague.trace #vague-ligne, .vague.trace #vague-aire { animation: none; stroke-dasharray: none; opacity: 1; }
}
.heures { position: relative; height: 1.9rem; border-top: 1px solid var(--berge); font-size: .85rem; color: var(--lichen); }
.heures span { position: absolute; top: .4rem; transform: translateX(-50%); white-space: nowrap; }
/* abscisse : 5 h à 22 h sur toute la largeur */
.heures span:nth-child(1) { left: 5.88%; }
.heures span:nth-child(2) { left: 23.53%; }
.heures span:nth-child(3) { left: 41.18%; }
.heures span:nth-child(4) { left: 58.82%; }
.heures span:nth-child(5) { left: 76.47%; }
.heures span:nth-child(6) { left: 94.12%; }
figcaption { margin-top: 1rem; color: var(--lichen); }
#vague-legende strong { color: var(--brume); font-weight: 700; }
#vague-legende .score { font: 400 1.6rem/1 var(--titre); color: var(--brume); }
#vague-legende .or { color: var(--aube); }
#vague-legende .stress { color: var(--alerte); }

/* sections */
.bloc { padding-top: clamp(4rem, 10vw, 7rem); }
.bloc > p { color: var(--lichen); }

.poids { display: flex; height: 3rem; margin: 1.75rem 0 2rem; border-radius: .5rem; overflow: hidden; font-weight: 700; }
.poids span { display: flex; align-items: center; padding-left: .8rem; color: var(--nuit-eau); }
.poids-eau { flex: 60; background: var(--brume); }
.poids-debit { flex: 25; background: var(--lichen); }
.poids-heure { flex: 15; background: var(--eau-calme); color: var(--brume) !important; }
.facteurs { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: 0; }
.facteurs dt { font-weight: 700; margin-bottom: .3rem; }
.facteurs dd { margin: 0; color: var(--lichen); }

.plages { margin: 2rem 0 0; }
.plages-axe { display: flex; justify-content: space-between; margin-left: 8rem; font-size: .85rem; color: var(--lichen); }
#plages { list-style: none; margin: .4rem 0 0; padding: 0; }
#plages li { display: grid; grid-template-columns: 8rem 1fr; align-items: center; min-height: 2.6rem; border-top: 1px solid var(--berge); }
#plages .nom { font-family: var(--titre); font-size: 1.1rem; }
#plages .nom i { display: block; font: italic 400 .8rem var(--texte); color: var(--lichen); }
.piste { position: relative; height: .9rem; }
.piste .active { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--eau-calme); }
.piste .ideale { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--aube); }
.piste .stress { position: absolute; top: -.35rem; bottom: -.35rem; width: 2px; background: var(--alerte); }
.plages figcaption { font-size: .95rem; }

.carte-texte { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
#carte { width: 100%; height: auto; max-width: 30rem; aspect-ratio: 1; }
.carte-texte p { color: var(--lichen); }
.legende { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .5rem; }
.pastille { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .6rem; vertical-align: .05em; }
.pastille-capteur { background: var(--aube); }
.pastille-releve { background: var(--lichen); }

.tarifs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2rem; border-top: 1px solid var(--berge); }
.tarif { padding: 1.5rem 1.5rem 0 0; }
.tarif + .tarif { padding-left: 1.5rem; border-left: 1px solid var(--berge); }
.tarif p { color: var(--lichen); font-size: 1.02rem; }
.tarif .prix { font: 400 1.6rem/1.25 var(--titre); color: var(--brume); }
.tarif .prix span { font: 400 .95rem var(--texte); color: var(--lichen); }
.tarif-fondateur { border-top: 4px solid var(--aube); margin-top: -2.5px; }
.tarif-fondateur h3 { color: var(--aube); }

.inscription form { max-width: 34rem; margin-top: 1.5rem; display: grid; gap: 1.25rem; }
#places { color: var(--brume); font-size: 1.2rem; }
#places strong { color: var(--aube); }
.champ { display: grid; gap: .35rem; }
.champ label { font-weight: 700; }
.champ label span { font-weight: 400; color: var(--lichen); }
.champs-doubles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.champ-case { grid-template-columns: auto 1fr; align-items: start; gap: .75rem; }
.champ-case input { width: 1.6rem; height: 1.6rem; min-height: 0; margin: .15rem 0 0; accent-color: var(--aube); }
.champ-case label { font-weight: 400; }
.champ-case .erreur { grid-column: 2; }
.erreur { margin: 0; color: var(--alerte); font-size: .95rem; }
[aria-invalid="true"] { border-color: var(--alerte); }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.statut { margin: 0; min-height: 1.6em; }
.statut.ok { color: var(--rosee); font-weight: 700; }
.statut.ko { color: var(--alerte); }
.note { font-size: .9rem; color: var(--lichen); }

details { border-top: 1px solid var(--berge); max-width: 44rem; }
details:last-of-type { border-bottom: 1px solid var(--berge); }
summary { cursor: pointer; padding: 1.1rem 0; font-weight: 700; list-style-position: outside; }
summary:hover { color: var(--aube); }
details p { color: var(--lichen); }

.pied { margin-top: clamp(4rem, 10vw, 7rem); padding: 2rem 0 3rem; border-top: 1px solid var(--berge); font-size: .92rem; color: var(--lichen); }
.pied a { color: var(--lichen); margin-right: 1.25rem; }
.pied p { max-width: none; }

/* pages légales */
.legal { padding-bottom: 3rem; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--lichen); max-width: 44rem; }

@media (max-width: 760px) {
  .seuil-etiquette { display: none; }
  body { font-size: 1.0625rem; }
  .carte-texte, .tarifs, .champs-doubles { grid-template-columns: 1fr; }
  .tarif, .tarif + .tarif { padding: 1.5rem 0; border-left: 0; }
  .tarif + .tarif { border-top: 1px solid var(--berge); }
  .tarif-fondateur { border-top: 4px solid var(--aube) !important; margin-top: 0; }
  .recherche { flex-basis: 100%; }
  .plages-axe { margin-left: 5.5rem; }
  #plages li { grid-template-columns: 5.5rem 1fr; }
  #plages .nom { font-size: 1rem; }
  .entete .bouton { min-height: 2.75rem; padding: .5rem 1rem; font-size: .95rem; }
  .heures span:nth-child(even) { visibility: hidden; }
}

.lien { background: none; border: 0; padding: 0; color: var(--brume); font: inherit; text-decoration: underline; cursor: pointer; }
.suggestions .vide { margin: 0; padding: .6rem .7rem; color: var(--lichen); font-size: .95rem; }
