/* ══════════════════════════════════════════════════════════════════════
   GLOBAL — styles transversaux à toutes les pages ASAPH
   Chargé sans condition après asaph-child-style.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Navbar transparente (hero overlay) ──────────────────────────────────
   Active sur toute page portant la body-class ast-theme-transparent-header.
   Astra injecte cette class via le Customizer (pages configurées) ou via
   add_filter('body_class') dans functions.php pour les pages custom.
   La règle est intentionnellement générique — ne pas scoper par page.       */
.ast-theme-transparent-header #masthead {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
}

/* ── Sélection texte ──────────────────────────────────────────────────── */
::selection {
  background: rgba(125, 191, 120, 0.28);
  color: var(--clr-primary-dark, #2c4a28);
}

/* ── Scrollbar webkit ─────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(125, 191, 120, 0.4);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-primary, #7dbf78);
}

/* ── Skip-to-content (accessibilité clavier) ──────────────────────────── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  z-index: 99999;
  padding: 0.625rem 1.25rem;
  background: var(--clr-primary-dark, #2c4a28);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus {
  top: 0;
}

/* ── Classe de masquage unifiée ──────────────────────────────────────────
   .is-hidden est la seule classe autorisée pour masquer un élément.
   NE PAS créer de variantes (*--hidden, *-hidden) dans les composants.    */
.is-hidden {
  display: none !important;
}

/* ── [hidden] — certains navigateurs ne le masquent pas nativement ──────── */
[hidden] {
  display: none !important;
}

/* ── Carte de localisation footer (CSS) ─────────────────────────────── */
.asaph-map-card {
  position: relative;
  width: 100%;
  min-height: 180px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(20, 40, 20, 0.9) 0%, rgba(30, 55, 30, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grille CSS simulant un fond carte */
.asaph-map-card__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(125, 191, 120, 0.06) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(125, 191, 120, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

.asaph-map-card__grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(15, 30, 15, 0.6) 100%
  );
}

.asaph-map-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 2rem;
  text-align: center;
}

.asaph-map-card__pin {
  width: 48px;
  height: 48px;
  background: rgba(125, 191, 120, 0.2);
  border: 1px solid rgba(125, 191, 120, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-primary, #7dbf78);
  flex-shrink: 0;
}

.asaph-map-card__pin svg {
  width: 24px;
  height: 24px;
}

.asaph-map-card__address {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.asaph-map-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: rgba(125, 191, 120, 0.15);
  border: 1px solid rgba(125, 191, 120, 0.35);
  border-radius: 20px;
  color: var(--clr-primary, #7dbf78) !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.asaph-map-card__btn:hover {
  background: rgba(125, 191, 120, 0.28);
  border-color: rgba(125, 191, 120, 0.6);
  color: #fff !important;
}

/* ── Impression ───────────────────────────────────────────────────────── */
@media print {
  .asaph-navbar,
  #masthead,
  .asaph-footer,
  #colophon,
  #bl-modal,
  .cookie-banner,
  .bl-filter-bar {
    display: none !important;
  }

  body::before {
    display: none !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}
