﻿/* ============================================================
   EscapCor — Feuille de style principale
   ============================================================ */

:root {
  --rouge:   #D42B2B;
  --orange:  #E8521A;
  --bleu:    #1E5FA8;
  --or:      #C8972A;
  --rouge-light: #fdf2f2;
  --bleu-light:  #f0f5fc;
  --or-light:    #fdf8ee;

  --bg:      #F4F6FA;
  --surface: #FFFFFF;
  --border:  #E2E8F0;
  --text:    #1A202C;
  --text-2:  #4A5568;
  --text-3:  #718096;

  --sidebar-w: 240px;
  --header-h:  60px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.1);

  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}
a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }
ul { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */

#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--text);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s ease;
}

#main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

#page-content {
  flex: 1;
  padding: 28px 28px 48px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-logo .logo-icon img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.sidebar-logo .logo-text { color: #fff; }
.sidebar-logo .logo-text strong { display: block; font-size: .95rem; font-weight: 700; }
.sidebar-logo .logo-text span { font-size: .72rem; color: rgba(255,255,255,.5); }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }

.nav-section-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .15s;
  user-select: none;
}
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.nav-item.active {
  background: rgba(212,43,43,.18);
  border-left-color: var(--rouge);
  color: #fff;
}
.nav-item .nav-icon { font-size: 1rem; width: 26px; text-align: center; flex-shrink: 0; }
.nav-item .nav-icon-svg { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-item .nav-icon-svg .illus-wrap { display: block !important; width: 32px !important; }
.nav-item .nav-icon-svg svg { width: 32px !important; height: 32px !important; }

/* Sidebar logo banner */
#sidebar-illus-banner svg { width: 100% !important; height: auto !important; display: block; }
#sidebar-illus-banner:hover { opacity: 1 !important; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--rouge);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer .agent-info {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.6);
  font-size: .8rem;
}
.agent-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--rouge), var(--orange));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

/* ============================================================
   TOPBAR
   ============================================================ */

