/* ============================================================
   PEPINIERE APP — Thème Organique / Forêt
   Palette : Vert profond, terre, écorce, lumière naturelle
   ============================================================ */

/* --- VARIABLES --- */
:root {
  --accent:       #2d6a4f;
  --accent-light: #40916c;
  --accent-dark:  #1b4332;
  --accent-pale:  #d8f3dc;
  --earth:        #8B5E3C;
  --earth-light:  #c4a882;
  --bark:         #4a3728;
  --leaf:         #52b788;
  --leaf-pale:    #b7e4c7;

  --bg:           #f8f6f1;
  --bg-card:      #ffffff;
  --bg-sidebar:   #1b4332;
  --text:         #2c2c2c;
  --text-light:   #6b7280;
  --text-white:   #f0faf4;
  --border:       #e2e8e4;
  --shadow:       0 2px 16px rgba(27,67,50,0.10);
  --shadow-md:    0 8px 32px rgba(27,67,50,0.15);

  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --sidebar-w:    260px;
  --topbar-h:     60px;
  --transition:   0.25s cubic-bezier(0.4,0,0.2,1);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- TEXTURE DE FOND --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(45,106,79,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(82,183,136,0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  background-image:
    linear-gradient(180deg, #1b4332 0%, #143526 60%, #0f2419 100%);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  overflow: hidden;
}

/* Pattern de fond subtil */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2340916c' fill-opacity='0.05'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent-light), var(--leaf));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(64,145,108,0.4);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  color: white;
  line-height: 1.2;
  display: block;
}

.brand-sub {
  font-size: 11px;
  color: var(--leaf-pale);
  opacity: 0.7;
  display: block;
  margin-top: 2px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  margin: 8px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
}

.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--earth), var(--earth-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 2px;
}
.badge-admin    { background: rgba(196,168,130,0.3); color: var(--earth-light); }
.badge-pepinieriste { background: rgba(82,183,136,0.2); color: var(--leaf); }

.sidebar-menu {
  flex: 1;
  list-style: none;
  padding: 10px 12px;
  overflow-y: auto;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.sidebar-menu li a:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  transform: translateX(2px);
}

.sidebar-menu li a.active {
  background: linear-gradient(135deg, rgba(64,145,108,0.5), rgba(82,183,136,0.3));
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sidebar-menu li a i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  opacity: 0.9;
}

.menu-sep {
  padding: 14px 14px 4px !important;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all var(--transition);
}
.lang-btn.active, .lang-btn:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.logout-btn {
  margin-left: auto;
  font-size: 12px;
  padding: 6px 12px;
  background: rgba(255,100,100,0.15);
  color: rgba(255,150,150,0.9);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.logout-btn:hover {
  background: rgba(255,100,100,0.3);
  color: white;
}

/* ============================================================
   MAIN WRAPPER & TOPBAR
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.topbar {
  display: none;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.topbar-toggle {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.topbar-user {
  font-size: 13px;
  color: var(--text-light);
}

.page-content {
  padding: 32px;
  flex: 1;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-header h1 i {
  color: var(--accent);
  font-size: 22px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 24px;
}

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--stat-color, var(--accent));
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--stat-bg, var(--accent-pale));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--stat-color, var(--accent));
  margin-bottom: 12px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-dark);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

.stat-plus {
  position: absolute;
  top: 14px; right: 14px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--stat-bg, var(--accent-pale));
  color: var(--stat-color, var(--accent));
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.stat-plus:hover { transform: scale(1.15); }

.stat-pct .stat-value { font-size: 28px; }
.stat-pct .stat-value::after { content: '%'; font-size: 16px; opacity: 0.7; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: var(--accent-dark);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:hover { background: rgba(45,106,79,0.04); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 11px 16px;
  vertical-align: middle;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  box-shadow: 0 3px 12px rgba(45,106,79,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 4px 16px rgba(45,106,79,0.45);
  transform: translateY(-1px);
}

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

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  box-shadow: 0 3px 10px rgba(220,38,38,0.3);
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(220,38,38,0.4); }

.btn-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: white;
}
.btn-warning:hover { transform: translateY(-1px); }

.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-icon { padding: 7px 9px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
}

label .req { color: #ef4444; margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232d6a4f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

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

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: var(--accent-pale); color: var(--accent-dark); }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-earth   { background: #f5ebe0; color: var(--bark); }

/* Entrée / Sortie */
.badge-entree { background: var(--accent-pale); color: var(--accent-dark); }
.badge-sortie { background: #fce7c5; color: #92400e; }

/* Stock indicator */
.stock-low    { color: #dc2626; font-weight: 700; }
.stock-ok     { color: var(--accent); font-weight: 600; }

/* ============================================================
   STAR RATING (notes 0-5)
   ============================================================ */
.rating-stars {
  display: inline-flex;
  gap: 2px;
}
.rating-stars span { font-size: 14px; }
.star-filled { color: #f59e0b; }
.star-empty  { color: #d1d5db; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}
.alert-success { background: var(--accent-pale); color: var(--accent-dark); border: 1px solid #b7e4c7; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  align-items: flex-end;
}

.filter-bar .form-group { flex: 1; min-width: 150px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,36,25,0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.25s ease;
}

.modal-box.modal-lg { max-width: 860px; }
.modal-box.modal-sm { max-width: 420px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  transition: all var(--transition);
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }

.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ============================================================
   DYNAMIC TABLE ROWS (mouvements multi-espèces)
   ============================================================ */
.dynamic-rows { display: flex; flex-direction: column; gap: 8px; }

.dynamic-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  background: var(--bg);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.btn-remove-row {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 4px 6px;
  font-size: 16px;
  transition: transform var(--transition);
}
.btn-remove-row:hover { transform: scale(1.2); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--accent), var(--leaf));
  transition: width 1s ease;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-light);
}
.empty-state i { font-size: 48px; opacity: 0.3; margin-bottom: 14px; display: block; }
.empty-state p { font-size: 15px; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #0f2419 0%, #1b4332 40%, #2d6a4f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82,183,136,0.15) 0%, transparent 70%);
  top: -200px; right: -200px;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,168,130,0.1) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}

.login-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
  animation: slideUp 0.4s ease;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--leaf));
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: white;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(45,106,79,0.4);
}

