/* ════════════════════════════════════════════════════════════════
   DJANGUI v1.0.45 — Charte Salott-IT Engineering
   Couleurs brand : Navy #0E2E5A · Teal #2BA3C7 · Orange #F26419
   ════════════════════════════════════════════════════════════════ */

:root {
  /* ─── Brand Salott-IT ─── */
  --primary:        #0E2E5A;
  --primary-dark:   #061D3D;
  --primary-light:  #1D4A8A;
  --primary-50:     rgba(14, 46, 90, .05);
  --primary-100:    rgba(14, 46, 90, .10);

  --teal:           #2BA3C7;
  --teal-dark:      #1F8AAB;
  --teal-light:     #5BBED5;
  --teal-50:        rgba(43, 163, 199, .08);

  --accent:         #F26419;
  --accent-dark:    #C84D10;
  --accent-light:   #F8884A;
  --accent-50:      rgba(242, 100, 25, .08);

  --trust:          #4DB748;
  --trust-dark:     #3A9038;
  --trust-50:       rgba(77, 183, 72, .08);

  --danger:         #DC3545;
  --warning:        #F0B429;
  --info:           #0DCAF0;

  /* ─── Neutres ─── */
  --text:           #0F1B36;
  --text-soft:      #344259;
  --text-muted:     #6B7A99;
  --bg:             #F5F7FB;
  --bg-card:        #FFFFFF;
  --border:         #E2E8F0;
  --border-soft:    #EDF1F7;

  /* ─── Effets ─── */
  --shadow-xs:  0 1px 2px rgba(14, 46, 90, .04);
  --shadow-sm:  0 1px 3px rgba(14, 46, 90, .08), 0 1px 2px rgba(14, 46, 90, .04);
  --shadow:     0 4px 12px rgba(14, 46, 90, .08), 0 2px 4px rgba(14, 46, 90, .06);
  --shadow-lg:  0 12px 32px rgba(14, 46, 90, .14), 0 4px 12px rgba(14, 46, 90, .08);
  --shadow-xl:  0 24px 48px rgba(14, 46, 90, .18);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --font:        'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:   'Inter', 'Poppins', system-ui, sans-serif;

  --header-h:    72px;
  --topbar-h:    36px;

  --transition:  150ms cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
[x-cloak] { display: none !important; }

/* Scroll bar */
::-webkit-scrollbar       { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ════ TOPBAR Salott-IT ═══════════════════════════════════════════ */
.salott-topbar {
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: rgba(255, 255, 255, .92);
  font-size: .76rem;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--teal);
}
.salott-topbar-inner {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.topbar-info, .topbar-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-info span i, .topbar-links a i { color: var(--teal-light); margin-right: 4px; }
.topbar-info .sep { color: rgba(255,255,255,.3); }
.topbar-links a { color: rgba(255,255,255,.92); transition: color var(--transition); }
.topbar-links a:hover { color: var(--accent-light); }
.version-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: .7rem;
  letter-spacing: .03em;
}

/* ════ HEADER PRINCIPAL ═══════════════════════════════════════════ */
.main-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
}
.header-inner {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Brand */
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  flex-shrink: 0;
}
.brand-link:hover { color: var(--text); }
/* Logo complet horizontal dans le header (mode "pas d'asso sélectionnée") */
.brand-full-logo {
  height: 50px;
  width: auto;
  max-width: 220px;
  display: block;
}
@media (max-width: 600px) {
  .brand-full-logo { height: 38px; max-width: 160px; }
}

/* Logo asso + djangui inline */
.brand-icon-asso {
  width: 48px; height: 48px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.brand-djangui-inline {
  height: 14px;
  width: auto;
  vertical-align: middle;
  margin-left: 2px;
}
.brand-text .brand-name {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--primary);
  letter-spacing: -.01em;
}
.brand-text .brand-sub {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

/* Toggle mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  margin-left: auto;
}

/* Navigation horizontale */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius);
  color: var(--text-soft);
  font-weight: 500;
  font-size: .87rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--primary-50);
  color: var(--primary);
}
.nav-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.nav-link.active:hover { color: #fff; }
.nav-link i { font-size: 1rem; }
.nav-link.admin-link {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
}
.nav-link.admin-link:hover { background: var(--accent-dark); color: #fff; }

/* Dropdowns */
.nav-dropdown { position: relative; }
.nav-dropdown .chevron {
  font-size: .65rem !important;
  margin-left: 2px;
  transition: transform var(--transition);
}
.nav-dropdown.open .chevron { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--transition);
  z-index: 1000;
}
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--transition);
}
.dropdown-menu a:hover {
  background: var(--primary-50);
  color: var(--primary);
}
.dropdown-menu a i { color: var(--teal); width: 18px; }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition);
  font-size: 1.1rem;
}
.icon-btn:hover { background: var(--primary-100); color: var(--primary); }
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

