/* ====== RESET & BASE ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ====== VARIABLES CSS ====== */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --surface-color: #ffffff;
  --surface-secondary: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ====== LAYOUT ====== */
#spa-root {
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
  background: var(--surface-color);
}

/* ====== SIDEBAR ====== */
aside#sidebar {
  width: 260px;
  background: var(--surface-color);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

#sidebar .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 1.2rem;
  color: var(--primary-color);
}

/* Sidebar user info */
#sidebar .user-info {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}
#sidebar .user-info .username {
  font-size: 1.05rem;
  font-weight: 600;
}
#sidebar .user-info .role {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Sidebar nav links */
#sidebar .nav {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}
#sidebar .nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 1.2rem;
  margin: 0.2rem 0.8rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
#sidebar .nav a:hover {
  background: var(--surface-secondary);
  color: var(--primary-color);
}
#sidebar .nav a.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
#sidebar .nav a svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

/* ====== MAIN ====== */
main#main-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: var(--surface-secondary);
}

/* ====== CARDS ====== */
.card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  animation: slideIn 0.3s ease-out;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ====== TABLES ====== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
table thead {
  background: var(--surface-secondary);
}
table th {
  padding: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}
table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
table tr:hover {
  background: var(--surface-secondary);
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-danger {
  background: var(--danger-color);
}
.btn-danger:hover {
  background: #dc2626;
}

/* ====== AUTH CARD ====== */
.centered-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.centered-card form {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 300px;
  box-shadow: var(--shadow-lg);
}
.centered-card h2 {
  text-align: center;
  margin-bottom: 1.2rem;
  color: var(--primary-color);
}
.centered-card input,
.centered-card select {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 1rem;
}
.centered-card .btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* ====== STATUS BADGES ====== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }

