:root {
  /* Fond & surfaces */
  --bg-main: #030712;
  --bg-gradient-top: #111827;
  --bg-gradient-bottom: #020617;
  --bg-card: rgba(15, 23, 42, 0.96);
  --bg-elevated: rgba(15, 23, 42, 0.98);

  /* Couleurs néon / accents */
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-blue: #38bdf8;
  --accent-orange: #f97316;

  /* Texte */
  --text-main: #e5e7eb;
  --text-soft: #9ca3af;
  --text-muted: #6b7280;

  /* Bordures & ombres */
  --border-subtle: rgba(148, 163, 184, 0.28);
  --border-strong: rgba(148, 163, 184, 0.45);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.85);

  /* Rayons */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  /* Transitions */
  --transition-fast: 0.16s ease-out;
  --transition-med: 0.24s ease-out;
}

/* ===========================================
   RESET
   =========================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, var(--bg-gradient-top) 0, var(--bg-gradient-bottom) 48%, #000 100%);
}

/* ===========================================
   SHELL GLOBAL
   =========================================== */

.app-shell {
  max-width: 1400px;
  margin: 24px auto 40px;
  padding: 20px 22px 32px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(88, 28, 135, 0.32) 0, transparent 45%),
    radial-gradient(circle at 100% 0, rgba(56, 189, 248, 0.22) 0, transparent 45%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(3, 7, 18, 0.99));
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(148, 163, 184, 0.22);
}

/* ===========================================
   HEADER
   =========================================== */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px 4px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.32);
}

header h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f9fafb;
}

.logo-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #facc15 0, #f97316 38%, #fb7185 100%);
  box-shadow: 0 0 20px rgba(248, 250, 252, 0.9);
}

.subtitle {
  margin: 4px 0 0 26px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.badge-env {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.8), rgba(12, 74, 110, 0.96));
  border: 1px solid rgba(191, 219, 254, 0.4);
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #bbf7d0 0, #22c55e 40%, #16a34a 100%);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.95);
}

.badge-text {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===========================================
   CARTE GENERIQUE
   =========================================== */

.card {
  margin-top: 14px;
  padding: 18px 20px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.99)),
    radial-gradient(circle at top left, rgba(30, 64, 175, 0.4), transparent 55%);
  box-shadow: var(--shadow-soft);
}

/* ===========================================
   FORMULAIRES / CHAMPS
   =========================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 0.96) 0, rgba(15, 23, 42, 1) 50%, #020617 100%);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    transform 0.1s ease-out;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-blue);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.6),
    0 0 0 8px rgba(56, 189, 248, 0.15);
  background:
    radial-gradient(circle at 0 0, rgba(30, 64, 175, 0.24), rgba(15, 23, 42, 1));
  transform: translateY(-1px);
}

select,
select option {
  background-color: #020617;
  color: #e5e7eb;
}

.help {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--text-soft);
}

.help.small {
  font-size: 0.72rem;
}

.status-text,
.small-status {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.small-status {
  margin-left: 8px;
}

.field-hidden {
  display: none;
}

/* ===========================================
   BOUTONS
   =========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform 0.08s ease-out;
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.76rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
  border-color: rgba(253, 186, 116, 0.9);
  color: #020617;
  box-shadow:
    0 12px 30px rgba(248, 113, 113, 0.6),
    0 0 0 1px rgba(249, 250, 251, 0.16);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c, #fb7185);
  transform: translateY(-1px);
  box-shadow:
    0 16px 35px rgba(248, 113, 113, 0.7),
    0 0 0 1px rgba(249, 250, 251, 0.18);
}

.btn-primary:active {
  background: linear-gradient(135deg, #ea580c, #f97373);
  transform: translateY(0);
  box-shadow:
    0 8px 22px rgba(248, 113, 113, 0.6),
    0 0 0 1px rgba(249, 250, 251, 0.2);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--text-soft);
}

.btn-ghost:hover {
  background: rgba(30, 64, 175, 0.4);
  border-color: rgba(129, 140, 248, 0.7);
  color: #e5e7eb;
}

.footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Boutons dans les tableaux */

.table-wrapper button,
#articles-tbody button {
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.35), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  color: #e5e7eb;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.9);
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform 0.08s ease-out,
    box-shadow var(--transition-fast);
}

