/* Paladines — « Liquid Glass » (style iOS 26 : verre transparent, lumière, couleurs système Apple)
 * Se charge APRÈS theme.css et redéfinit ses jetons : les surfaces deviennent du verre transparent,
 * le « bleu nuit » devient du verre clair, les couleurs passent à la palette système d'Apple.
 * - Fond : dégradé maillé coloré, fixe, qu'on voit à travers le verre.
 * - Verre : très transparent, flouté et saturé, liseré de lumière, reflet en biais.
 * - Titres : police système (SF Pro sur iPhone) ; texte courant : Atkinson Hyperlegible (lisibilité).
 * - « Réduire la transparence » ou navigateur sans flou : surfaces opaques et lisibles.
 * Aucun changement de HTML ni de JS. Contrastes AA vérifiés sur les zones les plus colorées du fond.
 */

/* ============ 1. Jetons ============ */
:root {
  /* Fond maillé */
  --fond-base: #f2f2f7;
  --tache-1: rgb(255 255 255 / 0.9);
  --tache-2: rgb(255 255 255 / 0.55);
  --tache-3: rgb(229 229 234 / 0.6);
  --tache-4: rgb(255 255 255 / 0.6);
  --tache-5: rgb(229 229 234 / 0.5);

  /* Verre */
  --verre: rgb(255 255 255 / 0.72);
  --verre-survol: rgb(255 255 255 / 0.86);
  --verre-barre: rgb(249 249 251 / 0.72);
  --verre-lentille: rgb(255 255 255 / 0.9);
  --verre-bord: rgb(0 0 0 / 0.07);
  --reflet: linear-gradient(180deg, rgb(255 255 255 / 0.35), rgb(255 255 255 / 0) 40%);
  --liseré: inset 0 0.5px 0 rgb(255 255 255 / 0.9);
  --ombre-verre: 0 0.5px 0 rgb(0 0 0 / 0.04), 0 4px 14px -8px rgb(0 0 0 / 0.12);
  --flou: blur(22px) saturate(120%) brightness(1.04);

  /* Couleurs système (texte AA sur le verre le plus coloré) */
  --encre: #111113;
  --encre-douce: #4a4a4f;
  --lien: #111113;
  --focus: #111113;
  --accent: #111113;
  --accent-texte: #111113;
  --accent-chaud: #6b6b70;
  --accent-bouton: #111113;
  --vert-bouton: #2e7d32;
  --rouge-bouton: #d32f2f;
  --logo: #111113;
  --trait: rgb(0 0 0 / 0.12);
  --trait-fort: rgb(0 0 0 / 0.22);
  --ok: #1e6b25;
  --ok-fond: rgb(46 125 50 / 0.13);
  --bientot: #3d3d42;
  --bientot-fond: rgb(0 0 0 / 0.06);
  --ferme: #5a5a60;
  --ferme-fond: rgb(0 0 0 / 0.06);
  --urgent: #b71c1c;
  --urgent-fond: rgb(211 47 47 / 0.12);
  --femmes: #111113;
  --femmes-fond: rgb(0 0 0 / 0.07);
  --femmes-trait: rgb(0 0 0 / 0.2);
  --femmes-encre: #ffffff;
  --lampe: #111113;
  --lampe-encre: #ffffff;
  --lampe-voile: rgb(0 0 0 / 0.06);
  --quitter: var(--rouge-bouton);
  --sur-accent: #ffffff;

  /* L'ancien « bleu nuit » devient du verre clair */
  --nuit: var(--verre-barre);
  --nuit-2: var(--verre);
  --nuit-3: var(--verre-survol);
  --sur-nuit: var(--encre);
  --sur-nuit-doux: var(--encre-douce);
  --sur-nuit-voile: rgb(0 0 0 / 0.05);
  --sur-nuit-filet: rgb(255 255 255 / 0.5);

  /* Surfaces : du verre */
  --papier: rgb(255 255 255 / 0.5);
  --surface: var(--verre);
  --surface-2: var(--verre-survol);
  --ombre-1: var(--liseré), var(--ombre-verre);
  --ombre-2: var(--liseré), 0 2px 4px rgb(30 40 80 / 0.08), 0 18px 40px -16px rgb(30 40 80 / 0.35);
  --ombre-flot: var(--liseré), 0 2px 6px rgb(30 40 80 / 0.1), 0 22px 48px -16px rgb(30 40 80 / 0.4);
  --teinte-fond: 20%;
  --clair-ic: 0%;

  --f-titre: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --r: 24px;
  --r-btn: 999px;
  --r-petit: 14px;
  --h-onglets: 64px;
  --marge-onglets: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: var(--verre);
    --surface-2: var(--verre-survol);
    --nuit: var(--verre-barre);
    --nuit-2: var(--verre);
    --nuit-3: var(--verre-survol);
    --sur-nuit: var(--encre);
    --sur-nuit-doux: var(--encre-douce);
    --quitter: var(--rouge-bouton);
    --ombre-1: var(--liseré), var(--ombre-verre);
    --fond-base: #000000;
    --tache-1: rgb(44 44 46 / 0.55);
    --tache-2: rgb(28 28 30 / 0.5);
    --tache-3: rgb(44 44 46 / 0.35);
    --tache-4: rgb(28 28 30 / 0.4);
    --tache-5: rgb(44 44 46 / 0.3);
    --verre: rgb(28 28 30 / 0.72);
    --verre-survol: rgb(44 44 46 / 0.8);
    --verre-barre: rgb(22 22 24 / 0.72);
    --verre-lentille: rgb(255 255 255 / 0.16);
    --verre-bord: rgb(255 255 255 / 0.09);
    --reflet: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0) 40%);
    --liseré: inset 0 0.5px 0 rgb(255 255 255 / 0.1);
    --ombre-verre: 0 0.5px 0 rgb(0 0 0 / 0.4), 0 6px 18px -10px rgb(0 0 0 / 0.7);
    --flou: blur(22px) saturate(120%) brightness(0.9);
    --encre: #f5f5f7;
    --encre-douce: #c4c4cc;
    --lien: #f5f5f7;
    --focus: #f5f5f7;
    --accent: #f5f5f7;
    --accent-texte: #ffffff;
    --accent-chaud: #a1a1a6;
    --vert-bouton: #2e7d32;
    --rouge-bouton: #d32f2f;
    --accent-bouton: #f5f5f7;
    --sur-accent: #111113;
    --logo: #f5f5f7;
    --trait: rgb(255 255 255 / 0.12);
    --trait-fort: rgb(255 255 255 / 0.2);
    --ok: #6fd174;
    --ok-fond: rgb(76 175 80 / 0.18);
    --bientot: #d1d1d6;
    --bientot-fond: rgb(255 255 255 / 0.08);
    --ferme: #a1a1aa;
    --ferme-fond: rgb(255 255 255 / 0.06);
    --urgent: #ff6b6b;
    --urgent-fond: rgb(255 82 82 / 0.16);
    --femmes: #f5f5f7;
    --femmes-fond: rgb(255 255 255 / 0.1);
    --femmes-trait: rgb(255 255 255 / 0.28);
    --femmes-encre: #111113;
    --lampe: #f5f5f7;
    --lampe-voile: rgb(255 255 255 / 0.08);
    --sur-nuit-voile: rgb(255 255 255 / 0.08);
    --sur-nuit-filet: rgb(255 255 255 / 0.14);
    --papier: rgb(255 255 255 / 0.05);
    --teinte-fond: 30%;
    --clair-ic: 40%;
    --ombre-2: var(--liseré), 0 2px 4px rgb(0 0 0 / 0.3), 0 20px 44px -16px rgb(0 0 0 / 0.8);
    --ombre-flot: var(--liseré), 0 2px 8px rgb(0 0 0 / 0.35), 0 24px 52px -16px rgb(0 0 0 / 0.85);
    --lampe-encre: #111113;
}
}
:root[data-theme="dark"] {
  --surface: var(--verre);
  --surface-2: var(--verre-survol);
  --nuit: var(--verre-barre);
  --nuit-2: var(--verre);
  --nuit-3: var(--verre-survol);
  --sur-nuit: var(--encre);
  --sur-nuit-doux: var(--encre-douce);
  --quitter: var(--rouge-bouton);
  --ombre-1: var(--liseré), var(--ombre-verre);
  --fond-base: #000000;
  --tache-1: rgb(44 44 46 / 0.55);
  --tache-2: rgb(28 28 30 / 0.5);
  --tache-3: rgb(44 44 46 / 0.35);
  --tache-4: rgb(28 28 30 / 0.4);
  --tache-5: rgb(44 44 46 / 0.3);
  --verre: rgb(28 28 30 / 0.72);
  --verre-survol: rgb(44 44 46 / 0.8);
  --verre-barre: rgb(22 22 24 / 0.72);
  --verre-lentille: rgb(255 255 255 / 0.16);
  --verre-bord: rgb(255 255 255 / 0.09);
  --reflet: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0) 40%);
  --liseré: inset 0 0.5px 0 rgb(255 255 255 / 0.1);
  --ombre-verre: 0 0.5px 0 rgb(0 0 0 / 0.4), 0 6px 18px -10px rgb(0 0 0 / 0.7);
  --flou: blur(22px) saturate(120%) brightness(0.9);
  --encre: #f5f5f7;
  --encre-douce: #c4c4cc;
  --lien: #f5f5f7;
  --focus: #f5f5f7;
  --accent: #f5f5f7;
  --accent-texte: #ffffff;
  --accent-chaud: #a1a1a6;
  --accent-bouton: #f5f5f7;
  --sur-accent: #111113;
  --vert-bouton: #2e7d32;
  --rouge-bouton: #d32f2f;
  --logo: #f5f5f7;
  --trait: rgb(255 255 255 / 0.12);
  --trait-fort: rgb(255 255 255 / 0.2);
  --ok: #6fd174;
  --ok-fond: rgb(76 175 80 / 0.18);
  --bientot: #d1d1d6;
  --bientot-fond: rgb(255 255 255 / 0.08);
  --ferme: #a1a1aa;
  --ferme-fond: rgb(255 255 255 / 0.06);
  --urgent: #ff6b6b;
  --urgent-fond: rgb(255 82 82 / 0.16);
  --femmes: #f5f5f7;
  --femmes-fond: rgb(255 255 255 / 0.1);
  --femmes-trait: rgb(255 255 255 / 0.28);
  --femmes-encre: #111113;
  --lampe: #f5f5f7;
  --lampe-voile: rgb(255 255 255 / 0.08);
  --sur-nuit-voile: rgb(255 255 255 / 0.08);
  --sur-nuit-filet: rgb(255 255 255 / 0.14);
  --papier: rgb(255 255 255 / 0.05);
  --teinte-fond: 30%;
  --clair-ic: 40%;
  --ombre-2: var(--liseré), 0 2px 4px rgb(0 0 0 / 0.3), 0 20px 44px -16px rgb(0 0 0 / 0.8);
  --ombre-flot: var(--liseré), 0 2px 8px rgb(0 0 0 / 0.35), 0 24px 52px -16px rgb(0 0 0 / 0.85);
  --lampe-encre: #111113;
}

