/* ============================================
   GESTEQUIPE - Feuille de Style Principale
   Design: Premium Light / Industrial Split Theme
   Cosider Canalisations - 2026
   ============================================ */

/* ===== VARIABLES CSS ===== */
:root {
    /* Couleurs principales (Thème Clair) */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #ffffff;
    
    /* Sidebar foncée pour un contraste premium (Split Design) */
    --bg-sidebar: #0f172a;

    /* Accent orange (inspiré du logo Cosider) */
    --accent: #e8590c;
    --accent-light: #ff6b1a;
    --accent-dark: #c44a08;
    --accent-glow: rgba(232, 89, 12, 0.08);
    --accent-glow-strong: rgba(232, 89, 12, 0.2);

    /* Couleurs de statut */
    --success: #16a34a;
    --success-bg: rgba(22, 163, 74, 0.08);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.08);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.08);
    --info: #2563eb;
    --info-bg: rgba(37, 99, 235, 0.08);

    /* Texte (Mode Clair) */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Bordures */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-accent: rgba(232, 89, 12, 0.3);

    /* Typographie */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;

    /* Transitions */
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

input, select, textarea, button {
    font-family: var(--font-body);
    font-size: 0.93rem;
}

::selection {
    background: var(--accent);
    color: white;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== PAGE DE CONNEXION ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-bg-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-glow) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(232, 89, 12, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 20px 25px -5px rgba(0, 0, 0, 0.05);
    animation: loginSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    height: 48px;
    margin-bottom: 1rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.login-title .accent {
    color: var(--accent);
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 0.3rem;
}

.login-form .form-group {
    margin-bottom: 1.2rem;
}

.login-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.login-form label i {
    margin-right: 0.3rem;
    color: var(--accent);
    font-size: 0.78rem;
}

.login-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 2.8rem;
}

.password-toggle {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    transition: var(--transition-fast);
}

.password-toggle:hover { color: var(--accent); }

.login-error {
    background: var(--danger-bg);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--danger);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.btn-login {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.8rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.88rem;
    transition: var(--transition);
    white-space: nowrap;
}

.btn i { font-size: 0.82rem; }

.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 4px 16px rgba(232, 89, 12, 0.2);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #15803d;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.2);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #b91c1c; }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card-hover); }

.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-icon.edit:hover { color: var(--info); background: var(--info-bg); }
.btn-icon.delete:hover { color: var(--danger); background: var(--danger-bg); }

/* ===== LAYOUT: SIDEBAR (SPLIT DESIGN) ===== */
.app-page {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.3rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid #1e293b;
}

.sidebar-logo {
    height: 32px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
    color: #ffffff;
}

.sidebar-title .accent { color: var(--accent); }

