/*
 * Learniz v2 — styles du mode présentation partagé (console présentateur, cadre 16:9, vue public).
 * Les diapositives utilisent les tokens de la proposition ; chaque proposition peut surcharger
 * .lz-presenting .f-frame… pour garder son identité.
 */
:root {
  --f-w: 1280px;
  --f-h: 720px;
}
/* Pendant la présentation, l'interface normale de la proposition est masquée. */
:root.lz-presenting body > :not(#lz-present):not(.lz-strip):not(.lz-strip__show):not(.lz-toasts):not(.lz-ruler):not(dialog):not(.lz-sr):not(script) {
  display: none !important;
}
:root.lz-presenting body {
  overflow: auto;
}
:root[data-w~='lt40'] .lz-present-btn__l {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- Le cadre 16:9 (commun aux deux vues) ---------- */
.f-viewport {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 10px;
}
.f-scaler {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--f-w);
  height: var(--f-h);
  transform-origin: 0 0;
}
.f-frame {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--lz-surface);
  color: var(--lz-text);
  overflow: hidden;
}
.f-frame__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 28px 56px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--lz-muted);
}
.f-frame__bar b {
  color: var(--lz-primary);
}
.f-frame__body {
  overflow: auto;
  padding: 20px 56px 40px;
  scrollbar-width: thin;
}
.f-frame__body .lz-it__title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.f-frame__body .lz-prose {
  font-size: 22px;
  max-width: none;
}
.f-frame__body .lz-flip-grid,
.f-frame__body .lz-cm-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.f-frame__body .lz-flip__quote,
.f-frame__body .lz-flip__answer {
  font-size: 22px;
}
.f-frame__body .lz-it--media-player .lz-media {
  max-width: 900px;
  margin: 0 auto;
}

/* Diapositives de titre */
.f-title {
  grid-template-rows: 1fr;
  align-content: end;
  padding: 72px 80px;
  background:
    radial-gradient(100% 120% at 100% 0%, color-mix(in oklab, #fff 18%, transparent), transparent 55%),
    var(--lz-primary-fill);
  color: var(--lz-on-primary);
}
.f-title h1,
.f-title h2 {
  margin: 0;
  font-weight: 900;
  font-size: 84px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 15ch;
}
.f-title p {
  margin: 24px 0 0;
  font-size: 26px;
  max-width: 42ch;
  opacity: 0.9;
}
.f-title .f-kick {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  opacity: 0.85;
}
.f-title--chapter {
  background: var(--lz-text);
  color: var(--lz-bg);
}
.f-title--chapter .f-num {
  position: absolute;
  right: 60px;
  top: 20px;
  font-size: 360px;
  font-weight: 900;
  line-height: 1;
  color: var(--lz-primary-fill);
  opacity: 0.9;
}
:root[data-theme='contrast'] .f-title--chapter .f-num,
:root[data-theme='mono'] .f-title--chapter .f-num {
  color: inherit;
  opacity: 0.4;
}
.f-title--slide {
  background: var(--lz-surface);
  color: var(--lz-text);
}
.f-title--slide .f-kick {
  color: var(--lz-primary);
  opacity: 1;
}
.f-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.f-chips li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--lz-surface-2);
  font-size: 18px;
  font-weight: 600;
}
.f-end ul {
  margin: 28px 0 0;
  padding-left: 1.2em;
  font-size: 24px;
  display: grid;
  gap: 8px;
}

/* Quiz en direct */
.f-poll {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  height: 100%;
  align-content: start;
}
.f-poll__q {
  margin: 0 0 24px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
}
.f-poll__opts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.f-poll__opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 2px solid var(--lz-line);
  overflow: hidden;
  font-size: 22px;
  font-weight: 600;
}
.f-poll__opt i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--lz-primary-soft);
  transition: width 600ms var(--lz-ease);
  z-index: 0;
}
.f-poll__opt > span {
  position: relative;
  z-index: 1;
}
.f-poll__opt b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--lz-surface-2);
  flex: none;
}
.f-poll__opt em {
  white-space: nowrap;
  margin-left: auto;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.f-poll__opt.is-right {
  border-color: var(--lz-success);
}
.f-poll__opt.is-right b {
  background: var(--lz-success);
  color: var(--lz-surface);
}
.f-poll__join {
  display: grid;
  gap: 12px;
  align-content: start;
  text-align: center;
  font-size: 18px;
}
.f-poll__join svg {
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}
.f-poll__join strong {
  font-size: 30px;
  letter-spacing: 0.1em;
}
.f-poll__expl {
  margin: 20px 0 0;
  font-size: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--lz-success) 12%, var(--lz-surface));
}

/* Écrans noir / blanc et laser */
.f-blank {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
}
.f-blank[data-v='black'] {
  display: block;
  background: #000;
}
.f-blank[data-v='white'] {
  display: block;
  background: #fff;
}
.f-laser {
  position: absolute;
  z-index: 25;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff3b3b 0 35%, rgb(255 59 59 / 0.35) 36% 60%, transparent 62%);
  pointer-events: none;
  display: none;
}
.f-laser.is-on {
  display: block;
}

