/* Police Open Sans hébergée sur le site (pas d'appel à Google = RGPD).
   Déposez le fichier OpenSans.ttf (téléchargé sur fonts.google.com) dans le dossier fonts/ */
@font-face {
  font-family: "Open Sans";
  /* uniquement le fichier du site (police variable, tous les gras) : une Open Sans installée
     sur l'ordinateur n'a parfois que le style normal, et le gras ne s'affichait pas */
  src: url("../fonts/OpenSans.ttf") format("truetype");
  font-weight: 300 800;
  font-display: swap;
}

/* ==========================================================
   Bouffeurs de Graines — prototype
   Couleurs et tailles modifiables ici
   ========================================================== */
:root {
  --bleu: #353ecd;
  --bleu-clair: #e8e9fb;
  --bleu-grille: rgba(53, 62, 205, .18);
  --fond: #f4f4f8;
  --blanc: #ffffff;
  --texte: #1c1d3a;
  --texte-doux: #5b5d80;
  --rayon: 22px;
  --nav-h: 86px;
  --police: "Open Sans", system-ui, sans-serif;
  --non-teste: #353ecd;       /* couleur des lieux pas encore testés */
  --non-teste-clair: #e7e8fa;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--police);
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ---------- Mise en page générale ---------- */
.app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: 33% 1fr;
  transition: grid-template-rows .35s ease;
}
.app.map-large { grid-template-rows: 66% 1fr; }

.map-zone { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: #dfe3e8; }

.panel {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--fond);
  border-radius: var(--rayon) var(--rayon) 0 0;
  margin-top: calc(var(--rayon) * -1);
  z-index: 500;
  box-shadow: 0 -6px 20px rgba(20, 20, 60, .12);
}
.panel-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px 24px;
}

/* Ordinateur : carte 2/3 à gauche, panneau 1/3 à droite */
@media (min-width: 900px) {
  .app, .app.map-large {
    grid-template-rows: none;
    grid-template-columns: 2fr 1fr;
  }
  .panel {
    margin-top: 0;
    border-radius: 0;
    box-shadow: -6px 0 20px rgba(20, 20, 60, .12);
  }
  .map-btn--size { display: none; }
  .panel-scroll { padding: 24px 22px 28px; }
}

/* ---------- Boutons sur la carte ---------- */
.map-btn {
  position: absolute;
  right: 12px;
  z-index: 600;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--blanc);
  color: var(--bleu);
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  display: grid; place-items: center;
}
.map-btn--size { bottom: 34px; }
.map-btn--locate { top: 12px; }

/* ---------- Pins et regroupements ---------- */
.pin { position: relative; width: 40px; height: 54px; }
.pin img { width: 40px; height: 54px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.pin-badge {
  position: absolute; top: -6px; right: -14px;
  background: var(--bleu); color: #fff;
  font-size: 9px; font-weight: 800; line-height: 1;
  padding: 4px 5px; border-radius: 10px;
  border: 2px solid #fff; white-space: nowrap;
}
.pin.is-selected img { transform: scale(1.25); transform-origin: bottom center; }

.cluster {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 30px;
  padding: 3px 14px 3px 3px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  white-space: nowrap; width: max-content;
}
.cluster-nb {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bleu); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
}
.cluster-ville { color: var(--bleu); font-weight: 600; font-size: 15px; }
.leaflet-marker-icon.cluster-icon { background: none; border: 0; }

/* ---------- En-tête Explorer ---------- */
.brand { text-align: center; margin: 0 0 14px; }
.brand img { width: 150px; margin: 0 auto; }
.brand-sub {
  display: inline-block; margin-top: -6px;
  background: var(--bleu); color: #fff;
  font-weight: 700; font-size: 15px;
  padding: 2px 10px; border-radius: 6px;
}
.zone-info {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  color: var(--texte-doux); font-size: 13px; margin: 6px 2px 12px;
}
.link-btn { background: none; border: 0; color: var(--bleu); font-weight: 700; text-decoration: underline; padding: 0; font-size: 13px; }