.login-app-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-dark);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

.login-card .form-group { margin-bottom: 18px; }

.login-btn-wrap { margin-top: 8px; }
.login-btn-wrap .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-content > * {
  animation: slideUp 0.3s ease both;
}
.page-content > *:nth-child(2) { animation-delay: 0.05s; }
.page-content > *:nth-child(3) { animation-delay: 0.10s; }
.page-content > *:nth-child(4) { animation-delay: 0.15s; }

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .main-wrapper {
    margin-left: 0;
  }
  .topbar {
    display: flex;
  }
  .page-content {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dynamic-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .modal-box { border-radius: var(--radius); }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  table { font-size: 13px; }
  thead th, tbody td { padding: 9px 10px; }
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-light); font-size: 13px; }
.text-success { color: var(--accent); }
.text-danger  { color: #dc2626; }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.gap-2 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ============================================================
   ADDITIONS — MODULE 2
   ============================================================ */

/* Carte site avec gradient */
.site-stat-bar {
  height: 6px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 8px;
}
.site-stat-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--accent), var(--leaf));
  transition: width 1s ease;
}

/* Chart card responsive */
#stockChart { max-width: 100%; }

/* Table hover highlight for active row */
tbody tr.highlighted { background: var(--accent-pale) !important; }

/* Dropdown menu */
.dropdown { position: relative; }

/* Quick stats inline */
.inline-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.inline-stat { text-align: center; }
.inline-stat-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-dark);
}
.inline-stat-lbl {
  font-size: 12px;
  color: var(--text-light);
}

/* Toast link */
.toast-link { color: inherit; font-weight: 700; text-decoration: underline; }

/* Scrollbar custom */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-light); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .sidebar, .topbar, .btn, .filter-bar, .page-header .btn { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  table { font-size: 12px; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
}
