/* ══════════════════════════════════════════════════════════
   HERO « VITRINE » — page d'accueil
   Portage HTML/CSS du composant React HeroSection (shadcn) :
   badge + action, titre en dégradé, actions, maquette encadrée
   avec halo lumineux et fondu bas. Aucun build nécessaire.
   La typographie existante (.hero-title, .hero-desc…) est conservée.
   ══════════════════════════════════════════════════════════ */

.hero.hero-showcase {
  display: block;
  min-height: 0;
  padding: 8.5rem 1.5rem 3rem;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

/* ── Badge avec action ─────────────────────── */
.hero-showcase .hero-badge {
  margin-bottom: 0;
  gap: 0.75rem;
  text-decoration: none;
  transition:
    border-color var(--dur-fast, 180ms),
    background var(--dur-fast, 180ms),
    transform var(--dur-fast, 180ms);
}
.hero-showcase .hero-badge:hover {
  border-color: var(--violet);
  background: rgba(97, 48, 160, 0.14);
  transform: translateY(-1px);
}
body.dark .hero-showcase .hero-badge {
  color: #b994ea;
  border-color: rgba(185, 148, 234, 0.35);
}
body.dark .hero-badge-label::before {
  background: #b994ea;
}

/* Annule la règle d'origine « .hero-badge span » (pastille 6px) */
.hero-showcase .hero-badge span {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
}
.hero-badge-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.75;
}
.hero-badge-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
}
.hero-badge-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(97, 48, 160, 0.25);
}
.hero-badge-action::after {
  content: "→";
  transition: transform var(--dur, 320ms) var(--ease-out, ease);
}
.hero-showcase .hero-badge:hover .hero-badge-action::after {
  transform: translateX(3px);
}

/* ── Titre en dégradé (les accents gardent leur couleur) ── */
.hero-showcase .hero-title {
  margin-bottom: 0;
  background: linear-gradient(100deg, var(--texte) 30%, var(--texte-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-showcase .hero-title .accent-t {
  -webkit-text-fill-color: var(--jaune);
}
.hero-showcase .hero-title .accent-j {
  -webkit-text-fill-color: var(--violet);
}

.hero-showcase .hero-desc {
  margin: 0 auto;
  max-width: 560px;
}

.hero-showcase .hero-actions {
  justify-content: center;
  flex-wrap: wrap;
}

/* Variante « glow » du bouton secondaire */
.btn-ghost.btn-glow {
  background: var(--card-bg);
  box-shadow:
    0 0 0 1px rgba(61, 191, 184, 0.15),
    0 8px 28px rgba(61, 191, 184, 0.18);
}
.btn-ghost.btn-glow:hover {
  box-shadow:
    0 0 0 1px rgba(61, 191, 184, 0.4),
    0 12px 36px rgba(61, 191, 184, 0.3);
}

/* ── Chiffres clés : rangée centrée sous les actions ── */
.hero-showcase .hero-stats {
  position: static;
  order: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem 2rem;
  width: 100%;
  margin-top: 1.5rem;
  text-align: center;
}
.hero-showcase .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
/* Chiffres à chasse fixe : la largeur ne bouge pas pendant le comptage */
.hero-showcase .stat-num {
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── Titre de la vidéo ─────────────────────
   Typographie reprise de .action-tag et .action-featured h3 */
.mockup-heading {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 720px;
}
.mockup-heading .action-tag {
  margin-bottom: 0.5rem;
}
.mockup-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--texte);
  transition: color 0.35s;
}
.mockup-heading + .hero-mockup-wrap {
  margin-top: -1.5rem;
}

/* ── Maquette encadrée + halo ─────────────── */
.hero-mockup-wrap {
  position: relative;
  width: 100%;
  max-width: 1000px;
  padding-top: 2.5rem;
}

.mockup-frame {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0.5rem;
  border-radius: 1.25rem;
  background: color-mix(in srgb, var(--texte) 5%, transparent);
  border: 1px solid var(--bordure);
  opacity: 0;
  animation: hero-appear-zoom 0.7s 0.7s var(--ease-out, ease-out) forwards;
}

.mockup {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--bordure);
  box-shadow: 0 30px 60px -12px var(--shadow), 0 18px 36px -18px rgba(0, 0, 0, 0.25);
  line-height: 0;
  background: #000;
}
.mockup img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition:
    transform 0.8s var(--ease-out, ease),
    filter 0.5s;
}
.mockup-frame:hover .mockup img {
  transform: scale(1.03);
  filter: brightness(0.85);
}

