/**
 * Thème live PRÉFAC (phase G.4) — surcharge optionnelle des couleurs projection / public.
 * Activé sur les pages .page-live (console, public, présentation).
 */
.page-live {
  --live-brand-primary: var(--fasi-cyan, #00b4d8);
  --live-brand-primary-dim: color-mix(in srgb, var(--live-brand-primary) 18%, transparent);
  --live-brand-on-dark: #fff;
}

.live-present {
  --live-brand-primary: var(--fasi-cyan, #00b4d8);
}

.live-present .live-content-slide__title,
.live-present .live-present__question {
  color: var(--live-brand-on-dark);
}

.live-present .live-join-info__code code,
.live-present-qr-panel__code {
  color: var(--live-brand-primary);
}

.live-guest-poll-cta.btn-primary,
.live-host-toolbar .btn-primary {
  background: var(--live-brand-primary);
  border-color: var(--live-brand-primary);
}

.live-participant-panel__badge,
.live-present-joined {
  background: var(--live-brand-primary-dim);
  color: var(--live-brand-primary);
}

@media (prefers-reduced-motion: reduce) {
  .live-guest-poll-cta {
    position: static;
  }
}

.live-content-slide--empty .live-content-slide__empty-msg {
  text-align: center;
  color: var(--muted-foreground, #94a3b8);
  font-size: 1.0625rem;
  line-height: 1.5;
  margin: 2rem auto;
  max-width: 40rem;
}

/* Public : une fois dans la salle, masquer le bandeau « Rejoindre le live » */
.page-live--in-room .section-head {
  display: none !important;
}

/* Conserver l’espace sous la nav fixe ; centrer le contenu dans la page */
.page-live.page-shell.page-live--in-room {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  padding-top: max(5.25rem, calc(4.75rem + env(safe-area-inset-top, 0px)));
  padding-bottom: 2rem;
}

.page-live--in-room .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: min(44rem, 100%);
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 1rem;
}

.page-live--in-room #live-guest {
  width: 100%;
  max-width: min(44rem, 100%);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-margin-top: 5.5rem;
}

.page-live--in-room .live-guest-stack {
  width: 100%;
  margin-top: 0;
  align-items: stretch;
}

.page-live--in-room .live-guest-box,
.page-live--in-room .live-waiting {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.page-live--in-room .live-waiting {
  text-align: center;
  max-width: min(44rem, 100%);
}

.page-live--in-room .live-guest-sync-status {
  max-width: min(44rem, 100%);
  width: 100%;
}

.page-live--in-room .live-disclaimer {
  margin-top: auto;
  padding-top: 1.5rem;
  width: 100%;
  max-width: min(44rem, 100%);
  text-align: center;
}

/* Slides contenu (intro, consignes) — carte plus large que les sondages */
.page-live--in-room .live-guest-content.live-guest-box {
  max-width: min(44rem, 100%);
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: visible;
}

.page-live--in-room .live-guest-content-mount {
  overflow: visible;
}

.page-live--in-room .live-content-slide--guest {
  max-width: 100%;
  overflow: visible;
}

.page-live--in-room .live-guest-poll.live-guest-box,
.page-live--in-room .live-guest-thanks.live-guest-box {
  max-width: min(44rem, 100%);
}

.live-content-slide--guest .live-content-slide__title {
  text-align: left;
  color: var(--foreground);
  font-size: clamp(1.375rem, 4.5vw, 1.875rem);
  line-height: 1.2;
  margin: 0 0 0.65rem;
}

.live-content-slide--guest .live-content-slide__body {
  color: hsl(240 30% 25%);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0 0 0.85rem;
}

.live-content-slide--guest .live-content-slide__bullets {
  color: hsl(240 25% 30%);
  margin: 0;
  padding-left: 1.25rem;
}

.live-content-slide--guest .live-content-slide__bullets li {
  margin-bottom: 0.45rem;
}

.live-content-slide--guest .live-content-slide__bullets li::marker {
  color: var(--live-brand-primary);
}

.live-content-slide--guest .live-content-slide__img {
  border-radius: 0.65rem;
  box-shadow: 0 8px 28px hsl(240 40% 20% / 0.12);
}

.live-content-slide--guest.live-content-slide--kind-intro .live-content-slide__title {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.live-content-slide--guest.live-content-slide--kind-intro .live-content-slide__body {
  font-size: 1rem;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .live-content-slide--guest.live-content-slide--split .live-content-slide__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.25rem 1.75rem;
    align-items: center;
  }

  .live-content-slide--guest.live-content-slide--split .live-content-slide__img {
    max-height: min(42vh, 16rem);
  }
}

@media (max-width: 639px) {
  .live-content-slide--guest.live-content-slide--split .live-content-slide__figure {
    order: -1;
    margin-bottom: 0.75rem;
  }

  .live-content-slide--guest.live-content-slide--split .live-content-slide__grid {
    display: flex;
    flex-direction: column;
  }
}

.live-guest-leave-wrap {
  margin-top: 1.25rem;
}

.live-guest-session-ended {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius, 0.5rem);
  background: color-mix(in srgb, var(--destructive, #b91c1c) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--destructive, #b91c1c) 25%, transparent);
  color: var(--foreground);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
}