.table-wrapper button:hover,
#articles-tbody button:hover {
  background:
    radial-gradient(circle at 0 0, rgba(236, 72, 153, 0.5), transparent 55%),
    linear-gradient(135deg, #4c1d95, #ec4899);
  color: #f9fafb;
  box-shadow:
    0 0 18px rgba(236, 72, 153, 0.8),
    0 10px 24px rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
}

.table-wrapper button:active,
#articles-tbody button:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(248, 250, 252, 0.15);
}

/* ===========================================
   ONGLET / TABS
   =========================================== */

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.36);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.85);
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-tabs::-webkit-scrollbar {
  height: 4px;
}
.admin-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.admin-tabs::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
}

.tab-button {
  border-radius: var(--radius-pill);
  border: 0;
  padding: 6px 14px;
  font-size: 0.8rem;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform 0.08s ease-out,
    box-shadow 0.18s ease-out;
}

.tab-button:hover {
  background: rgba(31, 41, 55, 0.9);
  color: #e5e7eb;
}

.tab-button.active {
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.5), transparent 60%),
    linear-gradient(135deg, rgba(76, 29, 149, 0.98), rgba(236, 72, 153, 0.98));
  color: #f9fafb;
  box-shadow:
    0 0 0 1px rgba(248, 250, 252, 0.16),
    0 0 26px rgba(129, 140, 248, 0.7);
}

/* Panels d’onglet – logique commune */

.tab-panel {
  display: none;
  margin-top: 10px;
}

.tab-panel.active {
  display: block;
}

/* ===========================================
   GRILLES / TABLES / LAYOUT GENERIQUE
   =========================================== */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.1fr);
  gap: 16px;
}

.table-wrapper {
  padding: 10px 12px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.99));
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

thead tr {
  background: rgba(15, 23, 42, 0.98);
}

th,
td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.95);
}

th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

td {
  color: var(--text-main);
}

tbody tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.7);
}

tbody tr:hover td {
  background: rgba(30, 64, 175, 0.5);
}

.col-num {
  text-align: right;
}

.sub-table-wrapper {
  max-height: 220px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.96);
}

.sub-table {
  width: 100%;
  border-collapse: collapse;
}

.sub-table th,
.sub-table td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.98);
}

.form-card {
  padding: 10px 12px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 1));
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric-card {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.99));
}

.metric-label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.metric-value {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.metric-help {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pill,
.pill-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.78rem;
  color: var(--text-soft);
}

.pill-small {
  font-size: 0.72rem;
}
/* ===========================================
   APPARENCE – LAYOUT GÉNÉRAL
   =========================================== */

.appearance-layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

/* Colonne gauche : sélection pages / zones */
.appearance-left {
  flex: 0 0 360px;
  max-width: 380px;
}

/* Colonne droite : preview + éditeur */
.appearance-right {
  flex: 1;
  min-width: 0;
}

/* Panneaux colonne gauche (pages / zones) */

.appearance-page-panel {
  margin-bottom: 12px;
}

.appearance-page-panel .appearance-page-panel-inner,
.appearance-page-panel-inner {
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.99));
}

.appearance-page-select-field {
  margin-top: 10px;
}

.appearance-page-select-field label {
  font-weight: 600;
  font-size: 0.85rem;
}

.appearance-page-select-field select {
  width: 100%;
  margin-top: 6px;
}

/* ===========================================
   CARTE D'APERÇU + IFRAME
   =========================================== */

.appearance-preview-card {
  padding: 10px 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.28), transparent 60%),
    radial-gradient(circle at 100% 0, rgba(236, 72, 153, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.99));
  box-shadow: var(--shadow-soft);
  overflow: visible;
}

.appearance-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

/* ===========================================
   PREVIEW + PANNEAUX EN COLONNE
   =========================================== */

.preview-css-layout {
  display: block;
}

/* Bloc iframe */

.preview-wrapper {
  margin-bottom: 12px;
}

/* Iframe large et haute */

.appearance-preview-frame {
  width: 100%;
  max-width: 2000px;
  height: 80vh;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #000;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.98);
}

/* Desktop : full width */
.appearance-preview-card[data-device="desktop"] .appearance-preview-frame {
  max-width: 100%;
}