/* ====== ANIMATIONS ====== */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  aside#sidebar {
    width: 220px;
    position: fixed;
    left: -220px;
    top: 0;
    height: 100%;
    transition: left 0.3s ease;
    z-index: 100;
  }
  aside#sidebar.open {
    left: 0;
  }
  main#main-content {
    padding: 1rem;
  }
}






















 body {
            box-sizing: border-box;
        }

        /* ====== RESET & BASE ====== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #1a1a1a;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }

        /* ====== VARIABLES CSS MODERNES ====== */
        :root {
            --primary-color: #2563eb;
            --primary-dark: #1d4ed8;
            --secondary-color: #10b981;
            --danger-color: #ef4444;
            --warning-color: #f59e0b;
            --surface-color: #ffffff;
            --surface-secondary: #f8fafc;
            --text-primary: #0f172a;
            --text-secondary: #64748b;
            --border-color: #e2e8f0;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-xl: 20px;
        }

        /* ====== LAYOUT MOBILE-FIRST ====== */
        #spa-root {
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
            background: var(--surface-color);
        }

        /* ====== HEADER MOBILE ====== */
        .mobile-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            background: var(--surface-color);
            border-bottom: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
            position: sticky;
            top: 0;
            z-index: 50;
        }

        .mobile-header .logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-weight: 700;
            font-size: 1.25rem;
            color: var(--primary-color);
        }

        .mobile-header .logo svg {
            width: 28px;
            height: 28px;
            fill: var(--primary-color);
        }

        .mobile-header .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 0.875rem;
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .mobile-header .user-avatar:hover {
            transform: scale(1.05);
        }

        /* ====== SIDEBAR MODERNE ====== */
        aside#sidebar {
            position: fixed;
            left: -280px;
            top: 0;
            width: 280px;
            height: 100vh;
            background: var(--surface-color);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            padding: 0;
            transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 100;
            box-shadow: var(--shadow-xl);
        }

        aside#sidebar.open {
            left: 0;
        }

        .sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.5);
            z-index: 90;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .sidebar-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* ====== SIDEBAR HEADER ====== */
        #sidebar .sidebar-header {
            padding: 2rem 1.5rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
            color: white;
        }

        #sidebar .user-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 0;
        }

        #sidebar .user-info .avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 1.125rem;
        }

        #sidebar .user-info .user-details .username {
            font-size: 1.125rem;
            font-weight: 600;
            margin-bottom: 0.25rem;
        }

        #sidebar .user-info .user-details .user-role {
            font-size: 0.875rem;
            opacity: 0.8;
        }

        /* ====== NAVIGATION MODERNE ====== */
        #sidebar .nav {
            flex: 1;
            padding: 1.5rem 0;
            overflow-y: auto;
        }

        #sidebar .nav-section {
            margin-bottom: 2rem;
        }

        #sidebar .nav-section-title {
            padding: 0 1.5rem 0.75rem;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-secondary);
        }

        #sidebar .nav a {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.875rem 1.5rem;
            color: var(--text-primary);
            font-weight: 500;
            text-decoration: none;
            transition: all 0.2s ease;
            position: relative;
            margin: 0 0.75rem 0.25rem;
            border-radius: var(--radius-md);
        }

        #sidebar .nav a:hover {
            background: var(--surface-secondary);
            color: var(--primary-color);
        }

        #sidebar .nav a.active {
            background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
            color: white;
            font-weight: 600;
            box-shadow: var(--shadow-md);
        }

        #sidebar .nav a.active::before {
            content: '';
            position: absolute;
            left: -0.75rem;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 24px;
            background: var(--primary-color);
            border-radius: 2px;
        }

        #sidebar .nav a svg {
            width: 20px;
            height: 20px;
            stroke-width: 1.5;
            flex-shrink: 0;
        }

        #sidebar .nav a.active svg {
            stroke: white;
        }

        /* ====== MAIN CONTENT ====== */
        main#main-content {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
            background: var(--surface-secondary);
            transition: margin-left 0.3s ease;
        }

        /* ====== STYLES POUR TON CODE CLIENT.JS ====== */
        .main {
            width: 100%;
        }

        .main h2 {
            font-size: 1.875rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 2rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .main h3 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 1rem;
        }

        .main h4 {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 1rem;
        }

        .small {
            font-size: 0.875rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        /* ====== CARDS MODERNES ====== */
        .card {
            background: var(--surface-color);
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
            transition: all 0.2s ease;
        }

        .card:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
        }

        .card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-color);
        }

        .card-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        /* ====== STATS CARDS POUR TON CODE ====== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .stat-card {
            background: var(--surface-color);
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            border: 1px solid var(--border-color);
            position: relative;
            overflow: hidden;
            transition: all 0.2s ease;
        }

        .stat-card:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        }

        .stat-card .small {
            margin-bottom: 0.75rem;
            font-size: 0.875rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .stat-card h3 {
            font-size: 2rem;
            font-weight: 700;
            color: var(--text-primary);
            margin: 0;
        }

        .stat-card #notifs {
            font-size: 0.875rem;
            color: var(--text-primary);
            line-height: 1.5;
        }

        /* ====== INPUTS MODERNES ====== */
        .input {
            width: 100%;
            padding: 0.875rem 1rem;
            margin-bottom: 1rem;
            border-radius: var(--radius-md);
            border: 1px solid var(--border-color);
            font-size: 1rem;
            transition: all 0.2s ease;
            background: var(--surface-color);
            color: var(--text-primary);
        }

        .input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .input::placeholder {
            color: var(--text-secondary);
        }

        /* ====== TABLES MODERNES ====== */
        .table-container {
            overflow-x: auto;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
            background: var(--surface-color);
            margin-top: 1rem;
        }

        .table, table {
            width: 100%;
            border-collapse: collapse;
            min-width: 600px;
        }

        .table thead, table thead {
            background: var(--surface-secondary);
        }

        .table th, table th {
            text-align: left;
            padding: 1rem 1.5rem;
            font-weight: 600;
            font-size: 0.875rem;
            color: var(--text-primary);
            text-transform: uppercase;
            letter-spacing: 0.025em;
            border-bottom: 1px solid var(--border-color);
        }

        .table td, table td {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            font-size: 0.875rem;
            color: var(--text-primary);
        }

        .table tr:hover, table tr:hover {
            background: var(--surface-secondary);
        }

        .table tr:last-child td, table tr:last-child td {
            border-bottom: none;
        }

        /* ====== BUTTONS MODERNES ====== */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            background: var(--primary-color);
            color: white;
            padding: 0.75rem 1.5rem;
            border-radius: var(--radius-md);
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            font-weight: 500;
            font-size: 0.875rem;
            text-decoration: none;
            position: relative;
            overflow: hidden;
            width: 100%;
            margin-top: 0.5rem;
        }

        .btn:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        .btn:active {
            transform: translateY(0);
        }

        .btn-secondary {
            background: var(--surface-color);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

        .btn-secondary:hover {
            background: var(--surface-secondary);
            border-color: var(--primary-color);
        }

        .btn-success {
            background: var(--secondary-color);
        }

        .btn-success:hover {
            background: #059669;
        }

        .btn-danger {
            background: var(--danger-color);
        }

        .btn-danger:hover {
            background: #dc2626;
        }

        .btn-sm {
            padding: 0.5rem 1rem;
            font-size: 0.8125rem;
            width: auto;
        }

        .btn-lg {
            padding: 1rem 2rem;
            font-size: 1rem;
        }

        /* ====== STATUS BADGES ====== */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 500;
            background: var(--surface-secondary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

        .badge-success {
            background: #dcfce7;
            color: #166534;
            border-color: #bbf7d0;
        }

        .badge-warning {
            background: #fef3c7;
            color: #92400e;
            border-color: #fde68a;
        }

        .badge-danger {
            background: #fee2e2;
            color: #991b1b;
            border-color: #fecaca;
        }

        .badge-info {
            background: #dbeafe;
            color: #1e40af;
            border-color: #bfdbfe;
        }

        /* ====== BOTTOM NAVIGATION MOBILE ====== */
        .bottom-nav {
            display: flex;
            background: var(--surface-color);
            border-top: 1px solid var(--border-color);
            padding: 0.75rem 0;
            position: sticky;
            bottom: 0;
            z-index: 40;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        }

        .bottom-nav a {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.25rem;
            padding: 0.5rem;
            text-decoration: none;
            color: var(--text-secondary);
            font-size: 0.75rem;
            font-weight: 500;
            transition: color 0.2s ease;
        }

        .bottom-nav a.active {
            color: var(--primary-color);
        }

        .bottom-nav a svg {
            width: 24px;
            height: 24px;
            stroke-width: 1.5;
        }

        /* ====== RESPONSIVE DESIGN ====== */
        @media (min-width: 768px) {
            #spa-root {
                flex-direction: row;
            }

            .mobile-header {
                display: none;
            }

            aside#sidebar {
                position: static;
                left: 0;
                width: 280px;
                box-shadow: none;
                border-right: 1px solid var(--border-color);
            }

            .sidebar-overlay {
                display: none;
            }

            main#main-content {
                padding: 2rem;
            }

            .bottom-nav {
                display: none;
            }

            .stats-grid {
                grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            }

            .btn {
                width: auto;
            }
        }

        @media (min-width: 1024px) {
            main#main-content {
                padding: 2.5rem;
            }

            .stats-grid {
                grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            }
        }

        /* ====== ANIMATIONS & MICRO-INTERACTIONS ====== */
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .card, .stat-card {
            animation: slideIn 0.3s ease-out;
        }

        /* ====== LOADING STATE ====== */
        .loading {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            color: var(--text-secondary);
        }

        /* ====== ERROR STATES ====== */
        .error {
            color: var(--danger-color);
            background: #fee2e2;
            border: 1px solid #fecaca;
            padding: 1rem;
            border-radius: var(--radius-md);
            margin: 1rem 0;
        }

        /* ====== UTILITAIRES ====== */
        .text-center { text-align: center; }
        .text-right { text-align: right; }
        .font-bold { font-weight: 700; }
        .font-semibold { font-weight: 600; }
        .text-sm { font-size: 0.875rem; }
        .text-lg { font-size: 1.125rem; }
        .text-xl { font-size: 1.25rem; }
        .text-2xl { font-size: 1.5rem; }
        .mb-4 { margin-bottom: 1rem; }
        .mb-6 { margin-bottom: 1.5rem; }
        .mt-4 { margin-top: 1rem; }
        .mt-6 { margin-top: 1.5rem; }
        .flex { display: flex; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }
        .gap-4 { gap: 1rem; }
        .hidden { display: none; }
        
        
        
        
        
        .about-box {
  margin-top: 1.5rem;
  padding: 1.2rem 1rem;
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  animation: slideIn .25s ease-out;
}
.about-box h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  color: var(--primary-color);
  font-weight: 600;
}
.about-box .small {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
}






