/* Police de titre hébergée sur le site (licence SIL OFL, voir fonts/OFL-bricolage-grotesque.txt).
   Police variable : graisses 600 à 800, sous-ensemble latin (accents, œ, guillemets, espaces fines). */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  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;
}

/* Douvi : feuille de style
   Mobile d'abord, mode sombre automatique, polices système. */

:root {
  --fond: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #eef4f3;
  --texte: #14252b;
  --texte-doux: #4f6268;
  --bord: #dbe5e4;
  --accent: #0e6f8a;        /* bleu Léman */
  --accent-fort: #0a5568;
  --accent-texte: #ffffff;
  --corail: #e8743b;        /* coucher de soleil */
  --corail-doux: #fde7da;

  --t-lac: #0e6f8a;     --t-lac-doux: #dcf0f4;
  --t-foret: #2f7d4f;   --t-foret-doux: #dff1e5;
  --t-soleil: #b86e00;  --t-soleil-doux: #fdf0d7;
  --t-corail: #c4532a;  --t-corail-doux: #fde4d8;
  --t-lilas: #6b4fa8;   --t-lilas-doux: #ece6f8;
  --t-ardoise: #3d5a66; --t-ardoise-doux: #e3ecef;
  --t-rose: #b8396b;    --t-rose-doux: #fbe3ec;

  --ciel-haut: #ffd8b8; --ciel-bas: #fff3e6;
  --eau-haut: #3a9ab3;  --eau-bas: #0e6f8a;
  --mont-loin: #9fb9c4; --mont-pres: #5e8494;

  --rayon: 18px;
  --rayon-petit: 10px;
  --ombre: 0 1px 2px rgb(20 37 43 / .06), 0 8px 24px rgb(20 37 43 / .07);
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: "Bricolage Grotesque", ui-rounded, "Segoe UI Variable Display", system-ui, sans-serif;
  --largeur: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0b1d26;
    --surface: #122a35;
    --surface-2: #163340;
    --texte: #e6f0f2;
    --texte-doux: #a3b9c0;
    --bord: #23424f;
    --accent: #5cc3dc;
    --accent-fort: #8ad6e8;
    --accent-texte: #06202a;
    --corail: #ff9a62;
    --corail-doux: #3a2418;

    --t-lac: #5cc3dc;    --t-lac-doux: #133a47;
    --t-foret: #6fcf96;  --t-foret-doux: #15382a;
    --t-soleil: #f2b84b; --t-soleil-doux: #3a2e14;
    --t-corail: #ff9a72; --t-corail-doux: #3d2219;
    --t-lilas: #b7a0f0;  --t-lilas-doux: #2a2342;
    --t-ardoise: #9cc0cd; --t-ardoise-doux: #1d3540;
    --t-rose: #f08cb3;    --t-rose-doux: #3d1d2b;

    --ciel-haut: #1d3a5c; --ciel-bas: #3f5f80;
    --eau-haut: #1b5b70;  --eau-bas: #0c3342;
    --mont-loin: #2c4a5e; --mont-pres: #1d3646;
    --ombre: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 1.0625rem/1.65 var(--police);
  padding-bottom: 76px; /* place pour la barre du bas sur mobile */
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-fort); }
:focus-visible { outline: 3px solid var(--corail); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--police-titre); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--accent-texte); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.evitement:focus { top: 12px; }

.icone { width: 1.4em; height: 1.4em; flex: none; }
.icone--mini { width: .9em; height: .9em; display: inline-block; vertical-align: -.05em; margin-left: .15em; }

/* Teintes par rubrique */
.teinte-lac     { --t: var(--t-lac);     --t-doux: var(--t-lac-doux); }
.teinte-foret   { --t: var(--t-foret);   --t-doux: var(--t-foret-doux); }
.teinte-soleil  { --t: var(--t-soleil);  --t-doux: var(--t-soleil-doux); }
.teinte-corail  { --t: var(--t-corail);  --t-doux: var(--t-corail-doux); }
.teinte-lilas   { --t: var(--t-lilas);   --t-doux: var(--t-lilas-doux); }
.teinte-ardoise { --t: var(--t-ardoise); --t-doux: var(--t-ardoise-doux); }
.teinte-rose    { --t: var(--t-rose);    --t-doux: var(--t-rose-doux); }