.topbar-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.topbar-subtitle { font-size: .8rem; color: var(--text-3); margin-top: 1px; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ============================================================
   COMPOSANTS GÉNÉRIQUES
   ============================================================ */

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: .9rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: .85rem; font-weight: 500;
  border: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--rouge);
  color: #fff;
}
.btn-primary:hover { background: #b82323; box-shadow: var(--shadow-sm); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: none;
  padding: 6px 10px;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger { background: #fee2e2; color: var(--rouge); }
.btn-danger:hover { background: var(--rouge); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-lg { padding: 10px 22px; font-size: .95rem; }
.btn-icon { padding: 7px; border-radius: var(--radius); }

/* Badges de statut */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 600;
}
.badge::before { content: "●"; font-size: .55rem; }
.badge-confirme  { background: #d1fae5; color: #065f46; }
.badge-etude     { background: #fef3c7; color: #92400e; }
.badge-projet    { background: #ede9fe; color: #5b21b6; }
.badge-annule      { background: #fee2e2; color: #991b1b; }
.badge-pre_inscrit { background: #FEF3C7; color: #B45309; }
.badge-pre-inscrit { background: #FEF3C7; color: #B45309; }
.badge-brouillon { background: #f3f4f6; color: #374151; }
.badge-attente   { background: #fef3c7; color: #92400e; }
/* anciens statuts conservés pour compatibilité */
.badge-complet   { background: #dbeafe; color: #1e40af; }
.badge-archive   { background: #f3f4f6; color: #9ca3af; }

/* Formulaires */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: .8rem; font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(30,95,168,.1);
}
.form-row { display: grid; gap: 16px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%; border-collapse: collapse;
  font-size: .85rem;
}
thead th {
  background: var(--bg);
  padding: 11px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* Progress bar */
.progress-bar {
  height: 7px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.progress-bar .fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--rouge), var(--orange));
  transition: width .4s ease;
}
.progress-bar .fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-bar .fill.blue  { background: linear-gradient(90deg, var(--bleu), #60a5fa); }

/* Modales */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  transform: translateY(16px);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Alertes */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .85rem;
  margin-bottom: 12px;
}
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 3px solid var(--bleu); }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 3px solid var(--or); }
.alert-danger  { background: #fef2f2; color: #991b1b; border-left: 3px solid var(--rouge); }
.alert-success { background: #f0fdf4; color: #14532d; border-left: 3px solid #22c55e; }
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* Toasts */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: .85rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .25s ease;
  max-width: 340px;
}
.toast.success { background: #065f46; }
.toast.error   { background: #991b1b; }
.toast.warning { background: #92400e; }
@keyframes toastIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Vide état */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: .9rem; margin-top: 6px; }

/* Tabs */
.tabs { display: flex; gap: 2px; background: var(--bg); border-radius: var(--radius); padding: 4px; margin-bottom: 24px; }
.tab-btn {
  flex: 1; padding: 7px 16px;
  border: none; background: transparent;
  border-radius: 7px;
  font-size: .85rem; font-weight: 500;
  color: var(--text-2);
  transition: all .15s;
}
.tab-btn.active {
  background: var(--primary, #2563EB);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
  font-weight: 700;
}
.tab-btn.active span { opacity: .85 !important; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* Tooltips simples */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff;
  padding: 4px 8px; border-radius: 5px;
  font-size: .75rem; white-space: nowrap;
  pointer-events: none; z-index: 200;
}

/* ============================================================
   PAGE DASHBOARD
   ============================================================ */

.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.page-header p { font-size: .88rem; color: var(--text-3); margin-top: 4px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: ""; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
}
.kpi-card.rouge::before  { background: linear-gradient(90deg, var(--rouge), var(--orange)); }
.kpi-card.bleu::before   { background: var(--bleu); }
.kpi-card.or::before     { background: var(--or); }
.kpi-card.vert::before   { background: #10b981; }
.kpi-label { font-size: .78rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1.1; margin: 6px 0 2px; }
.kpi-sub   { font-size: .8rem; color: var(--text-3); }
.kpi-icon  { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 2rem; opacity: .08; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
}
.dashboard-grid .card { margin: 0; }

/* Voyages list compact */
.voyage-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.voyage-row:last-child { border-bottom: none; }
.voyage-row-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.voyage-row-icon.fr { background: #dbeafe; }
.voyage-row-icon.es { background: #fef3c7; }
.voyage-row-info { flex: 1; min-width: 0; }
.voyage-row-info strong { font-size: .88rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voyage-row-info span { font-size: .78rem; color: var(--text-3); }
.voyage-row-fill { min-width: 90px; }

/* Alertes dashboard */
.alert-list .alert { margin-bottom: 8px; }
.alert-list .alert:last-child { margin-bottom: 0; }

/* ============================================================
   PAGE VOYAGES
   ============================================================ */

.voyage-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.voyage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
}
.voyage-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.voyage-card-banner {
  height: 6px;
  background: linear-gradient(90deg, var(--rouge), var(--orange));
}
.voyage-card-banner.bleu   { background: linear-gradient(90deg, var(--bleu), #60a5fa); }
.voyage-card-banner.vert   { background: linear-gradient(90deg, #10b981, #6ee7b7); }
.voyage-card-banner.gris   { background: var(--border); }
.voyage-card-body { padding: 18px 20px; }
.voyage-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.voyage-card-sub   { font-size: .8rem; color: var(--text-3); margin-bottom: 14px; }
.voyage-card-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.meta-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); border-radius: 6px;
  padding: 3px 9px; font-size: .78rem; color: var(--text-2);
}
.voyage-card-fill { margin-bottom: 8px; }
.voyage-card-fill-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-3); margin-bottom: 5px; }
.voyage-card-actions { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }

/* ============================================================
   PAGE PARTICIPANTS
   ============================================================ */

.filters-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1; min-width: 200px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
}
.search-input:focus { outline: none; border-color: var(--bleu); }

/* Fiche participant */
.participant-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rouge), var(--orange));
  color: #fff; font-weight: 700; font-size: .88rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.payment-progress {
  display: flex; flex-direction: column; gap: 4px; min-width: 120px;
}
.payment-progress .amounts { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-3); }

/* ============================================================
   PAGE FINANCES
   ============================================================ */

.finance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.finance-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.finance-stat .label { font-size: .75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.finance-stat .value { font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.finance-stat .value.green { color: #059669; }
.finance-stat .value.rouge { color: var(--rouge); }
.finance-stat .value.bleu  { color: var(--bleu); }
.finance-stat .value.or    { color: var(--or); }

/* ============================================================
   PAGE PLANNING
   ============================================================ */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-day-header {
  text-align: center;
  font-size: .72rem; font-weight: 600;
  color: var(--text-3);
  padding: 8px 0;
  text-transform: uppercase;
}
.calendar-day {
  min-height: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  position: relative;
}
.calendar-day.other-month { background: var(--bg); opacity: .6; }
.calendar-day.today { border-color: var(--rouge); }
.calendar-day .day-num {
  font-size: .8rem; font-weight: 600; color: var(--text-2);
  margin-bottom: 4px;
}
.calendar-day.today .day-num {
  background: var(--rouge);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cal-event {
  font-size: .7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.cal-event.rouge  { background: var(--rouge-light); color: var(--rouge); }
.cal-event.bleu   { background: var(--bleu-light);  color: var(--bleu); }
.cal-event.or     { background: var(--or-light);    color: #92400e; }

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

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  #sidebar { transform: translateX(-240px); width: 240px; }
  #sidebar.open { transform: translateX(0); }
  #main-wrapper { margin-left: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  #burger { display: flex !important; }
}
@media (max-width: 600px) {
  #page-content { padding: 16px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

/* Utilities */
.text-rouge { color: var(--rouge); }
.text-bleu  { color: var(--bleu); }
.text-or    { color: var(--or); }
.text-muted { color: var(--text-3); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ============================================================
   ILLUSTRATIONS — panneau de personnalisation
   ============================================================ */

/* Panneau slide-in depuis la droite */
#illus-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}
#illus-panel.open { pointer-events: all; }

.illus-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .3s ease;
}
#illus-panel.open .illus-panel-overlay { opacity: 1; }

.illus-panel-drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 95vw;
  background: var(--surface);
  box-shadow: -8px 0 32px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
  border-radius: 16px 0 0 16px;
}
#illus-panel.open .illus-panel-drawer { transform: translateX(0); }

.illus-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.illus-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Carte de slot */
.illus-slot-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: border-color .2s;
}
.illus-slot-card:hover { border-color: var(--bleu); }

/* Variante SVG sélectionnable */
.illus-variant {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: all .15s;
  background: #fff;
}
.illus-variant:hover { border-color: var(--bleu); background: var(--bleu-light); }
.illus-variant.active {
  border-color: var(--bleu);
  background: var(--bleu-light);
  box-shadow: 0 0 0 2px rgba(30,95,168,.2);
}

/* Wrapper illustration cliquable */
.illus-wrap {
  transition: transform .2s;
}
.illus-wrap:hover { transform: scale(1.02); }

/* Bouton ⚙ personnalisation dans la topbar */
.btn-illus {
  background: linear-gradient(135deg, var(--rouge), var(--orange));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.btn-illus:hover { opacity: .85; }
