/* ============================================================
   ADMIN.CSS — Styles partagés pour toutes les pages admin
   (Index, Content, Serie)
   ============================================================ */

/* ── Variables globales ── */
:root {
  --adm-bg:          #eef2fb;   /* fond de page */
  --adm-sidebar:     #0f172a;   /* sidebar sombre */
  --adm-blue:        #2563eb;   /* bleu principal */
  --adm-blue-dark:   #1e40af;   /* bleu foncé */
  --adm-sky:         #F2C14E;   /* or (accent sidebar) */
  --adm-purple:      #1d4ed8;   /* violet (page série) */
  --adm-green:       #15803d;   /* vert succès */
  --adm-red:         #dc2626;   /* rouge danger */
  --adm-orange:      #c2410c;   /* orange warning */
  --adm-border:      #e2e8f0;   /* bordure légère */
  --adm-border-card: #e8edf5;   /* bordure carte */
  --adm-text:        #0f172a;   /* texte principal */
  --adm-muted:       #64748b;   /* texte secondaire */
  --adm-muted2:      #94a3b8;   /* texte très atténué */
  --adm-radius:      14px;      /* rayon carte */
  --adm-radius-sm:   9px;       /* rayon champ */
  --adm-font:        'Inter', sans-serif;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--adm-font); background: var(--adm-bg); color: var(--adm-text); }

/* ============================================================
   MISE EN PAGE (layout flex sidebar + contenu)
   ============================================================ */
.adm-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.adm-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--adm-sidebar);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