.mockup-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  font-size: 1.4rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  transition:
    transform var(--dur, 320ms) var(--ease-spring, ease),
    background var(--dur, 320ms);
}
.mockup-frame:hover .mockup-play {
  transform: scale(1.12);
  background: var(--jaune);
}

/* Halo « mode ambiant » (portage de VideoAmbient) :
   YouTube interdit de lire les images d'une vidéo intégrée
   (iframe d'un autre domaine), donc le halo est une copie très
   floutée de la vignette, qui « respire » lentement. */
.mockup-ambient {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  top: 2.5rem;
  width: 100%;
  height: calc(100% - 2.5rem);
  object-fit: cover;
  border-radius: 1.25rem;
  pointer-events: none;
  filter: blur(60px) saturate(1.4);
  transform: scale(1.08);
  opacity: 0;
  animation:
    ambient-in 1s 1s var(--ease-out, ease-out) forwards,
    ambient-breathe 7s 2s ease-in-out infinite;
}
.hero-mockup-wrap.is-playing .mockup-ambient {
  filter: blur(70px) saturate(1.6);
}
body.dark .mockup-ambient {
  filter: blur(70px) saturate(1.6);
}

@keyframes ambient-in {
  to {
    opacity: 0.85;
  }
}
@keyframes ambient-breathe {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1.08);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.12);
  }
}

/* Lecteur YouTube chargé au clic */
.mockup-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.mockup-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Pendant la lecture : plus de fondu bas, la vidéo est entière */
.hero.hero-showcase.video-playing {
  -webkit-mask-image: none;
  mask-image: none;
  padding-bottom: 3rem;
}
.mockup-frame.is-playing {
  opacity: 1;
  animation: none;
}

@keyframes hero-appear-zoom {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 900px) {
  .hero.hero-showcase {
    padding: 7rem 1.25rem 0;
  }
  .hero-inner {
    gap: 1.4rem;
  }
}