/* Tablet / mobile : limites optionnelles */
.appearance-preview-card[data-device="tablet"] .appearance-preview-frame {
  max-width: 900px;
}

.appearance-preview-card[data-device="mobile"] .appearance-preview-frame {
  max-width: 420px;
}

/* ===========================================
   TOOLBAR APPAREILS
   =========================================== */

.device-toolbar {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.device-btn {
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  cursor: pointer;
  background: transparent;
  color: var(--text-soft);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform 0.08s ease-out;
}

.device-btn:hover {
  background: rgba(31, 41, 55, 0.98);
  color: #e5e7eb;
}

.device-btn.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.98), rgba(236, 72, 153, 0.96));
  color: #0b1120;
}

/* ===========================================
   PANNEAU DE DROITE (STYLES / CONTENU)
   =========================================== */

.editor-panel {
  padding: 8px 10px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
}

/* Wrapper des deux panneaux (styles / contenu) */
.editor-mode-panels {
  margin-top: 6px;
}

/* Panneaux liés aux modes (Styles / Contenu) */

.editor-mode-panel {
  display: none;
  margin-top: 6px;
  padding: 8px 9px 10px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.62);
  background:
    radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 0.98));
}

.editor-mode-panel.active {
  display: block;
}

/* Contexte (page / zone / élément) */

.editor-context {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 2px;
  column-gap: 6px;
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.context-row {
  display: contents;
}

.context-label {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.context-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e5e7eb;
  word-break: break-all;
}

/* Switch de mode Styles / Contenu */

.editor-mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  margin: 6px 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.mode-btn {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.mode-btn:hover {
  background: rgba(31, 41, 55, 0.98);
  color: #e5e7eb;
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(229, 231, 235, 0.94));
  color: #020617;
}

/* ===========================================
   ONGLET STYLES – CSS EDITOR
   (contenu de #editor-css-panel)
   =========================================== */

.css-panel-title {
  margin-bottom: 4px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #e5e7eb;
}

/* États Normal / Hover / Active */

.state-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.state-btn {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.state-btn:hover {
  background: rgba(31, 41, 55, 0.98);
  color: #e5e7eb;
}

.state-btn.active {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(229, 231, 235, 0.94));
  color: #020617;
}

/* Corps du panneau CSS structuré en blocs */

.editor-controls {
  margin-top: 6px;
  padding: 8px 9px 10px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.62);
  background:
    radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.22), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 0.98));
  transition: opacity var(--transition-med);
}

.editor-controls.disabled,
.editor-controls[data-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* Blocs logiques (Couleurs, Typo, Bordures, etc.) */

.design-block {
  padding: 8px 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  margin-bottom: 8px;
}

.design-block-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.design-block-header label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e5e7eb;
}

.design-block-header .help.small {
  font-size: 0.72rem;
  color: var(--text-soft);
}

/* Palette néon */

.neon-palette {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}

.btn-neon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.98);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(248, 250, 252, 0.9);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn-neon:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 18px rgba(248, 250, 252, 1);
}

/* Champs du bloc Couleurs / Typo / Effets */

.editor-controls .form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 4px;
}

.editor-controls .form-row .field {
  flex: 1;
}

.color-input {
  width: 100%;
  height: 30px;
  padding: 0;
}

/* Sliders d'ombre */

.slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.slider-row input[type="range"] {
  flex: 1;
}

.slider-row span {
  min-width: 26px;
  text-align: right;
  font-size: 0.76rem;
  color: var(--text-soft);
}

/* ================================
   Modal édition texte – SBS_TEXT_PANEL
   ================================ */

.sbs-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.sbs-modal.hidden {
  display: none;
}

.sbs-modal-content {
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  padding: 1.5rem;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

/* … le reste de tes règles pour #sbs-textarea, .sbs-modal-actions, .sbs-text-item, etc. */


.sbs-modal-content h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

#sbs-textarea {
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  resize: vertical;
  min-height: 120px;
}

.sbs-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.sbs-modal-actions button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  background: #f9fafb;
}

.sbs-modal-actions button.primary {
  background: #ec4899;
  border-color: #ec4899;
  color: #ffffff;
}

.sbs-modal-actions button.primary:hover {
  background: #db2777;
}

/* Liste des textes dans le panneau contenu */

