/* Tableau de bord, présentations, répétition, paramètres et pages de contenu. */

.session-notice { margin-bottom: 18px; }
#store-error { margin-bottom: 18px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 18px; align-items: stretch; }
.dash-stage { display: flex; flex-direction: column; }
.dash-side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 18px; min-width: 0; }

.slide-label { font-size: 1.0625rem; font-weight: 400; color: var(--muted); }
.slide-label strong { font-weight: 700; color: var(--text); }
.card-tools { display: flex; gap: 2px; }

.slide-frame { position: relative; aspect-ratio: var(--slide-ratio, 16 / 9); border-radius: var(--radius-s); overflow: hidden; background: var(--bg); border: 1px solid var(--line); display: grid; }
.slide-frame.has-slide { background: var(--navy); border-color: var(--navy); }
.slide-frame:fullscreen { border: 0; border-radius: 0; aspect-ratio: auto; }
.slide-fill { width: 100%; height: 100%; }
.stage-empty { align-self: center; padding-block: 12px; }
.stage-caption { margin-top: 10px; font-size: 0.875rem; color: var(--muted); }

.slide-sim { display: grid; gap: 4%; align-items: center; height: 100%; padding: 6% 7%; color: #fff; container-type: inline-size; overflow: hidden; }
.slide-sim.has-image { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.slide-sim-text { min-width: 0; overflow: hidden; max-height: 100%; }
.slide-sim-title { font-size: clamp(1rem, 5.4cqi, 2.75rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 0.5em; }
.slide-sim-title::after { content: ""; display: block; width: 2.2em; height: 3px; margin-top: 0.5em; background: var(--teal); }
.slide-sim-line { font-size: clamp(0.75rem, 2.3cqi, 1.25rem); line-height: 1.4; color: #c7d2e0; }
.slide-sim-line + .slide-sim-line { margin-top: 0.4em; }
.slide-sim img { width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.slide-sim-image { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.transport-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; }
.transport { display: flex; align-items: center; gap: 12px; margin-inline: auto; }
.round { display: inline-grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--bg); color: var(--text); text-decoration: none; }
.round:hover:not(:disabled) { background: var(--teal-soft); }
.round:disabled { opacity: 0.4; cursor: not-allowed; }
.round-main { width: 66px; height: 66px; background: var(--teal); color: var(--navy); }
.round-main:hover:not(:disabled) { background: var(--teal-hover); }
.round-main .ico { width: 30px; height: 30px; }

.timer-card { padding: clamp(12px, 1.4vw, 18px); }
.timer-inner { height: 100%; padding: 18px 20px; border-radius: var(--radius-s); background: var(--teal-soft); }
.timer-badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--teal) 24%, transparent); color: var(--teal-ink); margin-bottom: 10px; }
.timer-value { font-size: clamp(2.5rem, 4.6vw, 3.625rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.timer-value.is-late { color: var(--danger); }
.timer-label { font-size: 1.0625rem; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.timer-detail { margin-top: 2px; font-size: 0.875rem; color: var(--muted); }

.notes-card { display: flex; flex-direction: column; min-height: 200px; }
.notes-box { flex: 1; min-height: 90px; max-height: 300px; overflow-y: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); white-space: pre-wrap; overflow-wrap: anywhere; }
.notes-box.is-empty { color: var(--muted); }
.notes-large { font-size: var(--notes-size); line-height: 1.45; max-height: 420px; }
.zoom { display: flex; gap: 4px; }
.zoom button { min-width: 44px; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--text); font-weight: 600; }
.zoom button:hover { background: var(--teal-soft); }
.slide-clock { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }

.recent { margin-top: 28px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-row h2 { font-size: 1.3125rem; }
.see-all { display: inline-flex; align-items: center; gap: 2px; font-weight: 500; text-decoration: none; min-height: 44px; }
.see-all .ico { width: 18px; height: 18px; }

.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 18px; }
.deck-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px; }
.deck-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--bg); }
.deck-thumb-empty { display: grid; place-items: center; color: var(--muted); }
.deck-info { min-width: 0; }
.deck-info h3 { font-size: 1.0625rem; overflow-wrap: anywhere; margin-bottom: 4px; }
.deck-info p { font-size: 0.875rem; color: var(--muted); }
.deck-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.deck-empty { grid-column: 1 / -1; }
.deck-skeleton { height: 150px; }