@media (max-width: 600px) {
  .hero-showcase .hero-badge {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-mockup-wrap {
    padding-top: 1.5rem;
  }
  .mockup-ambient {
    top: 1.5rem;
    height: calc(100% - 1.5rem);
    filter: blur(40px) saturate(1.4);
  }
  .mockup-frame {
    padding: 0.3rem;
    border-radius: 0.9rem;
  }
  .mockup-play {
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    font-size: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mockup-frame {
    opacity: 1;
    animation: none;
  }
  .mockup-ambient {
    opacity: 0.85;
    animation: none;
  }
}

/* ══════════════════════════════════════════════════════════
   EN-TÊTE « HERO » (design épuré, typographie Inter)
   Formes en dégradé floutées en haut et en bas, pastille
   d'annonce, grand titre semi-gras centré, bouton + lien texte.
   ══════════════════════════════════════════════════════════ */

/* Les halos ronds d'origine laissent la place aux formes */
.hero.hero-showcase::before,
.hero.hero-showcase::after {
  display: none;
}
.hero.hero-showcase {
  isolation: isolate;
  padding-top: 9rem;
}
.hero.hero-showcase .hero-inner {
  position: relative;
  z-index: 2;
  gap: 2rem;
}

/* Formes en dégradé (même découpe que le composant) */
.hero-blob {
  position: absolute;
  inset-inline: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  filter: blur(64px);
  transform: translateZ(0);
}
.hero-blob > div {
  position: relative;
  aspect-ratio: 1155 / 678;
  width: 36rem;
  max-width: none;
  opacity: 0.32;
  background: linear-gradient(to top right, var(--jaune), var(--violet));
  clip-path: polygon(
    74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%,
    52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%,
    76.1% 97.7%, 74.1% 44.1%
  );
}
.hero-blob-top {
  top: -10rem;
}
.hero-blob-top > div {
  left: calc(50% - 11rem);
  transform: translateX(-50%) rotate(30deg);
  animation: blob-drift 16s ease-in-out infinite alternate;
}
.hero-blob-bottom {
  top: 34rem;
}
.hero-blob-bottom > div {
  left: calc(50% + 3rem);
  transform: translateX(-50%);
  background: linear-gradient(to top right, var(--turquoise), var(--violet));
  animation: blob-drift 18s ease-in-out infinite alternate-reverse;
}
@media (min-width: 640px) {
  .hero-blob-top {
    top: -20rem;
  }
  .hero-blob-top > div {
    left: calc(50% - 30rem);
    width: 72rem;
  }
  .hero-blob-bottom > div {
    left: calc(50% + 36rem);
    width: 72rem;
  }
}
@keyframes blob-drift {
  to {
    translate: 4% 3%;
    scale: 1.06;
  }
}
body.dark .hero-blob > div {
  opacity: 0.4;
}

/* Pastille d'annonce */
.hero-showcase .hero-badge {
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--texte-soft);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-showcase .hero-badge:hover {
  border-color: var(--texte-soft);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  transform: none;
}
.hero-showcase .hero-badge-label {
  opacity: 1;
}
.hero-showcase .hero-badge-label::before {
  display: none;
}
.hero-showcase .hero-badge-action {
  padding-left: 0.15rem;
  border-left: none;
  color: var(--violet);
  font-weight: 600;
}
body.dark .hero-showcase .hero-badge,
body.dark .hero-showcase .hero-badge-action {
  border-color: var(--bordure);
}
body.dark .hero-showcase .hero-badge-action {
  color: #b994ea;
}

/* Titre : grand, semi-gras, resserré, sans dégradé */
.hero-showcase .hero-title {
  max-width: 15ch;
  margin-inline: auto;
  font-size: clamp(2.4rem, 6.5vw, 4.75rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
  background: none;
  color: var(--texte);
}
.hero-showcase .hero-title br {
  display: none; /* le titre se répartit seul (text-wrap: balance) */
}
.hero-showcase .hero-title .accent-t,
.hero-showcase .hero-title .accent-j {
  -webkit-text-fill-color: currentColor;
  color: var(--violet);
}
body.dark .hero-showcase .hero-title .accent-t,
body.dark .hero-showcase .hero-title .accent-j {
  color: #b994ea;
}

/* Description */
.hero-showcase .hero-desc {
  max-width: 40rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 500;
  line-height: 1.65;
  color: var(--texte-soft);
}

/* Boutons : principal + lien texte avec flèche */
.hero-showcase .hero-actions {
  gap: 1.5rem;
}
.hero-showcase .hero-actions .btn-primary {
  padding: 0.75rem 1.25rem;
  border-radius: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 20px -10px rgba(230, 176, 32, 0.8);
}
.hero-showcase .hero-actions .btn-primary:hover {
  transform: translateY(-1px);
}
.hero-showcase .hero-actions .btn-ghost {
  padding: 0.75rem 0.25rem;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--texte);
  font-size: 0.95rem;
  font-weight: 600;
}
.hero-showcase .hero-actions .btn-ghost:hover {
  color: var(--texte-soft);
  transform: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  .hero.hero-showcase {
    padding-top: 7.5rem;
  }
  .hero-showcase .hero-actions {
    flex-direction: row;
    justify-content: center;
    gap: 1.25rem;
  }
  .hero-showcase .hero-actions .btn-primary,
  .hero-showcase .hero-actions .btn-ghost {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob > div {
    animation: none;
  }
}
