/* =========================================================
   HYROX — /hyrox/ et /hyrox/seance-essai/
   Fichier : assets/css/style-hyrox.css
   Chargé APRÈS style.css : utilise ses tokens (--green, --forest,
   --font-title…) et ses composants (.hero, .stats-band, .btn, .card,
   .section-header, .contact-grid). Ne contient que le spécifique HYROX.
   ========================================================= */

/* ---------- Commun ---------- */
.hx-lead { margin: 1rem 0 0; }
.hx-mb0 { margin-bottom: 0; }

.hx-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hx-actions--center { justify-content: center; margin-top: 2.5rem; }
.hx-actions .btn i { color: var(--green); }
.hx-actions .btn--green i { color: var(--black); }

.hx-tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--green-border);
  border-radius: var(--radius-sm);
  background: var(--green-dim);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
}

.hx-card--key { border-color: rgba(154,251,64,0.45); background: var(--green-dim); }

.hx-note { text-align: center; margin-top: 2rem; font-size: 0.95rem; }
.hx-note a { color: var(--green); text-decoration: underline; }

/* ---------- Hero ---------- */
.hx-hero .hero__content { max-width: 760px; }
.hx-hero h1 .accent { display: block; }

/* Overlay plus sombre que le hero par défaut du thème (0.62 → 0.08) */
.hx-hero .hero__bg::after {
  background: linear-gradient(105deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.50) 50%, rgba(0,0,0,0.25) 100%);
}

/* ---------- Prochaine échéance ---------- */
.hx-section-echeance { padding-block: clamp(3rem, 6vw, 5rem); }

.hx-echeance {
  display: grid;
  grid-template-columns: 1.3fr auto 1.3fr;
  gap: 2rem;
  align-items: center;
  padding: 2.25rem 2.5rem;
  border: 2px solid var(--green);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--green-dim) 0%, var(--forest) 75%);
}
.hx-echeance__nom { font-size: clamp(2rem, 3.6vw, 2.8rem); margin: 0.25rem 0 0.5rem; }
.hx-echeance__count {
  text-align: center;
  padding: 0 1.5rem;
  border-left: 1px solid var(--green-border);
  border-right: 1px solid var(--green-border);
}
.hx-echeance__n { font-family: var(--font-title); font-size: 4.5rem; font-weight: 700; line-height: 1; color: var(--green); }
.hx-echeance__l { font-family: var(--font-title); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white); }
.hx-echeance__cta p { margin-bottom: 1rem; }

/* ---------- Approche ---------- */
.hx .grid--split h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.hx-split__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
.hx-pillars { margin-top: 1.75rem; }
.hx-pillar { display: flex; gap: 1.25rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.hx-pillar:last-child { border-bottom: 0; }
.hx-pillar__n { flex-shrink: 0; width: 2.5rem; font-family: var(--font-title); font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--green); }
.hx-pillar h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.hx-pillar p { font-size: 0.95rem; }

/* ---------- Étapes essai ---------- */
.hx-step { text-align: center; }
.hx-step__n {
  width: 44px; height: 44px; margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--green); color: var(--black);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 1.2rem; font-weight: 700;
}
.hx-grid-narrow { max-width: 860px; margin-inline: auto; }

/* ---------- Vidéo + galerie ---------- */
.hx-video {
  position: relative; display: block;
  width: 100%; max-width: 1000px; margin: 0 auto;
  aspect-ratio: 16 / 9; border: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--grey); cursor: pointer;
}
.hx-video--iframe { cursor: auto; }
.hx-video img { width: 100%; height: 100%; object-fit: cover; }
.hx-video__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--green); color: var(--black);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; padding-left: 4px;
  transition: transform var(--transition);
}
.hx-video:hover .hx-video__play,
.hx-video:focus-visible .hx-video__play { transform: translate(-50%, -50%) scale(1.08); }

.hx-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; max-width: 1000px; margin: 1.5rem auto 0; }
.hx-gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }

