/* =============================================================================
   SE RENSEIGNER — PAGE D'ACCUEIL (refonte v2)
   Page : se_renseigner_home_v2.php  (/villes-et-quartiers/se-renseigner/)

   Chargé APRÈS /css/v2/home-refonte.css, dont il réutilise les variables
   (--hv3-*) et les composants (.hv3-search, .hv3-btn, .hv3-cta-band…).
   Les classes propres à cette page utilisent le préfixe .srh- ; les classes
   historiques du bandeau de clic (.se-renseigner-info-click-map*) sont
   conservées et restylées ici sous .srh-page.

   SOMMAIRE
   1. Réglages de page
   2. Section 1 — Recherche (hero)
   3. Séparateur "ou"
   4. Section 2 — Carte
   5. Section 3 — Régions
   6. Publicité
   7. Responsive
   ============================================================================= */


/* =============================================================================
   1. RÉGLAGES DE PAGE
   ============================================================================= */

.srh-page main.srh-main {
  background-size: 100% 900px;
}

.srh-section {
  position: relative;
  padding: 36px 0 64px;
}

.srh-section-head {
  margin-bottom: 30px;
}

.srh-c-city { color: var(--hv3-place); }
.srh-c-nbh  { color: #1DA5DE; }


/* =============================================================================
   2. SECTION 1 — RECHERCHE (HERO)
   ============================================================================= */

/* z-index : la liste de suggestions doit passer au-dessus de la carte
   (qui est confinée dans son propre contexte d'empilement, voir .srh-map-card) */
.srh-hero {
  position: relative;
  z-index: 5;
  padding: 20px 0 26px;
}

.srh-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

/* Titres : 25px sur toutes les résolutions (l'emporte sur les media queries
   de home-refonte.css grâce au préfixe .srh-page) */
.srh-page .srh-h1,
.srh-page .hv3-h2 {
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.3px;
}

.srh-h1 {
  font-weight: 800;
  color: var(--hv3-navy);
  margin: 0 0 22px;
}

.srh-h1-accent {
  background-image: linear-gradient(100deg, #0FA99B 0%, #22DAD2 60%, #3BE8B0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--hv3-place);
}

/* ---- Carte de recherche mise en avant ----
   Fond turquoise dégradé + bordure lumineuse + halo, pour que le champ
   ressorte nettement sur le fond clair de la page. */
.srh-search-card {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 22px 24px;
  border-radius: calc(var(--hv3-radius) + 6px);
}

.srh-search-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: #0B6F66;
}

.srh-search-label-ico {
  font-size: 17px;
  line-height: 1;
}

.srh-search {
  margin: 0;
}

.srh-search .hv3-search-field {
  height: 68px;
  border: 2px solid var(--hv3-place-bright);
  box-shadow: 0 14px 30px -16px rgba(15, 169, 155, .8);
}

.srh-search .hv3-search-field:focus-within {
  border-color: var(--hv3-place);
  box-shadow: 0 0 0 5px rgba(34, 218, 210, .28), 0 14px 30px -16px rgba(15, 169, 155, .8);
}

.srh-search .hv3-search-ico {
  width: 26px;
  height: 26px;
}

.srh-page .srh-search .hv3-search-input {
  font-size: 17px;
}

.srh-search .hv3-search-btn {
  height: 54px;
  padding: 0 28px;
  font-size: 16px;
}


/* =============================================================================
   3. SÉPARATEUR "OU"
   ============================================================================= */

.srh-or {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 420px;
  margin: 18px auto 0;
  padding: 0 20px;
}

.srh-or::before,
.srh-or::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(24, 20, 87, 0), rgba(24, 20, 87, .18), rgba(24, 20, 87, 0));
}

.srh-or span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--hv3-border);
  box-shadow: 0 10px 22px -16px rgba(24, 20, 87, .6);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hv3-muted);
}


/* =============================================================================
   4. SECTION 2 — CARTE
   ============================================================================= */

/* ---- Mode d'emploi ---- */
.srh-howto {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
}

.srh-howto li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 7px;
  border-radius: 100px;
  background: #FFFFFF;
  border: 1px solid var(--hv3-border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hv3-navy);
}

.srh-howto-num {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-image: var(--hv3-place-grad);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(6, 110, 102, .35);
}

/* ---- Cadre de la carte ---- */
/* z-index: 0 crée un contexte d'empilement : les calques Leaflet (z-index
   400 à 1000) ne peuvent ni passer sur le header fixe ni sur les suggestions. */