/* User menu */
.user-menu { position: relative; }
.user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.user-trigger:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .82rem;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-text { text-align: left; line-height: 1.2; }
.user-name { font-size: .82rem; font-weight: 600; color: var(--text); }
.user-role { font-size: .68rem; color: var(--text-muted); }
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 6px;
  z-index: 1000;
}
.user-dropdown-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .85rem;
  font-weight: 500;
}
.user-dropdown a:hover { background: var(--primary-50); color: var(--primary); }
.user-dropdown a i { width: 18px; color: var(--teal); }
.user-dropdown a.logout { color: var(--danger); }
.user-dropdown a.logout i { color: var(--danger); }
.user-dropdown a.logout:hover { background: rgba(220, 53, 69, .08); }
.dropdown-sep {
  height: 1px;
  background: var(--border-soft);
  margin: 6px 0;
}

/* ════ FLASH MESSAGES ═════════════════════════════════════════════ */
.flash-stack {
  max-width: 1440px;
  margin: 16px auto 0;
  padding: 0 24px;
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .87rem;
  margin-bottom: 10px;
  border-left: 4px solid;
  position: relative;
}
.alert i { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert span { flex: 1; line-height: 1.5; }
.alert-success { background: var(--trust-50);   color: var(--trust-dark); border-left-color: var(--trust); }
.alert-success i { color: var(--trust); }
.alert-error   { background: rgba(220,53,69,.08); color: #b22a36;        border-left-color: var(--danger); }
.alert-error i { color: var(--danger); }
.alert-warning { background: rgba(240,180,41,.1); color: #8a6515;        border-left-color: var(--warning); }
.alert-warning i { color: var(--warning); }
.alert-info    { background: var(--teal-50);    color: var(--teal-dark); border-left-color: var(--teal); }
.alert-info i  { color: var(--teal); }
.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .6;
  font-size: 1rem;
  padding: 0 4px;
}
.alert-close:hover { opacity: 1; }

/* ════ MAIN CONTENT ═══════════════════════════════════════════════ */
.page-body {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.02em;
  line-height: 1.2;
}
.page-subtitle {
  font-size: .88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ════ BUTTONS ════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: .87rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 42px;
  white-space: nowrap;
  letter-spacing: .01em;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 7px 12px; font-size: .8rem; min-height: 34px; }
.btn-lg { padding: 13px 24px; font-size: .95rem; min-height: 48px; }
.btn-full { width: 100%; }

.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 6px 16px rgba(14,46,90,.25); }

.btn-accent { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 6px 16px rgba(242,100,25,.25); }

.btn-teal { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%); color: #fff; border-color: var(--teal); }
.btn-teal:hover { background: var(--teal-dark); color: #fff; box-shadow: 0 6px 16px rgba(43,163,199,.25); }

.btn-success { background: var(--trust); color: #fff; border-color: var(--trust); }
.btn-success:hover { background: var(--trust-dark); color: #fff; }

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

.btn-outline { background: var(--bg-card); color: var(--primary); border-color: var(--border); }
.btn-outline:hover { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }

.btn-ghost { background: transparent; color: var(--text-soft); border: none; }
.btn-ghost:hover { background: var(--primary-50); color: var(--primary); box-shadow: none; transform: none; }

/* ════ CARDS ══════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
.card-title {
  font-size: .98rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title i { color: var(--teal); }
.card-body { padding: 20px; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--teal) 0%, var(--primary) 100%);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--teal-light);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-label {
  font-size: .73rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-bottom: 2px;
}
.stat-value {
  font-family: var(--font);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.stat-change {
  font-size: .73rem;
  margin-top: 3px;
  font-weight: 500;
}
.stat-change.positive { color: var(--trust); }
.stat-change.negative { color: var(--danger); }

/* ════ TABLES ═════════════════════════════════════════════════════ */
.table-container { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
}
.table thead {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card) 100%);
}
.table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
}
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: var(--primary-50); }
.table tbody tr:last-child td { border-bottom: none; }
.table code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .82em;
  color: var(--primary);
}

