/* ============================================
   HUB/HUB-EVENT.CSS — Styles spécifiques du Hub Événement (pattern D)
   Charge sur : template-hub-event.php (après hub/shared.css)
   Sections couvertes :
     1. .hub-hero / .hub-hero--event       — Hero éditorial pleine largeur 85vh
     3. .hub-event__formules / .formule-card — Grille des formules (3 cards)
     4. .hub-event__methode / .hub-event__step — Méthode étapes 01..04
     7. .hub-event__maillage / .hub-event__region — Maillage géographique
     8. .hub-event__cta                    — CTA final (sur .bg-teal)
   ============================================ */

/* ════════════════════════════════════════════
   1. HERO ÉDITORIAL (section 1)
   ════════════════════════════════════════════ */

.hub-hero {
  position: relative;
  width: 100%;
  min-height: 85svh; /* svh évite le saut de l'URL bar iOS */
  display: flex;
  align-items: flex-end;
  color: var(--surface-default);
  padding-block: var(--space-3xl) var(--space-2xl);
  overflow: hidden;
  isolation: isolate;
}

@supports not (height: 1svh) {
  .hub-hero { min-height: 85vh; }
}

.hub-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Le wrapper <picture> (jumeaux AVIF) doit remplir le bloc média, sinon le
   height:100% de l'img se résout contre un parent en hauteur auto et l'image
   retombe sur son ratio intrinsèque (hero mobile aux 3/4 vide). */
.hub-hero__media picture {
  position: absolute;
  inset: 0;
  display: block;
}

.hub-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lisibilité des heros : CARTOUCHE TEAL SIGNATURE.
   Aucun voile sur l'image, aucun text-shadow — le bloc titre + texte est posé
   sur un rectangle plein en teal profond (le même --em-primary-dark que les
   bandeaux CTA, mécanisme 2 « inversion » de la DA). Image full-bleed révélée
   à 100 %, lisibilité garantie quel que soit le visuel. Règle commune heros
   hubs + heros landings (hub-event.css est chargé sur les deux). */
.hub-hero__veil {
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.hub-hero__copy,
.hero-landing__copy {
  background: var(--em-primary-dark);
  padding: clamp(32px, 4vw, 56px) clamp(28px, 4vw, 64px);
  width: min(640px, 100%);
}

.hub-hero__copy {
  max-width: 640px;
}

/* Dans le cartouche teal, le bouton principal passe en clair (parité avec les
   bandeaux CTA teal : bouton crème sur fond teal). */
.hub-hero__copy .btn--primary,
.hero-landing__copy .btn--primary {
  background: var(--em-bg);
  border-color: var(--em-bg);
  color: var(--em-primary-dark);
}

.hub-hero__copy .btn--primary:hover,
.hero-landing__copy .btn--primary:hover {
  background: color-mix(in oklch, var(--em-bg) 90%, var(--em-primary-dark));
  border-color: color-mix(in oklch, var(--em-bg) 90%, var(--em-primary-dark));
  color: var(--em-primary-dark);
}

@media (max-width: 767px) {
  .hub-hero__copy,
  .hero-landing__copy {
    padding: var(--space-lg) var(--space-md);
  }
}

.hub-hero__title {
  font-family: var(--font-serif);
  font-size: var(--t-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--em-bg);
  margin: var(--space-sm) 0 var(--space-md);
  max-width: none;
}

.hub-hero__title-line {
  display: block;
}

.hub-hero__title-complement {
  display: block;
  font-style: italic;
  font-weight: 300;
  color: var(--em-text-on-teal);
  margin-top: 0.25em;
  font-size: 0.78em;
}

.hub-hero__lead {
  font-family: var(--font-sans);
  font-size: var(--t-lead);
  font-weight: 400;
  line-height: 1.55;
  color: var(--em-bg);
  max-width: 560px;
  margin-bottom: var(--space-lg);
  opacity: 0.92;
}

.hub-hero__cta {
  margin-top: var(--space-sm);
}

/* ════════════════════════════════════════════
   3. LES FORMULES (section 3)
   ════════════════════════════════════════════ */

/* Alternance de fonds : intro crème → formules SABLE → méthode crème →
   ponctuation encre → FAQ crème → maillage sable → CTA teal. */
.hub-event__formules {
  background: var(--em-bg-alt);
}

.hub-event__formules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

/* Stagger via custom prop alimentée par le PHP */
.formule-card.reveal {
  transition-delay: calc(var(--stagger, 0) * var(--stagger-delay));
}

.formule-card {
  background: var(--em-bg); /* crème sur section sable */
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  border-top: 2px solid var(--em-primary);
  position: relative;
}

.formule-card__head {
  border-bottom: 1px solid rgba(43, 41, 38, 0.08);
  padding-bottom: var(--space-sm);
}

.formule-card__name {
  font-family: var(--font-serif);
  font-size: 1.625rem; /* 26px */
  font-weight: 600;
  line-height: 1.15;
  color: var(--em-text);
  margin: 0;
}

.formule-card__subtitle {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  color: var(--em-text-light);
  margin: 4px 0 0;
}

.formule-card__desc {
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--em-text-light);
  margin: 0;
}