/* ============ 2. Fond maillé, vu à travers le verre ============ */
html {
  background: var(--fond-base);
}
body {
  background: transparent;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(48vmax 40vmax at 8% 4%, var(--tache-1), transparent 70%),
    radial-gradient(45vmax 38vmax at 96% 12%, var(--tache-2), transparent 70%),
    radial-gradient(42vmax 36vmax at 0% 62%, var(--tache-3), transparent 70%),
    radial-gradient(50vmax 40vmax at 100% 78%, var(--tache-4), transparent 70%),
    radial-gradient(46vmax 36vmax at 40% 104%, var(--tache-5), transparent 70%),
    var(--fond-base);
}
h1,
h2,
h3,
.marque-nom,
.hero-titre,
.urg-num,
.urg-rapide-num {
  letter-spacing: -0.02em;
}

/* ============ 3. Le verre, partout ============ */
.entete,
.onglets,
.hero,
.tuile,
.im-carte,
.urg-rapide,
.liens-bas,
.liste,
.liste-urg,
.fiches,
.horaires,
.verifie,
.signaler form,
.installer-bandeau,
.adresse,
.adresse-masquee,
.action,
.puce,
.btn,
.btn--doux,
.choix-repere select,
.badge-fictif,
.menu-langue,
.alerte,
.rappel,
.encart-femmes,
.criteres li,
.btn-quitter,
.btn-entete,
.cta-proche,
.btn-localiser,
.btn-placer,
.btn-tel-carte,
.carte-tel,
.carte-msg,
.leaflet-bar a,
.leaflet-popup-content-wrapper,
.leaflet-control-attribution {
  -webkit-backdrop-filter: var(--flou);
  backdrop-filter: var(--flou);
}
.hero,
.tuile,
.im-carte,
.urg-rapide,
.liens-bas,
.liste,
.liste-urg,
.fiches,
.horaires,
.verifie,
.signaler form,
.installer-bandeau,
.adresse,
.adresse-masquee,
.action,
.puce,
.btn--doux,
.choix-repere select,
.badge-fictif,
.menu-langue,
.alerte,
.rappel,
.encart-femmes,
.criteres li,
.carte-tel,
.carte-msg,
.leaflet-popup-content-wrapper {
  background-image: var(--reflet);
  border-color: var(--verre-bord);
  box-shadow: var(--liseré), var(--ombre-verre);
}
.tuile:hover,
.action:hover,
.puce:hover,
.btn--doux:hover,
.liens-bas a:hover,
.im-carte:hover,
.urg-rapide:hover {
  background-color: var(--verre-survol);
  background-image: var(--reflet);
}
/* Noir et blanc : pastilles, icônes et survols sans la couleur du besoin
   (seuls les repères de la carte la gardent, pour s'y retrouver) */
