/* Generate / Queue / Brand — styles */

/* ─── Gen Loader skeleton ──────────────────────────────────────────────── */
.gen-loader-skel {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  border-radius: inherit; overflow: hidden;
}
.gen-skel-img {
  flex: 1; background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.01) 100%);
}
.gen-skel-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: rgba(0,0,0,.25);
}
.gen-skel-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.12); flex-shrink: 0;
  animation: skel-pulse 1.6s ease-in-out infinite;
}
.gen-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.gen-skel-line {
  height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.1);
  animation: skel-pulse 1.6s ease-in-out infinite;
}
.gen-skel-line--70 { width: 70%; animation-delay: .1s; }
.gen-skel-line--45 { width: 45%; animation-delay: .25s; }
@keyframes skel-pulse {
  0%, 100% { opacity: .4; }
  50% { opacity: .9; }
}

/* ─── Queue feed validated state ───────────────────────────────────────── */
.feed-row--validated { opacity: .7; }
.feed-row--validated .feed-title { text-decoration: line-through; text-decoration-color: rgba(22,163,74,.4); }
.feed-preview-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px); z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.feed-preview-modal {
  position: relative; background: var(--app-surface);
  border-radius: 16px; overflow: hidden; width: min(420px, 90vw);
  box-shadow: 0 32px 80px rgba(0,0,0,.25);
}
.feed-preview-thumb {
  width: 100%; aspect-ratio: 4/5; display: grid; place-items: center;
}

/* ─── First-run veille nudge ────────────────────────────────────────────── */
.veille-nudge-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px); z-index: 600;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
.veille-nudge-modal {
  background: var(--app-surface); border-radius: 20px;
  padding: 36px 32px; width: min(440px, 90vw);
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
  animation: cmdSlideIn .2s ease;
}
.veille-nudge-icon { font-size: 36px; line-height: 1; }
.veille-nudge-title { font-size: 22px; font-weight: 700; color: var(--app-fg); margin: 0; }
.veille-nudge-desc { font-size: 14px; color: var(--app-fg-3); line-height: 1.55; max-width: 340px; margin: 0; }
.veille-nudge-steps {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin: 4px 0;
}
.veille-nudge-step {
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 20px;
}
.veille-nudge-step--done {
  background: rgba(22,163,74,.1); color: var(--app-success);
  border: 1px solid rgba(22,163,74,.2);
}
.veille-nudge-step--active {
  background: rgba(79,91,213,.1); color: var(--app-accent);
  border: 1px solid rgba(79,91,213,.25);
}
.veille-nudge-actions {
  display: flex; gap: 10px; width: 100%; margin-top: 6px;
}

/* ═══ GENERATE HUB — AI PROMPT BOX ══════════════════════════════════════ */
.aiprompt {
  position: relative;
  background: var(--app-surface);
  border: 1.5px solid var(--app-line-2);
  border-radius: 20px;
  padding: 18px 18px 14px;
  margin-bottom: 28px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.aiprompt:focus-within {
  border-color: rgba(79,91,213,.5);
  box-shadow: 0 0 0 4px rgba(79,91,213,.08), 0 4px 24px rgba(15,21,40,.07);
}
.aiprompt-glow {
  position: absolute; top: 0; right: 0;
  width: 340px; height: 160px; pointer-events: none;
  background: radial-gradient(ellipse 280px 130px at 100% 0%, rgba(110,123,255,.09), transparent 70%);
}
.aiprompt-ta {
  position: relative; z-index: 1;
  width: 100%; background: transparent;
  border: none; outline: none; resize: none;
  font: 400 16.5px/1.55 'DM Sans', system-ui, sans-serif;
  color: var(--app-fg);
  letter-spacing: -0.012em;
  min-height: 52px; max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--app-line-2) transparent;
}
.aiprompt-ta::placeholder { color: var(--app-fg-4); }
.aiprompt-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--app-line);
  position: relative; z-index: 1;
}
.aiprompt-hint {
  font-size: 12px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aiprompt-hint--idle { color: var(--app-fg-4); }
.aiprompt-hint--warn { color: var(--app-warn); }
.aiprompt-hint--err  { color: var(--app-danger); }
.aiprompt-hint--fmt {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--app-accent); font-weight: 600;
}
.aiprompt-fmt-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--app-accent); box-shadow: 0 0 0 3px rgba(79,91,213,.2);
  flex-shrink: 0;
}
.aiprompt-fmt-rest { color: var(--app-fg-4); font-weight: 400; margin-left: 2px; }
.aiprompt-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.aiprompt-count {
  font-size: 11px; color: var(--app-fg-4); font-variant-numeric: tabular-nums;
}
.aiprompt-count--over { color: var(--app-danger); }
.aiprompt-send {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.aiprompt-send--empty {
  background: var(--app-line-2); color: var(--app-fg-4); cursor: not-allowed;
}
.aiprompt-send--ready {
  background: var(--app-fg); color: var(--app-surface);
}
.aiprompt-send--ready:hover {
  background: var(--app-accent); transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(79,91,213,.35);
}
.aiprompt-send--loading {
  background: var(--app-accent); color: #fff; cursor: wait;
}
/* Drag state */
.aiprompt--dragging {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 4px rgba(79,91,213,.14);
}
.aiprompt-drop-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  background: rgba(79,91,213,.06);
  border-radius: 19px;
  font-size: 13px; font-weight: 600; color: var(--app-accent);
  pointer-events: none;
}

/* Attachment strip */
.aiprompt-attachments {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 12px;
  position: relative; z-index: 1;
}
.aiprompt-att-img {
  position: relative; width: 64px; height: 64px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--app-line-2);
  flex-shrink: 0;
}
.aiprompt-att-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.aiprompt-att-file {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--app-surface-2); border: 1px solid var(--app-line-2);
  border-radius: 8px; padding: 6px 10px;
  font-size: 12px; color: var(--app-fg-2); max-width: 180px;
}
.aiprompt-att-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aiprompt-att-remove {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(15,21,40,.55); backdrop-filter: blur(4px);
  border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
  opacity: 0; transition: opacity .15s;
}
.aiprompt-att-img:hover .aiprompt-att-remove { opacity: 1; }
.aiprompt-att-remove--inline {
  position: static; opacity: 1;
  background: transparent; color: var(--app-fg-4);
  width: 16px; height: 16px; flex-shrink: 0;
}
.aiprompt-att-remove--inline:hover { color: var(--app-fg); }