/* Logo en haut de la sidebar */
.adm-logo { padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.adm-logo-text {
  font-size: 15px; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.adm-logo-text i { color: var(--adm-sky); font-size: 20px; }
.adm-logo-sub   { font-size: 11px; color: var(--adm-muted); margin-top: 3px; }

/* Navigation sidebar */
.adm-nav { padding: 16px 0; flex: 1; }
.adm-nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
  color: #475569; text-transform: uppercase;
  padding: 0 20px; margin: 12px 0 6px;
}
.adm-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: 13px; font-weight: 500;
  color: var(--adm-muted2); text-decoration: none;
  background: none; border: none; width: 100%; text-align: left;
  border-left: 3px solid transparent; cursor: pointer;
  transition: all .2s;
}
.adm-nav-item:hover  { color: #fff; background: rgba(255,255,255,.05); }
/* Actif bleu par défaut (utilisateurs / contenu) */
.adm-nav-item.active { color: var(--adm-sky); border-left-color: var(--adm-sky); background: rgba(242,193,78,.08); }
/* Actif violet (page série) */
.adm-nav-item.active-purple { color: #8da2fb; border-left-color: #8da2fb; background: rgba(167,139,250,.08); }
.adm-nav-item i { width: 16px; text-align: center; font-size: 14px; }

/* Bas de la sidebar */
.adm-sidebar-bottom { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.adm-back-btn {
  display: flex; align-items: center; gap: 8px;
  color: var(--adm-muted); font-size: 13px;
  text-decoration: none; transition: color .2s;
}
.adm-back-btn:hover { color: var(--adm-muted2); }

/* ── Contenu principal ── */
.adm-main { flex: 1; overflow-x: hidden; }

/* ── Barre du haut ── */
.adm-topbar {
  background: #fff; border-bottom: 1px solid var(--adm-border);
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.adm-topbar h1 {
  font-size: 18px; font-weight: 800; color: var(--adm-text);
  display: flex; align-items: center; gap: 10px;
}
.adm-topbar-right { display: flex; align-items: center; gap: 12px; }

/* Badge admin (coin haut droit) */
.adm-admin-chip {
  display: flex; align-items: center; gap: 7px;
  background: #eef2ff; color: var(--adm-blue-dark);
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px;
}
.adm-admin-chip i { color: var(--adm-blue); }

/* Zone de contenu avec padding */
.adm-content { padding: 28px 32px; }

/* ============================================================
   BOUTONS GÉNÉRIQUES
   ============================================================ */
.adm-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  border: none; cursor: pointer; font-family: var(--adm-font);
  transition: all .2s; text-decoration: none;
}
/* Variantes de couleur */
.adm-btn-primary { background: linear-gradient(135deg, var(--adm-blue-dark), var(--adm-blue)); color: #fff; }
.adm-btn-primary:hover { opacity: .88; }
.adm-btn-blue   { background: #eef2ff; color: var(--adm-blue-dark); }
.adm-btn-blue:hover   { background: #dbeafe; }
.adm-btn-orange { background: #fff7ed; color: var(--adm-orange); }
.adm-btn-orange:hover { background: #ffedd5; }
.adm-btn-red    { background: #fef2f2; color: var(--adm-red); }
.adm-btn-red:hover    { background: #fee2e2; }
.adm-btn-green  { background: #f0fdf4; color: var(--adm-green); }
.adm-btn-green:hover  { background: #dcfce7; }
.adm-btn-purple { background: #eef2ff; color: var(--adm-purple); }
.adm-btn-purple:hover { background: #ede9fe; }
.adm-btn-outline { background: #f1f5f9; color: #334155; }
.adm-btn-outline:hover { background: var(--adm-border); }

/* Bouton de soumission pleine largeur */
.adm-submit-btn {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--adm-blue-dark), var(--adm-blue));
  color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700; font-family: var(--adm-font);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px;
  transition: opacity .2s, transform .2s;
}
.adm-submit-btn:hover    { opacity: .9; transform: translateY(-1px); }
.adm-submit-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.adm-submit-btn.purple   { background: linear-gradient(135deg,#1e3a8a, var(--adm-purple)); }
.adm-submit-btn.blue     { background: linear-gradient(135deg, var(--adm-blue-dark), var(--adm-blue)); }

/* ============================================================
   CARTES (encadrés blancs arrondis)
   ============================================================ */
.adm-card {
  background: #fff; border-radius: var(--adm-radius);
  border: 1.5px solid var(--adm-border-card);
  overflow: hidden; margin-bottom: 24px;
}
.adm-card-header {
  background: linear-gradient(135deg, #1a2a6c, var(--adm-blue));
  padding: 20px 24px; color: #fff;
  display: flex; align-items: center; gap: 12px;
}
.adm-card-header i    { font-size: 20px; }
.adm-card-header h2   { font-size: 16px; font-weight: 800; }
.adm-card-header p    { font-size: 12px; opacity: .8; margin-top: 2px; }
.adm-card-body        { padding: 24px; }

/* En-tête de section (blanc avec titre + bouton) */
.adm-section-header {
  padding: 18px 24px; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; justify-content: space-between;
}
.adm-section-header h2 {
  font-size: 15px; font-weight: 700; color: var(--adm-text);
  display: flex; align-items: center; gap: 8px;
}
.adm-section-header h2 i { color: var(--adm-blue); }
.adm-section-header-btns { display: flex; gap: 8px; }

/* ============================================================
   FORMULAIRES (champs, labels, selects)
   ============================================================ */
.adm-label {
  display: block; font-size: 12px; font-weight: 700;
  color: #475569; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 6px;
}
/* Champ texte, select, textarea partagés */
.adm-input, .adm-select, .adm-textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--adm-border); border-radius: var(--adm-radius-sm);
  font-size: 14px; font-family: var(--adm-font); color: var(--adm-text);
  outline: none; transition: border-color .2s, box-shadow .2s;
  margin-bottom: 14px; background: #fff;
}
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  border-color: var(--adm-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.adm-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
/* Select avec flèche personnalisée */
.adm-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232563eb' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px;
}
.adm-input::placeholder, .adm-textarea::placeholder { color: #b0bec5; }

/* Options A/B/C/D avec préfixe lettre */
.adm-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.adm-option-wrap  { position: relative; }
.adm-option-label {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 800; color: var(--adm-blue); pointer-events: none;
}
.adm-option-input {
  width: 100%; padding: 10px 14px 10px 30px;
  border: 1.5px solid var(--adm-border); border-radius: var(--adm-radius-sm);
  font-size: 13px; font-family: var(--adm-font); color: var(--adm-text);
  outline: none; transition: border-color .2s; background: #fff;
}
.adm-option-input:focus { border-color: var(--adm-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* Boutons radio bonne réponse (page Content) */
.adm-correct-row { display: flex; gap: 8px; margin-bottom: 16px; }
.adm-radio-btn {
  flex: 1; padding: 9px; border-radius: 8px;
  border: 1.5px solid var(--adm-border); background: #fff;
  font-size: 13px; font-weight: 700; color: var(--adm-muted);
  cursor: pointer; text-align: center; font-family: var(--adm-font);
  transition: all .2s;
}
.adm-radio-btn.selected        { background: var(--adm-blue); color: #fff; border-color: var(--adm-blue); }
.adm-radio-btn:hover:not(.selected) { border-color: #93c5fd; background: #eef2ff; }

/* ============================================================
   STATISTIQUES (page Index — 5 cartes en grille)
   ============================================================ */
.adm-stats { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; margin-bottom: 28px; }
@media (max-width: 1100px) { .adm-stats { grid-template-columns: repeat(3,1fr); } }
.adm-stat {
  background: #fff; border-radius: var(--adm-radius);
  padding: 20px; border: 1.5px solid var(--adm-border-card);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .2s;
}
.adm-stat:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.adm-stat-label { font-size: 11px; font-weight: 700; color: var(--adm-muted2); text-transform: uppercase; letter-spacing: .6px; }
.adm-stat-value { font-size: 32px; font-weight: 900; color: var(--adm-text); line-height: 1; }
.adm-stat-icon  { font-size: 22px; align-self: flex-end; margin-top: -28px; }

/* ============================================================
   TABLEAU (page Index — liste utilisateurs)
   ============================================================ */
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
  text-align: left; padding: 12px 16px;
  font-size: 11px; font-weight: 700; color: var(--adm-muted2);
  text-transform: uppercase; letter-spacing: .5px;
  background: #f8faff; border-bottom: 1px solid var(--adm-border);
}
.adm-table td { padding: 13px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: #f8faff; }

/* Badges rôle / abonnement */
.badge-admin   { display: inline-flex; align-items: center; gap: 5px; background: #eef2ff; color: var(--adm-blue-dark); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.badge-user    { display: inline-flex; align-items: center; gap: 5px; background: #f0fdf4; color: var(--adm-green);    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.badge-active  { background: #d1fae5; color: #065f46; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.badge-expired { background: #fee2e2; color: #991b1b; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.badge-none    { background: #f1f5f9; color: var(--adm-muted2); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }

/* ============================================================
   MODALS (page Index + page Série)
   ============================================================ */
.adm-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 100;
  align-items: center; justify-content: center;
}
.adm-overlay.show { display: flex; }
.adm-modal {
  background: #fff; border-radius: 16px; padding: 32px;
  width: 100%; max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: admModalIn .2s ease;
  max-height: 92vh; overflow-y: auto;
}
@keyframes admModalIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.adm-modal h3     { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.adm-modal p      { font-size: 13px; color: var(--adm-muted); margin-bottom: 20px; }
.adm-modal-label  {
  display: block; font-size: 12px; font-weight: 700;
  color: #475569; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
/* Champs modal — héritent de .adm-input mais sans margin-bottom automatique */
.adm-modal-input, .adm-modal-select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--adm-border); border-radius: var(--adm-radius-sm);
  font-size: 14px; font-family: var(--adm-font); outline: none;
  transition: border-color .2s; margin-bottom: 14px; background: #fff;
  color: var(--adm-text);
}
.adm-modal-input:focus, .adm-modal-select:focus {
  border-color: var(--adm-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.adm-modal-select { appearance: none; cursor: pointer; }
.adm-modal-divider { border: none; border-top: 1px solid var(--adm-border); margin: 16px 0; }
.adm-modal-btns   { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.adm-modal-cancel {
  padding: 9px 18px; border-radius: 8px; background: #f1f5f9; color: #334155;
  border: none; cursor: pointer; font-weight: 600; font-size: 13px; font-family: var(--adm-font);
}
.adm-modal-confirm {
  padding: 9px 18px; border-radius: 8px;
  background: linear-gradient(135deg, var(--adm-blue-dark), var(--adm-blue));
  color: #fff; border: none; cursor: pointer; font-weight: 700; font-size: 13px;
  font-family: var(--adm-font); transition: opacity .2s;
}
.adm-modal-confirm:hover  { opacity: .88; }
.adm-modal-confirm.danger { background: linear-gradient(135deg,#b91c1c, var(--adm-red)); }

/* Boutons jours rapides (modal abonnement) */
.quick-days { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.quick-day  {
  padding: 5px 14px; border-radius: 20px;
  border: 1.5px solid var(--adm-border); background: #fff;
  font-size: 12px; font-weight: 600; color: #475569;
  cursor: pointer; transition: all .2s; font-family: var(--adm-font);
}
.quick-day:hover, .quick-day.selected { background: #eef2ff; border-color: var(--adm-blue); color: var(--adm-blue-dark); }

/* ============================================================
   ACCORDÉON SÉRIES (page Content)
   ============================================================ */
.adm-serie-row { border-bottom: 1px solid #f1f5f9; transition: background .2s; }
.adm-serie-row:last-child { border-bottom: none; }
.adm-serie-head {
  display: flex; align-items: center; padding: 14px 24px;
  cursor: pointer; gap: 12px;
}
.adm-serie-head:hover { background: #f8faff; }
.adm-serie-num {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #1a2a6c, var(--adm-blue));
  color: #fff; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.adm-serie-info       { flex: 1; }
.adm-serie-info strong { font-size: 14px; font-weight: 700; display: block; }
.adm-serie-info span   { font-size: 12px; color: var(--adm-muted); }
.adm-cat-badge  { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: #eef2ff; color: var(--adm-blue-dark); }
.adm-serie-actions { display: flex; gap: 6px; align-items: center; }
.adm-icon-btn  {
  width: 32px; height: 32px; border-radius: 8px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  transition: all .2s; font-family: var(--adm-font);
}
.adm-icon-btn-red:hover   { background: #fee2e2; }
.adm-icon-btn-red         { background: #fef2f2; color: var(--adm-red); }
.adm-icon-btn-green       { background: #f0fdf4; color: var(--adm-green); }
.adm-icon-btn-green:hover { background: #dcfce7; }
.adm-chevron      { font-size: 12px; color: var(--adm-muted2); transition: transform .2s; }
.adm-chevron.open { transform: rotate(180deg); }

/* Questions dans l'accordéon */
.adm-questions-wrap        { display: none; padding: 0 24px 16px 68px; overflow: hidden; }
.adm-questions-wrap.open   { display: block; }
.adm-q-row  {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; background: #f8faff; border-radius: 10px;
  border: 1px solid var(--adm-border-card); margin-bottom: 8px;
  max-width: 100%; box-sizing: border-box;
}
.adm-q-num  {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--adm-blue); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
/* min-width:0 permet au contenu long de se réduire au lieu de déborder horizontalement */
.adm-q-body   { flex: 1; min-width: 0; }
.adm-q-text   { font-size: 13px; font-weight: 600; color: var(--adm-text); margin-bottom: 6px; overflow-wrap: anywhere; }
.adm-q-opts   { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 4px; }
.adm-q-opt    { font-size: 12px; color: var(--adm-muted); overflow-wrap: anywhere; min-width: 0; }
/* Neutralise tout style/positionnement injecté dans le contenu HTML des questions */
.adm-q-body * { max-width: 100% !important; float: none !important; position: static !important; }
.adm-q-opt.correct { color: var(--adm-green); font-weight: 700; }
.adm-q-answer { font-size: 12px; font-weight: 700; color: var(--adm-green); }
.adm-empty    { text-align: center; padding: 32px; color: var(--adm-muted2); }
.adm-empty i  { font-size: 36px; display: block; margin-bottom: 10px; color: #cbd5e1; }

/* ============================================================
   PAGE SÉRIE — Onglets mode Ajout / Modification
   ============================================================ */
.adm-mode-tabs {
  display: flex; background: #fff;
  border-radius: 12px; border: 1.5px solid var(--adm-border);
  overflow: hidden; margin-bottom: 28px;
}
.adm-mode-tab {
  flex: 1; padding: 14px; text-align: center; border: none; background: none;
  font-size: 14px; font-weight: 600; cursor: pointer; color: var(--adm-muted);
  transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--adm-font);
}
.adm-mode-tab.active       { background: linear-gradient(135deg,#1e3a8a, var(--adm-purple)); color: #fff; }
.adm-mode-tab:not(.active):hover { background: #eef2ff; color: var(--adm-purple); }

/* Grilles de formulaire (2 colonnes) */
.adm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.adm-form-full { grid-column: 1 / -1; }

/* Champ stylisé page Série (label + badge requis/optionnel) */
.adm-field { display: flex; flex-direction: column; gap: 6px; }
.adm-field label {
  font-size: 12px; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .5px;
  display: flex; align-items: center; gap: 6px;
}
.adm-field label i { color: var(--adm-purple); font-size: 11px; }
.badge-req { background: #fef2f2; color: var(--adm-red);   font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 700; }
.badge-opt { background: #f0fdf4; color: var(--adm-green); font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 700; }

/* Champ de saisie violet (page Série) */
.adm-pg-input, .adm-pg-select, .adm-pg-textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--adm-border); border-radius: 10px;
  font-size: 14px; font-family: var(--adm-font); color: var(--adm-text);
  outline: none; transition: all .2s; background: #fafbff;
}
.adm-pg-input:focus, .adm-pg-select:focus, .adm-pg-textarea:focus {
  border-color: var(--adm-purple); box-shadow: 0 0 0 3px rgba(124,58,237,.1); background: #fff;
}
.adm-pg-input::placeholder, .adm-pg-textarea::placeholder { color: #b0bec5; }
.adm-pg-textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.adm-pg-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237c3aed' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}

/* Cases de réponse A/B/C/D (page Série) */
.adm-responses-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-response-item  {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--adm-border); border-radius: 10px;
  overflow: hidden; transition: border-color .2s; background: #fafbff;
}
.adm-response-item:focus-within { border-color: var(--adm-purple); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.adm-response-letter {
  width: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff;
}
/* Couleur par lettre */
.adm-response-letter.a { background: var(--adm-blue); }
.adm-response-letter.b { background: #0ca678; }
.adm-response-letter.c { background: #e8590c; }
.adm-response-letter.d { background: #d97706; }
.adm-response-input {
  flex: 1; padding: 12px 14px; border: none; outline: none;
  background: transparent; font-size: 13.5px; font-family: var(--adm-font); color: var(--adm-text);
}
.adm-response-input::placeholder { color: #b0bec5; }

/* Boutons sélection bonne réponse (page Série) */
.adm-answer-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-answer-btn  {
  width: 48px; height: 48px; border-radius: 10px;
  border: 2px solid var(--adm-border); background: #fff;
  font-size: 16px; font-weight: 800; cursor: pointer; font-family: var(--adm-font);
  color: var(--adm-muted); transition: all .2s;
}
.adm-answer-btn:hover          { border-color: var(--adm-purple); color: var(--adm-purple); }
.adm-answer-btn.sel-a { background: var(--adm-blue); border-color: var(--adm-blue); color: #fff; }
.adm-answer-btn.sel-b { background: #0ca678; border-color: #0ca678; color: #fff; }
.adm-answer-btn.sel-c { background: #e8590c; border-color: #e8590c; color: #fff; }
.adm-answer-btn.sel-d { background: #d97706; border-color: #d97706; color: #fff; }

/* Aperçu des points */
.adm-points-wrap    { display: flex; align-items: center; gap: 10px; }
.adm-points-preview {
  padding: 6px 16px; border-radius: 20px; white-space: nowrap;
  background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; font-size: 13px; font-weight: 700;
}

/* Upload image */
.adm-img-upload-box {
  border: 2px dashed #d8e0ff; border-radius: 12px; padding: 28px;
  text-align: center; cursor: pointer; background: #fafbff;
  transition: all .2s; position: relative;
}
.adm-img-upload-box:hover    { border-color: var(--adm-purple); background: #eef2ff; }
.adm-img-upload-box input    { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.adm-img-upload-box i        { font-size: 32px; color: #8da2fb; margin-bottom: 10px; }
.adm-img-upload-box p        { font-size: 13px; color: var(--adm-muted); margin: 0; }
.adm-img-upload-box .img-hint { font-size: 11px; color: var(--adm-muted2); margin-top: 4px; }
.adm-img-preview { max-width: 100%; max-height: 140px; border-radius: 8px; margin-top: 10px; display: none; }

/* Info box (fond bleu pâle avec icône) */
.adm-info-box {
  background: #f8faff; border: 1px solid var(--adm-border);
  border-radius: 10px; padding: 14px 18px;
  font-size: 13px; color: #475569; margin-bottom: 16px;
}
.adm-serie-info-box {
  background: #eef2ff; border: 1px solid #ddd6fe;
  border-radius: 10px; padding: 14px 18px;
  font-size: 13px; color: #5b21b6;
  display: none; align-items: center; gap: 10px; margin-bottom: 20px;
}
.adm-serie-info-box i { color: var(--adm-purple); }

/* ============================================================
   TOAST (notification bas droite)
   ============================================================ */
.adm-toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  padding: 12px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  animation: admToastIn .3s ease;
  display: none;
}
.adm-toast.show    { display: flex; }
@keyframes admToastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.adm-toast.success { background: #0f172a; color: #4ade80; }
.adm-toast.error   { background: #0f172a; color: #f87171; }

/* ============================================================
   ALERTE INLINE (succès / erreur dans un formulaire)
   ============================================================ */
.adm-alert {
  display: none; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; margin-bottom: 14px;
  align-items: center; gap: 8px;
}
.adm-alert.show    { display: flex; }
.adm-alert.success { background: #dcfce7; color: var(--adm-green); border: 1px solid #86efac; }
.adm-alert.error   { background: #fee2e2; color: var(--adm-red);   border: 1px solid #fca5a5; }

/* ============================================================
   PAGE ACCÈS REFUSÉ
   ============================================================ */
.adm-denied {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; text-align: center; padding: 40px;
}
.adm-denied i  { font-size: 60px; color: var(--adm-red); margin-bottom: 20px; }
.adm-denied h2 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.adm-denied p  { color: var(--adm-muted); margin-bottom: 24px; }
.adm-denied a  {
  padding: 12px 28px; border-radius: 10px;
  background: linear-gradient(135deg, var(--adm-blue-dark), var(--adm-blue));
  color: #fff; font-weight: 700; text-decoration: none;
}

/* ============================================================
   CONTENEURS SUPPLÉMENTAIRES
   ============================================================ */

/* Section générique (page Index) — équivalent de adm-card sans en-tête gradient */
.adm-section {
  background: #fff; border-radius: var(--adm-radius);
  border: 1.5px solid var(--adm-border-card);
  margin-bottom: 24px; overflow: hidden;
}

/* Carte page Série — sans overflow:hidden, padding intégré */
.adm-card-serie {
  background: #fff; border-radius: var(--adm-radius);
  border: 1.5px solid var(--adm-border-card);
  padding: 32px; margin-bottom: 24px;
}

/* Titre à l'intérieur d'une carte Série (séparateur en bas) */
.adm-card-title {
  font-size: 15px; font-weight: 800; color: var(--adm-text);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}
.adm-card-title i { color: var(--adm-purple); }

/* Grille 2 colonnes (page Content) */
.adm-content-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 900px) { .adm-content-grid { grid-template-columns: 1fr; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Bouton hamburger + fond sombre (injectés par admin-common.js) */
.adm-burger {
  display: none; position: fixed; top: 10px; left: 10px; z-index: 1300;
  width: 44px; height: 44px; border-radius: 10px; border: none;
  background: #0f172a; color: #fff; font-size: 18px; cursor: pointer;
  align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.adm-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1100; }

@media (max-width: 768px) {
  .adm-sidebar {
    display: block; position: fixed; top: 0; left: 0; height: 100vh; width: 260px;
    z-index: 1200; transform: translateX(-100%); transition: transform .25s ease;
    overflow-y: auto;
  }
  .adm-sidebar.adm-open { transform: translateX(0); box-shadow: 0 0 50px rgba(0,0,0,.5); }
  .adm-backdrop.adm-open { display: block; }
  .adm-burger { display: flex; }
  .adm-main       { width: 100%; }
  .adm-form-grid  { grid-template-columns: 1fr; }
  .adm-responses-grid { grid-template-columns: 1fr; }
  .adm-content    { padding: 18px 14px; }
  .adm-topbar     { padding: 12px 16px 12px 64px; }  /* place pour le hamburger */
}

/* ============================================================
   ZONE UPLOAD AUDIO
   ============================================================ */
.adm-audio-upload-box {
    border: 2px dashed #8da2fb;
    border-radius: 12px;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    background: #faf5ff;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}
.adm-audio-upload-box input[type="file"] {
    display: none;
}
.adm-audio-upload-box:hover {
    border-color: #1d4ed8;
    background: #f3e8ff;
}
.adm-audio-upload-box i {
    font-size: 32px;
    color: #1d4ed8;
    display: block;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.adm-audio-upload-box p {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #4c1d95;
}
.adm-audio-upload-box .img-hint {
    font-size: 11px;
    color: #3b5bdb;
    font-weight: 400;
}

.adm-audio-preview {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    outline: none;
}

.adm-audio-status {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
    min-height: 18px;
}
.adm-audio-status.pending   { color: #d97706; }
.adm-audio-status.uploading { color: #2563eb; }
.adm-audio-status.success   { color: #059669; }
.adm-audio-status.error     { color: #dc2626; }

/* ============================================================
   MINI ÉDITEUR RICHE (Énoncé / Contexte)
   ============================================================ */
.mini-editor {
  border: 2px solid #8da2fb;
  border-radius: 10px;
  background: #fdfbff;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.mini-editor:focus-within {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

/* Barre d'outils */
.mini-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #f5f0ff;
  border-bottom: 1px solid #ede9fe;
}
.mini-tb-label {
  font-size: 10px;
  font-weight: 700;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-right: 4px;
}
.mini-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1.5px solid #c4b5fd;
  border-radius: 6px;
  background: white;
  color: #4c1d95;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1;
  white-space: nowrap;
}
.mini-tb-btn:hover        { background: #1d4ed8; border-color: #1d4ed8; color: white; }
.mini-tb-btn.active       { background: #1d4ed8; border-color: #1d4ed8; color: white; }
.mini-tb-btn strong       { font-weight: 900; font-size: 14px; }
.mini-tb-btn em           { font-style: italic; font-size: 14px; }
.mini-tb-sep {
  width: 1px;
  height: 20px;
  background: #c4b5fd;
  margin: 0 4px;
}

/* Zone de saisie contenteditable */
.mini-editor-body {
  min-height: 100px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.75;
  color: #1e293b;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}
.mini-editor-body:empty::before {
  content: attr(data-placeholder);
  color: #a0a0a0;
  pointer-events: none;
}
/* Rendu du formatage dans l'éditeur */
.mini-editor-body strong,
.mini-editor-body b { font-weight: 700; }
.mini-editor-body em,
.mini-editor-body i  { font-style: italic; }

/* ── Bouton création de série depuis le champ numéro ── */
.adm-btn-create-serie {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #3b5bdb);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.adm-btn-create-serie:hover:not(:disabled) {
  opacity: .9;
  transform: translateY(-1px);
}
.adm-btn-create-serie:disabled {
  opacity: .6;
  cursor: default;
}

/* ── Boutons déplacer / confirmer / annuler ── */
.adm-btn-move-confirm {
  display: inline-flex; align-items: center; gap: 5px;
  background: #6366f1; color: white; border: none;
  border-radius: 6px; padding: 5px 12px; font-size: 12px;
  font-weight: 600; cursor: pointer; transition: opacity .2s;
}
.adm-btn-move-confirm:hover { opacity: .85; }
.adm-btn-move-cancel {
  background: none; border: 1px solid #cbd5e1; color: #64748b;
  border-radius: 6px; padding: 5px 10px; font-size: 12px;
  cursor: pointer; transition: background .2s;
}
.adm-btn-move-cancel:hover { background: #f1f5f9; }

/* ── ElevenLabs TTS ─────────────────────────────────────── */
.adm-tts-box {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1.5px solid #d8b4fe;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.adm-tts-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  color: #1e3a8a;
  margin-bottom: 10px;
}
.adm-tts-textarea {
  width: 100%;
  border: 1.5px solid #ddd6fe;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  background: #fff;
  color: #1e1b4b;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
.adm-tts-textarea:focus { border-color: #3b5bdb; }
.adm-tts-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b5bdb 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity .15s;
}
.adm-tts-btn:hover    { opacity: .88; }
.adm-tts-btn:disabled { opacity: .55; cursor: not-allowed; }
.adm-tts-separator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: #94a3b8;
  font-size: 12px;
}
.adm-tts-separator::before,
.adm-tts-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