/* ════ BADGES ═════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-success { background: var(--trust-50); color: var(--trust-dark); }
.badge-warning { background: rgba(240,180,41,.15); color: #8a6515; }
.badge-danger  { background: rgba(220,53,69,.10); color: #b22a36; }
.badge-info    { background: var(--teal-50); color: var(--teal-dark); }
.badge-primary { background: var(--primary-100); color: var(--primary); }

/* ════ FORMS ══════════════════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .req { color: var(--accent); }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  background: var(--bg-card);
  transition: all var(--transition);
  min-height: 44px;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-50);
}
.form-control:disabled { background: var(--bg); cursor: not-allowed; opacity: .7; }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,53,69,.12); }
.form-error { font-size: .76rem; color: var(--danger); margin-top: 4px; }
.form-hint  { font-size: .76rem; color: var(--text-muted); margin-top: 4px; }
textarea.form-control { min-height: 90px; resize: vertical; }

/* ════ MODALS ═════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 46, 90, .6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 200ms ease;
  overflow-y: auto;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  margin: auto;
  transform: translateY(20px) scale(.97);
  transition: transform 240ms cubic-bezier(.34, 1.56, .64, 1);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 80px);
}
.modal-overlay.open .modal-dialog { transform: translateY(0) scale(1); }
.modal-dialog.modal-lg { max-width: 800px; }
.modal-dialog.modal-sm { max-width: 420px; }
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-title {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}
.modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(220,53,69,.1); color: var(--danger); }
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.modal-loader {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.modal-loader .spin {
  display: inline-block;
  animation: spin 1s linear infinite;
  font-size: 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════ EMPTY STATE ════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}
.empty-state-icon {
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--teal-50) 0%, var(--primary-50) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--primary);
}
.empty-state-title {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.empty-state-text { color: var(--text-muted); font-size: .9rem; }

/* ════ UPLOAD ZONE ════════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
}
.upload-zone:hover {
  border-color: var(--teal);
  background: var(--teal-50);
}
.upload-icon {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 1.6rem;
  box-shadow: var(--shadow-xs);
}

/* ════ TOAST ══════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  font-size: .87rem;
  animation: slideIn 280ms cubic-bezier(.34, 1.56, .64, 1);
}
.toast button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0 4px;
  margin-left: auto;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ════ FOOTER MINIMAL ═════════════════════════════════════════════ */
.main-footer {
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: rgba(255,255,255,.85);
  margin-top: 60px;
  border-top: 2px solid var(--teal);
}
.footer-mini {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: .8rem;
}
.footer-brand-mini img {
  filter: brightness(0) invert(1);
  display: block;
}
.footer-info-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.footer-info-mini i { color: var(--teal-light); margin-right: 4px; }
.footer-info-mini .sep { color: rgba(255,255,255,.3); }
.footer-info-mini a { color: rgba(255,255,255,.85); }
.footer-info-mini a:hover { color: var(--accent-light); }
.footer-copy {
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
}
@media (max-width: 768px) {
  .footer-mini { justify-content: center; text-align: center; }
  .footer-info-mini .sep { display: none; }
}

/* ════ AUTH PAGES ═════════════════════════════════════════════════ */
.auth-body {
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}
.auth-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(242,100,25,.15) 0%, transparent 50%);
  pointer-events: none;
}
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px 26px;
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
  margin: auto;
}
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-brand-icon {
  width: 96px; height: 96px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-brand-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(14, 46, 90, .15));
}

