/* ═══════════════════════════════════════════════════════════════
   DEREPOSTEL-LITTORAL — Styles Panneau Administration
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --adm-sidebar-w:   260px;
  --adm-header-h:    64px;
  --adm-primary:     #1a5276;
  --adm-primary-d:   #0f2f44;
  --adm-primary-l:   #2e86c1;
  --adm-accent:      #d4ac0d;
  --adm-accent-l:    #f4d03f;
  --adm-success:     #1e8449;
  --adm-warning:     #d68910;
  --adm-danger:      #c0392b;
  --adm-info:        #1a6da8;
  --adm-bg:          #f0f4f8;
  --adm-card:        #ffffff;
  --adm-border:      #e2e8f0;
  --adm-text:        #1a1a2e;
  --adm-text-mid:    #4a5568;
  --adm-text-light:  #718096;
  --adm-sidebar-bg:  #0f2f44;
  --adm-sidebar-txt: rgba(255,255,255,.75);
  --adm-shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --adm-shadow-md:   0 4px 12px rgba(0,0,0,.10);
  --adm-shadow-lg:   0 10px 30px rgba(0,0,0,.14);
  --radius-sm:       6px;
  --radius-md:       12px;
  --radius-lg:       18px;
  --transition:      all .22s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--adm-bg);
  color: var(--adm-text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: var(--adm-primary); }
img { max-width: 100%; }
ul { list-style: none; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--adm-bg); }
::-webkit-scrollbar-thumb { background: var(--adm-primary); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--adm-primary-d) 0%, var(--adm-primary) 60%, var(--adm-primary-l) 100%);
  position: relative; overflow: hidden; padding: 20px;
}
.login-bg-circles {
  position: absolute; inset: 0; pointer-events: none;
}
.login-bg-circles span {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.login-bg-circles span:nth-child(1) { width: 500px; height: 500px; top: -150px; right: -100px; }
.login-bg-circles span:nth-child(2) { width: 300px; height: 300px; bottom: -80px; left: -80px; }
.login-bg-circles span:nth-child(3) { width: 200px; height: 200px; top: 40%; left: 10%; background: rgba(212,172,13,.06); }

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--adm-shadow-lg);
  width: 100%; max-width: 420px;
  overflow: hidden;
  position: relative; z-index: 1;
  animation: loginIn .4s ease;
}
@keyframes loginIn { from { opacity:0; transform:translateY(24px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }

.login-header {
  background: linear-gradient(135deg, var(--adm-primary-d), var(--adm-primary));
  padding: 32px 32px 28px;
  text-align: center; color: white;
  position: relative;
}
.login-logo {
  width: 64px; height: 64px;
  background: white;
  border-radius: var(--radius-md);
  object-fit: contain;
  margin: 0 auto 16px;
  border: 2px solid rgba(255,255,255,.2);
  padding: 4px;
}
.login-header h1 { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.login-header p { font-size: .8rem; color: rgba(255,255,255,.65); }

.login-body { padding: 32px; }
.login-subtitle {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--adm-text-light);
  margin-bottom: 20px; text-align: center;
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--adm-text-mid); margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--adm-border);
  border-radius: var(--radius-sm);
  font-size: .9rem; font-family: inherit;
  color: var(--adm-text);
  background: var(--adm-bg);
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--adm-primary); background: white; box-shadow: 0 0 0 3px rgba(26,82,118,.1); }
.form-control.error { border-color: var(--adm-danger); }
.form-input-wrap { position: relative; }
.form-input-wrap .form-control { padding-left: 40px; }
.form-input-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--adm-text-light); font-size: 1rem; pointer-events: none;
}
.form-error { font-size: .78rem; color: var(--adm-danger); margin-top: 5px; display: none; }
.form-error.show { display: block; }

.login-alert {
  background: rgba(192,57,43,.08);
  border: 1px solid rgba(192,57,43,.2);
  border-left: 4px solid var(--adm-danger);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .84rem; color: var(--adm-danger);
  margin-bottom: 16px; display: none;
}
.login-alert.show { display: block; animation: shakeX .4s ease; }
@keyframes shakeX {
  0%,100% { transform:translateX(0); }
  25% { transform:translateX(-6px); }
  75% { transform:translateX(6px); }
}

.btn-login {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--adm-primary), var(--adm-primary-l));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 14px rgba(26,82,118,.35);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,82,118,.4); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.login-footer {
  padding: 16px 32px 24px;
  text-align: center;
  font-size: .75rem; color: var(--adm-text-light);
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════════════════════════ */
#admin-app { display: none; min-height: 100vh; }
#admin-app.visible { display: flex; }