/* --- En-tête -------------------------------------------------------------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--fond) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--bord) 70%, transparent);
}
.entete__barre { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texte); }
.logo__marque {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--corail)));
  color: #fff;
}
.logo__marque .icone { width: 22px; height: 22px; }
/* Le nom du site forme un seul bloc : une couleur qui glisse du bleu du lac au corail (variante F) */
.logo__nom {
  font-family: var(--police-titre); font-size: 1.2rem; font-weight: 800; letter-spacing: -.015em;
  color: var(--accent); white-space: nowrap; margin: 0; display: inline-block; width: fit-content;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo__nom {
    background: linear-gradient(90deg, var(--accent) 10%, var(--corail) 95%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
    padding-bottom: .08em; /* évite de couper le bas des lettres */
  }
}
.nav-haut { display: none; margin-left: auto; gap: 4px; }
.nav-haut a {
  color: var(--texte-doux); text-decoration: none; font-weight: 550; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav-haut a:hover { background: var(--surface-2); color: var(--texte); }
.nav-haut a[aria-current="page"] { background: var(--texte); color: var(--fond); }
.nav-haut a.nav-haut__carte {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 6px;
  background: var(--accent); color: var(--accent-texte);
}
.nav-haut a.nav-haut__carte .icone { width: 1.1em; height: 1.1em; }
.nav-haut a.nav-haut__carte:hover { background: var(--accent-fort); color: var(--accent-texte); }
.nav-haut a.nav-haut__carte[aria-current="page"] { background: var(--texte); color: var(--fond); }
.entete .bouton-recherche { margin-left: auto; }
.entete .bouton-menu { margin-left: 8px; }
.bouton-icone[aria-current="page"] { background: var(--texte); color: var(--fond); border-color: var(--texte); }
.tiroir__sep { border: 0; border-top: 1px solid var(--bord); margin: 8px 0; width: 100%; }

/* --- Recherche -------------------------------------------------------------- */
.recherche { position: relative; margin-top: 18px; max-width: 40rem; }
.recherche input {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--texte); background: var(--surface);
  border: 1.5px solid var(--bord); border-radius: 999px; padding: 14px 18px 14px 50px; box-shadow: var(--ombre);
}
.recherche input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.recherche__icone { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--texte-doux); display: flex; }
.recherche__icone .icone { width: 20px; height: 20px; }
.recherche--accueil { margin: 0 0 20px; }
.resultats-zone { padding-top: 12px; padding-bottom: 48px; max-width: 52rem; }
.resultats__etat { color: var(--texte-doux); font-size: .92rem; margin: 0 0 10px; }
.resultats { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.resultat a {
  display: grid; gap: 3px; padding: 14px 16px; border-radius: var(--rayon-petit); background: var(--surface);
  border: 1px solid var(--bord); color: var(--texte); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.resultat a:hover { border-color: var(--accent); box-shadow: var(--ombre); color: var(--texte); }
.resultat__rubrique { font: 700 .74rem/1 var(--police); text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.resultat__titre { font-family: var(--police-titre); font-weight: 750; font-size: 1.08rem; }
.resultat__extrait { color: var(--texte-doux); font-size: .93rem; line-height: 1.5; }
.resultat mark { background: color-mix(in srgb, var(--corail) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.suggestions { color: var(--texte-doux); }
.suggestions ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--bord); text-decoration: none; font-weight: 600; font-size: .92rem; }

/* --- Carte ------------------------------------------------------------------ */
.carte-page { padding-top: 8px; padding-bottom: 48px; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filtre--transport { --p: var(--t-lac); }
.filtre--transport .filtre__point, .filtre__point.filtre--transport { background: #fff; border-width: 3px; }
.filtre--services { --p: var(--t-ardoise); }
.filtre--enfants { --p: var(--t-soleil); }
.filtre--sport { --p: var(--t-corail); }
.filtre--decouvrir { --p: var(--t-lilas); }
.filtre--commerces { --p: var(--t-rose); }
.filtre--sorties { --p: var(--t-foret); }

/* Encart application mobile (liens vers les boutiques) */
.appli {
  display: flex; gap: 16px; align-items: flex-start; padding: 18px; margin: 1.2em 0;
  border-radius: var(--rayon); background: linear-gradient(135deg, var(--t-lac-doux), var(--surface));
  border: 1px solid var(--bord);
}
.appli__icone { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--t-lac); color: var(--surface); flex: none; }
.appli__texte p { margin: 0 0 12px; }
.prose .appli__boutons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.bouton-store {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  background: var(--texte); color: var(--fond); font-weight: 700; font-size: .95rem; text-decoration: none;
}
.bouton-store:hover { color: var(--fond); filter: brightness(1.25); }
.bouton-store .icone { width: 1.25em; height: 1.25em; }
.appli__plus { font-weight: 600; font-size: .92rem; }

/* QR codes : seulement sur grand écran avec souris (sur téléphone, on tape le bouton) */
.appli__consigne, .appli__qr { display: none; }
.appli__qr { gap: 16px; margin-top: 4px; }
.appli__qr a {
  display: grid; justify-items: center; gap: 6px; padding: 10px 10px 8px; border-radius: 14px;
  background: #fff; border: 1px solid var(--bord); text-decoration: none; color: #14252b; font-weight: 700; font-size: .88rem;
}
.appli__qr a:hover { box-shadow: var(--ombre); color: #14252b; }
.appli__qr img { width: 132px; height: 132px; image-rendering: pixelated; }
.appli__qr span { display: inline-flex; align-items: center; gap: 5px; }
.appli__qr .icone { width: 1.1em; height: 1.1em; }
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .appli__boutons .bouton-store { display: none; }
  .appli__consigne { display: block; margin: 0 0 10px; font-size: .92rem; color: var(--texte-doux); }
  .appli__texte { flex: 1; }
  .appli__qr { display: flex; justify-content: center; gap: clamp(32px, 6vw, 72px); margin-top: 10px; }
}

/* Annuaire des commerçants */
.annuaire { display: grid; gap: 18px; margin: 1em 0 1.4em; }
.annuaire__groupe h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--t-rose); }
.annuaire__liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.prose .fiche-commerce { margin: 0; }
.fiche-commerce {
  display: grid; gap: 4px; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--bord); border-left: 4px solid var(--t-rose); border-radius: var(--rayon-petit);
}
.fiche-commerce__nom { font-family: var(--police-titre); font-weight: 750; font-size: 1.05rem; }
.fiche-commerce__texte { color: var(--texte-doux); font-size: .95rem; line-height: 1.45; }
.fiche-commerce__infos { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; margin-top: 4px; }
.annuaire-vide {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px; margin: 1em 0 1.2em;
  border: 2px dashed color-mix(in srgb, var(--t-rose) 45%, var(--bord)); border-radius: var(--rayon); background: var(--t-rose-doux);
}
.annuaire-vide p { margin: 0; }
.annuaire-vide__icone { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--t-rose); color: var(--surface); flex: none; }