/* ---------- Cartes lieux ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card {
  position: relative;
  background: #fff;
  border-radius: var(--rayon);
  overflow: hidden;
  border: 0; padding: 0; text-align: left;
  box-shadow: 0 4px 16px rgba(53, 62, 205, .14);
  transition: transform .15s;
}
.card:hover { transform: translateY(-2px); }
.card-title {
  min-height: 74px;
  padding: 12px 14px;
  color: var(--bleu); font-weight: 700; font-size: 16px; line-height: 1.2;
  background-color: #fff;
  background-image:
    linear-gradient(var(--bleu-grille) 1px, transparent 1px),
    linear-gradient(90deg, var(--bleu-grille) 1px, transparent 1px);
  background-size: 16px 16px;
}
.card-ville { display: block; font-size: 11px; font-weight: 600; color: var(--texte-doux); margin-top: 4px; }
.card-img { aspect-ratio: 4 / 3; }
.card .pastille { position: absolute; right: 6px; top: 58px; }

/* Pastilles de niveau (provisoires : seront remplacées par les PNG) */
.pastille {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--bleu); color: #fff;
  border: 3px solid #fff;
  display: grid; place-items: center; text-align: center;
  font-weight: 800; font-size: 13px; line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.pastille small { display: block; font-size: 9px; font-weight: 700; margin-top: 2px; }