.pastille,
.action,
.im-ic,
.barre-carte .puce .ic {
  --c: var(--encre) !important;
}
.tuile:hover {
  border-color: var(--verre-bord);
}
/* Les fonds teintés gardent leur teinte, en verre */
.tuile--femmes,
.im--femmes,
.sommaire-femmes .puce {
  border-color: var(--femmes-trait);
}
.im--alerte {
  border-color: color-mix(in srgb, var(--bientot) 35%, transparent);
}

/* Pression : le verre s'enfonce un peu, comme sur iPhone */
.tuile,
.action,
.btn,
.cta-proche,
.urg-rapide,
.puce,
.im-carte {
  transition: transform 0.18s cubic-bezier(0.3, 0.7, 0.4, 1.4), background-color 0.2s ease, box-shadow 0.2s ease;
}
.tuile:active,
.action:active,
.btn:active,
.cta-proche:active,
.urg-rapide:active,
.puce:active,
.im-carte:active {
  transform: scale(0.97);
}

/* ============ 4. En-tête : barre de verre ============ */
.entete {
  background: var(--verre-barre);
  background-image: var(--reflet);
  color: var(--encre);
  box-shadow: inset 0 -1px 0 var(--trait);
}
body:has(.hero) .entete {
  box-shadow: inset 0 -1px 0 var(--trait);
}
.logo-lanterne {
  fill: var(--logo);
}
.marque-nom {
  font-family: var(--f-titre);
  font-weight: 700;
}
.btn-entete {
  border-radius: 999px;
  color: var(--encre);
}
.btn-entete:hover {
  background: var(--verre-survol);
}
.btn-quitter {
  border-radius: 999px;
  background: color-mix(in srgb, var(--rouge-bouton) 92%, transparent);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.28), rgb(255 255 255 / 0) 60%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 -1px 0 rgb(0 0 0 / 0.1), 0 6px 16px -6px rgb(211 47 47 / 0.6);
}
.menu-langue {
  background-color: var(--verre-barre);
  border: 1px solid var(--verre-bord);
  box-shadow: var(--ombre-flot);
}
.menu-langue button {
  color: var(--encre);
}

