/* Carte interactive — habillage sur les variables du design system CrocoBuilder. */
.rq-carte-lieux { --rq-carte-hauteur: 640px; display: flex; flex-direction: column; gap: 24px; font-family: var(--font-body); color: var(--bleu-nuit); }
.rq-carte__chargement, .rq-carte__aucun { padding: 26px 20px; color: var(--gris-texte); font-size: 16px; line-height: 24px; }

/* Pastille de catégorie : pictogramme blanc dans un rond de la couleur de la catégorie, le même partout —
   filtres, légende, liste et épingles de la carte, filtres et liste des annuaires (30/09/2026). Le diamètre se
   règle par --rq-pastille, le pictogramme en occupe la moitié. */
.rq-pastille-cat { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: var(--rq-pastille, 48px); height: var(--rq-pastille, 48px); border-radius: 50%; background: var(--rq-cat, var(--rouge)); }
.rq-pastille-cat img { display: block; width: 50%; height: 50%; filter: brightness(0) invert(1); }

/* Filtres de catégories : boutons compacts (pastille, nom, nombre), les mêmes sur la carte et dans les annuaires.
   Ils remplacent les grandes tuiles (30/09/2026, à la demande de Dorian après l’annuaire des associations). */
.rq-filtres-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-filtre-cat { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 5px; border: 1.5px solid var(--bordure); border-radius: 999px; background: var(--blanc); font-family: var(--font-alt); font-weight: 700; font-size: 15px; line-height: 18px; color: var(--encre); text-align: left; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.rq-filtre-cat .rq-pastille-cat { --rq-pastille: 30px; }
.rq-filtre-cat__n { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--gris-texte); }
.rq-filtre-cat:hover { border-color: var(--encre); }
.rq-filtre-cat:focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }
.rq-filtre-cat.est-actif { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.rq-filtre-cat.est-actif .rq-filtre-cat__n { color: var(--blanc); opacity: .85; }
.rq-filtre-cat.est-actif .rq-pastille-cat { box-shadow: 0 0 0 2px var(--blanc); } /* la couleur reste, un liseré la détache du fond sombre */

/* Outils */
.rq-carte__outils { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.rq-carte__recherche { flex: 1; min-width: 260px; display: flex; align-items: center; height: 56px; padding: 0 22px; background: var(--blanc); border: 1px solid var(--bordure); border-radius: var(--radius-recherche); box-shadow: var(--ombre-recherche); }
.rq-carte__recherche input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--encre); }
/* Focus visible (04/10/2026, audit RGAA 10.7) : le champ n’a pas de contour (outline: 0 ci-dessus, la boîte
   tient lieu de champ) et rien ne changeait à la prise de focus, sur la carte comme dans les deux annuaires.
   Le contour passe sur la boîte entière (rouge sur blanc : 5,69:1). */
.rq-carte__recherche:focus-within { outline: 2px solid var(--rouge); outline-offset: 2px; }
.rq-carte__filtre { cursor: pointer; height: 56px; padding: 0 20px; background: var(--blanc); color: var(--encre); border: 2px solid var(--encre); border-radius: var(--radius-btn); font-family: var(--font-alt); font-weight: 700; font-size: 16px; }
.rq-carte__filtre[aria-pressed="true"] { background: var(--encre); color: var(--blanc); }
.rq-carte__reinit { cursor: pointer; height: 56px; padding: 0 12px; border: 0; background: transparent; color: var(--gris-texte); font: inherit; font-size: 16px; text-decoration: underline; text-underline-offset: 3px; }

