/* ══════════════════════════════════════════════════════════════════════════════
   Carousel Maker — CSS spécifique à l'outil.
   Le chrome commun (tokens :root, reset, header, boutons, hero, FAQ, footer,
   .card, .toast, .overlay, .spinner) vient de ../shared/innospira-ui.css.
   Lié AVANT ce fichier. Ne pas le redéfinir ici.
   ══════════════════════════════════════════════════════════════════════════════ */

/* Helper de surlignage (couleur accent) propre aux titres de l'app */
.grad, .hl { color: var(--brand-strong); }
/* Signature « marqueur » indigo sous le mot accent du hero */
.hero__title .hl { position: relative; white-space: nowrap; }
.hero__title .hl::after {
  content: ""; position: absolute; left: -1%; right: -1%; bottom: -.14em; height: .34em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M4 9 Q 46 2 96 7 T 196 6' stroke='%235a52e0' fill='none' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* ═══ Écran d'entrée (structure de la landing) ═══════════════════════════════ */
.view { min-height: 100vh; }
#view-input { display: flex; flex-direction: column; min-height: 100vh; }
.landing { flex: 1; }
.tool { padding: 22px 24px 6vh; }

.input-card { max-width: 560px; margin: 0 auto; }
.field { margin-bottom: 14px; }
.field input, .field textarea, .card textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2);
  color: var(--text); border-radius: 10px; padding: 14px 15px; font-size: 15px; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }

.input-row { display: flex; gap: 18px; margin: 4px 0 18px; flex-wrap: wrap; }
.mini { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; width: max-content; }
.stepper button { width: 38px; height: 40px; background: var(--panel-2); border: none; color: var(--text); font-size: 18px; }
.stepper input { width: 52px; height: 40px; text-align: center; background: var(--bg-2); border: none; color: var(--text); font-size: 15px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.error { color: #ff8080; font-size: 14px; margin: 12px 0 0; }

/* ═══ Segmented control ══════════════════════════════════════════════════════ */
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg.small { width: 100%; }
.seg__btn {
  flex: 1; border: none; background: transparent; color: var(--muted);
  padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.seg__btn.is-on { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
#mode-seg { width: 100%; margin-bottom: 14px; }
#mode-seg .seg__btn { padding: 11px; }

/* ═══ Éditeur : structure ════════════════════════════════════════════════════ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: rgba(12,13,18,.75); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 12px; }
.topbar__topic { color: var(--muted); font-size: 14px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.editor {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 1px; background: var(--line);
  min-height: calc(100vh - 58px);
}
.panel { background: var(--bg); padding: 18px; overflow-y: auto; max-height: calc(100vh - 58px); }
.panel__block { margin-bottom: 26px; }
.panel__h { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2); margin-bottom: 14px; }

/* Presets de marque */
.presets { margin-bottom: 26px; }
.presets__hint { font-size: 12px; color: var(--muted-2); line-height: 1.5; margin: 0 0 12px; }
.preset-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.preset-chip { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.preset-chip__name { flex: 1; text-align: left; background: var(--panel-2); border: none; color: var(--text); padding: 9px 12px; font-size: 13px; font-weight: 600; }
.preset-chip__name:hover { background: var(--line-2); color: var(--brand-strong); }
.preset-chip__x { width: 34px; border: none; border-left: 1px solid var(--line-2); background: var(--panel); color: var(--muted-2); font-size: 11px; }
.preset-chip__x:hover { color: #ff8080; }
.preset-save { display: flex; flex-direction: column; gap: 8px; }
.preset-name { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; padding: 9px 10px; font-size: 13px; }

/* Panneau style */
.srow { margin-bottom: 16px; }
.srow__lbl, .frow__lbl { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.swatch {
  height: 54px; border-radius: 10px; border: 2px solid transparent; position: relative;
  overflow: hidden; padding: 0;
}
.swatch.is-on { border-color: var(--spark); box-shadow: 0 0 0 3px oklch(0.56 0.18 268 / .3); }
.swatch__lbl {
  position: absolute; left: 7px; bottom: 6px; font-size: 11px; font-weight: 600;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.select { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; padding: 9px 10px; font-size: 13px; }
input[type=range] { width: 100%; accent-color: var(--brand); }
input[type=color] { width: 46px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); padding: 2px; }
.accent-row { display: flex; align-items: center; gap: 10px; }
.link-btn { background: none; border: none; color: var(--brand-strong); font-size: 12px; font-weight: 600; padding: 4px 0; }
.toggles { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); cursor: pointer; }
.toggle input { width: 16px; height: 16px; accent-color: var(--brand); }
.srow input[type=text] { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; padding: 9px 10px; font-size: 13px; }

/* ═══ Scène ══════════════════════════════════════════════════════════════════ */
.stage { background: var(--bg-2); padding: 26px; overflow-y: auto; max-height: calc(100vh - 58px); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.stage__canvas { width: 100%; display: flex; justify-content: center; }
.slide-stage { border-radius: 22px; overflow: hidden; box-shadow: 0 28px 64px -28px oklch(0.4 0.05 55 / .4); }

.stage__toolbar { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.tb-group { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 5px; }
.icon-btn { width: 38px; height: 36px; border: none; background: transparent; color: var(--text); border-radius: 8px; font-size: 16px; }
.icon-btn:hover:not(:disabled) { background: var(--panel-2); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.tb-count { font-size: 13px; color: var(--muted); padding: 0 8px; min-width: 52px; text-align: center; }

.stage__form { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.frow { margin-bottom: 15px; }
.frow textarea, .frow input[type=text] { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; padding: 10px 11px; font-size: 14px; resize: vertical; }
.ta-title { font-weight: 600; }
.bullets-edit { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.bullet-row { display: flex; gap: 8px; }
.bullet-row input { flex: 1; }
.x-btn { width: 34px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); border-radius: 8px; font-size: 12px; }
.x-btn:hover { color: #ff8080; border-color: #ff8080; }
.regen-box { display: flex; flex-direction: column; gap: 8px; }
.in-instr { width: 100%; }

/* ═══ Filmstrip ══════════════════════════════════════════════════════════════ */
.filmstrip { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.thumb {
  display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); text-align: left; width: 100%;
}
.thumb.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px oklch(0.56 0.18 268 / .3); }
.thumb__canvas { border-radius: 8px; overflow: hidden; flex-shrink: 0; line-height: 0; }
.thumb__n { color: var(--muted); font-size: 13px; font-weight: 600; }

/* Légende */
.meta-legend, .meta-tags { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; padding: 10px 11px; font-size: 13px; resize: vertical; margin-bottom: 10px; }

/* Overlay & toast : voir ../shared/innospira-ui.css. Reste ici le détail propre. */
.overlay__box p { margin: 16px 0 0; color: var(--muted); font-size: 14px; }

/* ═══ Slides (design exporté) ════════════════════════════════════════════════ */
.slide { position: relative; overflow: hidden; isolation: isolate; }
.slide__grain { position: absolute; inset: 0; z-index: 1; opacity: .09; pointer-events: none; mix-blend-mode: overlay; background-repeat: repeat; }
.slide__ghost { position: absolute; z-index: 1; right: -20px; bottom: -140px; font-weight: 800; line-height: 1; font-size: 620px; pointer-events: none; }
.slide__prog { position: absolute; top: 0; left: 0; right: 0; height: 10px; z-index: 3; }
.slide__prog > i { display: block; height: 100%; }

.slide__pad { position: relative; z-index: 2; height: 100%; box-sizing: border-box; padding: 80px 78px; display: flex; flex-direction: column; }
.slide__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.slide__kicker { font-size: 27px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.slide__idx { font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.slide__mid { flex: 1; display: flex; flex-direction: column; padding: 50px 0; }
.slide__rule { width: 120px; height: 12px; border-radius: 6px; margin-bottom: 34px; }
.slide__title { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.slide__mark { line-height: 1.05; }
.slide__subtitle { margin: 30px 0 0; font-size: 40px; font-weight: 400; line-height: 1.34; }
.slide--cover .slide__subtitle { font-size: 44px; }

.slide__list { list-style: none; counter-reset: n; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 30px; }
.slide__list li { counter-increment: n; display: flex; align-items: flex-start; gap: 28px; font-size: 40px; line-height: 1.28; font-weight: 400; }
.slide__lnum::before { content: counter(n, decimal-leading-zero); font-size: 30px; font-weight: 700; }
.slide__lnum { padding-top: 8px; }
.slide__btext { flex: 1; }

.slide__num { font-weight: 800; line-height: .9; letter-spacing: -.02em; }
.slide--stat .slide__subtitle { font-size: 46px; margin-top: 40px; }

.slide__quote { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.slide__qmark { font-size: 260px; line-height: .4; margin-bottom: 40px; font-weight: 700; }
.slide__qbody { margin: 0; font-size: 68px; font-weight: 600; line-height: 1.24; }
.slide__qattr { margin-top: 50px; font-size: 26px; letter-spacing: .12em; text-transform: uppercase; }

.slide__tags { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; }
.slide__tag { font-size: 25px; letter-spacing: .04em; text-transform: uppercase; padding: 12px 22px; border-radius: 999px; border: 2px solid; }

.slide__og { border-radius: 26px; overflow: hidden; border: 2px solid; margin-top: 20px; }
.slide__ogimg { display: block; width: 100%; height: 360px; object-fit: cover; }
.slide__ogmeta { padding: 26px 30px; }
.slide__ogmeta b { display: block; font-size: 34px; font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
.slide__ogmeta span { font-size: 26px; }
.slide__ctabtn { margin-top: 34px; text-align: center; font-weight: 700; font-size: 38px; padding: 34px; border-radius: 22px; }

.slide__foot { display: flex; align-items: center; justify-content: space-between; font-size: 30px; letter-spacing: .02em; }
.slide__brandgroup { display: flex; align-items: center; gap: 20px; }
.slide__logo { height: 66px; width: auto; display: block; object-fit: contain; }
.slide__cue { letter-spacing: .06em; }

/* ═══ Responsive ═════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .editor { grid-template-columns: 1fr; }
  .panel, .stage { max-height: none; }
}