/* ============ 5. Accueil : grand titre sur une plaque de verre ============ */
.hero {
  margin: 4px 0 0;
  padding: 22px 18px 18px;
  border: 1px solid var(--verre-bord);
  border-radius: 30px;
  background-color: var(--verre);
  color: var(--encre);
}
.hero-pour {
  color: var(--accent-chaud);
}
.hero-titre {
  font-family: var(--f-titre);
  font-weight: 800;
}
.hero-titre span {
  color: var(--accent-chaud);
}
.proto {
  background: var(--sur-nuit-voile);
  border-color: var(--trait);
  color: var(--encre-douce);
}
/* Bouton principal : verre teinté jaune, comme un bouton « rempli » d'iOS */
.cta-proche {
  border: 1px solid rgb(255 255 255 / 0.5);
  border-radius: 24px;
  background: color-mix(in srgb, var(--lampe) 86%, transparent);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.4), rgb(255 255 255 / 0) 55%);
  color: var(--lampe-encre);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7), inset 0 -1px 0 rgb(0 0 0 / 0.06), 0 12px 28px -12px rgb(0 0 0 / 0.45);
}
.cta-ic {
  border-radius: 16px;
  background: var(--lampe-encre);
  color: var(--lampe);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.titre-bloc {
  color: var(--encre-douce);
}

/* ============ 6. Pastilles : verre teinté de la couleur du besoin ============ */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .pastille,
  .tete .pastille {
    background: color-mix(in srgb, var(--c, var(--accent)) var(--teinte-fond), transparent);
    background-image: linear-gradient(160deg, rgb(255 255 255 / 0.45), rgb(255 255 255 / 0) 60%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), inset 0 0 0 1px color-mix(in srgb, var(--c, var(--accent)) 30%, transparent);
  }
}
.tuile--femmes .pastille,
.tete.tete--femmes .pastille {
  background: var(--femmes);
  color: var(--femmes-encre);
}

/* ============ 7. Boutons ============ */
/* Bouton « rempli » : verre teinté bleu système, texte blanc */
.btn {
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-bouton) 95%, transparent);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0) 45%);
  color: var(--sur-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), inset 0 -1px 0 rgb(0 0 0 / 0.08), 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn:hover {
  background-color: var(--accent-bouton);
  border-color: rgb(255 255 255 / 0.35);
}
/* Bouton « doux » : verre clair */
.btn--doux,
.btn--doux:hover {
  background-color: var(--verre);
  border-color: var(--verre-bord);
  color: var(--encre);
  box-shadow: var(--liseré), var(--ombre-verre);
}
.btn--doux:hover {
  background-color: var(--verre-survol);
}
.btn--danger,
.btn--danger:hover {
  background: color-mix(in srgb, var(--rouge-bouton) 90%, transparent);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 45%);
  color: #fff;
}
.btn--appel,
.actions--principales .action--appel,
.leaflet-container a.btn--appel {
  background: color-mix(in srgb, var(--vert-bouton) 96%, transparent);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 45%);
  border-color: rgb(255 255 255 / 0.35);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), 0 10px 24px -12px rgb(46 125 50 / 0.7);
}
.actions--principales .action--appel .ic {
  color: #fff;
}
.leaflet-container a.btn {
  color: var(--sur-accent);
}
/* Puces (filtres, réglages) : capsules de verre ; choisie = bleu système */
.puce {
  border-radius: 999px;
  border-color: var(--verre-bord);
  color: var(--encre);
}
.puce[aria-pressed="true"],
.barre-carte .puce[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent-bouton) 95%, transparent);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0) 45%);
  border-color: rgb(255 255 255 / 0.35);
  color: var(--sur-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), 0 8px 18px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.choix-repere select {
  border-radius: 18px;
  color: var(--encre);
}
.action {
  border-radius: 20px;
}
a,
.lien-carte,
.lien-fleche {
  color: var(--lien);
}
.im-point[aria-current="true"]::before {
  background: var(--encre);
}