/* Grille carte + panneau */
.rq-carte__grille { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; height: var(--rq-carte-hauteur); }
.rq-carte-lieux--compact .rq-carte__grille { grid-template-columns: minmax(0, 1fr); }
.rq-carte-lieux--compact .rq-carte__panneau { display: none; }
.rq-carte__fond { position: relative; background: var(--brume); box-shadow: var(--ombre-carte); }
.rq-carte__leaflet { position: absolute; inset: 0; z-index: 1; font-family: var(--font-body); }
.rq-carte__legende { position: absolute; left: 16px; bottom: 34px; top: auto; z-index: 2; margin: 0; padding: 12px 14px; list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: calc(100% - 96px); overflow: auto; background: var(--blanc); box-shadow: var(--ombre-carte); font-size: 14px; line-height: 18px; }
.rq-carte__legende li { display: flex; align-items: center; gap: 8px; }
.rq-carte__vues { position: absolute; right: 16px; bottom: 16px; z-index: 2; display: flex; gap: 6px; }
.rq-carte__vues button { cursor: pointer; height: 40px; padding: 0 14px; background: var(--blanc); border: 0; box-shadow: var(--ombre-carte); font-family: var(--font-alt); font-weight: 700; font-size: 15px; color: var(--encre); }
/* Sous 375 px (04/10/2026, audit d’affichage) : les deux boutons font 304 px pour une carte de 288 px ancrée
   à 16 px du bord, « Centre-village » sortait de la carte à gauche. Ils se partagent toute la largeur, en 14 px. */
@media (max-width: 374px) {
  .rq-carte__vues { left: 8px; right: 8px; bottom: 40px; } /* au-dessus de la mention « © OpenStreetMap », sur deux lignes à cette largeur */
  .rq-carte__vues button { flex: 1 1 auto; min-width: 0; padding: 0 8px; font-size: 14px; white-space: nowrap; }
}

/* Épingles */
.rq-carte__pin-wrap { background: transparent; border: 0; }
.rq-carte__pin { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(13, 26, 51, .35); cursor: pointer; transition: transform 150ms; }
.rq-carte__pin img { width: 18px; height: 18px; transform: rotate(45deg); filter: brightness(0) invert(1); }
.rq-carte__pin.est-actif { transform: rotate(-45deg) scale(1.25); }