#sbs-text-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.sbs-text-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.85rem;
}

.sbs-text-item span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sbs-text-item .sbs-btn-edit {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  background: #f9fafb;
}

/* Panneau images – apparence des slots */
.image-slot-item {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  padding: 10px 0 14px;
}

.sbs-image-dropzone {
  margin-top: 6px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  padding: 10px;
  transition: all 0.15s ease;
}

.sbs-image-dropzone-inner {
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.4;
  opacity: 0.9;
}

.sbs-image-dropzone-title {
  font-weight: 600;
}

.sbs-image-dropzone-sub {
  font-size: 0.7rem;
  opacity: 0.8;
}

/* État dragover */
.sbs-image-dropzone.is-dragover {
  border-color: #f97316;
  background: rgba(30, 64, 175, 0.4);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.6);
}

/* Petite pastille */
.badge-small {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
}


/* ajuste après, je te renvoie index.html réécrit entièrement */



/* ===========================================
   SEO – PAGES
   =========================================== */

.seo-preview {
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #020617;
}

.seo-preview-url {
  margin: 0 0 2px;
  font-size: 0.76rem;
  color: #22c55e;
}

.seo-preview-title {
  margin: 0 0 2px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.seo-preview-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.error-msg {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #f97373;
}

.seo-suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.seo-suggestion-block {
  position: relative;
  overflow: hidden;
  padding: 8px 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(129, 140, 248, 0.7);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.35), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  box-shadow:
    0 0 18px rgba(56, 189, 248, 0.3),
    0 18px 34px rgba(0, 0, 0, 0.85);
}

.seo-suggestion-block::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.22),
    rgba(236, 72, 153, 0.2),
    rgba(129, 140, 248, 0.22)
  );
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity var(--transition-med);
}

.seo-suggestion-block:hover::before {
  opacity: 1;
}

.seo-suggestion-block textarea {
  font-size: 0.82rem;
  min-height: 80px;
}

.section-separator {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
  margin: 18px 0 14px;
  opacity: 0.95;
  position: relative;
}

.section-separator::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(56, 189, 248, 0.7),
    rgba(236, 72, 153, 0.7),
    transparent
  );
  opacity: 0.7;
}

/* Table des pages SEO */

.seo-pages-table {
  table-layout: fixed;
}

.seo-pages-table th,
.seo-pages-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-pages-table th:nth-child(1),
.seo-pages-table td:nth-child(1) { width: 18%; }
.seo-pages-table th:nth-child(2),
.seo-pages-table td:nth-child(2) { width: 22%; }
.seo-pages-table th:nth-child(3),
.seo-pages-table td:nth-child(3) { width: 22%; }
.seo-pages-table th:nth-child(4),
.seo-pages-table td:nth-child(4) { width: 28%; }
.seo-pages-table th:nth-child(5),
.seo-pages-table td:nth-child(5) { width: 10%; }

.seo-pages-table th {
  cursor: pointer;
  position: relative;
}

.seo-pages-table th::after {
  content: "⇅";
  font-size: 0.7rem;
  color: rgba(156, 163, 175, 0.8);
  margin-left: 4px;
}

.seo-pages-table th.sorted-asc::after {
  content: "↑";
  color: var(--accent-blue);
}

.seo-pages-table th.sorted-desc::after {
  content: "↓";
  color: var(--accent-blue);
}

/* ===========================================
   SEO IMAGES
   =========================================== */

.seo-images-block {
  margin-top: 8px;
}

.sub-toolbar {
  margin-bottom: 10px;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-toolbar h3 {
  margin: 0;
  font-size: 1rem;
  color: #e5e7eb;
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.6);
}

#seo-images-count {
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.3), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  border-color: rgba(129, 140, 248, 0.85);
  color: #e5e7eb;
}

#seo-images-tbody tr {
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform 0.08s ease-out;
}

#seo-images-tbody tr:hover td {
  background: rgba(56, 189, 248, 0.3);
}

#seo-images-tbody tr.seo-image-selected td {
  background:
    radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.4), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  box-shadow:
    0 0 18px rgba(59, 130, 246, 0.7),
    inset 0 0 0 1px rgba(248, 250, 252, 0.18);
  transform: translateY(-1px);
}

