/* ============================================
   HUB/HUB-GEO.CSS — Styles spécifiques du Hub Région (pattern E)
   Charge sur : template-hub-geo.php (après hub/shared.css)
   Sections couvertes :
     1. .hub-hero--geo                — Hero territorial (extension hub-hero)
     3. .hub-geo__matrice             — Matrice événements × villes (table)
     4. .hub-geo__testimonial         — Témoignage local (optionnel)
   CTA section 5 : réutilise hub-event.css (.hub-event__cta) appelé via hubs/event/cta.php.
   ============================================ */

/* ════════════════════════════════════════════
   1. HERO TERRITORIAL (extension de .hub-hero — base définie dans hub-event.css)
   ════════════════════════════════════════════ */

/* Voile geo supprimé — lisibilité assurée par le scrim localisé de
   .hub-hero__copy (hub-event.css), l'image se révèle en transparence. */
.hub-hero--geo .hub-hero__veil--geo {
  background: none;
}

/* ════════════════════════════════════════════
   3. MATRICE ÉVÉNEMENTS × VILLES (section 3)
   ════════════════════════════════════════════ */

/* Bascule sable : crée l'alternance de fonds du pattern
   (hero immersion → intro crème → matrice sable → FAQ crème → CTA teal). */
.hub-geo__matrice {
  background: var(--em-bg-alt);
}

.hub-geo__matrice-wrap {
  margin-top: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Indicateur de défilement (scroll-shadows) : ombres internes gauche/droite
     révélées quand le tableau déborde (tablette/mobile), masquées par des aplats
     --em-bg (= fond de section) en butée. Les cellules tbody étant transparentes,
     l'aplat se fond parfaitement → signale clairement qu'il reste des colonnes. */
  background:
    linear-gradient(to right, var(--em-bg-alt) 30%, transparent) left center / 40px 100% no-repeat,
    linear-gradient(to left, var(--em-bg-alt) 30%, transparent) right center / 40px 100% no-repeat,
    radial-gradient(farthest-side at 0 50%, color-mix(in oklch, var(--ivoire-900) 14%, transparent), transparent) left center / 16px 100% no-repeat,
    radial-gradient(farthest-side at 100% 50%, color-mix(in oklch, var(--ivoire-900) 14%, transparent), transparent) right center / 16px 100% no-repeat;
  background-attachment: local, local, scroll, scroll;
}

.hub-geo__matrice-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: var(--t-small);
}

.hub-geo__matrice-table th,
.hub-geo__matrice-table td {
  padding: var(--space-md) var(--space-sm);
  text-align: center;
  border-bottom: 1px solid rgba(43, 41, 38, 0.08);
  vertical-align: middle;
}

.hub-geo__matrice-table thead th {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--em-text-muted);
  font-size: var(--t-small);
  background: var(--em-bg); /* crème sur section sable (était sable sur crème) */
  border-bottom: 2px solid var(--em-primary);
}

.hub-geo__matrice-corner {
  text-align: left !important;
  background: transparent !important;
  border-bottom-color: rgba(43, 41, 38, 0.08) !important;
}

.hub-geo__matrice-city {
  text-align: left;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--em-text);
  white-space: nowrap;
  padding-right: var(--space-md);
}

.hub-geo__matrice-link {
  display: inline-block;
  font-size: var(--t-small);
  color: var(--em-primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-weight: var(--weight-medium);
  border-bottom: var(--border-base) solid transparent;
  padding: 4px 0;
  transition: var(--transition-border), var(--transition-color);
}

.hub-geo__matrice-link:hover {
  border-bottom-color: var(--em-primary);
  color: var(--em-primary-dark);
}

.hub-geo__matrice-empty {
  color: var(--em-text-muted);
  opacity: 0.5;
  font-size: var(--t-body);
}

.hub-geo__matrice-table tbody tr:hover {
  background: color-mix(in oklch, var(--em-primary) 4%, transparent);
}

.hub-geo__matrice-empty-state {
  margin-top: var(--space-lg);
  padding: var(--space-xl);
  background: var(--em-bg-alt);
  text-align: center;
}

.hub-geo__matrice-empty-state p {
  margin: 0;
  font-size: var(--t-body);
  color: var(--em-text-light);
  max-width: 560px;
  margin-inline: auto;
}

.hub-geo__matrice-empty-state a {
  color: var(--em-primary);
  border-bottom: 1px solid currentColor;
}

/* ════════════════════════════════════════════
   4. TÉMOIGNAGE LOCAL (section 4 — optionnel)
   ════════════════════════════════════════════ */

/* Ponctuation encre entre matrice (sable) et FAQ (crème) — registre citation. */
.hub-geo__testimonial {
  background: var(--ivoire-900);
}

.hub-geo__testimonial .hub-geo__testimonial-quote,
.hub-geo__testimonial .hub-geo__testimonial-author {
  color: var(--em-bg);
}

.hub-geo__testimonial .hub-geo__testimonial-role {
  color: color-mix(in oklch, var(--em-bg) 70%, transparent);
}

.hub-geo__testimonial-figure {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hub-geo__testimonial-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1rem + 1.5vw, 2.125rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.35;
  color: var(--em-text);
}

/* La citation vit dans un <p>, et base.css impose à TOUT p sa police sans, sa
   taille de corps et max-width: var(--container-text). Une règle directe bat
   l'héritage : sans ce bloc, le blockquote est bien en Cormorant 34px mais son
   paragraphe retombe en Hanken Grotesk 17px, plafonné à 640px et désaxé.
   Le défaut est resté invisible jusqu'au 02/08/2026 : les trois hubs avaient un
   'quote' vide, le gabarit sortait avant tout rendu, la section n'avait donc
   jamais été affichée. Cf. le piège p/li dans docs/reprise-agent.md. */
.hub-geo__testimonial-quote p {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  line-height: inherit;
  max-width: none;
}

.hub-geo__testimonial-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-md);
}

.hub-geo__testimonial-author {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--em-text);
  letter-spacing: 0.02em;
}

.hub-geo__testimonial-role {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--em-text-muted);
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

@media (max-width: 767px) {
  .hub-geo__matrice-table {
    font-size: 12px;
  }

  .hub-geo__matrice-table th,
  .hub-geo__matrice-table td {
    padding: var(--space-sm) 8px;
  }

  .hub-geo__matrice-city {
    font-size: 0.95rem;
  }

  .hub-geo__matrice-link {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}