/* Logo complet (avec texte) — utilisé sur pages auth et header */
.auth-full-logo {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto 14px;
  filter: drop-shadow(0 4px 10px rgba(14, 46, 90, .12));
}
@media (max-width: 480px) {
  .auth-full-logo { max-width: 200px; }
}
.auth-title {
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.01em;
  margin-bottom: 4px;
}
.auth-subtitle {
  color: var(--text-muted);
  font-size: .88rem;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  position: relative;
  z-index: 1;
}
.auth-footer a { color: #fff; font-weight: 600; }
.auth-footer a:hover { color: var(--accent-light); }

@media (max-width: 480px) {
  .auth-wrapper { padding: 16px 12px; }
  .auth-card { padding: 24px 20px; border-radius: var(--radius-lg); max-width: 100%; }
  .auth-brand-icon { width: 64px; height: 64px; }
  .auth-title { font-size: 1.4rem; }
  .auth-subtitle { font-size: .82rem; }
}

/* ════ UTILS ══════════════════════════════════════════════════════ */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.ms-1 { margin-left: 8px !important; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }

/* ════ RESPONSIVE ═════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .header-inner { gap: 12px; padding: 0 16px; }
  .salott-topbar-inner { padding: 0 16px; flex-wrap: wrap; gap: 8px; }
  .topbar-info { font-size: .7rem; }
  .topbar-info .sep { display: none; }
  .nav-link { padding: 8px 10px; font-size: .82rem; }
  .nav-link span { display: none; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: fixed;
    top: calc(var(--topbar-h) + var(--header-h));
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100vh - var(--topbar-h) - var(--header-h));
    overflow-y: auto;
    z-index: 99;
  }
  body.nav-open .main-nav { display: flex; }
  .nav-link { justify-content: flex-start; padding: 12px 14px; }
  .nav-dropdown .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg);
    margin-top: 4px;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .header-actions .user-text { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .salott-topbar { display: none; }
  .page-body { padding: 14px; }
  .page-title { font-size: 1.25rem; }
  .page-subtitle { font-size: .8rem; }
  .header-inner { padding: 0 12px; gap: 8px; }
  .brand-text .brand-name { font-size: 1rem; }
  .brand-text .brand-sub { font-size: .65rem; }
  .header-actions .icon-btn { width: 36px; height: 36px; }
  .header-actions .user-trigger { padding: 2px 8px 2px 2px; }
  .modal-dialog { max-height: 100vh; margin: 0; border-radius: 0; max-width: 100%; }
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal-header { border-radius: 0; }
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat-card { padding: 14px 16px; }
  .stat-value { font-size: 1.3rem; }
  .card-body { padding: 16px; }
  .table th, .table td { padding: 10px 12px; font-size: .82rem; }
  .form-control { font-size: 16px; } /* évite le zoom auto iOS */
  .footer-mini { padding: 12px 16px; gap: 12px; flex-direction: column; }
  .btn { min-height: 44px; } /* zone tactile minimale */
}

/* ════ PWA INSTALL BANNER ═════════════════════════════════════════ */
.pwa-install-banner {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2500;
  animation: slideUp 320ms cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUp {
  from { transform: translateY(120%); }
  to   { transform: translateY(0); }
}
.pwa-install-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.pwa-install-text { flex: 1; min-width: 0; line-height: 1.3; }
.pwa-install-text strong { display: block; color: var(--primary); font-size: .9rem; }
.pwa-install-text span { font-size: .75rem; color: var(--text-muted); }
@media (max-width: 480px) {
  .pwa-install-banner { gap: 8px; padding: 10px; }
  .pwa-install-text strong { font-size: .85rem; }
  .pwa-install-text span { font-size: .7rem; }
}

/* iOS PWA standalone — masquer le topbar (pas pertinent une fois installé) */
@media (display-mode: standalone) {
  .salott-topbar { display: none; }
  body { padding-top: env(safe-area-inset-top, 0); }
}

/* ════ BOTTOM NAV MOBILE (style budget) ═══════════════════════════ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(14, 46, 90, .08);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-items {
  display: flex;
  align-items: stretch;
  height: 100%;
  padding: 0 8px;
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .68rem;
  font-weight: 500;
  padding: 6px 4px;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.mobile-nav-item .nav-icon { font-size: 1.35rem; line-height: 1; }
.mobile-nav-item.active { color: var(--primary); font-weight: 600; }
.mobile-nav-item .mnav-dot {
  position: absolute;
  bottom: 4px;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
}
.mobile-nav-fab {
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  font-size: 1.5rem;
  margin: -16px 4px 0;  /* sort du flux */
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(242, 100, 25, .4), 0 2px 6px rgba(242, 100, 25, .2);
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  z-index: 1;
}
.mobile-nav-fab:hover { box-shadow: 0 8px 24px rgba(242, 100, 25, .5); }
.mobile-nav-fab:active { transform: scale(.92); }