/* Clip (paperclip) button */
.aiprompt-clip {
  width: 30px; height: 30px; border-radius: 8px; border: none;
  background: transparent; color: var(--app-fg-4);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.aiprompt-clip:hover { background: var(--app-line); color: var(--app-fg-2); }

/* Left group in bar */
.aiprompt-left { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }

.gen-section-divider {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--app-fg-4); margin: 0 0 14px;
}

.gen-section-label {
  display: flex; align-items: center; justify-content: space-between;
  margin: 24px 0 14px;
  font-size: 11px;
  color: var(--app-fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.gen-section-label > span:first-child { color: var(--app-fg-2); }
.gen-section-count { color: var(--app-fg-4); }

.gen-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.preset-card {
  all: unset;
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  width: 100%;
}
.preset-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  z-index: 3;
  pointer-events: none;
  transition: border-color 0.25s ease;
}
.preset-card:hover::after {
  border-color: rgba(255,255,255,0.28);
}

.preset-card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
}
.preset-card:hover .preset-card-img {
  transform: scale(1.06);
}

.preset-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 56px 22px 26px;
  background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.35) 55%, transparent 100%);
  z-index: 2;
}
.preset-card-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 7px;
}
.preset-card-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.005em;
  line-height: 1.45;
}

.preset-card-arrow {
  position: absolute;
  bottom: 26px; right: 22px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 2;
}
.preset-card:hover .preset-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.preset-tag {
  position: absolute; top: 16px; left: 16px; z-index: 3;
  padding: 5px 11px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.92);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.22);
}