/* Case à cocher des formulaires */
.case { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: .92rem; color: var(--texte-doux); cursor: pointer; }
.case input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.filtre {
  display: inline-flex; align-items: center; gap: 8px; font: 600 .92rem/1 var(--police); cursor: pointer;
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--bord); background: var(--surface); color: var(--texte);
}
.filtre[aria-pressed="false"] { opacity: .5; }
.filtre[aria-pressed="false"] .filtre__point { background: transparent; }
.filtre__point { width: 12px; height: 12px; border-radius: 50%; background: var(--p); border: 2px solid var(--p); flex: none; display: inline-block; }
.carte-zone { height: min(70vh, 560px); min-height: 360px; border-radius: var(--rayon); border: 1px solid var(--bord); box-shadow: var(--ombre); z-index: 0; }
.leaflet-container { font: inherit; }
.leaflet-popup-content { font-size: .95rem; line-height: 1.45; }
/* Lieux de la carte : cible (point, anneaux blancs et colorés, halo) */
.cible span {
  position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle closest-side,
    var(--c) 0 27%, #fff 29% 42%, var(--c) 44% 59%, #fff 61% 74%,
    color-mix(in srgb, var(--c) 35%, transparent) 76% 100%);
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / .35));
  transition: transform .15s;
}
.cible:hover span { transform: scale(1.12); }
.cible span::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c);
  animation: cible-onde 2.4s ease-out infinite; pointer-events: none;
}
@keyframes cible-onde { from { transform: scale(.75); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
.carte-apercu .cible span::after { display: none; }  /* aperçu de l'accueil : pas d'onde, trop de points */
@media (prefers-reduced-motion: reduce) { .cible span::after { animation: none; opacity: 0; } }
.carte-liste__titre { margin-top: 1.6em; }
.carte-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.carte-liste__item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-petit);
}
.carte-liste__item[hidden] { display: none; }
.carte-liste__texte { color: var(--texte-doux); font-size: .92rem; }
.carte-liste__nom {
  font: inherit; font-weight: 700; color: inherit; text-align: left; background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
  transition: text-decoration-color .15s, color .15s;
}
.carte-liste__nom:hover, .carte-liste__nom:focus-visible { color: var(--lien, var(--t-lac)); text-decoration-color: currentColor; }
.carte-liste__item a { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.carte-credit { font-size: .82rem; color: var(--texte-doux); margin-top: 14px; }

/* Pastilles de ligne de bus */
.badge-ligne {
  display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: var(--bl); color: #fff; font: 800 .78rem/1 var(--police); text-decoration: none; letter-spacing: .01em;
  flex: none; white-space: nowrap;
}
a.badge-ligne:hover { color: #fff; filter: brightness(1.1); }
.badge-ligne--grand { min-width: 52px; height: 30px; font-size: .9rem; border-radius: 8px; }
.badges-lignes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* Infobulle (survol) et fenêtre (clic) des arrêts */
.leaflet-tooltip.infobulle {
  background: var(--surface); color: var(--texte); border: 1px solid var(--bord); border-radius: 12px;
  box-shadow: var(--ombre); padding: 10px 12px; font: 400 .88rem/1.4 var(--police); white-space: normal; width: 250px;
}
.leaflet-tooltip.infobulle::before { border-top-color: var(--surface); }
.infobulle-lignes, .fenetre-lignes { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.infobulle-lignes li { display: flex; align-items: center; gap: 8px; }
.fenetre-lignes { margin-bottom: 10px; gap: 10px; }
.fenetre-lignes li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.fenetre-ligne__nom { display: block; font-weight: 600; }
.fenetre-ligne__reseau { display: block; color: var(--texte-doux); font-size: .85rem; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--texte); }
@media (min-width: 900px) { .carte-liste { grid-template-columns: repeat(2, 1fr); } }

.bouton--carte { margin-top: 18px; }

/* Aperçu de la carte sur l'accueil */
.section--carte { padding-top: 8px; }
.apercu {
  display: grid; gap: 20px; padding: 20px; border-radius: 28px;
  background: linear-gradient(135deg, var(--t-lac-doux), var(--t-lilas-doux)); border: 1px solid var(--bord);
}
.apercu__texte h2 { margin-bottom: .35em; }
.apercu__texte > p:not(.surtitre) { color: var(--texte-doux); margin: 0 0 16px; }
.surtitre--lac { background: var(--surface); color: var(--t-lac); }
.apercu__categories { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.apercu__categories .filtre { text-decoration: none; }
.apercu__nombre { font-size: .78rem; font-weight: 800; color: var(--texte-doux); background: var(--surface-2); border-radius: 999px; padding: 2px 7px; }
/* isolation : le bouton et la carte restent « dans » le cadre et passent sous l'en-tête collant */
.apercu__cadre { position: relative; isolation: isolate; display: block; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); border: 3px solid var(--surface); }
.carte-apercu { height: 300px; pointer-events: none; z-index: 0; }
.apercu__invite {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 500;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--texte); color: var(--fond); font-weight: 700; font-size: .95rem; white-space: nowrap;
  box-shadow: 0 6px 18px rgb(0 0 0 / .25); transition: transform .15s;
}
.apercu__invite .icone { width: 1.1em; height: 1.1em; }
.apercu__cadre:hover .apercu__invite { transform: translateX(-50%) translateY(-2px); }
@media (min-width: 900px) {
  .apercu { grid-template-columns: .9fr 1.1fr; align-items: center; padding: 32px; gap: 32px; }
  .carte-apercu { height: 360px; }
}

.bandeau-carte {
  position: relative; display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 18px 48px 18px 18px;
  border-radius: var(--rayon); text-decoration: none; color: var(--texte);
  background: linear-gradient(120deg, var(--t-lac-doux), var(--t-lilas-doux)); border: 1px solid var(--bord);
}
.bandeau-carte:hover { color: var(--texte); box-shadow: var(--ombre); }
.bandeau-carte__icone { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--t-lac); color: var(--surface); flex: none; }
.bandeau-carte .carte__fleche { color: var(--t-lac); top: 50%; transform: translateY(-50%); }
.bouton-menu, .bouton-icone {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--bord); background: var(--surface); color: var(--texte); cursor: pointer;
}