.srh-map-card {
  position: relative;
  z-index: 0;
  padding: 8px;
  border-radius: calc(var(--hv3-radius) + 8px);
  background: #FFFFFF;
  border: 1px solid var(--hv3-border);
  box-shadow: var(--hv3-shadow);
}

.srh-map {
  position: relative;
  width: 100%;
  height: 620px;
  border-radius: var(--hv3-radius);
  overflow: hidden;
  background: #EEF2F1;
  font-family: inherit;
}

/* Plein écran : plus d'arrondi */
.srh-map.leaflet-fullscreen-on,
.srh-map:fullscreen {
  border-radius: 0;
}

/* Curseur "viseur" : un clic = une téléportation */
.srh-page .srh-map.leaflet-container {
  cursor: crosshair;
}

.srh-page .leaflet-dragging .srh-map.leaflet-container {
  cursor: grabbing;
}

.srh-page .srh-map.srh-is-redirecting.leaflet-container {
  cursor: progress;
}

/* Contrôles Leaflet un peu plus modernes */
.srh-map .leaflet-bar {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px -14px rgba(24, 20, 87, .7);
}

.srh-map .leaflet-bar a {
  width: 36px;
  height: 36px;
  line-height: 36px;
  color: var(--hv3-navy);
  border-bottom-color: var(--hv3-border);
}

.srh-map .leaflet-bar a:hover {
  background: var(--hv3-soft);
  color: var(--hv3-navy);
}

.srh-map .leaflet-control-zoom-fullscreen {
  background-position: 6px 6px;
}

/* Attribution et contrôles du bas au-dessus de la barre POI (58 px) */
.srh-map .leaflet-bottom {
  bottom: 58px;
}

/* ---- Bandeau d'aide au clic (classes historiques conservées) ---- */
.srh-page .se-renseigner-info-click-map {
  position: absolute;
  z-index: 800;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  width: calc(100% - 140px);
  max-width: 520px;
  pointer-events: none;   /* le clic traverse le bandeau jusqu'à la carte */
  text-align: center;
}

.srh-page .se-renseigner-info-click-map-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 11px 20px 12px;
  border-radius: 18px;
  background: rgba(24, 20, 87, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 16px 32px -18px rgba(24, 20, 87, .9);
  color: #FFFFFF;
}

.srh-click-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
}

.srh-click-sub {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(255, 255, 255, .78);
}

.srh-page .se-renseigner-info-click-map-box-ville,
.srh-page .se-renseigner-info-click-map-box-quartier {
  display: inline-block;
  margin-left: 2px;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.srh-page .se-renseigner-info-click-map-box-ville {
  color: #073F3A;
  background: #3BE8B0;
}

.srh-page .se-renseigner-info-click-map-box-quartier {
  color: #FFFFFF;
  background: #1DA5DE;
}

/* Ville ou quartier selon le zoom (classe posée par se-renseigner-home.js) */
.srh-page .se-renseigner-info-click-map-box-quartier,
.srh-page .srh-mode-quartier .se-renseigner-info-click-map-box-ville {
  display: none;
}

.srh-page .srh-mode-quartier .se-renseigner-info-click-map-box-quartier {
  display: inline-block;
}

.srh-click-spin {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #3BE8B0;
  animation: hv3-spin .7s linear infinite;
}

/* L'avertissement de zoom de la barre POI passe sous le bandeau d'aide */
.srh-map .lpb-zoom-warning {
  top: 92px;
}

/* Barre POI centrée sur desktop et tablette (alignée à gauche sur mobile).
   margin: auto plutôt que justify-content: center : si les catégories
   débordent, les marges automatiques tombent à 0 et la barre reste
   entièrement scrollable depuis la gauche. */
@media (min-width: 768px) {
  .srh-map .lpb-categories {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---- Point cliqué (pendant la redirection) ---- */
.srh-pin {
  position: relative;
}

.srh-pin-dot,
.srh-pin-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.srh-pin-dot {
  inset: 4px;
  background: var(--hv3-match);
  border: 3px solid #FFFFFF;
  box-shadow: 0 4px 10px rgba(24, 20, 87, .45);
}

.srh-pin-pulse {
  background: rgba(255, 28, 96, .35);
  animation: srh-pin-pulse 1.2s ease-out infinite;
}

@keyframes srh-pin-pulse {
  from { transform: scale(.6); opacity: 1; }
  to   { transform: scale(2.6); opacity: 0; }
}

/* ---- Aide "Ctrl + molette" ---- */
.srh-wheel-hint {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 20, 87, .45);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}

.srh-map.srh-show-wheel-hint .srh-wheel-hint {
  opacity: 1;
}

.srh-wheel-hint kbd {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--hv3-navy);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}

.srh-map-noscript {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--hv3-muted);
}