.seo-images-table {
  table-layout: fixed;
}

.seo-images-table th,
.seo-images-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-images-table th:nth-child(1),
.seo-images-table td:nth-child(1) { width: 12%; }
.seo-images-table th:nth-child(2),
.seo-images-table td:nth-child(2) { width: 28%; }
.seo-images-table th:nth-child(3),
.seo-images-table td:nth-child(3) { width: 28%; }
.seo-images-table th:nth-child(4),
.seo-images-table td:nth-child(4) { width: 32%; }

#seo-images-tbody td.seo-image-thumb-cell {
  width: 64px;
}

#seo-images-tbody .seo-image-thumb {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  border: 1px solid rgba(129, 140, 248, 0.9);
  object-fit: cover;
  background: radial-gradient(circle at center, #020617 0, #000 100%);
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.6),
    0 8px 18px rgba(0, 0, 0, 0.9);
}

.seo-image-preview {
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 8px 10px;
  border-radius: 15px;
  border: 1px solid rgba(129, 140, 248, 0.9);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.32), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.99), rgba(15, 23, 42, 1));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 20px rgba(56, 189, 248, 0.55),
    0 20px 38px rgba(0, 0, 0, 0.92);
}

#seo-image-preview-img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.95);
  object-fit: contain;
  background: #020617;
}

/* ===========================================
   PRODUITS – LISTE & FICHE
   =========================================== */

#tab-products .tab-header {
  margin-bottom: 1.25rem;
}

#tab-products .tab-header h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

#tab-products .tab-header .tab-description {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin: 0;
}

#tab-products .tab-products-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

#tab-products .products-list-column {
  flex: 0 0 32%;
  max-width: 32%;
  display: flex;
  flex-direction: column;
  min-width: 260px;
}

#tab-products .product-detail-column {
  flex: 1 1 auto;
  min-width: 0;
}

/* Toolbar liste produits */

#tab-products .products-toolbar {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.99));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.75rem 0.5rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.8);
}

#tab-products .products-search-group {
  margin-bottom: 0.75rem;
}

#tab-products .products-search-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

#tab-products .products-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

#tab-products .products-actions-top {
  display: flex;
  justify-content: flex-end;
}

/* Liste produits */

#tab-products .products-list-wrapper {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.99));
  flex: 1 1 auto;
  min-height: 0;
  max-height: 60vh;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
  overflow-y: auto;
}

#tab-products #products-table {
  margin-bottom: 0;
  font-size: 0.85rem;
}

#tab-products #products-table tbody tr {
  cursor: pointer;
}

#tab-products #products-table td,
#tab-products #products-table th {
  vertical-align: middle;
}

#tab-products #products-table td:first-child,
#tab-products #products-table th:first-child {
  width: 52px;
  text-align: center;
}

#tab-products #products-table td:first-child img {
  max-width: 40px;
  max-height: 40px;
  border-radius: 0.35rem;
  object-fit: cover;
}

/* Fiche produit */

#tab-products #product-form {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
}

#tab-products .product-section {
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 0.9rem;
  padding: 0.75rem 0.9rem 0.9rem;
  margin-bottom: 0.9rem;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.12), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.98));
}

#tab-products .product-section legend {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0 0.25rem;
  color: #e5e7eb;
}

#tab-products .product-section .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.5rem 0.9rem;
}

#tab-products .product-section .form-group {
  margin-bottom: 0.5rem;
}

/* Images produit */

#tab-products .product-image-preview-inner {
  margin-top: 0.3rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: 0.7rem;
  padding: 0.3rem;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
}

#tab-products #product-main-image-preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 0.6rem;
}

/* Checkboxes collections / occasions */

#tab-products .checkbox-group {
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: 0.7rem;
  padding: 0.4rem 0.5rem;
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Vitrines liées */

#tab-products #product-showcases-table {
  margin-top: 0.3rem;
  font-size: 0.8rem;
}

#tab-products .product-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  gap: 0.75rem;
}

#tab-products .form-status {
  font-size: 0.8rem;
  min-height: 1.1rem;
}
#tab-products .form-status.success { color: #4ade80; }
#tab-products .form-status.error { color: #f97373; }

/* ===========================================
   STRUCTURE WORKSPACE - FULLSCREEN LAYOUT
   =========================================== */