/* ─── Sidebar ───────────────────────────────────────────────── */
.adm-sidebar {
  width: var(--adm-sidebar-w);
  min-height: 100vh;
  background: var(--adm-sidebar-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform .3s ease;
  overflow-y: auto;
}
.adm-sidebar::-webkit-scrollbar { width: 3px; }
.adm-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: white;
  flex-shrink: 0;
  padding: 2px;
}
.sidebar-logo-text { }
.sidebar-logo-title { font-size: .88rem; font-weight: 800; color: white; line-height: 1.2; }
.sidebar-logo-sub { font-size: .65rem; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .5px; }

.sidebar-user {
  margin: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--adm-accent), var(--adm-accent-l));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 800; color: var(--adm-primary-d);
  flex-shrink: 0;
}
.sidebar-user-name { font-size: .82rem; font-weight: 600; color: white; line-height: 1.2; }
.sidebar-user-role {
  font-size: .67rem; color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .5px;
}

.sidebar-nav { flex: 1; padding: 8px; }
.sidebar-section-label {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: rgba(255,255,255,.3);
  padding: 12px 12px 6px;
}
.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--adm-sidebar-txt);
  font-size: .84rem; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  border: none; background: none; width: 100%; text-align: left;
  margin-bottom: 2px;
}
.sidebar-nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.sidebar-nav-item.active {
  background: var(--adm-primary-l);
  color: white; font-weight: 600;
  box-shadow: 0 2px 8px rgba(46,134,193,.4);
}
.sidebar-nav-item .nav-icon { font-size: 1.1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-nav-badge {
  margin-left: auto;
  background: var(--adm-accent);
  color: var(--adm-primary-d);
  font-size: .65rem; font-weight: 800;
  padding: 2px 7px; border-radius: 100px;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-footer-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  background: rgba(192,57,43,.15);
  border: 1px solid rgba(192,57,43,.2);
  border-radius: var(--radius-sm);
  color: rgba(255,160,160,.85);
  font-size: .83rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: inherit;
}
.sidebar-footer-btn:hover { background: rgba(192,57,43,.3); color: white; }

/* ─── Main Content ──────────────────────────────────────────── */
.adm-main {
  margin-left: var(--adm-sidebar-w);
  flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ─── Top Header ────────────────────────────────────────────── */
.adm-header {
  height: var(--adm-header-h);
  background: white;
  border-bottom: 1px solid var(--adm-border);
  box-shadow: var(--adm-shadow-sm);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
}
.adm-header-left { display: flex; align-items: center; gap: 16px; }
.adm-hamburger {
  display: none; flex-direction: column; gap: 4px;
  cursor: pointer; padding: 8px; border: none; background: none;
  border-radius: var(--radius-sm);
}
.adm-hamburger span { display: block; width: 20px; height: 2px; background: var(--adm-text); border-radius: 2px; }
.adm-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--adm-text-light); }
.adm-breadcrumb strong { color: var(--adm-text); font-weight: 600; }
.adm-header-right { display: flex; align-items: center; gap: 12px; }
.adm-header-site-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600; color: var(--adm-text-mid);
  cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.adm-header-site-link:hover { background: var(--adm-primary); color: white; border-color: var(--adm-primary); }

/* ─── Content Area ──────────────────────────────────────────── */
.adm-content { flex: 1; padding: 28px; }