/* --- Tiroir --------------------------------------------------------------- */
.tiroir { position: fixed; inset: 0; z-index: 50; }
.tiroir__fond { position: absolute; inset: 0; background: rgb(6 20 26 / .45); opacity: 0; transition: opacity .2s; }
.tiroir__panneau {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 88vw);
  background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform .2s ease-out; overflow-y: auto;
  box-shadow: -10px 0 40px rgb(0 0 0 / .15);
}
.tiroir.ouvert .tiroir__fond { opacity: 1; }
.tiroir.ouvert .tiroir__panneau { transform: none; }
.tiroir__tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tiroir__lien {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px;
  color: var(--texte); text-decoration: none; font-weight: 600;
}
.tiroir__lien .icone { color: var(--t, var(--accent)); }
.tiroir__lien:hover, .tiroir__lien[aria-current="page"] { background: var(--surface-2); }

/* --- Barre du bas (mobile) ------------------------------------------------ */
.nav-bas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--bord);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.nav-bas a, .nav-bas button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: 600 .7rem/1.2 var(--police); color: var(--texte-doux); text-decoration: none;
  background: none; border: 0; padding: 6px 0; border-radius: 12px; cursor: pointer;
  width: auto; height: auto;
}
.nav-bas .icone { width: 24px; height: 24px; }
/* Bouton Carte central, mis en avant */
.nav-bas .nav-bas__carte { color: var(--accent); }
.nav-bas__bulle {
  display: grid; place-items: center; width: 48px; height: 48px; margin-top: -22px; border-radius: 50%;
  background: var(--accent); color: var(--accent-texte); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent);
  border: 3px solid var(--surface);
}
.nav-bas .nav-bas__carte[aria-current="page"] .icone { background: none; padding: 0; width: 24px; height: 24px; }
.nav-bas [aria-current="page"] { color: var(--accent); }
.nav-bas [aria-current="page"] .icone { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 999px; padding: 2px 10px; width: 44px; box-sizing: content-box; height: 22px; }

/* --- Accueil -------------------------------------------------------------- */
.hero { padding: 32px 0 48px; overflow: hidden; }
.hero__grille { display: grid; gap: 28px; align-items: center; }
.surtitre {
  display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  background: var(--corail-doux); color: var(--t-corail);
  font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
}
.souligne { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--corail) 45%, transparent) 62%); padding: 0 .08em; }
.hero__intro { font-size: 1.15rem; color: var(--texte-doux); max-width: 34em; margin: 0 0 24px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bouton {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-texte); text-decoration: none; font-weight: 700;
  border: 1px solid transparent; transition: transform .15s, background .15s;
}
.bouton:hover { background: var(--accent-fort); color: var(--accent-texte); transform: translateY(-1px); }
.bouton .icone { width: 1.1em; height: 1.1em; }
.bouton--clair { background: var(--surface); color: var(--texte); border-color: var(--bord); }
.bouton--clair:hover { background: var(--surface-2); color: var(--texte); }

