/* ==========================================================================
   CheckIA — page de démonstration (/demo)
   Complète css/styles.css : mêmes tokens, mêmes rythmes.
   ========================================================================== */

/* --- Hero de la page démo ----------------------------------------------- */
.demo-hero {
  position: relative;
  padding-top: clamp(7rem, 12vw, 9.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  overflow: hidden;
  isolation: isolate;
}

.demo-hero__head {
  display: grid;
  gap: 1.4rem;
  justify-items: center;
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}

/* Pastille d'accroche : rappelle au visiteur d'où vient le lien. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 70%);
  box-shadow: var(--shadow-sm);
  font-size: 0.8125rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
}

.eyebrow__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(90 233 253 / 22%);
}

.demo-hero__sub { max-width: 40rem; }

/* Groupe de boutons : principal + secondaire */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.btn--ghost {
  --btn-bg: var(--white);
  --btn-fg: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover::after { opacity: 0; }

/* --- Lecteur vidéo (point focal de la page) ------------------------------ */
.player-section {
  position: relative;
  padding-bottom: var(--section-y);
}

.player-shell {
  position: relative;
  max-width: 62rem;
  margin-inline: auto;
  isolation: isolate;
}

/* Halo cyan de marque derrière le lecteur */
.player-shell::before {
  content: "";
  position: absolute;
  inset: -12% -6%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(50% 50% at 30% 20%, var(--accent-wash) 0%, transparent 70%),
    radial-gradient(50% 50% at 75% 80%, var(--blue-wash) 0%, transparent 70%);
  opacity: 0.85;
  filter: blur(14px);
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 50% 0%, #2a2f3d 0%, var(--ink) 70%);
  box-shadow: var(--shadow-xl);
}

.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Façade cliquable : la vidéo YouTube n'est chargée qu'au clic. */
.player__facade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.player__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Masquée tant que la miniature n'a pas été chargée avec succès. */
  opacity: 0;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.player__thumb.is-loaded { opacity: 0.92; }
.player__facade:hover .player__thumb.is-loaded { transform: scale(1.03); }

.player__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38% 50% at 50% 46%, rgb(24 27 37 / 22%) 0%, transparent 70%),
    linear-gradient(180deg, rgb(24 27 37 / 14%) 0%, rgb(24 27 37 / 30%) 45%, rgb(24 27 37 / 68%) 100%);
}

.player__play {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(4.25rem, 9vw, 5.5rem);
  height: clamp(4.25rem, 9vw, 5.5rem);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 10px 40px rgb(0 0 0 / 28%);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.player__play svg {
  width: 1.6rem;
  height: 1.6rem;
  margin-left: 0.2rem;
}

.player__facade:hover .player__play {
  transform: scale(1.07);
  box-shadow: 0 14px 50px rgb(90 233 253 / 45%);
}

.player__label {
  position: absolute;
  inset: auto 0 clamp(1.1rem, 3vw, 1.75rem);
  color: rgb(255 255 255 / 88%);
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-align: center;
  text-shadow: 0 1px 12px rgb(0 0 0 / 45%);
}

/* Mention discrète sous le lecteur */
.player-note {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.player-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s var(--ease);
}

.player-note a:hover { text-decoration-color: var(--accent-deep); }

/* --- Sommaire de la démonstration --------------------------------------- */
.chapters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.chapter {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: clamp(1.5rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.chapter:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.chapter__num {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--accent-wash), var(--surface));
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

/* --- Bandeau de réassurance --------------------------------------------- */
.trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

.trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.trust__item img { width: 1.05rem; height: 1.05rem; opacity: 0.7; }

/* --- Appel à l'action final --------------------------------------------- */
.cta--demo { margin-bottom: clamp(3rem, 6vw, 5rem); }

.cta--demo .cta__inner { padding-bottom: clamp(3.5rem, 7vw, 6rem); }

.cta__note {
  font-size: 0.9375rem;
  color: rgb(255 255 255 / 60%);
}

.cta__note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Petits écrans ------------------------------------------------------ */
@media (max-width: 40rem) {
  .cta-row .btn { width: 100%; justify-content: center; }
  .player { border-radius: var(--radius); }
}