/* ════ FAB SHEET (action panel) ═══════════════════════════════════ */
.fab-sheet {
  position: fixed;
  inset: 0;
  z-index: 2200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms;
}
.fab-sheet.open {
  pointer-events: auto;
  opacity: 1;
}
.fab-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 46, 90, .6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fab-sheet-content {
  position: absolute;
  bottom: 80px; left: 16px; right: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 20px 22px;
  box-shadow: var(--shadow-xl);
  transform: translateY(40px);
  transition: transform 280ms cubic-bezier(.34,1.56,.64,1);
  max-height: 70vh;
  overflow-y: auto;
}
.fab-sheet.open .fab-sheet-content { transform: translateY(0); }
.fab-sheet-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 14px;
}
.fab-sheet-title {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  text-align: center;
}
.fab-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.fab-action {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.fab-action:hover, .fab-action:active { background: var(--primary-50); }
.fab-action-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
}

/* Activer la bottom-nav uniquement sur mobile et masquer la nav du header */
@media (max-width: 900px) {
  .mobile-nav { display: block; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .main-nav { display: none !important; }  /* on remplace par bottom-nav */
  body.nav-open .main-nav { display: flex !important; }
  .nav-toggle { display: none; }  /* plus besoin du toggle hamburger */
  .main-footer { margin-bottom: 64px; }
}

/* ════ MOBILE-NAV — Boutons spéciaux Menu et Déconnexion ══════════════ */
.mnav-menu-btn {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  color: var(--primary) !important;
  font-weight: 600;
}
.mnav-menu-btn:active { transform: scale(.95); }
.mnav-logout-btn { color: var(--danger) !important; }
.mnav-logout-btn:hover, .mnav-logout-btn:active { color: var(--accent-dark) !important; }

/* ════ APP MENU MODAL (centré, scroll interne) ═══════════════════════ */
.app-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 46, 90, .65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.app-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.app-menu-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(.96);
  transition: transform 220ms cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
.app-menu-overlay.open .app-menu-dialog { transform: translateY(0) scale(1); }

.app-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
}
.app-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.app-menu-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .92rem;
  flex-shrink: 0;
  overflow: hidden;
}
.app-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
.app-menu-user-text { min-width: 0; flex: 1; }
.app-menu-user-name {
  font-weight: 700;
  font-size: .98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-menu-user-role {
  font-size: .76rem;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-menu-close {
  background: rgba(255,255,255,.16);
  color: #fff;
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app-menu-close:hover { background: rgba(255,255,255,.28); }

.app-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
.app-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 8px;
  padding: 14px 6px;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 500;
  transition: transform .12s, background .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
}
.app-menu-item:hover {
  background: var(--primary-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.app-menu-item:active { transform: translateY(0); }
.app-menu-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.app-menu-item-admin { background: rgba(220, 38, 38, .06); }

.app-menu-logout {
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(220, 38, 38, .04);
  color: var(--danger);
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.app-menu-logout:hover { background: rgba(220, 38, 38, .12); color: var(--accent-dark); }

@media (max-width: 360px) {
  .app-menu-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ════ HEADER BRAND — TEXTE SIMPLE QUAND PAS D'ASSO ═══════════════════ */
.brand-name-plain {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* ════ AIDE — MODAL GUIDE D'UTILISATION ══════════════════════════════ */
.help-modal { font-size: .92rem; line-height: 1.6; color: var(--text); }
.help-modal .help-intro {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--teal-50) 100%);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.help-modal .help-intro p { margin: 8px 0 0; }
.help-role-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 12px;
  margin-bottom: 4px;
}
.help-role-badge-admin { background: var(--danger); }
.help-h4 {
  margin: 22px 0 10px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-soft);
}
.help-list, .help-ol { margin: 0 0 14px 18px; padding: 0; }
.help-list li, .help-ol li { margin: 4px 0; }
.help-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media (min-width: 540px) { .help-shortcuts { grid-template-columns: repeat(3, 1fr); } }
.help-shortcut {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  color: var(--primary);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--border-soft);
  transition: background .12s, transform .12s;
}
.help-shortcut:hover { background: var(--primary-50); transform: translateY(-1px); }
.help-shortcut i { color: var(--accent); font-size: 1rem; }
.help-note {
  background: #FFF8E1;
  border-left: 3px solid var(--warning);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
  font-size: .87rem;
}
.help-sep { margin: 24px 0 18px; border: 0; border-top: 1px dashed var(--border); }
.help-contact {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius);
}
.help-contact-title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.help-contact-list { list-style: none; padding: 0; margin: 8px 0; }
.help-contact-list li { padding: 4px 0; font-size: .87rem; }
.help-contact-list i { color: var(--accent); margin-right: 6px; }
.help-contact-hours { font-style: italic; font-size: .82rem; color: var(--text-muted); margin-top: 8px; margin-bottom: 0; }