.paysage { width: 100%; height: auto; border-radius: 32px; box-shadow: var(--ombre); }
.paysage .ciel-haut { stop-color: var(--ciel-haut); }
.paysage .ciel-bas  { stop-color: var(--ciel-bas); }
.paysage .eau-haut  { stop-color: var(--eau-haut); }
.paysage .eau-bas   { stop-color: var(--eau-bas); }
.paysage .soleil    { fill: var(--corail); opacity: .9; }
.paysage .mont-loin { fill: var(--mont-loin); }
.paysage .mont-pres { fill: var(--mont-pres); }
.paysage .neige     { fill: #fff; opacity: .85; }
.paysage .vague     { stroke: rgb(255 255 255 / .45); stroke-width: 3; stroke-linecap: round; fill: none; }
.paysage .voile     { fill: #fff; }
.paysage .coque     { fill: var(--corail); }

.section { padding-top: 40px; padding-bottom: 40px; } /* sans toucher aux marges latérales du .conteneur */
.section--teintee { background: var(--surface-2); }
.section__tete { margin-bottom: 20px; }
.section__tete p { color: var(--texte-doux); margin: 0; }

.cartes { display: grid; gap: 12px; }
.carte {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start;
  padding: 18px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord);
  color: var(--texte); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.carte:hover { transform: translateY(-2px); box-shadow: var(--ombre); border-color: color-mix(in srgb, var(--t) 40%, var(--bord)); color: var(--texte); }
.carte__icone {
  grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--t-doux); color: var(--t);
}
.carte__titre { font-family: var(--police-titre); font-weight: 750; font-size: 1.12rem; padding-right: 24px; }
.carte__texte { color: var(--texte-doux); font-size: .95rem; line-height: 1.45; }
.carte__fleche { position: absolute; right: 16px; top: 20px; color: var(--t); opacity: .7; }
.carte__fleche .icone { width: 20px; height: 20px; }
.pastille {
  display: inline-block; vertical-align: middle; font: 700 .68rem/1 var(--police); letter-spacing: .03em;
  text-transform: uppercase; padding: 4px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--texte-doux); border: 1px solid var(--bord); margin-left: 4px;
}

/* Liste numérotée « Mes premiers jours » (page S'installer) */
.prose .premiers-jours { list-style: none; padding: 0; margin: 20px 0 1.6em; display: grid; gap: 10px; counter-reset: etape; }
.prose .premiers-jours li {
  counter-increment: etape; position: relative; margin: 0;
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-petit); padding: 14px 16px 14px 60px;
}
.premiers-jours li::before {
  content: counter(etape); position: absolute; left: 16px; top: 13px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--t, var(--accent)); color: var(--surface); font: 700 .9rem/1 var(--police-titre);
}
.premiers-jours a { color: var(--texte); text-decoration: none; }
.premiers-jours a:hover strong { color: var(--t, var(--accent)); text-decoration: underline; }
.premiers-jours strong { display: block; }
.premiers-jours span { color: var(--texte-doux); font-size: .95rem; }

/* --- Pages de rubrique ---------------------------------------------------- */
.bandeau { padding: 28px 0 32px; background: linear-gradient(180deg, var(--t-doux), var(--fond)); }
.fil { font-size: .88rem; color: var(--texte-doux); margin: 0 0 14px; }
.fil a { color: inherit; }
.bandeau__titre { display: flex; align-items: center; gap: 14px; }
.bandeau__titre h1 { margin: 0; font-size: clamp(1.9rem, 5.5vw, 3rem); }
.bandeau__icone { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--t); color: var(--surface); flex: none; }
.bandeau__icone .icone { width: 30px; height: 30px; }
.bandeau__intro { font-size: 1.12rem; color: var(--texte-doux); max-width: 40em; margin: 14px 0 0; }

.mise-en-page { display: grid; gap: 24px; padding-top: 8px; padding-bottom: 48px; }
.sommaire {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 18px;
  font-size: .95rem;
}
.sommaire__titre { margin: 0 0 6px; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); }
.sommaire ol { margin: 0; padding-left: 1.2em; }
.sommaire li { margin: 4px 0; }
.sommaire a { color: var(--texte); text-decoration: none; }
.sommaire a:hover { color: var(--accent); text-decoration: underline; }

.prose { min-width: 0; max-width: 46rem; }
.prose--large { max-width: 52rem; }
.prose h2 { margin-top: 1.9em; padding-top: .2em; }
.prose h2:first-child { margin-top: .3em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--t, var(--accent)); }

.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1.2em 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bord); vertical-align: top; }
.prose th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-doux); border-bottom-width: 2px; white-space: nowrap; }
.prose tbody tr:hover { background: var(--surface-2); }

/* Saisons de l'agenda (même présentation que les familles de clubs) */
.saisons { display: grid; gap: 14px; margin: 1.2em 0 1.6em; }
.saison { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px 18px 6px; border-top: 4px solid var(--t); }
.saison h3 { margin: 0 0 .5em; display: flex; align-items: center; gap: 10px; font-size: 1.08rem; }
.saison h3 .icone { color: var(--t); }
.saison ul { list-style: none; padding: 0; margin: 0 0 10px; }
.prose .saison li { margin: 0; padding: 8px 0; border-top: 1px solid var(--bord); font-size: .96rem; line-height: 1.45; }
.prose .saison li:first-child { border-top: 0; }
@media (min-width: 900px) { .saisons { grid-template-columns: repeat(2, 1fr); } }

/* Familles de clubs */
.clubs { display: grid; gap: 14px; margin: 1.2em 0 1.6em; }
.club-famille { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px 18px 6px; border-top: 4px solid var(--t); }
.club-famille h3 { margin: 0 0 .5em; display: flex; align-items: center; gap: 10px; font-size: 1.08rem; }
.club-famille h3 .icone { color: var(--t); }
.club-famille ul { list-style: none; padding: 0; margin: 0 0 10px; }
.prose .club-famille li { margin: 0; padding: 8px 0; border-top: 1px solid var(--bord); font-size: .96rem; line-height: 1.45; }
.prose .club-famille li:first-child { border-top: 0; }
.club-famille a { white-space: nowrap; font-size: .88rem; font-weight: 600; }
@media (min-width: 900px) { .clubs { grid-template-columns: repeat(2, 1fr); } }