/* ---------- Pour qui ---------- */
.hx-check { display: flex; flex-direction: column; gap: 0.75rem; }
.hx-check li {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--green-border); border-radius: var(--radius);
  color: var(--white); line-height: 1.55;
}
.hx-check li i { color: var(--green); margin-top: 0.3rem; }

/* ---------- FAQ (même rendu que .faq-item du thème, en <details>) ---------- */
.hx-faq { display: flex; flex-direction: column; }
.hx-faq__item { border-bottom: 1px solid rgba(255,255,255,0.08); }
.hx-faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.25rem 0;
  font-family: var(--font-title); font-weight: 700; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--white);
  transition: color var(--transition);
}
.hx-faq__item summary::-webkit-details-marker { display: none; }
.hx-faq__item summary:hover { color: var(--green); }
.hx-faq__icon {
  width: 24px; height: 24px; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; line-height: 1;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}
.hx-faq__item[open] .hx-faq__icon { transform: rotate(45deg); background: var(--green); border-color: var(--green); color: var(--black); }
.hx-faq__item p { padding-bottom: 1.25rem; font-size: 0.92rem; }
.hx-faq__item a { color: var(--green); text-decoration: underline; }

/* ---------- Contact ---------- */
.hx-map { margin-top: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--green-border); }

/* ---------- Page d'essai ---------- */
.hx-essai { padding-top: calc(var(--section) + 60px); }
.hx-widget {
  max-width: 760px; margin: 0 auto; min-height: 420px;
  padding: 1.5rem;
  border: 1px solid var(--green-border); border-radius: var(--radius-lg);
  background: var(--forest);
}
.hx-widget iframe { width: 100%; border: 0; }

/* ---------- Barre mobile HYROX ----------
   Même style que .sticky-mobile du thème, mais pointe vers l'essai HYROX.
   La barre générique du thème est masquée sur les pages HYROX. */
body.hx-page .sticky-mobile { display: none !important; }
.hx-sticky { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hx-echeance { grid-template-columns: minmax(0, 1fr); text-align: center; padding: 2rem 1.5rem; gap: 1.25rem; }
  .hx-echeance .btn { white-space: normal; }
  .hx-echeance__count { border: 0; border-top: 1px solid var(--green-border); border-bottom: 1px solid var(--green-border); padding: 1rem 0; }
}

@media (max-width: 768px) {
  /* Cadrage mobile du hero : décalé vers la droite de la photo.
     Sélecteur renforcé pour passer devant la règle du thème (70% center).
     Ajuste la 1re valeur : plus elle est haute, plus on voit la droite (100% = bord droit). */
  .hero.hx-hero:not(.hero--has-mobile) .hero__bg img { object-position: 45% center; }
  /* Sur mobile le texte couvre toute la largeur : overlay renforcé en bas, là où il se trouve */
  .hx-hero .hero__bg::after {
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.88) 100%);
  }

  .hx-split__img { max-width: 420px; margin-inline: auto; }
  .hx-gallery { grid-template-columns: repeat(2, 1fr); }
  .hx-actions { flex-direction: column; align-items: stretch; }
  .hx-actions .btn { white-space: normal; text-align: center; }
  .hx-widget { padding: 0.75rem; }

  .hx-sticky {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    gap: 0.75rem;
    padding: 0.75rem var(--pad) calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--black);
    border-top: 1px solid var(--green-border);
  }
  .hx-sticky.is-visible { display: flex; }
  .hx-sticky__call,
  .hx-sticky__cta {
    text-align: center; padding: 0.9rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-title); font-weight: 700; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.05em;
  }
  .hx-sticky__call { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: var(--white); }
  .hx-sticky__cta { flex: 2; background: var(--green); color: var(--black); }
}

@media (prefers-reduced-motion: reduce) {
  .hx-video__play, .hx-faq__icon { transition: none; }
}