/* =============================================================================
   5. SECTION 3 — RÉGIONS
   ============================================================================= */

.srh-regions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.srh-region {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  aspect-ratio: 16 / 10;
  padding: 18px 18px 16px;
  border-radius: var(--hv3-radius-sm);
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  background: var(--hv3-navy);
  box-shadow: var(--hv3-shadow-sm);
  transition: transform var(--hv3-ease), box-shadow var(--hv3-ease);
}

.srh-region:hover,
.srh-region:focus-visible {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--hv3-shadow);
}

.srh-region-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}

.srh-region:hover .srh-region-img { transform: scale(1.06); }

/* Voile dégradé : garantit la lisibilité du nom quelle que soit la photo */
.srh-region::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(24, 20, 87, 0) 30%, rgba(24, 20, 87, .82) 100%);
  transition: background var(--hv3-ease);
}

.srh-region:hover::after {
  background: linear-gradient(180deg, rgba(24, 20, 87, .1) 10%, rgba(24, 20, 87, .9) 100%);
}

.srh-region-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.srh-region-name {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.2px;
  color: #FFFFFF;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}

.srh-region-old {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, .78);
}

.srh-region-go {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 700;
  transition: background var(--hv3-ease), color var(--hv3-ease), transform var(--hv3-ease);
}

.srh-region:hover .srh-region-go {
  background: #FFFFFF;
  color: var(--hv3-place);
  transform: translateX(3px);
}


/* =============================================================================
   6. PUBLICITÉ
   ============================================================================= */

.srh-ads {
  margin: 10px auto 0;
  padding: 12px;
  max-width: 970px;
  border-radius: var(--hv3-radius-sm);
  background: var(--hv3-soft);
  border: 1px solid var(--hv3-border);
  text-align: center;
}

.srh-ads-title {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--hv3-muted);
}


/* =============================================================================
   7. RESPONSIVE
   ============================================================================= */

@media (max-width: 1199px) {
  .srh-map { height: 560px; }
}

@media (max-width: 991px) {
  .srh-map { height: 500px; }
}

@media (max-width: 767px) {
  .srh-page main.srh-main { background-size: 100% 700px; }

  .srh-section { padding: 28px 0 48px; }
  .srh-section-head { margin-bottom: 22px; }

  .srh-search-card { padding: 16px 12px 16px; }
  .srh-search-label { font-size: 14.5px; margin-bottom: 12px; }
  .srh-search .hv3-search-field { height: 60px; }
  .srh-search .hv3-search-btn { height: 46px; padding: 0 18px; }

  .srh-howto { flex-direction: column; align-items: stretch; }
  .srh-howto li { border-radius: 16px; }

  .srh-map-card { padding: 5px; border-radius: calc(var(--hv3-radius-sm) + 5px); }
  .srh-map { height: min(72vh, 480px); border-radius: var(--hv3-radius-sm); }

  /* Bandeau d'aide : à droite des boutons de zoom */
  .srh-page .se-renseigner-info-click-map {
    top: 10px;
    left: 56px;
    right: 10px;
    width: auto;
    transform: none;
  }
  .srh-page .se-renseigner-info-click-map-box { padding: 8px 12px 9px; border-radius: 14px; }
  .srh-click-title { font-size: 12.5px; }
  .srh-click-sub { font-size: 11px; }

  .srh-map .leaflet-bottom { bottom: 48px; }  /* hauteur mobile de .lpb-bar */
  .srh-map .lpb-zoom-warning { top: 84px; }

  .srh-regions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .srh-region { aspect-ratio: 4 / 3; padding: 12px; }
  .srh-region-name { font-size: 15px; }
  .srh-region-old { font-size: 11px; }
  .srh-region-go { display: none; }
}

@media (max-width: 420px) {
  .srh-regions { grid-template-columns: 1fr; }
  .srh-region { aspect-ratio: 16 / 7; }
}

/* Appareils tactiles : l'aide molette n'a pas de sens sans souris */
@media (hover: none) {
  .srh-wheel-hint { display: none; }
}