.pastille--possible { background: #fff; color: var(--bleu); border-color: var(--bleu); }

/* Image provisoire quand la photo n'existe pas */
.ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: var(--bleu-clair);
  color: var(--bleu); font-weight: 700; font-size: 12px; text-align: center;
  background-image: radial-gradient(rgba(53,62,205,.18) 1.5px, transparent 1.5px);
  background-size: 10px 10px;
}
.img-cover { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Fiche lieu ---------- */
.fiche { position: relative; }
.fiche-close {
  position: sticky; top: 0; float: right; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--bleu); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.fiche h1 { color: var(--bleu); font-size: 24px; line-height: 1.15; margin: 4px 56px 4px 0; }
.fiche-ville { color: var(--texte-doux); font-weight: 600; margin: 0 0 14px; }
.fiche-photos { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scroll-snap-type: x mandatory; }
.fiche-photos > * { flex: 0 0 88%; aspect-ratio: 12 / 5; border-radius: 16px; overflow: hidden; scroll-snap-align: start; }
.fiche-photos > *:only-child { flex-basis: 100%; }
.offre { display: grid; gap: 6px; margin: 0 0 14px; }
.offre-ligne { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.offre-ligne b { color: var(--bleu); min-width: 88px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip {
  display: inline-block;
  background: #fff; color: var(--bleu);
  border: 1.5px solid var(--bleu);
  border-radius: 20px; padding: 4px 11px;
  font-size: 13px; font-weight: 600;
}
.chip--plein { background: var(--bleu); color: #fff; }
.fiche p { line-height: 1.55; }
.fiche h2 { color: var(--bleu); font-size: 18px; margin: 22px 0 10px; }

.teste { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 16px; padding: 10px; margin-bottom: 8px; }
.teste-rond { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 3px solid var(--bleu); }
.teste-rond .ph { font-size: 22px; }
.teste strong { display: block; color: var(--bleu); }
.teste span { font-size: 14px; color: var(--texte-doux); }

.infos { background: #fff; border-radius: 16px; padding: 4px 14px; }
.infos div { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bleu-clair); font-size: 14px; }
.infos div:last-child { border-bottom: 0; }
.infos dt { font-weight: 700; color: var(--bleu); min-width: 80px; }
.infos dd { margin: 0; }
.infos a { color: var(--bleu); }

.btn {
  display: block; width: 100%;
  background: var(--bleu); color: #fff;
  border: 0; border-radius: 30px;
  padding: 13px 18px; margin-top: 12px;
  font-weight: 700; font-size: 15px; text-align: center; text-decoration: none;
}
.btn--contour { background: #fff; color: var(--bleu); border: 2px solid var(--bleu); }

/* ---------- Recherche ---------- */
.titre-vue { color: var(--bleu); font-size: 22px; margin: 4px 0 14px; }
.search {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--bleu); border-radius: 30px;
  font: inherit; font-size: 16px; color: var(--texte);
  background: #fff;
}
.filtre-groupe { margin: 16px 0 0; }
.filtre-groupe h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-doux); margin: 0 0 8px; }
.filtre-groupe .chip { cursor: pointer; }
.resultats-titre { margin: 22px 0 10px; font-weight: 700; color: var(--bleu); }

/* ---------- Formulaire ---------- */
.form label { display: block; font-weight: 700; font-size: 14px; color: var(--bleu); margin: 14px 0 6px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid #c9cbef; border-radius: 12px;
  font: inherit; font-size: 15px; background: #fff; color: var(--texte);
}
.form textarea { min-height: 90px; resize: vertical; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.encart { background: var(--bleu-clair); border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin: 16px 0 0; }
.encart a { color: var(--bleu); font-weight: 700; }
.msg-ok { background: #fff; border: 2px solid var(--bleu); color: var(--bleu); border-radius: 14px; padding: 14px; font-weight: 600; margin-top: 14px; }

/* ---------- Page projet ---------- */
.projet p { line-height: 1.6; }

/* ---------- Menu ---------- */
.nav {
  flex: 0 0 var(--nav-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bleu);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  background: none; border: 0; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 700;
}
.nav-ico { width: 56px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.nav-ico svg { width: 40px; height: 30px; }
.nav-btn.is-active .nav-ico { background: #fff; color: var(--bleu); }
.nav-btn span:last-child { white-space: nowrap; }

@media (max-width: 380px) {
  .nav-btn { font-size: 10.5px; }
  .card-title { font-size: 14px; }
}

/* Corrections */
.pastille--possible { font-size: 11px; }
.pastille--possible small { font-size: 8px; }
@media (min-width: 900px) { .map-btn--size { display: none; } }

/* ---------- Langue ---------- */
.map-btn--lang { top: 64px; font-weight: 800; font-size: 13px; }

/* ---------- Menu : icônes SVG en fichiers (84 x 66 px) ---------- */
.nav { flex-basis: 96px; }
.nav-btn { gap: 2px; padding: 4px 0; }
.nav-btn img { width: 84px; height: 66px; max-width: 100%; object-fit: contain; }
.nav-btn span { font-size: 12px; }
@media (max-width: 380px) { .nav-btn img { width: 70px; height: 55px; } }

/* ---------- Lieux pas encore testés ---------- */
.card--nonteste .card-title {
  color: var(--non-teste);
  background-color: var(--non-teste-clair);
  background-image:
    linear-gradient(rgba(184, 110, 0, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 110, 0, .18) 1px, transparent 1px);
}
.card--nonteste { box-shadow: 0 4px 16px rgba(184, 110, 0, .18); }
.card--nonteste .pastille { background: var(--non-teste); }
.card--nonteste .pastille--possible { background: #fff; color: var(--non-teste); border-color: var(--non-teste); }
.card-img { position: relative; }
.bandeau-nonteste {
  position: absolute; left: 8px; bottom: 8px;
  background: var(--non-teste); color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 10px;
}
.fiche--nonteste h1, .fiche--nonteste h2 { color: var(--non-teste); }
.fiche--nonteste .fiche-close, .fiche--nonteste .btn:not(.btn--contour) { background: var(--non-teste); }
.fiche--nonteste .btn--contour { color: var(--non-teste); border-color: var(--non-teste); }
.fiche--nonteste .infos dt, .fiche--nonteste .infos a { color: var(--non-teste); }
.alerte-nonteste {
  background: var(--non-teste-clair); color: var(--non-teste);
  border: 2px dashed var(--non-teste); border-radius: 14px;
  padding: 10px 14px; font-weight: 700; font-size: 14px; margin: 0 0 14px;
}
.pin--nonteste .pin-badge { background: var(--non-teste); }

/* ---------- Divers ---------- */
.fiche .chips + .chips { margin-top: -6px; }
.note { font-size: 13px; color: var(--texte-doux); line-height: 1.5; }
.note a { color: var(--bleu); }
.mentions h2 { color: var(--bleu); font-size: 16px; margin: 18px 0 6px; }
.mentions p { font-size: 14px; }
.mentions a { color: var(--bleu); }

/* ==========================================================
   Menu : fond blanc qui glisse d'une icône à l'autre
   ========================================================== */
.nav { position: relative; }
.nav-indicateur {
  position: absolute; left: 0; top: 0;
  width: 84px; height: 66px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(10, 12, 80, .25);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: transform .45s cubic-bezier(.34, 1.35, .5, 1), opacity .2s;
}
.nav-indicateur.is-visible { opacity: 1; }
.nav-btn { position: relative; z-index: 1; }
.nav-ico {
  position: relative;
  width: 84px; height: 66px;
  background: none !important;
  transition: transform .2s ease;
}
.nav-ico .ico {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  transition: opacity .3s ease .08s, transform .25s ease;
}
.ico--on { opacity: 0; }
.nav-btn.is-active .ico--on { opacity: 1; }
.nav-btn.is-active .ico--off { opacity: 0; }
.nav-label { opacity: .8; transition: opacity .25s, transform .25s; }
.nav-btn.is-active .nav-label { opacity: 1; }
.nav-btn:hover .ico { transform: translateY(-2px); }
.nav-btn:hover .nav-label { opacity: 1; }
.nav-btn:active .nav-ico { transform: scale(.92); }
@media (max-width: 380px) { .nav-ico { width: 70px; height: 55px; } }

/* ==========================================================
   Animations au survol (sobres)
   ========================================================== */
.card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(53, 62, 205, .22); }
.card:active { transform: scale(.98); }
.card .img-cover { transition: transform .5s ease; }
.card:hover .img-cover { transform: scale(1.05); }
.card--nonteste:hover { box-shadow: 0 10px 26px rgba(184, 110, 0, .25); }

.btn { transition: transform .15s ease, box-shadow .2s ease, background-color .2s, color .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(53, 62, 205, .3); }
.btn:active { transform: scale(.98); box-shadow: none; }
.btn--contour:hover { background: var(--bleu); color: #fff; }
.fiche--nonteste .btn--contour:hover { background: var(--non-teste); color: #fff; }

button.chip { transition: background-color .2s, color .2s, transform .15s; }
button.chip:hover { background: var(--bleu-clair); }
button.chip.chip--plein:hover { background: var(--bleu); filter: brightness(1.1); }
button.chip:active { transform: scale(.95); }

.map-btn { transition: transform .2s ease, box-shadow .2s; }
.map-btn:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.fiche-close { transition: transform .3s ease; }
.fiche-close:hover { transform: rotate(90deg); }

.pin img { transition: transform .2s ease; transform-origin: bottom center; }
.pin:hover img { transform: scale(1.12); }
.cluster { transition: transform .2s ease; }
.cluster:hover { transform: scale(1.06); }

.teste { transition: transform .2s ease; }
.teste:hover { transform: translateX(4px); }
.link-btn { transition: opacity .2s; }
.link-btn:hover { opacity: .7; }
.search, .form input, .form select, .form textarea { transition: border-color .2s, box-shadow .2s; }
.search:focus, .form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(53, 62, 205, .15);
}

/* ==========================================================
   Apparition du contenu quand on change de vue
   ========================================================== */
@keyframes entree { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes entreeFiche { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.panel-scroll.entree > * { animation: entree .35s ease backwards; }
.panel-scroll.entree .card { animation: entree .4s ease backwards; }
.panel-scroll.entree .card:nth-child(2) { animation-delay: .05s; }
.panel-scroll.entree .card:nth-child(3) { animation-delay: .1s; }
.panel-scroll.entree .card:nth-child(4) { animation-delay: .15s; }
.panel-scroll.entree .card:nth-child(n+5) { animation-delay: .2s; }
.panel-scroll.entree--fiche > * { animation: entreeFiche .35s cubic-bezier(.2, .8, .3, 1) backwards; }

/* Personnes qui préfèrent limiter les animations (réglage du téléphone) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================
   Page projet : installer l'application
   ========================================================== */
.installer { margin-top: 32px; }
.etapes { display: grid; gap: 10px; margin-top: 12px; }
.etape-bloc { background: #fff; border-radius: 16px; padding: 12px 16px; }
.etape-bloc h3 { margin: 0 0 6px; color: var(--bleu); font-size: 15px; }
.etape-bloc ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.etapes:not(.is-ios) .etape-android { order: -1; }

/* ==========================================================
   Ajustements v5
   ========================================================== */
/* Menu : icônes réduites d'environ 1/3 (84x66 -> 56x44) */
.nav { flex-basis: 74px; }
.nav-ico { width: 56px; height: 44px; }
.nav-indicateur { border-radius: 11px; }
.nav-label { font-size: 11.5px; }
@media (max-width: 380px) { .nav-ico { width: 48px; height: 38px; } .nav-label { font-size: 10.5px; } }

/* La carte reste sous l'interface (mentions et contrôles Leaflet) */
#map { z-index: 0; }
.panel { z-index: 10; }
.map-btn, .logo-rond { z-index: 20; }
.leaflet-control-attribution { font-size: 10px; }
@media (max-width: 899px) {
  /* le panneau recouvre le bas de la carte : on remonte les mentions OpenStreetMap */
  .leaflet-bottom { bottom: var(--rayon); }
}

/* Pastilles 100% (cartes de la liste) — proches de la maquette */
.card { overflow: visible; }
.card-title { border-radius: var(--rayon) var(--rayon) 0 0; }
.card-img { overflow: hidden; border-radius: 0 0 var(--rayon) var(--rayon); }
.card .pastille {
  position: absolute; right: -10px; top: 50px;
  width: 64px; height: 64px;
  background: var(--bleu); color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(20, 20, 80, .3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1; text-align: center;
  z-index: 2;
}
.pastille b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.pastille b big { font-size: 22px; }
.pastille--vg100 b { font-size: 22px; }
.pastille small { font-size: 10px; font-weight: 700; margin-top: 2px; }
.card--nonteste .pastille { background: var(--non-teste); }

/* Mobile : petit logo dans un rond blanc sur la carte, logo retiré de la liste */
.logo-rond { display: none; }
@media (max-width: 899px) {
  .logo-rond {
    display: grid; place-items: center;
    position: absolute; left: 12px; top: 12px;
    width: 84px; height: 84px; border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
    transition: transform .2s ease;
  }
  .logo-rond img { width: 68px; }
  .logo-rond:hover { transform: scale(1.05); }
  .brand--explorer { display: none; }
}

/* Mobile et tablette : pas de carte sur Proposer, Bouffeurs de G. et Mentions */
@media (max-width: 899px) {
  .app.sans-carte, .app.sans-carte.map-large { grid-template-rows: 0 1fr; }
  .app.sans-carte .map-zone { visibility: hidden; }
  .app.sans-carte .panel { margin-top: 0; border-radius: 0; }
}

/* Page projet : photo 5:3 */
.projet-photo { aspect-ratio: 5 / 3; border-radius: var(--rayon); overflow: hidden; margin: 18px 0 4px; }
.projet-photo img { width: 100%; height: 100%; object-fit: cover; }
.card--pastille .card-title { padding-right: 52px; }
.card .pastille { top: 44px; }

/* ==========================================================
   v6 : pins par catégorie et pastille dessinée
   ========================================================== */
.pin { width: 46px; height: 54px; display: flex; align-items: flex-end; justify-content: center; }
.pin img { width: auto; height: 50px; max-width: 54px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.pin--interet img, .pin--boutique img { height: 46px; }
.pin-badge { top: -8px; right: -18px; }
.pin--a-tester .pin-badge { background: var(--non-teste); }
.pin.is-selected img { transform: scale(1.3); }

/* Pastille 100% : fond dessiné Pastille.png */
.card .pastille,
.card--nonteste .pastille {
  background: url("../img/assets/pastille.png") center / contain no-repeat;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 4px rgba(20, 20, 80, .3));
  width: 68px; height: 68px;
}

/* ==========================================================
   Mobile à l'horizontale : 3 colonnes
   1 = carte (avec le logo rond) · 2 = contenu · 3 = menu vertical minimal
   ========================================================== */
@media (orientation: landscape) and (max-height: 540px) {
  .app, .app.map-large {
    grid-template-rows: none;
    grid-template-columns: 1fr minmax(0, 1fr);
  }
  .app.sans-carte, .app.sans-carte.map-large { grid-template-rows: none; grid-template-columns: 0 1fr; }
  .app.sans-carte .map-zone { visibility: hidden; }

  .panel {
    flex-direction: row;
    margin-top: 0;
    border-radius: 0;
    box-shadow: -6px 0 20px rgba(20, 20, 60, .12);
  }
  .panel-scroll { padding: 14px 14px 18px; }

  /* Menu vertical à droite, le plus étroit possible */
  .nav {
    flex: 0 0 64px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    padding: 6px 0 env(safe-area-inset-bottom);
    padding-right: env(safe-area-inset-right);
  }
  .nav-ico { width: 48px; height: 38px; }
  .nav-label {             /* texte masqué visuellement, gardé pour l'accessibilité */
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }

  /* Carte : logo rond comme en vertical, pas de bouton d'agrandissement */
  .map-btn--size { display: none; }
  .leaflet-bottom { bottom: 0; }
  .logo-rond {
    display: grid; place-items: center;
    position: absolute; left: 10px; top: 10px;
    width: 68px; height: 68px; border-radius: 50%;
    background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
  }
  .logo-rond img { width: 54px; }
  .brand--explorer { display: none; }
  .map-btn { width: 40px; height: 40px; }
  .map-btn--locate { top: 10px; }
  .map-btn--lang { top: 58px; }
}

/* ==========================================================
   v8 : bouton carte +/− et regroupements (nombre seul)
   ========================================================== */
.map-btn--size .ico-carte-moins { display: none; }
.app.map-large .map-btn--size .ico-carte-plus { display: none; }
.app.map-large .map-btn--size .ico-carte-moins { display: block; }

.cluster {
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.cluster-nb { width: 36px; height: 36px; font-size: 15px; }

/* ==========================================================
   v9 : titres des cartes sur 2 lignes maximum (hauteur fixe)
   ========================================================== */
.card-title {
  height: 84px; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.card-nom {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.2;
}
.card-ville {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: auto; padding-top: 2px;
}
@media (max-width: 380px) { .card-title { height: 78px; } }
.lien-admin { text-align: center; margin: 6px 0 10px; }
.lien-admin a { font-size: 12px; color: var(--texte-doux); }

/* Safari (iPad / iPhone) : centrage exact des icônes dans les boutons ronds */
.map-btn, .fiche-close, .nav-btn {
  -webkit-appearance: none; appearance: none;
  padding: 0;
}
.map-btn, .fiche-close { line-height: 0; }
.map-btn svg, .fiche-close svg { display: block; margin: auto; flex-shrink: 0; }
.map-btn--lang { line-height: 1; }

/* ==========================================================
   v10 : icônes de menu dessinées (PNG) et pin champignon
   ========================================================== */
.nav-ico .ico { object-fit: contain; }
/* Sur le fond bleu, l'icône est affichée en blanc (la texture du trait est conservée) */
.nav-ico .ico--off { filter: brightness(0) invert(1); opacity: .9; }
.pin--champignon img { height: 44px; max-width: 56px; }

/* v11 : pictos du menu réduits d'environ 1/3, le rectangle blanc garde sa taille */
.nav-ico .ico { inset: 16%; width: 68%; height: 68%; }

/* ==========================================================
   v12 : fond dessiné du menu, regroupements en pastille, mobile
   ========================================================== */
/* Fond du menu : image étirée pour remplir exactement l'encart */
.nav {
  background: url("../img/assets/fond-menu.png") center / 100% 100% no-repeat;
  background-color: transparent;
}
@media (orientation: landscape) and (max-height: 540px) {
  .nav { background-image: url("../img/assets/fond-menu-vertical.png"); }
}

/* Regroupements de pins : nombre sur la pastille dessinée */
.cluster { background: none; box-shadow: none; width: 44px; height: 44px; }
.cluster-nb {
  width: 42px; height: 42px; border-radius: 0;
  background: url("../img/assets/pastille.png") center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(20, 20, 80, .35));
  font-size: 14px;
}

/* Téléphone vertical : icônes plus bas dans le menu, textes plus petits */
@media (max-width: 899px) and (orientation: portrait), (max-width: 899px) and (min-height: 541px) {
  .nav { flex-basis: 80px; }
  .nav-btn { justify-content: flex-start; padding-top: 12px; gap: 3px; }
  .nav-label { font-size: 10px; }
}
/* Correctif : les colonnes de cartes ne doivent jamais dépasser la largeur (noms de ville longs) */
.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; }
/* v13 : marge au-dessus des icônes du menu réduite (téléphone vertical) */
@media (max-width: 899px) and (orientation: portrait), (max-width: 899px) and (min-height: 541px) {
  .nav-btn { padding-top: 6px; }
  .nav { flex-basis: 74px; }
}
/* v14 : textes du menu plus petits (la règle « .nav-btn span » l'emportait sur les précédentes) */
.nav-btn .nav-label { font-size: 11px; }
@media (max-width: 899px) and (orientation: portrait), (max-width: 899px) and (min-height: 541px) {
  .nav-btn .nav-label { font-size: 9px; letter-spacing: .01em; }
}

/* ==========================================================
   v15 : papier, quadrillage dessiné, ombre granuleuse, noms des pins
   ========================================================== */
/* Fond papier (motif qui se répète sans raccord) derrière les cartes */
.panel { background: #f5f5f5 url("../img/assets/fond-papier.jpg") repeat; background-size: 400px 400px; }

/* Quadrillage scanné derrière le nom des lieux */
.card-title,
.card--nonteste .card-title {
  background-color: #fff;
  background: #fff url("../img/assets/fond-carte.jpg") center center / cover no-repeat;
}
.card--nonteste .card-title { background-color: var(--non-teste-clair); }

/* Ombre bleue granuleuse derrière chaque carte */
.card, .card:hover, .card--nonteste, .card--nonteste:hover { background: transparent; isolation: isolate; }
.card::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -16px -14px -22px -14px;
  background: url("../img/assets/ombre-carte.png") center / 100% 100% no-repeat;
  opacity: .8; transition: opacity .25s, transform .25s;
}
.card:hover::before { opacity: 1; transform: translateY(3px); }
.card--nonteste::before { filter: hue-rotate(165deg) saturate(1.2); }
.card-img { background: #fff; }

/* Noms des lieux plus gras ; 22 px sur ordinateur */
.card-nom { font-weight: 800; }
@media (min-width: 900px) {
  .card-nom { font-size: 22px; line-height: 1.15; }
  .card-title { height: 100px; }
}

/* Mention « Photo d'illustration » */
.card-img, .photo-cadre { position: relative; }
.illustration {
  position: absolute; right: 6px; bottom: 6px;
  background: rgba(255, 255, 255, .85); color: var(--texte-doux);
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 8px;
}
.card--nonteste .illustration { bottom: 30px; }

/* Nom du lieu sous le pin, au survol (et quand le lieu est ouvert) */
.pin { position: relative; }
.pin-nom {
  position: absolute; top: 100%; left: 50%;
  transform: translate(-50%, 2px);
  white-space: nowrap;
  background: #fff; color: var(--bleu);
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 7px; border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.pin:hover .pin-nom, .pin.is-selected .pin-nom { opacity: 1; transform: translate(-50%, 5px); }
.card::before { inset: -22px -20px -30px -20px; opacity: .9; }

/* ==========================================================
   v16 : quadrillage plein cadre, cartes plus aérées, ombre ajustée
   ========================================================== */
/* Le quadrillage remplit tout le haut de la carte, sans répétition */
.card-title, .card--nonteste .card-title {
  background-image: url("../img/assets/fond-carte.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 14px 16px;
}
/* Ombre : toujours bleue, moins basse, plus légère */
.card--nonteste::before { filter: none; }
.card::before { inset: -18px -18px -20px -18px; opacity: .6; }
.card:hover::before { opacity: .8; transform: translateY(2px); }

/* Ordinateur : plus d'air autour et dans les cartes, noms plus grands */
@media (min-width: 900px) {
  .panel-scroll { padding: 30px 30px 36px; }
  .cards { gap: 34px 30px; }
  .card-title { padding: 20px 22px; height: 124px; }
  .card-nom { font-size: 26px; line-height: 1.12; }
  .card .pastille { top: 56px; right: -14px; }
  .card--pastille .card-title { padding-right: 58px; }
}
/* v16b : sur ordinateur, le panneau fait 1/3 de l'écran : 24 px sur 3 lignes max pour ne pas couper les noms */
@media (min-width: 900px) {
  .panel-scroll { padding: 30px 26px 36px; }
  .cards { gap: 34px 24px; }
  .card-title { padding: 18px 18px; height: 150px; }
  .card-nom { font-size: 24px; -webkit-line-clamp: 3; line-clamp: 3; }
  .card .pastille { top: 80px; }
}
/* v17 : réglages de Pierrick (ordinateur) */
@media (min-width: 900px) {
  .panel-scroll { padding: 24px 30px 34px; }
  .cards { gap: 30px; }
}

/* Page projet : texte d'introduction */
.projet-accroche { font-size: 18px; line-height: 1.45; color: var(--bleu); }
.projet-accroche strong { font-weight: 800; }
.projet-appel { font-weight: 700; }
.projet-appel a { color: var(--bleu); }
/* Accueil : appel à explorer, tout en haut */
.cta-explorer { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 4px 0 22px; }
.cta-explorer .btn { margin: 0; }
@media (min-width: 420px) { .cta-explorer { grid-template-columns: 2fr 1fr; } }

/* v19 : fond de carte = image de Pierrick (Fond de carte.jpg), non modifiée,
   qui couvre toute la partie haute de la fiche, sans répétition */
.card .card-title,
.card.card--nonteste .card-title {
  background: #fff url("../img/assets/fond-carte.jpg") center center / cover no-repeat;
}
/* Mots trop longs pour la colonne : coupure propre avec tiret */
.card-nom { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }

/* ==========================================================
   v20 : noms en gras partout, 2 lignes max, pastilles mobiles, CTA
   ========================================================== */
.card-nom { font-weight: 800; -webkit-line-clamp: 2; line-clamp: 2; }
.card-ville { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .card-nom { -webkit-line-clamp: 2; line-clamp: 2; }
  .card-title { height: 118px; }
  .card .pastille { top: 70px; }
}
/* Téléphone : pastilles 100 % réduites à ~80 % */
@media (max-width: 899px) {
  .card .pastille, .card--nonteste .pastille { width: 54px; height: 54px; right: -8px; top: 52px; }
  .pastille b { font-size: 12px; }
  .pastille b big { font-size: 18px; }
  .pastille--vg100 b { font-size: 18px; }
  .pastille small { font-size: 8px; }
}
/* CTA sous le chapeau ; plus petits et centrés sur ordinateur */
.cta-explorer { margin: 16px 0 22px; }
@media (min-width: 900px) {
  .cta-explorer { display: flex; justify-content: center; gap: 10px; }
  .cta-explorer .btn { width: auto; padding: 10px 20px; font-size: 14px; }
}
/* v20b : la pastille ne réduit plus la largeur du nom (seule la ville lui laisse la place) */
.card--pastille .card-title, .card-title { padding-right: 16px; }
.card--pastille .card-ville { padding-right: 50px; }
@media (min-width: 900px) {
  .card--pastille .card-title, .card-title { padding-right: 18px; }
  .card--pastille .card-ville { padding-right: 56px; }
  .card .pastille { top: 78px; }
  .cta-explorer .btn { white-space: nowrap; font-size: 13px; padding: 9px 16px; }
}
@media (max-width: 899px) {
  .card .pastille, .card--nonteste .pastille { top: 58px; }
}

/* ==========================================================
   v21 : police « Carter One » pour les titres (licence libre SIL OFL)
   Pour revenir à Open Sans : supprimer ce bloc.
   ========================================================== */
@font-face {
  font-family: "Carter One";
  src: url("../fonts/CarterOne.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
:root { --police-titres: "Carter One", "Open Sans", system-ui, sans-serif; }
.card-nom, .fiche h1, .fiche h2, .titre-vue, .a-titre {
  font-family: var(--police-titres);
  font-weight: 400;
  font-synthesis: none;   /* une seule graisse, déjà grasse : pas de faux gras */
  letter-spacing: .01em;
}

/* v22 : lignes de titres mieux équilibrées ; numéro de version */
.card-nom, .fiche h1 { text-wrap: balance; }
.version-site { text-align: center; font-size: 11px; color: var(--texte-doux); opacity: .7; margin: 0 0 14px; }

/* v23 : tablette (cartes plus larges) : titres et villes plus grands */
@media (min-width: 600px) and (max-width: 899px) {
  .card-title { height: 112px; padding: 18px 20px; }
  .card-nom { font-size: 24px; line-height: 1.15; }
  .card-ville { font-size: 14px; margin-top: auto; }
  .card--pastille .card-ville { padding-right: 60px; }
  .card .pastille, .card--nonteste .pastille { width: 68px; height: 68px; top: 74px; right: -10px; }
  .pastille b { font-size: 15px; }
  .pastille b big { font-size: 22px; }
  .pastille--vg100 b { font-size: 22px; }
  .pastille small { font-size: 10px; }
}
/* v24 : « Ce que l'on a testé » sans photo */
.teste { display: block; padding: 12px 14px; border-left: 4px solid var(--bleu); }
.fiche--nonteste .teste { border-left-color: var(--non-teste); }

/* ---- v25 : message d'erreur des formulaires ---- */
.msg-erreur { background: #fff; border: 2px solid #c0392b; color: #c0392b; border-radius: 14px; padding: 14px; font-weight: 600; margin-top: 14px; }

/* ---- v26 : contenu de secours lisible par Google (remplacé par le site au chargement) ---- */
.seo-lieu { color: var(--texte, #333); line-height: 1.5; }
.seo-lieu h1 { font-family: "Carter One", sans-serif; color: var(--bleu); font-weight: 400; font-size: 26px; margin: 0 0 8px; }
.seo-lieu h2, .seo-lieu h3 { color: var(--bleu); font-size: 17px; margin: 18px 0 6px; }
.seo-lieu a { color: var(--bleu); }

/* ---- v27 : dates en bas de la fiche ---- */
.fiche-dates { margin: 18px 0 0; font-size: 12px; color: var(--texte-doux, #777); text-align: center; }

/* ---- v31 : quadrillage sur toutes les cartes (lieux testés et « à tester ») ---- */
.card--nonteste::before { filter: none; }
.card--nonteste, .card--nonteste:hover { box-shadow: none; }

/* Pastilles 100 % : dessin recoloré dans la couleur du tag (100% Végan / 100% Végé, réglable dans le backoffice) */
.card .pastille--vegan100 { background-image: var(--pastille-vegan100, url("../img/assets/pastille.png")); color: var(--pastille-texte-vegan100, #fff); }
.card .pastille--vg100 { background-image: var(--pastille-vg100, url("../img/assets/pastille.png")); color: var(--pastille-texte-vg100, #fff); }

/* ---- v30 : ordinateur — panneau à 50 % de la largeur pour ne pas compresser les cartes,
   sans dépasser 760 px (sinon cartes géantes sur grand écran), et jamais moins d'un tiers ---- */
@media (min-width: 900px) and (min-height: 541px) {
  .app, .app.map-large { grid-template-columns: minmax(0, 1fr) max(33.333vw, min(50vw, 760px)); }
}

/* ---- v32 : galerie de photos dans la fiche (photos 2, 3…), défilement horizontal ---- */
.galerie {
  display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px 22px 0; padding: 4px 16px 10px 0;
  scrollbar-width: thin;
}
@media (min-width: 900px) { .galerie { margin-right: -30px; padding-right: 30px; } }
.galerie-photo {
  flex: 0 0 min(62%, 420px); aspect-ratio: 1 / 1;
  border-radius: 16px; overflow: hidden; scroll-snap-align: start;
  background: var(--bleu-clair);
}
@media (hover: hover) and (pointer: fine) { .galerie { cursor: grab; user-select: none; } }
.galerie.is-glisse { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.galerie img { pointer-events: none; -webkit-user-drag: none; }
/* Pin « à tester » : point d'interrogation dessiné */
.pin--a-tester img { height: 46px; max-width: 40px; }