/* Panneau liste */
.rq-carte__panneau { display: flex; flex-direction: column; min-height: 0; background: var(--blanc); box-shadow: var(--ombre-carte); overflow: auto; }
.rq-carte__liste-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--bordure); font-family: var(--font-alt); font-weight: 700; font-size: 15px; letter-spacing: .6px; color: var(--encre); }
.rq-carte__liste-tete label { font-family: var(--font-body); font-weight: 400; letter-spacing: 0; color: var(--gris-texte); display: flex; align-items: center; gap: 8px; }
.rq-carte__liste-tete select { height: 32px; border: 1px solid var(--bordure-champ, #78869E); border-radius: var(--radius-btn); font: inherit; color: var(--encre); background: var(--blanc); }
.rq-carte__liste { list-style: none; margin: 0; padding: 0; }
.rq-carte__item { cursor: pointer; width: 100%; text-align: left; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; background: var(--blanc); border: 0; border-bottom: 1px solid var(--bordure); font-family: var(--font-body); }
.rq-carte__item:hover, .rq-carte__item.est-survole { background: var(--brume); }
.rq-carte__item-icone { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.rq-carte__item-icone img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.rq-carte__item-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rq-carte__item-nom { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 20px; color: var(--encre); }
.rq-carte__item-sous { font-size: 14px; line-height: 20px; color: var(--gris-texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-carte__item-droite { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 14px; font-weight: 700; color: var(--encre); }
.rq-carte__point { width: 10px; height: 10px; border-radius: 50%; }
.est-ouvert { background: #3F7D3A; } .est-ferme { background: var(--gris-neutre); } .est-inconnu { background: var(--bleu-nuit); }
.rq-carte__etat { max-width: 100%; height: auto; min-height: 28px; padding: 3px 10px; line-height: 20px; }
.rq-carte__infos .rq-horaires { margin: 0; padding: 0; list-style: none; }
.rq-carte__infos .rq-horaires--fermetures { color: var(--rouge); }
.rq-carte__infos .rq-horaires__saison { margin: 6px 0 0; font-weight: 700; color: var(--encre); }
.rq-carte__infos .rq-horaires__note { margin: 4px 0 0; color: var(--gris-texte); }

/* Panneau détail */
.rq-carte__detail-media { position: relative; flex-shrink: 0; }
.rq-carte__detail-media img, .rq-carte__detail-vide { width: 100%; height: 200px; object-fit: cover; display: block; background: var(--brume); }
.rq-carte__retour { position: absolute; left: 12px; top: 12px; cursor: pointer; height: 36px; padding: 0 12px; background: var(--blanc); border: 0; box-shadow: var(--ombre-carte); font-family: var(--font-alt); font-weight: 700; font-size: 15px; color: var(--encre); }
.rq-carte__badge { position: absolute; left: 0; bottom: -12px; color: var(--blanc); font-family: var(--font-alt); font-weight: 700; font-size: 14px; letter-spacing: .8px; padding: 5px 10px; }
.rq-carte__detail-corps { padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.rq-carte__detail-nom { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 30px; color: var(--encre); }
.rq-carte__etiquettes { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
/* min-height et non height : une note longue (« Selon le programme de la fête votive… ») passe à la ligne au lieu de déborder. */
.rq-carte__etat, .rq-carte__pmr { display: inline-flex; align-items: center; min-height: 28px; box-sizing: border-box; padding: 4px 10px; line-height: 20px; color: var(--blanc); font-family: var(--font-alt); font-weight: 700; font-size: 14px; }
.rq-carte__pmr { background: var(--bleu-nuit); }
.rq-carte__detail-desc { margin: 0; font-size: 16px; line-height: 24px; }
.rq-carte__infos { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 22px; }
.rq-carte__infos div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.rq-carte__infos dt { font-weight: 700; color: var(--encre); } .rq-carte__infos dd { margin: 0; }
.rq-carte__itineraire { display: flex; align-items: center; justify-content: center; height: 52px; background: var(--noir-doux); border-radius: var(--radius-btn); font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--blanc); text-decoration: none; }
.rq-carte__fiche, .rq-carte__lien a { font-size: 16px; font-weight: 700; color: var(--encre); text-decoration: none; }
.rq-carte__credit, .rq-carte__lien { margin: 0; font-size: 14px; color: var(--gris-texte); }

@media (max-width: 1455px) { .rq-carte__grille { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 767px) {
  .rq-carte__grille { grid-template-columns: minmax(0, 1fr); height: auto; }
  .rq-carte__fond { height: min(58vh, 460px); min-height: 320px; }
  /* La liste des lieux suit le fil de la page : avec son propre défilement, le doigt
     restait prisonnier du panneau et ne pouvait plus remonter vers le haut de la page. */
  .rq-carte__panneau { max-height: none; overflow: visible; }
  /* 16 px minimum sur les champs, sinon Safari sur iPhone zoome à la mise au point. */
  .rq-carte__liste-tete select { height: 38px; font-size: 16px; }
  .rq-carte__legende { display: none; }
  .rq-filtre-cat { font-size: 14px; padding-right: 12px; }
  .rq-carte__filtre { height: 44px; padding: 0 14px; font-size: 15px; }
}

/* ---- Catégories en liste déroulante (téléphone) ----
   Même en boutons compacts, les onze filtres prennent trop de place sur un petit écran : un bouton déroule la liste et on
   coche ce qu’on veut voir. Le déroulant n’existe qu’ici, les boutons restent au-dessus. */
.rq-carte__deroulant { display: none; position: relative; }
.rq-carte__deroulant-bouton { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--encre); border-radius: var(--radius-btn); background: var(--blanc); font-family: var(--font-alt); font-weight: 700; font-size: 15px; color: var(--encre); cursor: pointer; }
.rq-carte__deroulant-bouton::after { content: ""; width: 10px; height: 10px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 150ms ease; }
.rq-carte__deroulant-bouton[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-4px, -4px); }
.rq-carte__deroulant-etat { font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--gris-texte); }
.rq-carte__deroulant-panneau { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 60vh; overflow-y: auto; padding: 6px; background: var(--blanc); border: 1px solid var(--bordure); border-radius: var(--radius-btn); box-shadow: var(--ombre-panneau); }
.rq-carte__deroulant-ligne { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; cursor: pointer; }
.rq-carte__deroulant-ligne input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--rouge); }
.rq-carte__deroulant-nom { flex: 1; min-width: 0; font-family: var(--font-alt); font-weight: 700; font-size: 15px; color: var(--encre); }
.rq-carte__deroulant-ligne em { font-style: normal; font-size: 13px; color: var(--gris-texte); }
.rq-carte__deroulant-tout { width: 100%; min-height: 44px; margin-top: 4px; border: 0; border-top: 1px solid var(--bordure); background: none; font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--encre); cursor: pointer; }
.rq-carte__deroulant-tout[disabled] { color: var(--gris-neutre); cursor: default; }

@media (max-width: 767px) {
  .rq-carte__cats { display: none; }
  .rq-carte__deroulant { display: block; }
}

/* ---- Barre d’outils : un seul habillage pour la recherche, les filtres et le déroulant ----
   Trois styles se côtoyaient : recherche sans bordure mais avec ombre, filtres à bordure de
   2 px, déroulant à bordure de 1,5 px. Tout passe à la même bordure, la même hauteur et le
   même rayon ; l’ombre est réservée aux panneaux qui flottent au-dessus du reste. */
:root {
  --rq-ico-pmr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14' cy='4' r='1.8'/%3E%3Cpath d='M12.5 7.5v4.5h4.5l2.5 5.5'/%3E%3Cpath d='M12.5 10h4'/%3E%3Ccircle cx='11' cy='16' r='5.5'/%3E%3C/svg%3E");
  --rq-ico-position: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3C/svg%3E");
}
.rq-carte__outils { gap: 10px; }
.rq-carte__recherche { height: 48px; padding: 0 16px; border: 1.5px solid var(--encre); border-radius: var(--radius-btn); box-shadow: none; }
.rq-carte__filtre { height: 48px; padding: 0 16px; border-width: 1.5px; font-size: 15px; }
.rq-carte__reinit { height: 48px; }
.rq-carte__deroulant-bouton { height: 48px; min-height: 0; }

/* Les deux filtres à icône : même boîte que les autres, carrée. */
.rq-carte__filtre--icone { width: 48px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rq-carte__court { display: none; }
.rq-carte__ico { width: 22px; height: 22px; background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.rq-carte__ico--pmr { -webkit-mask-image: var(--rq-ico-pmr); mask-image: var(--rq-ico-pmr); }
.rq-carte__ico--position { -webkit-mask-image: var(--rq-ico-position); mask-image: var(--rq-ico-position); }
.rq-carte__filtre[data-etat="attente"] .rq-carte__ico { opacity: .5; }
.rq-carte__filtre[data-etat="ok"] { background: var(--encre); color: var(--blanc); }
.rq-carte__filtre[data-etat="echec"] { border-color: var(--gris-neutre); color: var(--gris-neutre); }


@media (max-width: 767px) {
  /* Un seul écart entre toutes les commandes : le bloc « catégories » était séparé de la
     recherche par les 24 px de la colonne, les filtres par 8 px seulement. */
  .rq-carte-lieux { gap: 10px; }
  /* La recherche occupe sa ligne ; les quatre commandes se partagent la suivante :
     deux libellés resserrés et deux icônes carrées. */
  .rq-carte__outils { gap: 10px; flex-wrap: wrap; }
  .rq-carte__recherche { flex: 1 1 100%; min-width: 0; }
  .rq-carte__filtre { flex: 0 1 auto; padding: 0 10px; font-size: 14px; white-space: nowrap; }
  .rq-carte__filtre--icone { flex: 0 0 48px; padding: 0; }
  .rq-carte__filtre[data-filtre="ouvert"] { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .rq-carte__reinit { flex: 0 0 auto; padding: 0 2px; font-size: 14px; }
  /* « Ouvert maintenant » prenait 238 px à lui seul : le libellé court laisse la place à
     « Réinitialiser » sur la même ligne. Le nom complet reste dans aria-label. */
  .rq-carte__long { display: none; }
  .rq-carte__court { display: inline; }
}