.formule-card__inclus {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.formule-card__inclus li {
  position: relative;
  padding-left: 18px;
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--em-text);
}

.formule-card__inclus li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 1px;
  background: var(--em-accent-light);
}

.formule-card__meta {
  margin: auto 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(43, 41, 38, 0.08);
  display: grid;
  gap: 8px;
}

.formule-card__meta-row {
  /* Empilé label-au-dessus-de-valeur (spec sheet) : en flex space-between, le
     label « ACCOMPAGNEMENT » (capitales + tracking) écrasait la valeur en
     colonne étroite → texte cassé mot par mot. L'empilement ne casse jamais. */
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--t-small);
}

.formule-card__meta-row dt {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--em-text-muted);
  font-weight: 500;
}

.formule-card__meta-row dd {
  margin: 0;
  text-align: left;
  color: var(--em-text);
  font-style: italic;
}

.hub-event__formules-note {
  margin-top: var(--space-xl);
  text-align: center;
  font-size: var(--t-small);
  color: var(--em-text-muted);
  max-width: 720px;
  margin-inline: auto;
}

/* ════════════════════════════════════════════
   4. LA MÉTHODE (section 4)
   ════════════════════════════════════════════ */

.hub-event__methode.bg-creme {
  background: var(--em-bg);
}

.hub-event__steps {
  list-style: none;
  padding: 0;
  margin: var(--space-xl) 0 0;
  display: grid;
  gap: var(--space-lg);
}

.hub-event__step.reveal {
  transition-delay: calc(var(--stagger, 0) * 80ms);
}

.hub-event__step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-lg);
  align-items: start;
  padding-block: var(--space-md);
  border-top: 1px solid rgba(43, 41, 38, 0.1);
}

.hub-event__step:first-child {
  border-top: none;
  padding-top: 0;
}

.hub-event__step-num {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 1.5rem + 1.5vw, 3.25rem);
  font-weight: 300;
  line-height: 1;
  color: var(--em-primary);
  font-feature-settings: 'lnum';
}

.hub-event__step-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.hub-event__step-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--em-text);
  margin: 0;
  max-width: none;
}

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

.hub-event__step-descr {
  font-size: var(--t-body);
  line-height: 1.7;
  color: var(--em-text-light);
  margin: 0 0 var(--space-sm);
  max-width: 640px;
}

.hub-event__step-livrable {
  display: flex;
  gap: var(--space-sm);
  align-items: baseline;
  margin: 0;
  padding: 8px 0 0;
  font-size: var(--t-small);
  color: var(--em-text);
}