/* ---------- Vue présentateur ---------- */
.f-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: 'top top' 'stage side' 'strip strip';
  gap: 0.75rem;
  height: calc(100dvh - var(--lz-proto-h));
  margin-top: var(--lz-proto-h);
  padding: 0.75rem;
}
:root[data-w~='lt64'] .f-console {
  height: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'top' 'stage' 'side' 'strip';
}
.f-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.f-top__title {
  flex: 1;
  min-width: 12rem;
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.f-tbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0 0.85rem;
  border-radius: 10px;
  border: 1.5px solid var(--lz-line);
  background: var(--lz-surface);
  font-weight: 600;
  font-size: 0.92rem;
}
.f-tbtn[aria-pressed='true'] {
  background: var(--lz-text);
  color: var(--lz-bg);
  border-color: transparent;
}
.f-tbtn--main {
  background: var(--lz-primary-fill);
  color: var(--lz-on-primary);
  border-color: transparent;
}
:root[data-w~='lt48'] .f-tbtn__l {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.f-stage {
  grid-area: stage;
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.5rem;
}
.f-stage__view {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
}
:root[data-w~='lt64'] .f-stage__view {
  aspect-ratio: 16 / 9;
}
.f-stage .f-viewport {
  width: 100%;
  height: 100%;
  max-width: calc((100dvh - 14rem) * 16 / 9);
  max-height: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  box-shadow: 0 20px 50px -25px rgb(0 0 0 / 0.5);
}
.f-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.f-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 3rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 0;
  background: var(--lz-surface);
  font-weight: 700;
  box-shadow: 0 1px 0 var(--lz-line);
}
.f-nav__btn--next {
  background: var(--lz-text);
  color: var(--lz-bg);
}
.f-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 5em;
  text-align: center;
}

.f-side {
  grid-area: side;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.f-card {
  padding: 1rem;
  border-radius: var(--lz-radius);
  background: var(--lz-surface);
  border: 1px solid var(--lz-line);
}
.f-card h2 {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.f-timer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  text-align: center;
}
.f-timer div {
  display: grid;
}
.f-timer span {
  font-size: 0.78rem;
  color: var(--lz-muted);
}
.f-timer strong {
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.f-timer [data-over='true'] strong {
  color: var(--lz-danger);
}
.f-notes {
  --notes: 1.05rem;
  font-size: var(--notes);
  line-height: 1.55;
}
.f-notes p {
  margin: 0 0 0.6em;
}
.f-notes ul {
  margin: 0 0 0.6em;
  padding-left: 1.1em;
}
.f-notes__tip {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: var(--lz-primary-soft);
  font-size: 0.92em;
}
.f-notes__edit {
  display: inline-flex !important;
  align-items: center;
  gap: 0.25rem;
  width: auto !important;
  padding: 0 0.6rem;
  font-weight: 600 !important;
}
.f-notes__edit[hidden] {
  display: none !important;
}
.f-notes__custom {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--lz-primary);
}
.f-notes__ta {
  width: 100%;
  min-height: 9rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--lz-primary);
  background: var(--lz-bg);
  resize: vertical;
  line-height: 1.45;
  font-size: inherit;
}
.f-notes__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.f-notes__size {
  display: flex;
  gap: 0.25rem;
}
.f-notes__size button {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  border: 1.5px solid var(--lz-line);
  background: var(--lz-surface);
  font-weight: 800;
}
.f-mine textarea {
  width: 100%;
  min-height: 6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--lz-line);
  background: var(--lz-bg);
  resize: vertical;
  line-height: 1.45;
}
.f-next .f-viewport {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.f-next p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--lz-muted);
}
.f-pollctl {
  display: grid;
  gap: 0.5rem;
}

.f-strip {
  grid-area: strip;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0.1rem 0.4rem;
  list-style: none;
  margin: 0;
}
.f-strip button {
  flex: none;
  width: 8.5rem;
  height: 5rem;
  display: grid;
  align-content: space-between;
  gap: 0.2rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1.5px solid var(--lz-line);
  background: var(--lz-surface);
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.25;
  overflow: hidden;
}
.f-strip button[data-kind='cover'],
.f-strip button[data-kind='chapter'] {
  background: var(--lz-primary-fill);
  color: var(--lz-on-primary);
  border-color: transparent;
}
.f-strip button[aria-current='true'] {
  outline: 3px solid var(--lz-primary);
  outline-offset: 2px;
}
.f-strip b {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* Trieuse (vue d'ensemble) */
.f-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.75rem;
}
.f-grid button {
  aspect-ratio: 16 / 9;
  display: grid;
  align-content: space-between;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1.5px solid var(--lz-line);
  background: var(--lz-surface);
  text-align: left;
  font-weight: 600;
  line-height: 1.25;
}
.f-grid button[aria-current='true'] {
  outline: 3px solid var(--lz-primary);
}
.f-grid button span {
  font-size: 0.8rem;
  color: var(--lz-muted);
}
.lz-dialog--grid {
  width: min(70rem, calc(100vw - 2rem));
}

/* ---------- Vue public ---------- */
.f-audience {
  position: fixed;
  inset: 0;
  background: #000;
  display: grid;
  place-items: center;
  cursor: none;
}
.f-audience.is-cursor {
  cursor: default;
}
.f-audience .f-viewport {
  width: min(100vw, 100vh * 16 / 9);
  aspect-ratio: 16 / 9;
  border-radius: 0;
}
.f-wait {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 30;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 0.9rem;
}
.is-audience .lz-strip,
.is-audience .lz-strip__show {
  display: none !important;
}