/* ============ 8. Barre d'onglets : capsule de verre flottante, onglet choisi en lentille ============ */
.onglets {
  left: var(--marge-onglets);
  right: var(--marge-onglets);
  bottom: calc(var(--marge-onglets) + env(safe-area-inset-bottom, 0px));
  max-width: 34rem;
  margin-inline: auto;
  min-height: var(--h-onglets);
  padding: 4px;
  border: 1px solid var(--verre-bord);
  border-radius: 999px;
  background: var(--verre-barre);
  background-image: var(--reflet);
  box-shadow: var(--ombre-flot);
}
.onglets a {
  border-radius: 999px;
  color: var(--encre);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.onglets a[aria-current="page"] {
  background: var(--verre-lentille);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7), inset 0 -1px 0 rgb(255 255 255 / 0.2), 0 4px 14px -6px rgb(0 0 0 / 0.25);
  color: var(--accent-texte);
}
.onglets a[aria-current="page"] .ic,
.onglets .ic {
  padding: 2px;
  background: none;
  box-shadow: none;
  color: inherit;
}
.onglets .onglet-urg {
  color: var(--urgent);
}
.vue {
  padding-bottom: calc(var(--h-onglets) + var(--marge-onglets) + 40px + env(safe-area-inset-bottom, 0px));
}

/* ============ 9. Carte : jusqu'en bas, contrôles en verre ============ */
.vue-carte {
  bottom: 0;
  background: transparent;
}
.vue-carte .leaflet-bottom {
  bottom: calc(var(--h-onglets) + var(--marge-onglets) + 8px + env(safe-area-inset-bottom, 0px));
}
.btn-localiser,
.btn-placer {
  bottom: calc(var(--h-onglets) + var(--marge-onglets) + 24px + env(safe-area-inset-bottom, 0px));
}
.btn-tel-carte {
  bottom: calc(var(--h-onglets) + var(--marge-onglets) + 88px + env(safe-area-inset-bottom, 0px));
}
.carte-tel {
  bottom: calc(var(--h-onglets) + var(--marge-onglets) + 146px + env(safe-area-inset-bottom, 0px));
}
.btn-localiser,
.btn-placer:not([aria-pressed="true"]),
.btn-tel-carte:not([aria-expanded="true"]),
.barre-carte .puce:not([aria-pressed="true"]),
.leaflet-bar a {
  background-color: var(--verre-barre);
  background-image: var(--reflet);
  border-color: var(--verre-bord);
  color: var(--encre);
  box-shadow: var(--ombre-flot);
}
.btn-tel-carte[aria-expanded="true"] {
  background: color-mix(in srgb, var(--accent-bouton) 95%, transparent);
  border-color: rgb(255 255 255 / 0.35);
  color: var(--sur-accent);
}
.btn-localiser,
.btn-placer,
.btn-tel-carte {
  border-radius: 999px;
}
.leaflet-bar {
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--ombre-flot);
}
.leaflet-popup-content-wrapper {
  border: 1px solid var(--verre-bord);
  border-radius: 22px;
  background-color: var(--verre-barre);
  color: var(--encre);
}
.leaflet-popup-tip {
  background: var(--verre-barre);
}

/* ============ 10. Finitions selon les règles de design d'Apple (HIG) ============
 * Une seule famille de caractères, une échelle de tailles (34 / 28 / 20 / 17 / 15 / 13 / 11),
 * des espacements sur une grille de 4 et 8 px, des titres de section courts en gras, des
 * listes « groupées » d'iOS, et des ombres légères : c'est le verre qui donne la profondeur. */