/* Preset previews — mini stylized cards */
.pp { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px; }
.pp-actu { background: linear-gradient(150deg, #1a1b2e, #2a1f3a); }
.pp-actu .pp-chip { font-size: 9px; letter-spacing: 0.12em; color: #FF6B6B; font-weight: 700; margin-bottom: 10px; }
.pp-actu .pp-lede { color: #EEF4FF; font-family: 'DM Sans', sans-serif; font-size: 15px; line-height: 1.2; letter-spacing: -0.02em; flex: 1; }
.pp-actu .pp-meta { font-size: 9.5px; color: rgba(255,255,255,0.4); letter-spacing: 0.06em; }

.pp-quote { background: linear-gradient(140deg, #3d2a5a, #1a1540); justify-content: center; align-items: center; text-align: center; }
.pp-quote .pp-quote-mark { font-family: 'DM Sans', sans-serif; font-size: 60px; line-height: 0.6; color: #FF9ED3; margin-bottom: 8px; }
.pp-quote .pp-quote-text { font-family: 'DM Sans', sans-serif; font-style: italic; font-size: 13px; color: #EEF4FF; line-height: 1.3; letter-spacing: -0.01em; }

.pp-bts { background: #1a1410; overflow: hidden; }
.pp-bts::before {
  content:''; position:absolute; inset:0;
  background:
    radial-gradient(circle at 30% 40%, rgba(180,126,63,0.6), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(122,80,48,0.8), transparent 60%),
    linear-gradient(120deg, #2a1f18, #1a1410);
}
.pp-bts-grain {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.1) 0 1px, transparent 1px 3px);
}
.pp-bts .pp-bts-label {
  position: absolute; bottom: 12px; left: 14px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.15em;
  color: rgba(242,232,213,0.9);
}

.pp-product { background: linear-gradient(145deg, #3a2817 0%, #6b4520 60%, #B47E3F 100%); justify-content: space-between; }
.pp-product .pp-product-tag { font-size: 9px; letter-spacing: 0.15em; color: rgba(242,232,213,0.7); }
.pp-product .pp-product-name { font-family: 'DM Sans', sans-serif; font-size: 32px; color: #F2E8D5; letter-spacing: 0.02em; line-height: 1; }
.pp-product .pp-product-line { height: 1px; background: rgba(242,232,213,0.3); }

.pp-portrait { background: linear-gradient(160deg, #1a2030, #2a3850); justify-content: space-between; }
.pp-portrait .pp-portrait-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #D9A566, #7A4F20);
  border: 2px solid rgba(255,255,255,0.1);
  align-self: flex-start;
}
.pp-portrait .pp-portrait-name { font-size: 11px; color: rgba(238,244,255,0.8); letter-spacing: -0.005em; }

.pp-pedago { background: #F2E8D5; color: #2A1F18; }
.pp-pedago .pp-pedago-title { font-size: 9px; letter-spacing: 0.15em; font-weight: 700; color: #7A5030; margin-bottom: 6px; }
.pp-pedago .pp-pedago-word { font-family: 'DM Sans', sans-serif; font-size: 28px; letter-spacing: -0.01em; line-height: 1; margin-bottom: 10px; }
.pp-pedago .pp-pedago-def { font-size: 10px; color: #2A1F18; opacity: 0.7; line-height: 1.3; }

.pp-season { background: #B47E3F; justify-content: space-between; }
.pp-season .pp-season-label { font-size: 10px; color: rgba(242,232,213,0.8); letter-spacing: 0.1em; font-weight: 700; }
.pp-season .pp-season-name { font-family: 'DM Sans', sans-serif; font-style: italic; font-size: 28px; color: #F2E8D5; line-height: 1; letter-spacing: -0.02em; }

.pp-testi { background: linear-gradient(160deg, #0d1538, #1a2050); justify-content: center; }
.pp-testi .pp-testi-quote { font-family: 'DM Sans', sans-serif; font-style: italic; font-size: 12.5px; color: #EEF4FF; line-height: 1.4; letter-spacing: -0.01em; margin-bottom: 10px; }
.pp-testi .pp-testi-sig { font-size: 9.5px; color: rgba(238,244,255,0.5); letter-spacing: 0.02em; }

/* Recent cards */
.gen-recent { margin-top: 32px; }
.gen-recent-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.recent-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease;
}
.recent-card:hover { border-color: var(--app-line-3); }
.recent-type { font-size: 10.5px; color: var(--app-fg-3); font-variant: all-small-caps; letter-spacing: 0.08em; font-weight: 600; }
.recent-when { color: var(--app-fg-4); font-weight: 400; }
.recent-title { font-size: 12.5px; color: var(--app-fg); margin-top: 2px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══ GENERATE STUDIO (chat + studio shared) ═══════════════════════════ */
.gen-studio-body { padding: 0; }
.gen-studio-head {
  padding: 14px 28px;
  border-bottom: 1px solid var(--app-line);
  display: flex; align-items: center; gap: 14px;
}
.gen-studio-title-row { display: flex; align-items: center; gap: 10px; flex: 1; }
.gen-studio-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.015em;
}
.gen-studio-actions { display: flex; gap: 8px; }

.gen-studio-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(0, 1.1fr);
  gap: 0;
  height: calc(100vh - var(--topbar-h) - 58px);
  min-height: 600px;
}
.gen-studio-grid--studio { grid-template-columns: 340px minmax(0, 1fr); }

/* Chat */
.gen-chat {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--app-line);
  background: var(--app-bg);
  min-width: 0;
}
.gen-chat-messages {
  flex: 1; overflow-y: auto;
  padding: 24px 24px 12px;
  display: flex; flex-direction: column; gap: 14px;
}
.gen-msg { display: flex; gap: 10px; max-width: 92%; }
.gen-msg--user { align-self: flex-end; justify-content: flex-end; }
.gen-msg-avatar {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--chromatic);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.gen-msg-bubble {
  padding: 10px 14px;
  font-size: 13.5px; line-height: 1.5;
  border-radius: 10px;
  letter-spacing: -0.005em;
}
.gen-msg--forje .gen-msg-bubble { background: var(--app-surface-2); color: var(--app-fg); border: 1px solid var(--app-line); }
.gen-msg--user  .gen-msg-bubble { background: var(--app-surface-3); color: var(--app-fg); border: 1px solid var(--app-line-2); }
.gen-msg--system { opacity: 0.9; }
.gen-msg--system .gen-msg-bubble {
  background: rgba(110,123,255,0.08);
  border: 1px solid rgba(110,123,255,0.2);
  font-size: 12px;
  display: flex; align-items: center; gap: 8px;
  color: var(--app-fg-2);
}
.gen-msg--system .gen-msg-bubble svg { color: var(--app-accent-3); flex-shrink: 0; }

.gen-chat-composer {
  border-top: 1px solid var(--app-line);
  padding: 12px 16px 14px;
  background: var(--app-surface);
}
.gen-chat-composer textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--app-fg);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
}
.gen-chat-composer textarea::placeholder { color: var(--app-fg-4); }
.gen-chat-composer-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
}
.gen-chat-chips { display: flex; gap: 6px; flex: 1; overflow-x: auto; }
.chat-chip {
  padding: 5px 10px;
  font-size: 11.5px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-line);
  color: var(--app-fg-2);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s ease;
}
.chat-chip:hover { border-color: var(--app-line-3); }

/* Studio tools */
.gen-tools {
  border-right: 1px solid var(--app-line);
  background: var(--app-surface);
  padding: 20px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
}
.tool-section { display: flex; flex-direction: column; gap: 10px; }
.tool-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--app-fg-3);
  text-transform: uppercase;
}
.tool-section-head svg { color: var(--app-fg-4); }
.tool-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--app-bg);
  border: 1px solid rgba(110,150,255,0.22);
  border-radius: var(--radius-sm);
  color: var(--app-fg);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.tool-textarea:focus {
  border-color: rgba(110,150,255,0.55);
  box-shadow: 0 0 0 3px rgba(110,150,255,0.09);
}
.tool-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-pill {
  padding: 5px 11px;
  font-size: 12px;
  font-family: inherit;
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  color: var(--app-fg-3);
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s ease;
}
.tool-pill.active {
  background: var(--app-surface-3);
  color: var(--app-fg);
  border-color: var(--app-line-3);
}
.tool-sub { font-size: 11px; color: var(--app-fg-4); }

.slider-track {
  height: 4px; background: var(--app-surface-3); border-radius: 2px;
  position: relative; margin: 10px 6px;
}
.slider-fill { height: 100%; background: var(--chromatic); border-radius: 2px; }
.slider-thumb {
  position: absolute; top: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--app-fg);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px var(--app-bg), 0 0 0 4px var(--app-line-3);
}
.slider-labels {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--app-fg-4);
  padding: 0 4px;
}
.tool-visuals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.visual-option {
  all: unset;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--app-line);
  transition: border-color .15s ease;
}
.visual-option.active { border-color: var(--app-line-3); background: var(--app-surface-2); }
.visual-option-thumb {
  aspect-ratio: 1/1;
  border-radius: 4px;
  background: var(--app-surface-3);
}
.visual-option--typo .visual-option-thumb { background: linear-gradient(135deg, #3a2817, #B47E3F); }
.visual-option--photo .visual-option-thumb { background: linear-gradient(135deg, #1a1410, #5a3d1f); }
.visual-option--texture .visual-option-thumb {
  background: repeating-linear-gradient(45deg, #2a1f18, #2a1f18 3px, #3a2817 3px, #3a2817 6px);
}
.visual-option--carousel .visual-option-thumb {
  background: linear-gradient(to right, #B47E3F 0 33%, #7A5030 33% 66%, #2A1F18 66%);
}
.visual-option span { font-size: 11px; color: var(--app-fg-2); }

.tool-select {
  padding: 8px 12px;
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  color: var(--app-fg);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  cursor: pointer;
}

/* Preview panel — image sticky à gauche, caption à droite */
.gen-preview {
  height: 100%;
  overflow-y: auto;
  overflow-x: clip;
  background: var(--app-bg);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 28px 28px 52px;
  min-width: 0;
  gap: 28px;
}

/* Colonne image — sticky pendant le scroll de la caption */
.gen-preview-visual {
  flex: 0 0 280px;
  position: sticky;
  top: 0;
  align-self: flex-start;
}

.gen-preview-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 16px;
  margin-bottom: 4px;
  border-bottom: none;
}
.gen-preview-variants { display: flex; gap: 4px; }
.gen-variant-btn {
  all: unset;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--app-fg-3);
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.gen-variant-btn:hover { color: var(--app-fg); }
.gen-variant-btn.active {
  background: var(--app-surface-3);
  color: var(--app-fg);
  border-color: var(--app-line-3);
}
.gen-variant-add { color: var(--app-fg-4); display: flex; align-items: center; gap: 4px; }
.gen-preview-device {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--app-fg-4);
  font-variant: all-small-caps; letter-spacing: 0.08em;
}

.gen-preview-stage {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.gen-preview-stage img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 20px 56px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}
.post-preview {
  width: 420px;
  aspect-ratio: 1/1;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  display: flex; flex-direction: column;
  padding: 32px;
}
.post-preview--typo-camel {
  background: linear-gradient(140deg, #8a5a2a 0%, #B47E3F 40%, #D9A566 100%);
  color: #F2E8D5;
}
.post-preview-kicker {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(242,232,213,0.7);
  margin-bottom: 16px;
}
.post-preview-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: 68px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  flex: 1;
}
.post-preview-sig {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(242,232,213,0.6);
  text-transform: uppercase;
}

.post-preview--photo {
  background: #1a1410;
  color: #F2E8D5;
  padding: 0;
  display: block;
}
.post-preview-photo-layer {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(217,165,102,0.5), transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(180,126,63,0.8), transparent 55%),
    linear-gradient(135deg, #3a2817 0%, #1a1410 100%);
}
.post-preview-photo-layer::after {
  content:''; position:absolute; inset:0;
  background-image:
    repeating-linear-gradient(37deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.post-preview-photo-label {
  position: absolute; bottom: 32px; left: 32px;
}
.small-kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: rgba(242,232,213,0.8); margin-bottom: 12px; }
.headline-photo { font-family: 'DM Sans', sans-serif; font-style: italic; font-size: 62px; line-height: 0.9; letter-spacing: -0.03em; color: #F2E8D5; }

.post-preview--split {
  display: grid; grid-template-columns: 1fr 0.8fr;
  padding: 0;
  background: #F2E8D5;
}
.split-left { padding: 32px; display: flex; flex-direction: column; color: #2A1F18; }
.split-headline { font-family: 'DM Sans', sans-serif; font-size: 44px; line-height: 0.95; letter-spacing: -0.03em; flex: 1; }
.split-headline span { font-style: italic; }
.split-foot { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(42,31,24,0.55); }
.post-preview--split .post-preview-kicker { color: #7A5030; font-weight: 700; font-size: 10px; }
.split-right { background: linear-gradient(145deg, #B47E3F, #7A4F20); position: relative; }
.split-swatch {
  position: absolute; inset: 24px;
  background: radial-gradient(ellipse at 30% 30%, #D9A566, transparent 70%), #8a5a2a;
  border-radius: 4px;
  opacity: 0.9;
}

/* Caption — colonne droite, côte à côte avec l'image */
.gen-captions-scroll {
  flex: 1 1 0;
  min-width: 260px;
}

/* Shimmer pendant la génération */
.gen-caption-shimmer { padding-top: 4px; }
.gen-shimmer-line {
  height: 10px;
  border-radius: 4px;
  background: var(--app-surface-3);
  animation: skel-pulse 1.5s ease-in-out infinite;
}

/* Responsive — sous 1200px, empilé verticalement */
@media (max-width: 1200px) {
  .gen-preview {
    flex-direction: column;
    align-items: center;
  }
  .gen-preview-visual {
    position: static;
    flex: none;
    width: 100%;
    max-width: 340px;
  }
  .gen-captions-scroll {
    width: 100%;
    max-width: 340px;
    min-width: 0;
    margin-top: 22px;
  }
}

.gen-preview-caption {
  padding: 0;
  background: transparent;
}
.gen-preview-caption + .gen-preview-caption {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--app-line);
}
.gen-preview-caption--no-border { }

.caption-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.caption-label {
  font-size: 10px;
  color: var(--app-fg-4);
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
}
.caption-actions { display: flex; gap: 4px; }
.caption-body {
  font-size: 13px;
  color: var(--app-fg-2);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.caption-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--app-line);
  font-size: 11px;
  color: var(--app-fg-4);
  flex-wrap: wrap;
}

/* Caption Instagram */
.gen-ig-caption {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--app-line);
}
.caption-ig-body {
  font-size: 12px;
  color: var(--app-fg-2);
  line-height: 1.68;
  white-space: pre-line;
}
.caption-ig-editable {
  display: block;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 7px;
  margin: -5px -7px;
  outline: none;
  font-family: inherit;
  cursor: text;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
/* Dans les feed cards, la caption est scrollable et ne grandit pas librement */
.gen-feed-caption-wrap .caption-ig-editable {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.caption-ig-editable:hover {
  background: var(--app-surface-3);
  border-color: var(--app-line);
}
.caption-ig-editable:focus {
  background: var(--app-surface-2);
  border-color: rgba(79, 91, 213, .35);
  box-shadow: 0 0 0 3px rgba(79, 91, 213, .08);
}

/* ═══ VISUAL MODE TOGGLE ════════════════════════════════════════════════ */
.vis-mode-toggle {
  display: flex;
  background: var(--app-surface-2);
  border: 1px solid var(--app-line-2);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 6px;
}
.vis-mode-btn {
  flex: 1;
  padding: 9px 8px;
  border-radius: 7px;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .22s ease;
  background: transparent;
  color: var(--app-fg-3);
  letter-spacing: -0.01em;
}
.vis-mode-btn.active {
  background: var(--app-surface);
  color: var(--app-fg);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(17,24,50,0.1), 0 0 0 1px var(--app-line);
}
.vis-mode-btn:not(.active):hover { color: var(--app-fg-2); }

/* Timing indicator below the vis-mode toggle */
.vis-mode-timing {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--app-fg-4);
  margin-top: -4px; margin-bottom: 8px;
  padding: 0 2px;
}
.vis-mode-timing svg { opacity: 0.55; }

/* AutoStart banner — s'affiche quand la génération vient directement du Hub */
.gen-autostart-banner {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px;
  background: linear-gradient(90deg, rgba(79,91,213,0.07) 0%, rgba(14,165,198,0.05) 100%);
  border: 1px solid rgba(79,91,213,0.18);
  border-radius: var(--radius-sm);
  font-size: 11.5px; color: var(--app-fg-3);
  font-weight: 500;
  margin-bottom: -4px; /* compense le gap de gen-tools */
  animation: fadeIn .25s ease;
}
.gen-autostart-banner svg { color: var(--app-accent); flex-shrink: 0; }

/* ═══ FEED DE POSTS GÉNÉRÉS ══════════════════════════════════════════════ */
/* Colonne droite : loading épinglé en haut + feed scrollable en dessous */
.gen-results-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--app-bg);
}
.gen-results-col > .gen-feed-card--loading {
  flex-shrink: 0;
  margin: 20px 24px 0;
  border-radius: 14px;
}

.gen-feed-panel {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px 40px;
}

.gen-feed-card {
  display: flex;
  gap: 16px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 14px;
  padding: 14px;
  transition: box-shadow .2s;
  height: 340px;
  overflow: hidden;
  flex-shrink: 0;
}
.gen-feed-card:hover { box-shadow: 0 4px 16px rgba(15,21,40,.07); }

.gen-feed-card--loading {
  padding: 0;
  aspect-ratio: unset;
  height: 340px;
  overflow: hidden;
  border-radius: 14px;
}

.gen-feed-thumb {
  flex: 0 0 180px;
  width: 180px;
  aspect-ratio: 4/5;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  background: var(--app-surface-2);
  flex-shrink: 0;
  align-self: flex-start;
}
.gen-feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gen-feed-thumb-empty { width: 100%; height: 100%; background: var(--app-surface-3); }
.gen-feed-thumb-expand {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; align-items: center; justify-content: center;
  color: #fff; opacity: 0;
  transition: opacity .18s, background .18s;
}
.gen-feed-thumb:hover .gen-feed-thumb-expand {
  opacity: 1;
  background: rgba(0,0,0,.32);
}

.gen-feed-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.gen-feed-meta { display: flex; flex-direction: column; gap: 3px; }
.gen-feed-title { font-size: 13px; font-weight: 600; color: var(--app-fg); line-height: 1.4; }
.gen-feed-subtitle { font-size: 12px; color: var(--app-fg-3); line-height: 1.5; }
.gen-feed-caption-wrap {
  margin-top: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Modale expand ── */
.gen-expand-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: overlay-in .18s ease both;
}
@keyframes overlay-in { from { opacity:0; } to { opacity:1; } }
.gen-expand-modal {
  position: relative;
  max-width: min(480px, 90vw);
  width: 100%;
  animation: modal-bloom .28s cubic-bezier(.16,1,.3,1) both;
}
@keyframes modal-bloom {
  from { opacity:0; transform: scale(.94); }
  to   { opacity:1; transform: scale(1); }
}
.gen-expand-img {
  width: 100%; height: auto; display: block;
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
}
.gen-expand-close {
  position: absolute; top: -14px; right: -14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--app-surface); border: 1px solid var(--app-line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--app-fg-2);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transition: color .15s;
  z-index: 1;
}
.gen-expand-close:hover { color: var(--app-fg); }
.gen-expand-slides {
  display: flex; gap: 6px; justify-content: center;
  margin-top: 14px; flex-wrap: wrap;
}

/* ═══ ANIMATION SPEEDER — génération ════════════════════════════════════ */
.gen-card-loader {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--app-surface-2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: 24px;
}

.gen-speeder {
  position: absolute;
  top: 50%; left: 50%;
  margin-left: -50px; margin-top: -6px;
  animation: speeder .4s linear infinite;
}
.gen-speeder > span {
  height: 5px; width: 35px;
  background: rgba(15,20,50,.72);
  position: absolute; top: -19px; left: 60px;
  border-radius: 2px 10px 1px 0;
}
.gen-speeder > span > span:nth-child(1),
.gen-speeder > span > span:nth-child(2),
.gen-speeder > span > span:nth-child(3),
.gen-speeder > span > span:nth-child(4) {
  width: 30px; height: 1px;
  background: rgba(15,20,50,.72);
  position: absolute; animation: fazer1 .2s linear infinite;
}
.gen-speeder > span > span:nth-child(2) { top: 3px; animation: fazer2 .4s linear infinite; }
.gen-speeder > span > span:nth-child(3) { top: 1px; animation: fazer3 .4s linear infinite; animation-delay: -1s; }
.gen-speeder > span > span:nth-child(4) { top: 4px; animation: fazer4 1s  linear infinite; animation-delay: -1s; }

@keyframes fazer1 { 0%{left:0} 100%{left:-80px;opacity:0} }
@keyframes fazer2 { 0%{left:0} 100%{left:-100px;opacity:0} }
@keyframes fazer3 { 0%{left:0} 100%{left:-50px;opacity:0} }
@keyframes fazer4 { 0%{left:0} 100%{left:-150px;opacity:0} }

.gen-speeder-base { position: absolute; top: 0; left: 0; }
.gen-speeder-base > span {
  position: absolute; width: 0; height: 0;
  border-top: 6px solid transparent;
  border-right: 100px solid rgba(15,20,50,.72);
  border-bottom: 6px solid transparent;
}
.gen-speeder-base > span::before {
  content: "";
  height: 22px; width: 22px; border-radius: 50%;
  background: rgba(15,20,50,.72);
  position: absolute; right: -110px; top: -16px;
}
.gen-speeder-base > span::after {
  content: "";
  position: absolute; width: 0; height: 0;
  border-top: 0 solid transparent;
  border-right: 55px solid rgba(15,20,50,.72);
  border-bottom: 16px solid transparent;
  top: -16px; right: -98px;
}
.gen-speeder-face {
  position: absolute;
  height: 12px; width: 20px;
  background: rgba(15,20,50,.72);
  border-radius: 20px 20px 0 0;
  transform: rotate(-40deg);
  right: -125px; top: -15px;
}
.gen-speeder-face::after {
  content: "";
  height: 12px; width: 12px;
  background: rgba(15,20,50,.72);
  right: 4px; top: 7px;
  position: absolute;
  transform: rotate(40deg);
  transform-origin: 50% 50%;
  border-radius: 0 0 0 2px;
}

@keyframes speeder {
  0%   { transform: translate(2px,1px)   rotate(0deg); }
  10%  { transform: translate(-1px,-3px) rotate(-1deg); }
  20%  { transform: translate(-2px,0px)  rotate(1deg); }
  30%  { transform: translate(1px,2px)   rotate(0deg); }
  40%  { transform: translate(1px,-1px)  rotate(1deg); }
  50%  { transform: translate(-1px,3px)  rotate(-1deg); }
  60%  { transform: translate(-1px,1px)  rotate(0deg); }
  70%  { transform: translate(3px,1px)   rotate(-1deg); }
  80%  { transform: translate(-2px,-1px) rotate(1deg); }
  90%  { transform: translate(2px,1px)   rotate(0deg); }
  100% { transform: translate(1px,-2px)  rotate(-1deg); }
}

.gen-speeder-fazers { position: absolute; inset: 0; pointer-events: none; }
.gen-speeder-fazers span {
  position: absolute; height: 1px; width: 20%;
  background: rgba(15,20,50,.12);
}
.gen-speeder-fazers span:nth-child(1) { top:20%; animation: lf  .6s linear infinite; animation-delay:-5s; }
.gen-speeder-fazers span:nth-child(2) { top:40%; animation: lf2 .8s linear infinite; animation-delay:-1s; }
.gen-speeder-fazers span:nth-child(3) { top:60%; animation: lf3 .6s linear infinite; }
.gen-speeder-fazers span:nth-child(4) { top:80%; animation: lf4 .5s linear infinite; animation-delay:-3s; }

@keyframes lf  { 0%{left:200%} 100%{left:-200%;opacity:0} }
@keyframes lf2 { 0%{left:200%} 100%{left:-200%;opacity:0} }
@keyframes lf3 { 0%{left:200%} 100%{left:-100%;opacity:0} }
@keyframes lf4 { 0%{left:200%} 100%{left:-100%;opacity:0} }

/* ─── Deep Dive — image mode selector ──────────────────────────────────── */
.dd-mode-pills {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.dd-mode-pill {
  flex: 1; min-width: 80px; padding: 9px 10px;
  background: var(--app-surface); border: 1.5px solid var(--app-line-2);
  border-radius: 10px; cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s;
  display: flex; flex-direction: column; gap: 2px;
}
.dd-mode-pill-label { font-size: 12.5px; font-weight: 600; color: var(--app-fg); }
.dd-mode-pill-sub   { font-size: 11px; color: var(--app-fg-4); }
.dd-mode-pill--active {
  border-color: var(--app-accent); background: rgba(79,91,213,.07);
}
.dd-mode-pill--active .dd-mode-pill-label { color: var(--app-accent); }

.gen-card-loader__cancel {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  background: none; border: 1px solid rgba(15,20,50,.12); border-radius: 5px;
  color: rgba(15,20,50,.3); font-size: 10.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; cursor: pointer; transition: border-color .15s, color .15s;
}
.gen-card-loader__cancel:hover { border-color: rgba(15,20,50,.28); color: rgba(15,20,50,.6); }

.gen-card-loader__step {
  position: relative; z-index: 2;
  font-size: 10.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(15,20,50,.38);
  animation: step-surface .3s ease both;
  text-align: center;
}
@keyframes step-surface {
  from { opacity:0; transform: translateY(4px); }
  to   { opacity:1; transform: translateY(0); }
}
.gen-card-loader__counter {
  position: relative; z-index: 2;
  margin-top: 5px;
  font-family: 'DM Sans', sans-serif;
  font-style: italic; font-weight: 300;
  font-size: 11px; letter-spacing: .06em;
  color: rgba(15,20,50,.2);
  font-variant-numeric: tabular-nums;
}

.gen-card-loader--exiting {
  transition: opacity .28s ease-in, transform .28s ease-in;
  opacity: 0; transform: scale(.95);
  pointer-events: none;
}
.gen-result--entering {
  animation: result-bloom .42s cubic-bezier(.16,1,.3,1) both;
}
@keyframes result-bloom {
  from { opacity:0; transform: translateY(-12px) scale(.98); }
  to   { opacity:1; transform: scale(1); }
}
@keyframes step-fade {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bouton Générer inactif */
.btn-forge--inactive { opacity: .45; cursor: not-allowed; }
.btn-forge--inactive:hover { transform: none; }


/* ═══ Premium Forge generate button ════════════════════════════════════ */
.btn-forge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--app-fg);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.1) inset,
    0 8px 24px rgba(15,21,40,0.22);
  transition: transform .2s ease, box-shadow .2s ease, opacity .15s;
}
.btn-forge:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 12px 32px rgba(15,21,40,0.32);
}
.btn-forge:disabled { opacity: 0.32; cursor: not-allowed; }

/* ═══ QUEUE ═══════════════════════════════════════════════════════════ */
.view-toggle {
  display: flex;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.view-btn {
  all: unset;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  font-size: 12.5px; font-weight: 500;
  color: var(--app-fg-3);
  border-radius: 5px;
  cursor: pointer;
  transition: all .15s ease;
}
.view-btn:hover { color: var(--app-fg); }
.view-btn.active { background: var(--app-surface-3); color: var(--app-fg); }

/* Calendar */
.cal-card { overflow: hidden; }
.cal-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--app-line);
  display: flex; align-items: center; justify-content: space-between;
}
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-range { font-size: 14px; font-weight: 600; color: var(--app-fg); letter-spacing: -0.01em; }
.cal-legend { display: flex; gap: 14px; font-size: 11px; color: var(--app-fg-3); }
.cal-legend-item { display: flex; align-items: center; gap: 5px; }
.cal-swatch { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.cal-swatch--quote { background: #A78BFF; }
.cal-swatch--bts { background: #7AE7FF; }
.cal-swatch--product { background: #FFD59E; }
.cal-swatch--news { background: #FFE066; }
.cal-swatch--pedago { background: #3ECF8E; }

.cal-grid {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
}
.cal-hours-col, .cal-day-col { position: relative; border-right: 1px solid var(--app-line); }
.cal-day-col:last-child { border-right: none; }
.cal-day-head {
  height: 40px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--app-line);
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
}
.cal-day-label { color: var(--app-fg-4); font-variant: all-small-caps; letter-spacing: 0.08em; }
.cal-day-num { color: var(--app-fg); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.cal-day-num.today {
  background: var(--app-surface-3);
  padding: 1px 7px;
  border-radius: 20px;
  border: 1px solid var(--app-line-3);
}
.cal-hour {
  height: 64px;
  padding: 4px 8px;
  font-size: 10px; color: var(--app-fg-4);
  border-bottom: 1px solid var(--app-line);
}
.cal-slot { height: 64px; border-bottom: 1px solid var(--app-line); }
.cal-event {
  position: absolute;
  left: 4px; right: 4px;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  border-left: 2px solid;
}
.cal-event-time { font-size: 9.5px; opacity: 0.7; font-weight: 600; }
.cal-event-title {
  font-weight: 500;
  color: var(--app-fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.cal-event.draft { border-style: dashed; opacity: 0.85; }
.cal-event--quote   { background: rgba(167,139,255,0.12); border-color: #A78BFF; }
.cal-event--bts     { background: rgba(122,231,255,0.12); border-color: #7AE7FF; }
.cal-event--product { background: rgba(255,213,158,0.12); border-color: #FFD59E; }
.cal-event--news    { background: rgba(255,224,102,0.12); border-color: #FFE066; }
.cal-event--pedago  { background: rgba(62,207,142,0.12); border-color: #3ECF8E; }

/* Feed view */
.queue-feed { display: flex; flex-direction: column; gap: 12px; }
.feed-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
  overflow: hidden;
}
.feed-thumb {
  aspect-ratio: 1/1;
  position: relative;
  border-right: 1px solid var(--app-line);
  display: grid; place-items: center;
  overflow: hidden;
}
.feed-thumb--quote   { background: linear-gradient(140deg, #3d2a5a, #1a1540); }
.feed-thumb--bts     { background: linear-gradient(140deg, #2a1f18, #1a1410); }
.feed-thumb--news    { background: linear-gradient(140deg, #1a1b2e, #2a1f3a); }
.feed-thumb--product { background: linear-gradient(145deg, #3a2817 0%, #B47E3F 100%); }
.feed-thumb--pedago  { background: #F2E8D5; color: #2A1F18; }
.feed-thumb-quote { font-family: 'DM Sans', sans-serif; font-size: 48px; color: #FF9ED3; line-height: 0.6; }
.feed-thumb-label { font-family: 'DM Sans', sans-serif; font-size: 14px; text-align: center; color: #F2E8D5; line-height: 1.1; padding: 4px; }
.feed-thumb--pedago .feed-thumb-label { color: #2A1F18; }
.feed-thumb-chip { font-size: 9px; font-weight: 700; letter-spacing: 0.15em; color: #FF6B6B; }

.feed-meta { padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.feed-meta-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--app-fg-4); }
.feed-when { color: var(--app-fg-3); font-weight: 500; }
.feed-type { color: var(--app-fg-2); }
.feed-title { font-size: 14.5px; font-weight: 600; color: var(--app-fg); letter-spacing: -0.015em; margin-top: 2px; }
.feed-caption { font-size: 12.5px; color: var(--app-fg-3); line-height: 1.5; margin-bottom: 6px; }
.feed-actions { display: flex; gap: 6px; margin-top: auto; }

/* Grid view */
.queue-grid-wrap { display: flex; flex-direction: column; gap: 16px; }
.queue-grid-legend {
  display: flex; gap: 18px;
  font-size: 11.5px; color: var(--app-fg-3);
  align-items: center;
}
.queue-grid-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot--done { background: var(--chromatic); }
.legend-dot--planned { background: transparent; border: 1.5px dashed var(--app-line-3); }
.legend-dot--published { background: var(--app-success); }

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  max-width: 560px;
  background: var(--app-surface);
  padding: 3px;
  border-radius: var(--radius);
  border: 1px solid var(--app-line);
}
.ig-cell {
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.ig-cell.ig-cell--planned { opacity: 0.72; }
.ig-cell.ig-cell--planned::after {
  content:''; position:absolute; inset:0;
  border: 1.5px dashed rgba(150,180,255,0.4);
}
.ig-cell-foot {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.ig-cell-status { font-size: 9.5px; font-weight: 600; letter-spacing: 0.05em; color: #fff; }
.ig-cell-status--planned { color: rgba(255,255,255,0.7); }
.ig-cell-status--published { color: #7AE7FF; }

/* ═══ BRAND ═══════════════════════════════════════════════════════════ */
.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.brand-card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.brand-field { margin-bottom: 14px; }
.brand-field label {
  display: block;
  font-size: 11px;
  color: var(--app-fg-4);
  font-variant: all-small-caps;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 6px;
}
.brand-input, .brand-textarea {
  padding: 10px 12px;
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  border-radius: var(--radius-sm);
  color: var(--app-fg);
  font-size: 13.5px;
  line-height: 1.5;
}
.brand-textarea { min-height: 64px; }
.brand-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.brand-chip {
  padding: 5px 11px;
  font-size: 12px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-line);
  color: var(--app-fg);
  border-radius: 20px;
  font-weight: 500;
}

/* Voice */
.voice-sliders { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; }
.voice-slider { }
.voice-slider-labels {
  display: flex; justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 4px;
}
.voice-side--left { color: var(--app-fg); font-weight: 600; }
.voice-side--right { color: var(--app-fg-4); }
.brand-voice-samples {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--app-line);
}
.voice-sample {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px;
  font-family: 'DM Sans', sans-serif; font-style: italic;
  color: var(--app-fg-2);
}
.voice-sample-tick {
  font-family: 'DM Sans', sans-serif; font-style: normal;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.voice-sample-tick--yes { color: var(--app-success); background: rgba(62,207,142,0.1); }
.voice-sample-tick--no  { color: var(--app-danger);  background: rgba(255,107,107,0.1); }

/* Palette */
.palette-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px; }
.swatch { display: flex; flex-direction: column; gap: 8px; }
.swatch-chip {
  aspect-ratio: 1/1;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.swatch-name { font-size: 11.5px; color: var(--app-fg); font-weight: 600; letter-spacing: -0.01em; }
.swatch-role { font-size: 10px; color: var(--app-fg-4); margin-top: 1px; }

.palette-preview {
  padding-top: 16px;
  border-top: 1px solid var(--app-line);
}
.palette-preview-label {
  font-size: 11px; color: var(--app-fg-4);
  font-variant: all-small-caps; letter-spacing: 0.1em; font-weight: 600;
  margin-bottom: 10px;
}
.palette-preview-stage { display: flex; justify-content: center; }

/* Type */
.type-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--app-line);
}
.type-row:last-child { border-bottom: none; }
.type-preview {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--app-surface-2);
  border-radius: 8px;
  font-size: 32px;
  color: var(--app-fg);
  line-height: 1;
}
.type-name { font-size: 14px; font-weight: 600; color: var(--app-fg); }
.type-name span { font-weight: 400; color: var(--app-fg-3); font-style: italic; }
.type-desc { font-size: 12px; color: var(--app-fg-3); margin-top: 2px; }

/* Rules */
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rules-col { padding: 16px; border-radius: var(--radius); border: 1px solid var(--app-line); }
.rules-col--do { background: rgba(62,207,142,0.04); border-color: rgba(62,207,142,0.2); }
.rules-col--dont { background: rgba(255,107,107,0.04); border-color: rgba(255,107,107,0.2); }
.rules-col-head {
  font-size: 13px; font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.rules-col--do .rules-col-head { color: var(--app-success); }
.rules-col--dont .rules-col-head { color: var(--app-danger); }
.rules-col ul { margin: 0; padding: 0 0 0 18px; }
.rules-col li { font-size: 13px; color: var(--app-fg-2); margin-bottom: 6px; line-height: 1.45; }


/* ═══ SETTINGS ═══════════════════════════════════════════════════════════ */

.settings-layout {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 28px;
  align-items: start;
}

/* ─── Left nav ─── */
.settings-nav {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--app-fg-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, color .12s;
  text-align: left;
  font-family: inherit;
  letter-spacing: -0.005em;
}
.settings-nav-item:hover { background: var(--app-surface-2); color: var(--app-fg); }
.settings-nav-item.active { background: rgba(79,91,213,0.07); color: var(--app-accent); font-weight: 600; }
.settings-nav-divider { height: 1px; background: var(--app-line); margin: 6px 0; }
.settings-nav-item--danger { color: var(--app-fg-4); }
.settings-nav-item--danger:hover { color: var(--app-danger); background: rgba(209,69,69,0.05); }

/* ─── Content ─── */
.settings-content { min-width: 0; }

/* ─── Avatar card ─── */
.settings-avatar-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.settings-avatar-card::after {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0; width: 200px;
  background: radial-gradient(ellipse at 100% 50%, rgba(79,91,213,0.055), transparent 70%);
  pointer-events: none;
}
.settings-avatar {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--app-accent) 0%, var(--app-accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
  flex-shrink: 0;
}

/* ─── Sections ─── */
.settings-section {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  overflow: hidden;
}
.settings-section-head {
  padding: 14px 22px 12px;
  border-bottom: 1px solid var(--app-line);
}
.settings-section-title { font-size: 13px; font-weight: 600; color: var(--app-fg); margin: 0; }
.settings-section-sub { font-size: 11.5px; color: var(--app-fg-4); margin-top: 2px; line-height: 1.4; }
.settings-section-body { display: flex; flex-direction: column; }

/* ─── Rows ─── */
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--app-line);
  gap: 24px;
  transition: background .1s;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: rgba(150,160,255,0.025); }
.settings-row--danger:hover { background: rgba(209,69,69,0.025); }
.settings-row-l { flex: 1; min-width: 0; }
.settings-row-r { flex-shrink: 0; display: flex; align-items: center; }
.settings-row-label { font-size: 13px; font-weight: 500; color: var(--app-fg); }
.settings-row-sub { font-size: 11.5px; color: var(--app-fg-4); margin-top: 2px; line-height: 1.45; }

/* ─── Tags ─── */
.settings-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
  background: rgba(31,157,106,0.1); color: var(--app-success);
}
.settings-tag--neutral { background: var(--app-surface-2); color: var(--app-fg-3); }
.settings-tag--accent  { background: rgba(79,91,213,0.09); color: var(--app-accent); }

/* ─── Plan card ─── */
.settings-plan-hero {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.settings-plan-hero::before {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(79,91,213,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.settings-plan-tier {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 6px; margin-bottom: 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  background: var(--app-surface-2); color: var(--app-fg-3);
  border: 1px solid var(--app-line-2);
}

/* ─── Credits bar ─── */
.settings-credits-bar {
  width: 110px; height: 5px;
  background: var(--app-surface-3); border-radius: 3px; overflow: hidden;
}
.settings-credits-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--app-accent), var(--app-accent-2));
  border-radius: 3px; transition: width .5s ease;
}

/* ─── Plan compare rows ─── */
.settings-plan-compare-row {
  padding: 16px 22px;
  border-bottom: 1px solid var(--app-line);
  transition: background .12s;
}
.settings-plan-compare-row:last-child { border-bottom: none; }
.settings-plan-compare-row:hover { background: var(--app-surface-2); }
.settings-plan-compare-row.spc--current { background: rgba(79,91,213,0.03); }

/* ─── Connexion item ─── */
.settings-conn-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px; border-bottom: 1px solid var(--app-line);
  transition: background .1s;
}
.settings-conn-row:last-child { border-bottom: none; }
.settings-conn-row:hover { background: rgba(150,160,255,0.025); }
.settings-conn-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.settings-conn-info { flex: 1; min-width: 0; }
.settings-conn-name { font-size: 13px; font-weight: 500; color: var(--app-fg); }
.settings-conn-status { font-size: 11.5px; color: var(--app-fg-4); margin-top: 2px; }
.settings-conn-status.connected { color: var(--app-success); }

/* ─── Toggle ─── */
.settings-toggle {
  position: relative; display: inline-block;
  width: 36px; height: 20px;
  border-radius: 10px; border: none;
  cursor: pointer; flex-shrink: 0;
  transition: background .2s;
}
.settings-toggle-knob {
  position: absolute; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: left .18s cubic-bezier(.4,0,.2,1);
}

/* ─── Brand health warning banner in Studio ─────────────────────────── */
.gen-brand-warn-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(212,148,42,0.08);
  border: 1px solid rgba(212,148,42,0.25);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--app-warn, #d4942a);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.gen-brand-warn-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.gen-brand-warn-link {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--app-warn, #d4942a);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 0;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.85;
}
.gen-brand-warn-link:hover { opacity: 1; }

/* ─── Shimmer skeleton ───────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--app-surface-2, #2a2a38) 25%, var(--app-surface-3, #32323e) 50%, var(--app-surface-2, #2a2a38) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm, 4px);
  display: block;
}

/* ─── Mobile responsiveness (max-width: 768px) ───────────────────────── */
@media (max-width: 768px) {
  /* Hide sidebar on mobile */
  .sidebar {
    display: none;
  }

  /* Studio grid: stack vertically */
  .gen-studio-grid,
  .gen-studio-grid--studio {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: unset;
  }

  /* Tools panel: no right border, scrollable */
  .gen-tools {
    border-right: none;
    border-bottom: 1px solid var(--app-line);
    max-height: 60vh;
    overflow-y: auto;
  }

  /* Feed panel: reasonable height */
  .gen-feed-panel {
    min-height: 50vh;
  }

  /* Preview image: responsive */
  .gen-feed-thumb img {
    max-width: 100%;
    height: auto;
  }

  /* Studio head: allow wrapping */
  .gen-studio-head {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }

  /* Action buttons in feed card: wrap */
  .caption-head {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Page body padding reduction */
  .page-body {
    padding: 16px;
  }

  /* Topbar stays visible (default) */
  .topbar {
    display: flex;
  }
}