/* Onglet Structure */
#tab-structure {
  background: #0f111a;
  overflow: visible;
  position: relative;
}

/* On force le layout en colonne, sans limiter la hauteur */
#tab-structure.tab-panel.active {
  display: flex;
  flex-direction: column;
}

/* En-tête de l'onglet (Barre d'outils) */
.structure-top-bar {
  flex: 0 0 auto;
  padding: 12px 20px;
  background: #161924;
  border-bottom: 1px solid #2a2e3b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.structure-top-bar h2 {
  font-size: 1rem;
  margin: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Zone principale : Canvas + Sidebar */
.structure-workspace {
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
  min-height: 360px;
}

/* Colonne gauche : arbre + preview + export */
.structure-left {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* ZONE GAUCHE : LE CANVAS (ARBRE) */
.structure-canvas {
  flex: 1 1 auto;
  background-color: #050712;
  background-image:
    linear-gradient(#1a1d29 1px, transparent 1px),
    linear-gradient(90deg, #1a1d29 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center top;
  overflow: auto;
  padding: 40px;
  position: relative;
  cursor: grab;
}

.structure-canvas:active {
  cursor: grabbing;
}

/* ZONE DROITE : L'INSPECTEUR (FORMULAIRE) */
.structure-sidebar {
  width: 340px;
  background: #161924;
  border-left: 1px solid #2a2e3b;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
  z-index: 20;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid #2a2e3b;
  background: #1b1f2e;
}
.sidebar-header h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}
.sidebar-header p {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.sidebar-content {
  padding: 16px;
  overflow-y: auto;
  flex: 1 1 auto;
}

/* ===========================================
   DESIGN DE L'ARBRE (TREE VIEW)
   =========================================== */

.tree-root {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: fit-content;
}

/* Conteneur d'un nœud */
.structure-node {
  position: relative;
  padding-left: 20px;
}

/* Enfants (sous-catégories) */
.structure-node-children {
  margin-left: 20px;
  padding-left: 20px;
  border-left: 2px solid #334155;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

/* Carte du nœud */
.structure-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 8px 12px;
  border-radius: 8px;
  min-width: 220px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Connecteur horizontal */
.structure-node-children .structure-node > .structure-card::before {
  content: "";
  position: absolute;
  left: -42px;
  top: 50%;
  width: 42px;
  height: 2px;
  background: #334155;
}

/* Effets au survol et sélection */
.structure-card:hover {
  background: #283549;
  border-color: #64748b;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.structure-card.is-selected {
  background: #1e293b;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}
.structure-card.is-selected::after {
  content: "EDITING";
  position: absolute;
  top: -8px;
  right: 10px;
  font-size: 0.6rem;
  background: #3b82f6;
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: bold;
}

/* Style selon le type (bordure gauche colorée) */
.structure-card[data-type="category"] {
  border-left: 4px solid #f59e0b;
}
.structure-card[data-type="subcategory"] {
  border-left: 4px solid #a855f7;
}
.structure-card[data-type="page"] {
  border-left: 4px solid #10b981;
}

/* Contenu de la carte */
.card-icon {
  color: #94a3b8;
  font-size: 1.1rem;
}
.card-info {
  display: flex;
  flex-direction: column;
}
.card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #f1f5f9;
}
.card-meta {
  font-size: 0.7rem;
  color: #64748b;
}

/* Badges dans la carte */
.card-badges {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.mini-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.bg-femme {
  background: #ec4899;
  box-shadow: 0 0 5px #ec4899;
}
.bg-homme {
  background: #06b6d4;
  box-shadow: 0 0 5px #06b6d4;
}

/* Formulaire Sidebar */
.sidebar-form-group {
  margin-bottom: 16px;
}
.sidebar-form-group label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 6px;
}
.sidebar-input {
  width: 100%;
  background: #0f111a;
  border: 1px solid #334155;
  padding: 8px 10px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
}
.sidebar-input:focus {
  border-color: #3b82f6;
  outline: none;
}

/* ===========================================
   PRÉVISUALISATION DU MENU (STRUCTURE)
   =========================================== */

.menu-preview-wrapper {
  flex: 0 0 auto;
  padding: 16px 20px 20px;
  border-top: 1px solid #1e293b;
  background: #020617;
}

.menu-preview-card {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.25), transparent 60%),
    radial-gradient(circle at 100% 0, rgba(236, 72, 153, 0.2), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
}

.menu-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.menu-preview-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #22c55e 0, #4ade80 45%, #16a34a 100%);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

.menu-preview-header h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.menu-preview-header p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.menu-preview-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.menu-preview-mode-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-right: 4px;
}

.menu-layout-btn {
  border-radius: 999px;
  border: 0;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  background: transparent;
  color: #9ca3af;
  transition:
    background-color 0.16s ease-out,
    color 0.16s ease-out,
    transform 0.08s ease-out;
}

.menu-layout-btn:hover {
  background: rgba(31, 41, 55, 0.98);
  color: #e5e7eb;
}

.menu-layout-btn-active {
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: #020617;
}

/* Conteneur de la nav */
.menu-preview-nav-container {
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(2, 6, 23, 0.96);
  border: 1px solid rgba(30, 64, 175, 0.6);
}

/* ===========================================
   NAV LINKS – MINI BIBLIOTHÈQUE
   =========================================== */

.menu-preview {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

/* Layouts */
.menu-preview--horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-preview--pill {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.menu-preview--stacked {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-preview-item {
  display: inline-flex;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
  color: #e5e7eb;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.9);
  transition:
    background 0.16s ease-out,
    color 0.16s ease-out,
    transform 0.08s ease-out,
    box-shadow 0.16s ease-out;
}

.menu-link-icon {
  font-size: 0.9rem;
  opacity: 0.9;
}

.menu-link:hover {
  background:
    radial-gradient(circle at 0 0, rgba(236, 72, 153, 0.45), transparent 60%),
    linear-gradient(135deg, #4c1d95, #ec4899);
  color: #f9fafb;
  transform: translateY(-1px);
  box-shadow:
    0 0 18px rgba(236, 72, 153, 0.8),
    0 10px 24px rgba(0, 0, 0, 0.9);
}

.menu-link:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(248, 250, 252, 0.15);
}

.menu-link--active {
  border-color: rgba(250, 204, 21, 0.9);
  background:
    radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.5), transparent 60%),
    linear-gradient(135deg, #f97316, #facc15);
  color: #020617;
  box-shadow:
    0 0 18px rgba(250, 204, 21, 0.8),
    0 12px 28px rgba(0, 0, 0, 0.9);
}

/* ===========================================
   PRÉVISUALISATION RÉELLE DU MENU EXPORTÉ
   =========================================== */

.menu-export-live {
  border-radius: 16px;
  background: #020617;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

/* Le nav généré dans la preview */
.menu-export-live .navbar {
  width: 100%;
  background: #fff5fb;
  border-radius: 999px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Container fluide dans la preview */
.menu-export-live .navbar .container-fluid {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Libellé "Menu" à gauche */
.menu-export-live .navbar-brand.menu-text {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ec4899;
}

/* Bloc UL des liens principaux */
.menu-export-live .navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0 24px;
  padding: 0;
}

/* Liens de menu */
.menu-export-live .nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.menu-export-live .nav-link:hover {
  color: #be185d;
}

.menu-export-live .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ec4899, #f59e0b);
  transition: width 0.18s ease-out;
}

.menu-export-live .nav-link:hover::after {
  width: 100%;
}

/* Boutons Connexion / Panier à droite */
.menu-export-live .btn {
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
}

/* Connexion : gris */
.menu-export-live .btn-primary {
  background: #6b7280;
  color: #f9fafb;
}

/* Panier : doré */
.menu-export-live .btn-secondary {
  background: #facc15;
  color: #111827;
  margin-left: 8px;
}

/* On masque le burger dans la preview desktop */
.menu-export-live .navbar-toggler {
  display: none;
}

/* --- Base pour tous les textes de menu --- */
.menu-export-live .sbs-menu-label {
  position: relative;
  display: inline-block;
  transform: translate(
    var(--sbs-menu-text-offset-x, 0px),
    var(--sbs-menu-text-offset-y, 0px)
  );
}

/* Alignement horizontal du texte à l'intérieur du bouton */
.menu-export-live[data-text-align="left"]  .navbar .nav-link {
  justify-content: flex-start;
  text-align: left;
}

.menu-export-live[data-text-align="center"] .navbar .nav-link {
  justify-content: center;
  text-align: center;
}

.menu-export-live[data-text-align="right"] .navbar .nav-link {
  justify-content: flex-end;
  text-align: right;
}

/* Décalage vertical gros (haut / milieu / bas) */
.menu-export-live[data-text-valign="top"]    .navbar .nav-link {
  align-items: flex-start;
}
.menu-export-live[data-text-valign="middle"] .navbar .nav-link {
  align-items: center;
}
.menu-export-live[data-text-valign="bottom"] .navbar .nav-link {
  align-items: flex-end;
}

/* ===========================================
   PANNEAU DES ZONES PAR PAGE (STRUCTURE / APPARENCE)
   =========================================== */

.page-zones-panel {
  margin-top: 24px;
  padding: 16px 32px;
  border-top: 1px solid #1e293b;
}

.page-zones-section h3 {
  font-size: 0.95rem;
  margin: 0 0 4px;
  color: #e5e7eb;
}

.page-zones-section p {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: #9ca3af;
}

.page-zones-zone-card {
  background: #020617;
  border-radius: 10px;
  border: 1px solid #1f2937;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.page-zones-zone-card:hover {
  border-color: #475569;
}

.page-zone-card-selected {
  box-shadow: 0 0 0 1px #f97316;
}

.page-zones-zone-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.page-zones-zone-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #4b5563;
  color: #e5e7eb;
  font-family: monospace;
}

.page-zones-zone-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e5e7eb;
}

.page-zones-zone-desc {
  font-size: 0.78rem;
  color: #9ca3af;
  margin: 0;
}

/* === Modal publication brouillon (choix parent) === */

.sbs-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8); /* fond sombre */
  display: none;                      /* caché par défaut */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.sbs-modal-backdrop.is-open {
  display: flex;
}

.sbs-modal {
  background: #020617;
  border-radius: 16px;
  border: 1px solid #1e293b;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  max-width: 720px;
  width: 100%;
  padding: 16px 20px;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.sbs-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sbs-modal-header h3 {
  margin: 0;
  font-size: 1rem;
}

.sbs-modal-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1rem;
  cursor: pointer;
}

.sbs-modal-close:hover {
  color: #f97316;
}

.sbs-modal-body {
  margin-top: 4px;
  margin-bottom: 12px;
}

.sbs-modal-intro {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0 0 10px 0;
}

.publish-parent-current-draft {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.publish-parent-label {
  color: #9ca3af;
}

.publish-parent-value {
  color: #f97316;
  font-weight: 500;
}

.publish-parent-helper {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 10px;
}

.publish-parent-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Item de la liste */
.publish-parent-item {
  border-radius: 10px;
  border: 1px solid #1f2937;
  padding: 8px 10px;
  background: #020617;
  cursor: pointer;
  transition: all 0.15s ease-out;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.publish-parent-item:hover {
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.4);
  background: #030712;
}

.publish-parent-item.is-selected {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.7);
}

.publish-parent-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.publish-parent-title {
  font-size: 0.86rem;
  font-weight: 500;
  color: #e5e7eb;
}

.publish-parent-id {
  font-size: 0.7rem;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.publish-parent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
  font-size: 0.72rem;
}

.publish-parent-file {
  color: #9ca3af;
}

.publish-parent-badge {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.7rem;
  border: 1px solid #374151;
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
}

/* footer du modal */
.sbs-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}


/* ===========================================
   RESPONSIVE GLOBAL
   =========================================== */

@media (max-width: 1100px) {
  .appearance-layout {
    flex-direction: column;
  }

  .appearance-left,
  .appearance-right {
    max-width: 100%;
  }

  .preview-css-layout {
    flex-direction: column;
  }

  .editor-panel {
    max-width: 100%;
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tab-products .tab-products-layout {
    flex-direction: column;
  }

  #tab-products .products-list-column,
  #tab-products .product-detail-column {
    max-width: 100%;
    flex: 1 1 auto;
  }
}

@media (max-width: 960px) {
  .structure-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .seo-suggestions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  header h1 {
    font-size: 1.12rem;
  }

  .app-shell {
    margin: 10px auto 20px;
    padding: 14px 12px 24px;
  }

  .summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .structure-page-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