:root {
  --f-texte: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --r: 22px;
}
body {
  font-size: 1.0625rem;
  line-height: 1.47;
  letter-spacing: -0.006em;
}
h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.026em;
}
.fiche-lieu h1 {
  font-size: 1.75rem;
  line-height: 1.15;
}
h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.017em;
}
.horaires,
.statut,
.urg-num,
.urg-rapide-num,
.lieu-meta {
  font-variant-numeric: tabular-nums;
}
.vue {
  gap: 28px;
}
.bloc {
  gap: 12px;
}
/* Titres de section : en gras, sans capitales espacées */
.titre-bloc {
  font-family: var(--f-titre);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.017em;
  text-transform: none;
  color: var(--encre);
}
.titre-bloc--urg {
  color: var(--urgent);
}

/* En-tête */
.btn-quitter {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 4px 12px -6px rgb(211 47 47 / 0.55);
}

/* Accueil : grand titre posé sur le fond, sans plaque ; le bouton principal porte l'action */
.hero {
  padding: 4px 0 0;
  gap: 18px;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.hero-pour {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--encre-douce);
}
.hero-titre {
  font-size: 2.125rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.hero-titre span {
  color: var(--encre-douce);
}
.cta-proche {
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 10px 24px -14px rgb(0 0 0 / 0.5);
}
.cta-txt strong {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cta-txt small {
  font-size: 0.8125rem;
  opacity: 0.85;
}

/* Tuiles des besoins */
.grille-cat {
  gap: 10px;
}
.tuile {
  gap: 8px;
  padding: 16px 6px 14px;
}
.tuile-nom {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.tuile-nb {
  font-size: 0.75rem;
  font-weight: 600;
}
.pastille {
  border-radius: 13px;
}

/* Listes de lieux : liste groupée d'iOS (séparateurs après l'icône, statut en texte coloré) */
.ligne-lieu {
  position: relative;
}
.liste li + li {
  border-top: 0;
}
.liste li + li::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 72px 0;
  height: 1px;
  background: var(--trait);
}
.lieu {
  align-items: center;
  gap: 14px;
  padding: 14px 4px 14px 16px;
}
.lieu-cat {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.lieu-nom {
  font-weight: 600;
  letter-spacing: -0.012em;
}
.statut {
  padding: 0;
  border-radius: 0;
  background: none !important;
  font-size: 0.875rem;
  font-weight: 600;
}
.appel-rapide {
  width: 72px;
  border-inline-start: 0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
}
.appel-rapide .ic {
  background: var(--vert-bouton);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 4px 10px -4px rgb(46 125 50 / 0.6);
}
.appel-rapide:hover {
  background: transparent;
}

/* Fiche */
.horaires tr.auj th,
.horaires tr.auj td {
  font-weight: 700;
  box-shadow: none;
}
.actions--principales .action--principale {
  min-height: 54px;
  border-radius: 999px;
  font-weight: 600;
}
.action {
  border-radius: 18px;
  font-weight: 600;
}

/* Urgences : « Appeler » en vert, comme partout ailleurs (même action, même apparence) */
.liste-urg .btn {
  background: color-mix(in srgb, var(--vert-bouton) 96%, transparent);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 45%);
  border-color: rgb(255 255 255 / 0.35);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4), 0 6px 16px -8px rgb(46 125 50 / 0.6);
}

/* Pastilles : icône sur un fond neutre plein, sans reflet ni liseré (plus net) */
.pastille,
.tete .pastille {
  border-radius: 12px;
  background: var(--sur-nuit-voile) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--encre) !important;
}
.tuile--femmes .pastille,
.tete.tete--femmes .pastille,
.tete--proche .pastille {
  background: var(--encre) !important;
  color: var(--fond-base) !important;
}
.tete--urg .pastille {
  background: var(--urgent-fond) !important;
  color: var(--urgent) !important;
}

/* Infos du moment : indicateur de pages discret, comme iOS */
.im-ctrl {
  gap: 0;
}
.im-point::before {
  width: 6px;
  height: 6px;
  background: var(--trait-fort);
}
.im-point[aria-current="true"]::before {
  width: 16px;
}
.im-pause {
  opacity: 0.55;
}

/* Changement d'écran : fondu court ; l'en-tête et les onglets ne bougent pas */
.entete {
  view-transition-name: entete;
}
.onglets {
  view-transition-name: onglets;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.18s;
  animation-timing-function: ease-out;
}

/* Carte : repères noir et blanc. Noir = ouvert maintenant, blanc = fermé ou horaires inconnus ;
   l'icône dit le besoin. Les lieux à adresse protégée gardent leur bord en pointillés. */
.marqueur {
  background: #111113;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 6px 14px -4px rgb(0 0 0 / 0.4);
}
.marqueur--ferme {
  filter: none;
  opacity: 1;
  background: #ffffff;
  color: #4a4a4f;
  border-color: rgb(0 0 0 / 0.14);
}
.marqueur--protege {
  border-style: dashed;
  box-shadow: 0 0 0 3px rgb(17 17 19 / 0.35), 0 6px 14px -4px rgb(0 0 0 / 0.4);
}