/* ====== SIDEBAR TOGGLE (mobile) ====== */
.sidebar-toggle {
  position: fixed;
  top: 12px;
  right: 12px;   /* 👉 au lieu de left:12px */
  background: var(--theme-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  z-index: 110;
  display: none; /* caché sur desktop */
}
.sidebar-toggle i {
  width: 20px;
  height: 20px;
}

/* visible seulement en mobile */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}









/* ===== Auth fixes spécifiques (mettre à la fin de style.css) ===== */

.auth-card {
  width: 100%;
  max-width: 480px;      /* largeur agréable pour login */
  margin: 24px auto;     /* centrer */
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
  border-radius: 12px;
}

.auth-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0; /* important pour permettre shrink */
}

/* empêche tout enfant flex d'imposer une largeur minimale */
.auth-card, .auth-card * { box-sizing: border-box; min-width: 0; }

/* actions (boutons) : côte-à-côte sur desktop, empilés en mobile */
.auth-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* boutons prennent de l'espace équitable sans dépasser */
.auth-actions .btn {
  flex: 1 1 0;
  min-width: 0;
}

/* variant ghost */
.auth-actions .btn.ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* petit ajustement pour les messages */
.auth-msg { text-align: center; }

/* mobile : empiler les boutons */
@media (max-width: 600px) {
  .auth-card { max-width: 92%; margin: 16px auto; padding: 14px; }
  .auth-actions { flex-direction: column; }
  .auth-actions .btn { width: 100%; }
}

/* about-box : déjà présent mais on s'assure qu'il ne dépasse */
.auth-card .about-box {
  margin-top: 8px;
  padding: 12px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
}










/* === LAYOUT RESPONSIVE POUR ADMIN === */

/* rangées de cartes */
.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.card-row .kcard {
  flex: 1;
  min-width: 180px;
  text-align: center;
}

/* rangées de formulaires */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.form-row .input,
.form-row .select,
.form-row .btn {
  flex: 1;
  min-width: 140px;
}

/* tables scrollables sur mobile */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.table-wrap .table {
  min-width: 600px; /* évite que ça casse les colonnes */
  border-collapse: collapse;
  width: 100%;
}

/* ajustements mobiles */
@media (max-width: 768px) {
  .card-row {
    flex-direction: column;
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-row .input,
  .form-row .select,
  .form-row .btn {
    min-width: unset;
    width: 100%;
  }
  .kcard {
    width: 100%;
  }
}

