/* editor.css — éditeur mobile-first. */

.page-editor { padding-bottom: 96px; } /* place pour la barre Terminé fixe */

.editor__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.editor__back {
  width: var(--tap);
  height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--fg);
  text-decoration: none;
  font-size: 1.3rem;
}
.editor__head h1 { margin: 0; font-size: 1.9rem; }

.field { margin: 18px 0; }
.field > label, .field__label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.opt { color: var(--muted); font-weight: 400; font-size: 0.85em; }

input[type="text"] {
  width: 100%;
  min-height: var(--tap);
  padding: 0.6em 0.9em;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--fg);
  font: inherit;
}

/* Thèmes */
.theme-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 6px 12px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.theme-chip[aria-pressed="true"] { border-color: var(--accent); }
.theme-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }

/* Slides */
.slides { display: flex; flex-direction: column; gap: 12px; }
.slide {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,0.06);
}
.slide--error { border-color: #ef4444; }
.slide__thumb {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.06);
}
.slide__thumb img { width: 100%; height: 100%; object-fit: cover; }
.slide__thumb--text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.slide__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.slide__text {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 8px;
  font: inherit;
  resize: vertical;
  background: #fff;
  color: var(--fg);
}
.slide__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.slide__actions { display: flex; gap: 4px; }

.tag { font-size: 0.78rem; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag--wait { background: #fef3c7; color: #92400e; }
.tag--ok { background: #dcfce7; color: #166534; }
.tag--err { background: #fee2e2; color: #991b1b; }

.icon {
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 10px;
  background: rgba(0,0,0,0.05);
  color: var(--fg);
  font-size: 1.1rem;
  cursor: pointer;
}
.icon:disabled { opacity: 0.3; cursor: not-allowed; }
.icon--del { color: #b91c1c; }
.icon--retry { color: #a16207; background: #fef3c7; }

.add-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.add-btn { flex: 1; }

.global-status {
  min-height: 1.4em;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 12px 0;
}

/* Barre Terminé fixe en bas */
.finalize-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg-2), transparent);
  display: flex;
  justify-content: center;
}
.finalize { width: 100%; max-width: var(--maxw); font-size: 1.05rem; }

/* Écran de succès */
.success { text-align: center; padding: 8vh 4px; }
.success h1 { font-size: 2rem; margin: 0 0 6px; }
.success__sub { color: var(--muted); margin-top: 0; }
.success__link { display: flex; gap: 8px; margin: 20px 0 12px; }
.success__link input {
  flex: 1;
  font-size: 0.85rem;
}
.success__actions { display: flex; gap: 10px; justify-content: center; margin: 14px 0; }
.success__actions .btn { flex: 1; }
.success__note { color: var(--muted); font-size: 0.82rem; margin-top: 18px; }