/* ─── Page Title ────────────────────────────────────────────── */
.adm-page-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.adm-page-title h1 { font-size: 1.4rem; font-weight: 800; color: var(--adm-text); }
.adm-page-title p { font-size: .83rem; color: var(--adm-text-light); margin-top: 3px; }
.adm-page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════
   STAT CARDS (Dashboard)
   ═══════════════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-bottom: 28px;
}
.stat-card {
  background: white;
  border: 1px solid var(--adm-border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--adm-shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--adm-shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.stat-icon.blue { background: rgba(26,109,168,.12); }
.stat-icon.green { background: rgba(30,132,73,.12); }
.stat-icon.orange { background: rgba(214,137,16,.12); }
.stat-icon.purple { background: rgba(118,68,138,.12); }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--adm-text); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--adm-text-light); font-weight: 500; margin-top: 4px; }
.stat-trend { font-size: .72rem; margin-top: 6px; }
.stat-trend.up { color: var(--adm-success); }
.stat-trend.neutral { color: var(--adm-text-light); }

/* ═══════════════════════════════════════════════════════════════
   DATA TABLE
   ═══════════════════════════════════════════════════════════════ */
.adm-card {
  background: white;
  border: 1px solid var(--adm-border);
  border-radius: var(--radius-md);
  box-shadow: var(--adm-shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}
.adm-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  background: var(--adm-bg);
}
.adm-card-title {
  font-size: .95rem; font-weight: 700; color: var(--adm-text);
  display: flex; align-items: center; gap: 8px;
}
.adm-card-body { padding: 0; }
.adm-card-padded { padding: 22px; }

.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th {
  background: var(--adm-bg);
  padding: 11px 16px;
  text-align: left; font-size: .75rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .7px;
  color: var(--adm-text-light);
  border-bottom: 1px solid var(--adm-border);
  white-space: nowrap;
}
.adm-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--adm-border);
  font-size: .86rem; color: var(--adm-text-mid);
  vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr { transition: var(--transition); }
.adm-table tr:hover td { background: rgba(26,82,118,.03); }
.adm-table td strong { color: var(--adm-text); font-weight: 600; }

/* Overflow table on mobile */
.table-wrapper { overflow-x: auto; }