.drop-zone { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; margin-bottom: 18px; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-weight: 500; }
.drop-zone.is-active { border-color: var(--teal); background: var(--teal-soft); color: var(--text); }

.history-list { list-style: none; margin: 0; padding: 0; }
.history-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history-list li:last-child { border-bottom: 0; }
.history-name { font-weight: 600; overflow-wrap: anywhere; }
.history-meta { color: var(--muted); font-size: 0.875rem; }
#history { margin-top: 28px; }

.result-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.time-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.time-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) auto; gap: 12px; align-items: center; }
.time-name { font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-bar { height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; display: block; }
.time-bar::after { content: ""; display: block; height: 100%; width: var(--share, 0%); background: var(--teal); border-radius: 99px; }
.time-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.result-actions { margin-top: 18px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.settings-stack { display: grid; gap: 14px; }
.font-preview { font-size: var(--notes-size); line-height: 1.4; padding: 10px 14px; background: var(--bg); border-radius: var(--radius-s); overflow-wrap: anywhere; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a { display: block; padding: 11px 0; font-weight: 500; text-decoration: none; }
.link-list a:hover { text-decoration: underline; }

/* Installation, rejoindre */
.install-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 18px; align-items: start; }
.install-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.install-steps > li { counter-increment: step; position: relative; padding: 0 0 26px 56px; }
.install-steps > li:last-child { padding-bottom: 0; }
.install-steps > li::before { content: counter(step); position: absolute; left: 0; top: -3px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--teal); color: var(--navy); font-weight: 700; border-radius: 50%; }
.install-steps h2 { font-size: 1.1875rem; margin-bottom: 6px; }
.install-steps p + p { margin-top: 8px; }
.install-steps .btn { margin-top: 10px; }
.side-stack { display: grid; gap: 18px; }
.side-stack ul { margin: 0; padding-left: 20px; }
.side-stack li + li { margin-top: 6px; }
.join-card { max-width: 30rem; }
.join-card form { display: grid; gap: 16px; }
.aside-link { margin-top: 18px; color: var(--muted); }

.not-found { display: grid; justify-items: start; gap: 12px; padding-block: 40px; }
.not-found h1 { font-size: clamp(2rem, 5vw, 3rem); }
.not-found-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

@media (max-width: 1100px) {
  .dash-grid, .install-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); grid-template-rows: auto; }
}
@media (max-width: 720px) {
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .settings-grid, .result-grid { grid-template-columns: minmax(0, 1fr); }
  .deck-card { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
  .history-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .history-meta { grid-column: 1; grid-row: 2; }
  .history-list strong { grid-row: 1 / 3; grid-column: 2; }
  .transport { width: 100%; }
  .transport-row .btn { width: 100%; }
  .drop-zone { display: none; }
}

/* La vague de la maquette, sur les aperçus sans image. */
.slide-sim { position: relative; }
.slide-sim-text { position: relative; z-index: 1; }
.slide-sim:not(.has-image) .slide-sim-text { max-width: 62%; }
.slide-sim:not(.has-image)::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 40%; background: var(--teal); clip-path: path("M 400 0 L 400 600 L 0 600 C 130 520 180 330 240 210 C 280 120 340 40 400 0 Z"); clip-path: polygon(100% 0, 100% 100%, 0 100%, 16% 88%, 34% 62%, 52% 34%, 74% 12%); }

.notes-box.is-empty { font-size: 1rem; }