.sidebar-nav {
    flex: 1;
    padding: 0.8rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    position: relative;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.nav-item:hover {
    background: #1e293b;
    color: #ffffff;
}

.nav-item.active {
    background: var(--accent-glow);
    color: #ffffff;
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
}

.user-role {
    font-size: 0.72rem;
    color: #64748b;
}

.btn-logout {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid #1e293b;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.btn-logout:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.btn-menu {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 1.1rem;
}

.btn-menu:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.topbar-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.topbar-search i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.topbar-search input {
    width: 100%;
    padding: 0.55rem 0.9rem 0.55rem 2.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: var(--transition);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
}

.topbar-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== SECTIONS ===== */
.content-section {
    display: none;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.content-section.active { display: block; }

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-header h2 i {
    color: var(--accent);
    font-size: 1.2rem;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: -0.8rem;
    margin-bottom: 1.2rem;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-total::after { background: var(--accent); }
.stat-service::after { background: var(--success); }
.stat-conge::after { background: var(--warning); }
.stat-absent::after { background: var(--danger); }

.stat-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-total .stat-icon { background: var(--accent-glow); color: var(--accent); }
.stat-service .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-conge .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-absent .stat-icon { background: var(--danger-bg); color: var(--danger); }

.stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i { color: var(--accent); font-size: 0.9rem; }

.chart-container {
    min-height: 200px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.chart-bar-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    width: 140px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    min-width: 30px;
}

/* ===== ACTIVITY LIST ===== */
.activity-list {
    max-height: 260px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-dot.green { background: var(--success); }
.activity-dot.orange { background: var(--warning); }
.activity-dot.red { background: var(--danger); }

.activity-text { color: var(--text-secondary); flex: 1; }
.activity-time { color: var(--text-muted); font-size: 0.78rem; }

/* ===== FILTRES ===== */
.filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.filter-group label i { color: var(--accent); }

.filter-group select {
    padding: 0.4rem 0.7rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    min-width: 160px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.results-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== TABLEAU ===== */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-primary);
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.th-check { width: 40px; text-align: center; }
.th-actions { width: 100px; text-align: center; }

.data-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.td-name {
    font-weight: 600;
    color: var(--text-primary);
}

.td-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ===== BADGES STATUT ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-service {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.badge-conge {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
    animation: pulseBadge 2s ease infinite;
}

@keyframes pulseBadge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
}

.badge-absent {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.badge-inactif {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* ===== BARRE DE PROGRESSION CONGÉ ===== */
.conge-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    width: 100px;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-fill.low { background: var(--success); }
.progress-fill.mid { background: var(--warning); }
.progress-fill.high { background: var(--accent); }
.progress-fill.full { background: var(--danger); }

.progress-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* ===== ACTIONS TABLEAU ===== */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* ===== ÉTAT VIDE ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* ===== MODALES ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeOverlay 0.2s ease;
}

@keyframes fadeOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i { color: var(--accent); }

.modal-header-danger h3 i { color: var(--danger); }

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

/* ===== FORMULAIRES ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-group label i {
    margin-right: 0.25rem;
    color: var(--accent);
    font-size: 0.78rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* ===== POINTAGE ===== */
.pointage-controls {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.pointage-controls .form-group {
    margin-bottom: 0;
}

.input-date {
    padding: 0.6rem 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

.input-date:focus {
    outline: none;
    border-color: var(--accent);
}

.pointage-select {
    padding: 0.4rem 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    cursor: pointer;
    min-width: 110px;
}

.pointage-select:focus {
    border-color: var(--accent);
    outline: none;
}

/* ===== SETTINGS & CONFIG LISTS ===== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.settings-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-list-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.settings-items {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
}

.settings-item:last-child {
    border-bottom: none;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 380px;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

.toast-success {
    background: #f0fdf4;
    border: 1px solid rgba(22, 163, 74, 0.2);
    color: var(--success);
}

.toast-error {
    background: #fef2f2;
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--danger);
}

.toast-info {
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--info);
}

.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* ===== CHECKBOX ===== */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .dashboard-grid, .settings-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }
    .main-content {
        margin-left: 0;
    }
    .btn-menu {
        display: flex;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .filters-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-group {
        width: 100%;
    }
    .filter-group select {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .content-section {
        padding: 1rem;
    }
    .topbar {
        padding: 0 1rem;
    }
}

/* ===== IMPRESSION ===== */
@media print {
    body {
        background: white;
        color: black;
        font-size: 11pt;
    }

    .sidebar, .topbar, .section-header .section-actions,
    .filters-bar, .btn-menu, .th-check, .td-check,
    .th-actions, .action-buttons, .toast-container,
    .modal-overlay, #loginPage,
    .topbar-search, .topbar-actions,
    .pointage-controls, .pointage-actions {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .content-section {
        display: block !important;
        padding: 0;
    }

    .table-container {
        border: none;
        box-shadow: none;
    }

    .print-header {
        display: flex !important;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
        border-bottom: 2px solid #333;
        margin-bottom: 1rem;
    }

    .data-table {
        border: 1px solid #ccc;
    }

    .data-table th {
        background: #f0f0f0 !important;
        color: #333 !important;
        border: 1px solid #ccc;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .data-table td {
        border: 1px solid #ccc;
        color: #333;
    }

    .badge {
        border: 1px solid #999;
        color: #333 !important;
        background: transparent !important;
    }

    .progress-bar { border: 1px solid #ccc; }

    .stat-card, .card {
        border: 1px solid #ccc;
        background: white;
        box-shadow: none;
    }
}