/* Réglages : contrôles segmentés d'iOS (une capsule, l'option choisie en lentille) */
.choix {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  width: 100%;
  max-width: 26rem;
  padding: 3px;
  border-radius: 24px;
  background: rgb(118 118 128 / 0.12);
}
.choix .puce,
.choix .puce:hover {
  /* parts égales tant que ça tient ; sinon la capsule passe sur deux lignes plutôt que de couper un mot */
  flex: 1 1 0;
  min-width: max-content;
  justify-content: center;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--encre);
  font-weight: 600;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.choix .puce[aria-pressed="true"] {
  background: var(--verre-lentille);
  background-image: none;
  color: var(--encre);
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.12), 0 1px 1px rgb(0 0 0 / 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .choix {
    background: rgb(118 118 128 / 0.24);
  }
}
:root[data-theme="dark"] .choix {
  background: rgb(118 118 128 / 0.24);
}

/* « A+ » et « A++ » restent dans ce sens, même en arabe */
.taille-0,
.taille-1,
.taille-2 {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Segments : pas de coche (la lentille suffit, comme sur iPhone), pour que quatre choix tiennent */
.choix .puce .ic,
.choix .puce[aria-pressed="true"]::before {
  display: none;
}

/* Mention de la carte : lisible dans tous les styles */
.leaflet-control-attribution {
  background: var(--verre-barre) !important;
  color: var(--encre-douce) !important;
}
.leaflet-control-attribution a {
  color: var(--encre) !important;
}

/* « Tout effacer » : action destructive, en rouge comme sur iPhone */
.effacer > .btn--doux {
  color: var(--urgent);
}

/* État vide : centré, sans cadre en pointillés */
.vide {
  padding: 40px 24px;
  border: 0;
  background: none;
  box-shadow: none;
  text-align: center;
  color: var(--encre-douce);
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* Barre d'onglets : libellés 11 px, icônes 24 px, comme iOS */
.onglets a {
  gap: 2px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0;
}
.onglets .ic {
  width: 1.5rem;
  height: 1.5rem;
}

/* ============ 11. Confort : moins de transparence, pas de flou, couleurs forcées ============ */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --verre: rgb(255 255 255 / 0.94);
    --verre-survol: #ffffff;
    --verre-barre: rgb(249 249 251 / 0.97);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --verre: rgb(28 28 30 / 0.96);
      --verre-survol: #2c2c2e;
      --verre-barre: rgb(22 22 24 / 0.97);
    }
  }
  :root[data-theme="dark"] {
    --verre: rgb(28 28 30 / 0.96);
    --verre-survol: #2c2c2e;
    --verre-barre: rgb(22 22 24 / 0.97);
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root {
    --verre: #ffffff;
    --verre-survol: #f2f2f7;
    --verre-barre: #f9f9fb;
    --verre-lentille: #e5e5ea;
    --papier: #f2f2f7;
    --reflet: none;
  }
  body::before {
    background: #f2f2f7;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --verre: #1c1c1e;
      --verre-survol: #2c2c2e;
      --verre-barre: #1c1c1e;
      --verre-lentille: #3a3a3c;
      --papier: #000000;
    }
    :root:not([data-theme="light"]) body::before {
      background: #000000;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .tuile:active,
  .action:active,
  .btn:active,
  .cta-proche:active,
  .urg-rapide:active,
  .puce:active,
  .im-carte:active {
    transform: none;
  }
}
@media (forced-colors: active) {
  body::before {
    display: none;
  }
}

/* ============ 12. Style « Paladines » (Réglages → Couleurs), en dernier pour primer ============
 * Les couleurs du début (bleu nuit, lampe jaune) avec le verre de la première version
 * Liquid Glass : très transparent, lueurs colorées derrière (bleu, prune, lampe, bleu canard,
 * indigo), reflets en biais et liserés de lumière. Le reste du style actuel est gardé. */
:root[data-theme="paladines"] {
  color-scheme: dark;
  --fond-base: #081022;
  --tache-1: rgb(36 82 143 / 0.6);
  --tache-2: rgb(244 182 63 / 0.26);
  --tache-3: rgb(123 47 134 / 0.45);
  --tache-4: rgb(14 116 144 / 0.32);
  --tache-5: rgb(91 63 160 / 0.4);
  --verre: rgb(255 255 255 / 0.07);
  --verre-survol: rgb(255 255 255 / 0.12);
  --verre-barre: rgb(10 19 36 / 0.45);
  --verre-lentille: rgb(244 182 63 / 0.22);
  --verre-bord: rgb(255 255 255 / 0.16);
  --reflet: linear-gradient(135deg, rgb(255 255 255 / 0.18) 0%, rgb(255 255 255 / 0.04) 38%, rgb(255 255 255 / 0) 60%, rgb(255 255 255 / 0.07) 100%);
  --liseré: inset 0 1px 0 rgb(255 255 255 / 0.26), inset 0 -1px 0 rgb(255 255 255 / 0.06), inset 0 0 0 1px rgb(255 255 255 / 0.06);
  --ombre-verre: 0 1px 2px rgb(0 0 0 / 0.3), 0 14px 36px -14px rgb(0 0 0 / 0.7);
  --ombre-1: var(--liseré), var(--ombre-verre);
  --ombre-2: var(--liseré), 0 2px 4px rgb(0 0 0 / 0.3), 0 20px 44px -16px rgb(0 0 0 / 0.8);
  --ombre-flot: var(--liseré), 0 2px 8px rgb(0 0 0 / 0.35), 0 24px 52px -16px rgb(0 0 0 / 0.85);
  --flou: blur(22px) saturate(180%) brightness(0.9);
  --encre: #f3f5f8;
  --encre-douce: #bcc6d6;
  --lien: #f6c35a;
  --focus: #f6c35a;
  --accent: #f4b63f;
  --accent-texte: #f6c35a;
  --accent-chaud: #f6c35a;
  --accent-bouton: #f4b63f;
  --sur-accent: #1d1606;
  --logo: #f4b63f;
  --lampe: #f4b63f;
  --lampe-encre: #1d1606;
  --lampe-voile: rgb(244 182 63 / 0.16);
  --vert-bouton: #2e7d32;
  --rouge-bouton: #d32f2f;
  --quitter: var(--rouge-bouton);
  --trait: rgb(255 255 255 / 0.12);
  --trait-fort: rgb(255 255 255 / 0.2);
  --ok: #6fd174;
  --ok-fond: rgb(76 175 80 / 0.18);
  --bientot: #f6c35a;
  --bientot-fond: rgb(244 182 63 / 0.16);
  --ferme: #aab6c8;
  --ferme-fond: rgb(255 255 255 / 0.06);
  --urgent: #ff6b6b;
  --urgent-fond: rgb(255 82 82 / 0.16);
  --femmes: #e2a8f0;
  --femmes-fond: rgb(123 47 134 / 0.32);
  --femmes-trait: rgb(226 168 240 / 0.35);
  --femmes-encre: #1d1606;
  --nuit: var(--verre-barre);
  --nuit-2: var(--verre);
  --nuit-3: var(--verre-survol);
  --sur-nuit: var(--encre);
  --sur-nuit-doux: var(--encre-douce);
  --sur-nuit-voile: rgb(255 255 255 / 0.08);
  --sur-nuit-filet: rgb(255 255 255 / 0.14);
  --surface: var(--verre);
  --surface-2: var(--verre-survol);
  --papier: rgb(255 255 255 / 0.05);
  --teinte-fond: 30%;
  --clair-ic: 40%;
}
/* Pictogrammes couleur lampe, contrôles segmentés sombres */
:root[data-theme="paladines"] .pastille,
:root[data-theme="paladines"] .tete .pastille {
  color: var(--lampe) !important;
}
:root[data-theme="paladines"] .tuile--femmes .pastille,
:root[data-theme="paladines"] .tete--proche .pastille {
  background: var(--lampe) !important;
  color: var(--lampe-encre) !important;
}
:root[data-theme="paladines"] .choix {
  background: rgb(118 118 128 / 0.24);
}
:root[data-theme="paladines"] .choix .puce[aria-pressed="true"] {
  background: rgb(255 255 255 / 0.16);
}
/* Accueil : « Bonjour. » et la ligne du haut en jaune lampe, bouton principal jaune plein */
:root[data-theme="paladines"] .hero-titre span,
:root[data-theme="paladines"] .hero-pour {
  color: var(--accent-chaud);
}
:root[data-theme="paladines"] .cta-proche {
  background: var(--lampe);
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.22), rgb(255 255 255 / 0) 50%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), 0 12px 28px -14px rgb(244 182 63 / 0.6);
}
/* Carte : repère jaune lampe = ouvert ; bleu nuit = fermé */
:root[data-theme="paladines"] .marqueur {
  background: #f4b63f;
  color: #1d1606;
  border-color: #ffffff;
}
:root[data-theme="paladines"] .marqueur--ferme {
  background: #1f3354;
  color: #c9d2df;
  border-color: rgb(255 255 255 / 0.3);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme="paladines"] {
    --verre: rgb(26 41 68 / 0.97);
    --verre-survol: #253a5a;
    --verre-barre: rgb(14 24 44 / 0.98);
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root[data-theme="paladines"] {
    --verre: #16233b;
    --verre-survol: #1f3354;
    --verre-barre: #101b30;
    --papier: #0a1324;
  }
  :root[data-theme="paladines"] body::before {
    background: #0a1324;
  }
}