/* ─── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: .71rem; font-weight: 700;
}
.badge-success { background: rgba(30,132,73,.1); color: var(--adm-success); }
.badge-warning { background: rgba(214,137,16,.1); color: var(--adm-warning); }
.badge-danger  { background: rgba(192,57,43,.1);  color: var(--adm-danger);  }
.badge-info    { background: rgba(26,82,118,.1);  color: var(--adm-primary); }
.badge-neutral { background: var(--adm-bg); color: var(--adm-text-light); border: 1px solid var(--adm-border); }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: .84rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: var(--transition); border: none;
  white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--adm-primary), var(--adm-primary-l)); color: white; box-shadow: 0 3px 10px rgba(26,82,118,.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(26,82,118,.4); }
.btn-success { background: var(--adm-success); color: white; }
.btn-success:hover { background: #166538; }
.btn-warning { background: var(--adm-warning); color: white; }
.btn-danger  { background: var(--adm-danger); color: white; }
.btn-danger:hover  { background: #96281b; }
.btn-outline {
  background: white; border: 1.5px solid var(--adm-border);
  color: var(--adm-text-mid);
}
.btn-outline:hover { border-color: var(--adm-primary); color: var(--adm-primary); }
.btn-sm { padding: 6px 13px; font-size: .78rem; }
.btn-xs { padding: 4px 10px; font-size: .74rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); aspect-ratio: 1; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* Action buttons group */
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── Search & Filters ──────────────────────────────────────── */
.table-controls {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.adm-search {
  display: flex; align-items: center;
  background: white;
  border: 1.5px solid var(--adm-border);
  border-radius: var(--radius-sm);
  padding: 0 12px; gap: 8px;
  transition: var(--transition);
}
.adm-search:focus-within { border-color: var(--adm-primary); }
.adm-search input {
  border: none; background: none;
  padding: 8px 4px; font-size: .85rem;
  font-family: inherit; outline: none;
  width: 180px; color: var(--adm-text);
}
.adm-select {
  padding: 9px 12px;
  border: 1.5px solid var(--adm-border);
  border-radius: var(--radius-sm);
  font-size: .84rem; font-family: inherit;
  color: var(--adm-text-mid); background: white;
  cursor: pointer; outline: none; transition: var(--transition);
}
.adm-select:focus { border-color: var(--adm-primary); }

/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */
.adm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.adm-modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--adm-shadow-lg);
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
.adm-modal-lg { max-width: 860px; }
.adm-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--adm-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.adm-modal-title { font-size: 1rem; font-weight: 700; color: var(--adm-text); display: flex; align-items: center; gap: 8px; }
.adm-modal-close {
  width: 32px; height: 32px;
  border: 1px solid var(--adm-border); border-radius: 50%;
  background: white; color: var(--adm-text-light);
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.adm-modal-close:hover { background: var(--adm-danger); color: white; border-color: var(--adm-danger); }
.adm-modal-body { padding: 24px; }
.adm-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--adm-border);
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; background: var(--adm-bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ─── Rich Text Editor ──────────────────────────────────────── */
.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 10px 12px;
  background: var(--adm-bg);
  border: 1.5px solid var(--adm-border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.editor-btn {
  padding: 5px 10px; border-radius: 4px;
  border: 1px solid var(--adm-border); background: white;
  color: var(--adm-text-mid); font-size: .8rem; font-family: inherit;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  min-width: 32px;
}
.editor-btn:hover { background: var(--adm-primary); color: white; border-color: var(--adm-primary); }
.editor-btn.active { background: var(--adm-primary); color: white; border-color: var(--adm-primary); }
.editor-separator { width: 1px; background: var(--adm-border); margin: 0 4px; align-self: stretch; }

.content-editor {
  width: 100%;
  min-height: 200px; max-height: 400px;
  overflow-y: auto;
  padding: 16px;
  border: 1.5px solid var(--adm-border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: .9rem; line-height: 1.7;
  color: var(--adm-text);
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.content-editor:focus { border-color: var(--adm-primary); }
.content-editor p { margin-bottom: 12px; }
.content-editor h2, .content-editor h3 { margin: 16px 0 8px; color: var(--adm-primary); }
.content-editor ul { margin: 8px 0 12px 20px; }

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.adm-toasts {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}
.adm-toast {
  background: var(--adm-text);
  color: white; padding: 13px 18px;
  border-radius: var(--radius-md);
  font-size: .85rem; font-weight: 500;
  box-shadow: var(--adm-shadow-lg);
  display: flex; align-items: center; gap: 10px;
  min-width: 280px; max-width: 380px;
  animation: toastSlide .3s ease;
}
@keyframes toastSlide { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
.adm-toast.success { background: var(--adm-success); }
.adm-toast.error   { background: var(--adm-danger); }
.adm-toast.warning { background: var(--adm-warning); }
.adm-toast.info    { background: var(--adm-info); }

/* ═══════════════════════════════════════════════════════════════
   CONFIRM DIALOG
   ═══════════════════════════════════════════════════════════════ */
.confirm-dialog .adm-modal { max-width: 420px; }
.confirm-body { padding: 28px 24px; text-align: center; }
.confirm-icon { font-size: 3rem; margin-bottom: 14px; }
.confirm-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; color: var(--adm-text); }
.confirm-body p { font-size: .87rem; color: var(--adm-text-mid); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */
.adm-empty {
  text-align: center; padding: 60px 24px;
  color: var(--adm-text-light);
}
.adm-empty-icon { font-size: 3.5rem; margin-bottom: 14px; opacity: .4; }
.adm-empty h3 { font-size: 1rem; font-weight: 700; color: var(--adm-text-mid); margin-bottom: 6px; }
.adm-empty p { font-size: .85rem; }

/* ═══════════════════════════════════════════════════════════════
   FORM STYLES
   ═══════════════════════════════════════════════════════════════ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 16px; }
.form-text { font-size: .76rem; color: var(--adm-text-light); margin-top: 5px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--adm-primary); }
.form-check-label { font-size: .85rem; color: var(--adm-text-mid); }

/* ─── Switch ────────────────────────────────────────────────── */
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch-track {
  width: 44px; height: 24px; border-radius: 12px;
  background: var(--adm-border); position: relative;
  transition: var(--transition); flex-shrink: 0;
}
.switch-track::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-track { background: var(--adm-success); }
.switch input:checked + .switch-track::after { left: 23px; }
.switch input { display: none; }
.switch-label { font-size: .85rem; font-weight: 500; color: var(--adm-text-mid); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .adm-sidebar {
    transform: translateX(-100%);
  }
  .adm-sidebar.open {
    transform: translateX(0);
  }
  .adm-main {
    margin-left: 0;
  }
  .adm-hamburger { display: flex; }
  .adm-content { padding: 16px; }
  .adm-page-title { gap: 12px; }
  .adm-page-title h1 { font-size: 1.2rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .adm-overlay { align-items: flex-end; padding: 0; }
  .adm-modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 95vh; }
  .adm-modal-lg { max-width: 100%; }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 199;
  }
  .sidebar-overlay.show { display: block; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ─── Permissions Table ─────────────────────────────────────── */
.perms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.perm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm);
  font-size: .83rem; color: var(--adm-text-mid);
}
.perm-item.granted { background: rgba(30,132,73,.06); border-color: rgba(30,132,73,.2); color: var(--adm-success); }
.perm-item.denied  { opacity: .45; }

/* ─── Preview panel ─────────────────────────────────────────── */
.preview-frame {
  border: 1px solid var(--adm-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  background: white;
  min-height: 180px;
  font-size: .9rem; line-height: 1.7; color: var(--adm-text-mid);
}
.preview-frame h2, .preview-frame h3 { color: var(--adm-primary); margin-bottom: 10px; }
.preview-frame p { margin-bottom: 10px; }
.preview-frame ul { margin: 0 0 10px 18px; }
.preview-frame strong { color: var(--adm-text); }

/* ─── Tabs in Admin Modals ──────────────────────────────────── */
.adm-tabs-header {
  display: flex;
  border-bottom: 2px solid var(--adm-border);
  margin-bottom: 16px;
  gap: 8px;
}
.adm-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 8px 16px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--adm-text-light);
  cursor: pointer;
  transition: var(--transition);
}
.adm-tab-btn:hover {
  color: var(--adm-primary);
}
.adm-tab-btn.active {
  color: var(--adm-primary);
  border-bottom-color: var(--adm-primary);
}
.adm-tab-content {
  display: none;
}
.adm-tab-content.active {
  display: block;
}

/* ─── Galerie & Recadrage Admin ─────────────────────────────── */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.gallery-admin-card {
  background: white;
  border: 1px solid var(--adm-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--adm-shadow-sm);
  display: flex;
  flex-direction: column;
}
.gallery-admin-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: #eee;
  overflow: hidden;
}
.gallery-admin-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-admin-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gallery-admin-event {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--adm-primary);
}
.gallery-admin-caption {
  font-size: 0.75rem;
  color: var(--adm-text-mid);
  line-height: 1.4;
  flex: 1;
}
.gallery-admin-actions {
  padding: 8px 12px 12px;
  border-top: 1px solid var(--adm-border);
  display: flex;
  gap: 8px;
}

/* Dropzone style */
.upload-dropzone {
  border: 2px dashed var(--adm-border);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  background: var(--adm-bg);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}
.upload-dropzone:hover {
  border-color: var(--adm-primary);
  background: rgba(26,82,118,0.02);
}
.upload-dropzone-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
.upload-dropzone-text {
  font-size: 0.85rem;
  color: var(--adm-text-mid);
  font-weight: 500;
}

/* Image Cropper Modal elements */
.cropper-container {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 20px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .cropper-container {
    grid-template-columns: 1fr;
  }
}
.cropper-workarea {
  background: #222;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}
.cropper-workarea canvas {
  max-width: 100%;
  max-height: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  cursor: crosshair;
}
.cropper-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--adm-bg);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--adm-border);
}
.cropper-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cropper-control-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--adm-text-mid);
  display: flex;
  justify-content: space-between;
}
.cropper-control-group input[type="range"] {
  width: 100%;
  accent-color: var(--adm-primary);
}
.cropper-preview-box {
  margin-top: 12px;
  border-top: 1px solid var(--adm-border);
  padding-top: 12px;
  text-align: center;
}
.cropper-preview-box h4 {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--adm-text-mid);
}
.cropper-preview-canvas {
  max-width: 100%;
  height: 100px;
  object-fit: contain;
  border: 1px solid var(--adm-border);
  background: #f7f7f7;
  border-radius: var(--radius-sm);
}