.hub-event__step-livrable-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--em-accent);
  white-space: nowrap;
}

.hub-event__step-livrable-text {
  font-style: italic;
}

/* ════════════════════════════════════════════
   7. MAILLAGE GÉOGRAPHIQUE (section 7)
   ════════════════════════════════════════════ */

.hub-event__regions {
  list-style: none;
  margin: var(--space-xl) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.hub-event__region.reveal {
  transition-delay: calc(var(--stagger, 0) * var(--stagger-delay));
}

.hub-event__region {
  padding: var(--space-md) 0;
  border-top: 2px solid var(--em-accent-light);
}

.hub-event__region-link {
  display: inline-block;
  color: var(--em-text);
  text-decoration: none;
}

.hub-event__region-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  color: var(--em-text);
  max-width: none;
  transition: var(--transition-color);
}

.hub-event__region-link:hover .hub-event__region-name {
  color: var(--em-primary);
}

.hub-event__region-desc {
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--em-text-light);
  margin: 0 0 var(--space-md);
}

.hub-event__region-villes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.hub-event__region-villes li {
  font-size: var(--t-small);
}

.hub-event__region-villes a {
  color: var(--em-primary);
  text-decoration: none;
  border-bottom: var(--border-base) solid transparent;
  transition: var(--transition-border);
}

.hub-event__region-villes a:hover {
  border-bottom-color: var(--em-primary);
}

/* ════════════════════════════════════════════
   8. CTA FINAL (section 8 — sur .bg-teal)
   ════════════════════════════════════════════ */

.hub-event__cta {
  padding-block: var(--space-2xl);
}

.hub-event__cta-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hub-event__cta-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 0.75rem + 4vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--em-bg);
  margin: var(--space-sm) auto var(--space-sm);
  max-width: 600px;
}

.hub-event__cta-lead {
  font-family: var(--font-sans);
  font-size: var(--t-lead);
  line-height: 1.6;
  color: var(--em-text-on-teal);
  max-width: 560px;
  margin: var(--space-md) auto var(--space-lg);
}

.hub-event__cta-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

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

@media (max-width: 1024px) {
  .hub-event__formules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hub-event__regions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  /* CTA empilés pleine largeur : en flex-wrap, les 2 boutons (clair + ghost) prenaient
     des largeurs inégales selon la longueur du label. Stack + stretch = rigueur. */
  .hub-event__cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hub-event__cta-actions .btn {
    width: 100%;
  }

  .hub-hero {
    min-height: 75svh;
    /* padding-top 3xl : le hero commence derrière le header opaque (~70px),
       avec 2xl (64px) l'overline affleurait le bord du header sur mobile. */
    padding-block: var(--space-3xl) var(--space-xl);
  }

  .hub-hero__title-complement {
    font-size: 0.85em;
  }

  .hub-event__formules-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .formule-card {
    padding: var(--space-md);
  }

  .hub-event__step {
    grid-template-columns: 64px 1fr;
    gap: var(--space-md);
  }

  .hub-event__step-num {
    font-size: 2rem;
  }

  .hub-event__regions {
    grid-template-columns: 1fr;
  }
}

/* ── CTA teal : hover en inversion (retour UX Partenaires) ──
   Repos : bouton ivoire plein, texte teal. Hover/focus : fond transparent,
   texte ivoire, liseré ivoire — la vraie bascule, pas un assombrissement. */
.hub-event__cta .btn--clair {
  border: 1px solid transparent;
  transition:
    background-color 0.3s var(--ease-editorial),
    color 0.3s var(--ease-editorial),
    border-color 0.3s var(--ease-editorial);
}

.hub-event__cta .btn--clair:hover,
.hub-event__cta .btn--clair:focus-visible {
  background: transparent;
  color: var(--ivoire-50, #faf7f3);
  border-color: color-mix(in oklch, var(--ivoire-50) 85%, transparent);
}