/* Frise « parcours » par âge */
.parcours { list-style: none; padding: 0; margin: 1.2em 0 1.6em; display: grid; gap: 10px; counter-reset: etape; }
.prose .parcours li { margin: 0; }
.parcours li {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--bord); border-left: 4px solid var(--t); border-radius: var(--rayon-petit);
  padding: 12px 14px;
}
.parcours__age { grid-column: 1; font: 800 .78rem/1 var(--police); letter-spacing: .04em; text-transform: uppercase; color: var(--t); }
.parcours strong { grid-column: 1; font-family: var(--police-titre); font-size: 1.05rem; }
.parcours li > span:not(.parcours__age) { grid-column: 1; color: var(--texte-doux); font-size: .92rem; line-height: 1.4; }
.parcours a {
  grid-column: 2; grid-row: 1 / span 3; font-weight: 700; font-size: .85rem; text-decoration: none;
  padding: 6px 12px; border-radius: 999px; background: var(--t-doux); color: var(--t);
}
/* Toute la brique est cliquable : le lien « Voir » s'étend sur la carte */
.parcours a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.parcours li { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.parcours li:hover { box-shadow: 0 4px 14px rgb(0 0 0 / .08); transform: translateY(-1px); }
.parcours li:hover a { background: var(--t); color: var(--surface); }
.parcours li:has(a:focus-visible) { outline: 2px solid var(--t); outline-offset: 2px; }
@media (min-width: 640px) {
  .parcours { grid-template-columns: repeat(4, 1fr); }
  .parcours li { grid-template-columns: 1fr; align-content: start; border-left-width: 1px; border-top: 4px solid var(--t); }
  .parcours a { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}

/* Blocs mode de transport et encarts */
.modes { display: grid; gap: 14px; margin: 1.2em 0 1.6em; }
.mode {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px 18px 6px;
  border-top: 4px solid var(--t);
}
.mode h3 { margin: 0 0 .4em; display: flex; align-items: center; gap: 10px; }
.mode h3 .icone { color: var(--t); }
.mode p { font-size: .98rem; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.etiquettes li { margin: 0; font-size: .8rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--t-doux); color: var(--t); }

.encart {
  border-radius: var(--rayon-petit); padding: 14px 16px; margin: 1.2em 0;
  background: var(--t-lac-doux); border-left: 4px solid var(--t-lac);
}
.encart p:last-child { margin-bottom: 0; }
.encart--astuce { background: var(--t-soleil-doux); border-left-color: var(--t-soleil); }
.encart--bientot { background: var(--t-lilas-doux); border-left-color: var(--t-lilas); }

.sources { margin-top: 2.4em; padding-top: 18px; border-top: 1px dashed var(--bord); font-size: .92rem; color: var(--texte-doux); }
.sources__titre { font-weight: 700; color: var(--texte); margin: 0 0 6px; }
.sources ul { padding-left: 1.1em; margin: 0 0 10px; }
.sources__date { font-style: italic; margin: 0; }

/* Formulaire de contact */
.formulaire { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px; margin-top: 1em; }
.champ { display: grid; gap: 6px; }
.champ label { font-weight: 650; font-size: .95rem; }
.facultatif { font-weight: 400; color: var(--texte-doux); }
.champ input, .champ select, .champ textarea {
  font: inherit; color: var(--texte); background: var(--fond); width: 100%;
  border: 1.5px solid var(--bord); border-radius: var(--rayon-petit); padding: 11px 13px;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.formulaire .bouton { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; }
.formulaire__note { font-size: .85rem; color: var(--texte-doux); margin: 0; }

/* --- Pied de page --------------------------------------------------------- */
.pied { border-top: 1px solid var(--bord); background: var(--surface); padding: 28px 0; font-size: .92rem; color: var(--texte-doux); }
.pied__grille { display: grid; gap: 16px; }
.pied p { margin: 0 0 6px; }

/* --- Écrans plus larges --------------------------------------------------- */
@media (min-width: 640px) {
  .cartes { grid-template-columns: repeat(2, 1fr); }
  .modes { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .nav-bas { display: none; }
  .nav-haut { display: flex; }
  .entete .bouton-menu { display: none; }
  .hero { padding: 56px 0 72px; }
  .hero__grille { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .cartes { grid-template-columns: repeat(3, 1fr); }
  .mise-en-page.avec-sommaire { grid-template-columns: 220px 1fr; gap: 48px; }
  .prose table { display: table; }
  .sommaire { position: sticky; top: 88px; align-self: start; background: none; border: 0; padding: 0; }
  .pied__grille { grid-template-columns: 1fr 1.4fr; }
}
@media (min-width: 900px) and (max-width: 1080px) {
  .nav-haut a { padding: 8px 9px; font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Améliorations issues de la critique du design (16/11/2026)
   ===================================================================== */

/* 1. Accueil sur téléphone : pas d'illustration, la carte arrive tout de suite */
@media (max-width: 899px) {
  .hero__visuel { display: none; }
  .hero { padding: 22px 0 18px; }
  .hero__intro { font-size: 1.05rem; margin-bottom: 18px; }
  .section--carte { padding-top: 0; }
}

/* 3. Rubriques : tuiles sur deux colonnes sur téléphone ; 4 colonnes sur grand écran */
.carte--carte { --t: var(--t-lac); --t-doux: var(--t-lac-doux); }
@media (max-width: 639px) {
  .cartes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .carte {
    grid-template-columns: 1fr; gap: 10px; padding: 14px; min-height: 118px; align-content: start;
    background: linear-gradient(160deg, var(--t-doux), var(--surface) 70%);
  }
  .carte__icone { grid-row: auto; width: 44px; height: 44px; }
  .carte__texte, .carte__fleche { display: none; }
  .carte__titre { padding-right: 0; font-size: 1.05rem; }
}
@media (min-width: 900px) {
  .cartes { grid-template-columns: repeat(4, 1fr); }
}

/* 4. Sommaire des rubriques : une rangée de pastilles qui défile, sur téléphone et tablette */
@media (max-width: 899px) {
  .sommaire {
    background: none; border: 0; padding: 0; margin: 0 -16px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .sommaire::-webkit-scrollbar { display: none; }
  .sommaire__titre { display: none; }
  .sommaire ol { display: flex; gap: 8px; list-style: none; padding: 0 16px; margin: 0; white-space: nowrap; }
  .sommaire li { margin: 0; }
  .sommaire a {
    display: block; padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600;
    background: var(--surface); border: 1px solid var(--bord);
  }
  .sommaire a:hover { text-decoration: none; border-color: var(--accent); }
}

/* 5. Tableaux : chaque ligne devient une fiche sur téléphone */
@media (max-width: 639px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose table { overflow: visible; }
  .prose thead { display: none; }
  .prose tr {
    background: var(--surface); border: 1px solid var(--bord); border-left: 4px solid var(--t, var(--accent));
    border-radius: 12px; padding: 10px 14px; margin-bottom: 10px;
  }
  .prose tbody tr:hover { background: var(--surface); }
  .prose td { border: 0; padding: 2px 0; }
  .prose td:first-child { font-weight: 700; font-size: 1.02rem; margin-bottom: 2px; }
  .prose td:last-child:not(:first-child) { color: var(--texte-doux); font-size: .92rem; }
}

/* 2. Police de titre : le grand titre de l'accueil, plus serré, tient sur une ligne */
.hero h1 { letter-spacing: -.035em; }

/* Sous-filtres « Transport » de la carte : groupes par usage, puis lignes */
.sous-filtres {
  display: grid; gap: 10px; margin: 0 0 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--bord); border-left: 4px solid var(--t-lac); border-radius: var(--rayon-petit);
  transition: opacity .2s;
}
.sous-filtres--inactif { opacity: .45; }
.groupe-lignes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
/* nom du groupe : un simple titre, jamais grisé ni barré */
.groupe-lignes__nom { font: 700 .95rem/1.2 var(--police-titre); color: var(--texte); min-width: 104px; }
.groupe-lignes__puces { display: flex; gap: 6px; }
.puce-ligne {
  min-width: 38px; height: 30px; padding: 0 9px; border-radius: 8px; cursor: pointer;
  border: 2px solid var(--bl); background: var(--bl); color: #fff; font: 800 .85rem/1 var(--police);
}
.puce-ligne[aria-pressed="false"] { background: transparent; color: var(--bl); opacity: .6; }
.groupe-lignes__reseau { flex-basis: 100%; font-size: .82rem; color: var(--texte-doux); padding-left: 2px; }
.sous-filtres__note { margin: 0; font-size: .8rem; color: var(--texte-doux); }
.lignes-groupe__titre { margin: 1.2em 0 .5em; font-size: 1.1rem; }
.lignes-groupe__titre span { display: block; font: 400 .85rem/1.4 var(--police); color: var(--texte-doux); margin-top: 2px; }
.fenetre-lignes a { display: block; font-size: .85rem; margin-top: 2px; }
@media (min-width: 900px) {
  .sous-filtres { grid-template-columns: repeat(3, 1fr); }
  .sous-filtres__note { grid-column: 1 / -1; }
}
/* Calque « traces » de la carte : la règle générale svg { max-width: 100% } l'écrasait à 0 */
.leaflet-container .leaflet-pane svg { max-width: none !important; max-height: none !important; }
/* Sur téléphone : sous-filtres compacts (réseau et billet restent dans la liste sous la carte) */
@media (max-width: 639px) {
  .sous-filtres { padding: 10px 12px; gap: 8px; }
  .groupe-lignes__reseau, .sous-filtres__note { display: none; }
  .groupe-lignes__nom { min-width: 96px; font-size: .9rem; }
}
.sous-filtres[hidden] { display: none; }

/* =====================================================================
   Paysage de fond (static/paysage.svg, inséré par js/fond.js)
   Le ciel suit l'heure réelle : html[data-ciel="aube|jour|soir|nuit"].
   ===================================================================== */
html { background: var(--fond); }
body { background: transparent; }
.fond-paysage { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fond-paysage svg { width: 100%; height: 100%; display: block; }
/* voile : le paysage reste discret, plus présent en bas de l'écran */
.fond-paysage::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--fond) var(--voile-haut), transparent) 0%,
    color-mix(in srgb, var(--fond) var(--voile-milieu), transparent) 45%,
    color-mix(in srgb, var(--fond) var(--voile-bas), transparent) 100%);
}
:root { --voile-haut: 80%; --voile-milieu: 66%; --voile-bas: 45%; }

/* Palettes (jour par défaut) */
:root {
  --pc-haut: #9fd0e6; --pc-bas: #eaf5f7; --pm-loin: #9dbac6; --pm-alpes-loin: #b2c8d2; --pm-alpes: #7f9fae;
  --p-neige: #ffffff; --pl-loin: #7cc0d3; --pl-pres: #2f8ba7; --p-reflet: rgb(255 255 255 / .6);
  --p-collines: #6f9a7f; --p-terre: #a9c2a9; --p-astre: #ffd36b; --p-etoiles: 0;
}
html[data-ciel="aube"] {
  --pc-haut: #8ea7d1; --pc-bas: #ffd3bb; --pm-loin: #9a9dbd; --pm-alpes-loin: #b6b2cc; --pm-alpes: #7d7fa3;
  --p-neige: #ffe9e0; --pl-loin: #b7b4d2; --pl-pres: #5f7fa0; --p-collines: #5c7473; --p-terre: #a1a3b0; --p-astre: #ffb27c; --p-etoiles: .25;
}
html[data-ciel="soir"] {
  --pc-haut: #6e5b92; --pc-bas: #ffa06e; --pm-loin: #7f6585; --pm-alpes-loin: #a07f92; --pm-alpes: #634e6e;
  --p-neige: #ffd2bf; --pl-loin: #e09576; --pl-pres: #5c5275; --p-collines: #44425a; --p-terre: #826b78; --p-astre: #ff7b3f; --p-etoiles: .15;
}
html[data-ciel="nuit"] {
  /* thème clair : nuit « bleu pastel », assez claire pour garder le texte foncé lisible */
  --pc-haut: #6f7fae; --pc-bas: #c3cbe6; --pm-loin: #8f9bc4; --pm-alpes-loin: #a3add0; --pm-alpes: #7482b0;
  --p-neige: #eef1fb; --pl-loin: #8fa3d4; --pl-pres: #5d72ad; --p-reflet: rgb(255 255 255 / .55);
  --p-collines: #66739f; --p-terre: #a7b0d2; --p-astre: #f4f6ff; --p-etoiles: 1;
}
@media (prefers-color-scheme: dark) {
  html[data-ciel="nuit"]:not([data-theme="light"]) {
    --pc-haut: #0b1630; --pc-bas: #26385f; --pm-loin: #1d2c47; --pm-alpes-loin: #29395d; --pm-alpes: #17243d;
    --p-neige: #a9bad6; --pl-loin: #22385c; --pl-pres: #0f1d34; --p-reflet: rgb(220 230 255 / .35);
    --p-collines: #0f1a2b; --p-terre: #1a2740; --p-astre: #e9edf7;
  }
  /* thème sombre : voile sombre un peu plus présent (texte clair) */
  :root:not([data-theme="light"]) { --voile-haut: 84%; --voile-milieu: 72%; --voile-bas: 54%; }
}
.p-ciel-haut { stop-color: var(--pc-haut); }
.p-ciel-bas { stop-color: var(--pc-bas); }
.p-lac-loin { stop-color: var(--pl-loin); }
.p-lac-pres { stop-color: var(--pl-pres); }
.p-jura { fill: var(--pm-loin); }
.p-alpes-loin { fill: var(--pm-alpes-loin); }
.p-alpes { fill: var(--pm-alpes); }
.p-neige { fill: var(--p-neige); opacity: .9; }
.p-collines { fill: var(--p-collines); }
.p-terre { fill: var(--p-terre); }
.p-astre { fill: var(--p-astre); }
.p-etoiles { fill: #fff; opacity: var(--p-etoiles); }
.p-reflets { stroke: var(--p-reflet); stroke-width: 3; stroke-linecap: round; }
.p-voile { fill: #fff; }
.p-coque { fill: var(--corail); }
.p-voilier { transform: translate(calc((var(--v-x1) + var(--v-x2)) / 2), var(--v-y)); }
.p-couche { will-change: transform; }

/* Animations : grand écran avec souris seulement (classe posée par fond.js) */
.fond-anime .p-reflets line { animation: p-onde 9s ease-in-out infinite alternate; }
.fond-anime .p-reflets line:nth-child(3n) { animation-duration: 12s; animation-delay: -4s; }
.fond-anime .p-reflets line:nth-child(3n+1) { animation-duration: 7s; animation-delay: -2s; }
.fond-anime .p-voilier { animation: p-voilier 260s linear infinite alternate; }
.fond-anime .p-etoiles circle:nth-child(4n) { animation: p-scintille 4s ease-in-out infinite alternate; }
.fond-pause .fond-paysage * { animation-play-state: paused !important; }
@keyframes p-onde { from { transform: translateX(-18px); opacity: .35; } to { transform: translateX(18px); opacity: 1; } }
@keyframes p-voilier { from { transform: translate(var(--v-x1), var(--v-y)); } to { transform: translate(var(--v-x2), var(--v-y)); } }
@keyframes p-scintille { from { opacity: .3; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fond-paysage * { animation: none !important; } }
