/* ================ VARIABLES ET RESET ================ */
:root {
    /* Couleurs principales */
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --info-color: #4895ef;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --light-color: #f8f9fa;
    --dark-color: #1c1c1c; /* plus foncé pour meilleur contraste */

    /* Couleurs spécifiques */
    --sidebar-bg: #2b2d42;
    --sidebar-active: #3a86ff;
    --gray-color: #6c757d;
    --gray-light: #e9ecef;
    --white-color: #ffffff;

    /* Dégradés */
    --primary-gradient: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
    --secondary-gradient: linear-gradient(135deg, #00b0ff 0%, #0091ea 100%);
    --success-gradient: linear-gradient(135deg, #00c853 0%, #00b248 100%);
    --warning-gradient: linear-gradient(135deg, #ffab00 0%, #ff8f00 100%);
    --danger-gradient: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
    --info-gradient: linear-gradient(135deg, #00b8d4 0%, #00a3bf 100%);

    /* Ombres et effets */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.05), 0 6px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);

    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: all 0.5s ease;
}
/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f7fb;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #495057;
    line-height: 1.6;
}

/* ================ LAYOUT PRINCIPAL ================ */
.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    background: var(--sidebar-bg);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #1a1a2e 100%);
    color: white;
    transition: var(--transition);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content {
    padding: 2rem;
    background-color: #f5f7fb;
}

/* ================ SIDEBAR ================ */
.sidebar .logo {
    text-align: center;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .logo img {
    width: 80px;
    margin-bottom: 10px;
}

.sidebar .logo h2 {
    font-size: 18px;
    color: white;
}

.sidebar .nav-links {
    list-style: none;
    padding: 20px 0;
}

.sidebar .nav-links li {
    position: relative;
}

.sidebar .nav-links li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar .nav-links li a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.sidebar .nav-links li a.active {
    color: white;
    background-color: var(--sidebar-active);
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.3);
}

.sidebar .nav-links li a i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    transition: var(--transition);
}

.sidebar .nav-links li a .fa-chevron-down {
    margin-left: auto;
    font-size: 12px;
}

.sidebar .submenu ul {
    list-style: none;
    padding-left: 20px;
    display: none;
}

.sidebar .submenu.active ul {
    display: block;
}

.sidebar .submenu ul li a {
    padding: 10px 20px;
    font-size: 14px;
}

.sidebar .px-3.py-2 {
    padding: 0.5rem 1rem;
}

.sidebar .px-3.py-2 .d-flex {
    display: flex;
    align-items: center;
}

.sidebar .px-3.py-2 .flex-shrink-0 i {
    font-size: 2rem;
}

.sidebar .px-3.py-2 .flex-grow-1 {
    flex-grow: 1;
    margin-left: 0.75rem;
}

.sidebar .px-3.py-2 small {
    font-size: 0.75rem;
}

.sidebar .px-3.py-2 .fw-bold {
    font-weight: bold;
}

.sidebar .btn-outline-light {
    width: 100%;
    margin-top: 0.75rem;
}

/* ================ HEADER & FOOTER ================ */
header {
    background-color: white;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer {
    padding: 15px;
    text-align: center;
    background-color: white;
    border-top: 1px solid #eee;
}

/* ================ CARTES ================ */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: var(--white-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}



.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title i {
    color: var(--primary-color);
}

/* Cartes de statistiques */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-icon.bg-primary {
    background: var(--primary-gradient);
}

.stat-icon.bg-success {
    background: var(--success-gradient);
}

.stat-icon.bg-warning {
    background: var(--warning-gradient);
}

.stat-icon.bg-info {
    background: var(--info-gradient);
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark-color);
}

.stat-info p {
    margin: 0.25rem 0 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* ================ BOUTONS ================ */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
}

.btn-secondary {
    background-color: var(--gray-color);
    border-color: var(--gray-color);
    color: white;
}

.btn-outline-light {
    color: #f8f9fa;
    border-color: #f8f9fa;
    background-color: transparent;
}

.btn-outline-light:hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* ================ FORMULAIRES ================ */
.form-control, .form-select {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-light);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
}

/* ================ TABLEAUX ================ */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.data-table thead th {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* ================ BADGES ================ */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    border-radius: var(--border-radius-sm);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
    color: var(--dark-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.bg-secondary {
    background-color: var(--gray-color) !important;
}

/* Badges de statut */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

.status-badge.en-attente {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.contrôlé {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.non-conforme {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.disponible {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.en-maintenance {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.hors-service {
    background-color: #f8d7da;
    color: #721c24;
}

/* Badges de gravité */
.gravite-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.gravite-badge.mineure {
    background-color: #fff3cd;
    color: #856404;
}

.gravite-badge.majeure {
    background-color: #ffeeba;
    color: #856404;
}

.gravite-badge.critique {
    background-color: #f5c6cb;
    color: #721c24;
}

/* Badges de résultats */
.resultat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.resultat-badge.conforme {
    background-color: #d4edda;
    color: #155724;
}

.resultat-badge.non-conforme {
    background-color: #f8d7da;
    color: #721c24;
}

.resultat-badge.observation {
    background-color: #fff3cd;
    color: #856404;
}

/* Badges de qualité */
.qualite-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.qualite-badge.ab {
    background-color: #d4edda;
    color: #155724;
}

.qualite-badge.ab- {
    background-color: #c3e6cb;
    color: #155724;
}

.qualite-badge.ab-plus {
    background-color: #b1dfbb;
    color: #155724;
}

.qualite-badge.ab-plus-plus {
    background-color: #8fd19e;
    color: #155724;
}

.qualite-badge.b {
    background-color: #fff3cd;
    color: #856404;
}

.qualite-badge.c {
    background-color: #f8d7da;
    color: #721c24;
}

/* ================ STATUTS CONGÉS ================ */
.leave-status-pending { 
    background-color: rgba(248, 150, 30, 0.1);
    border-left: 4px solid var(--warning-color);
}

.leave-status-approved { 
    background-color: rgba(76, 201, 240, 0.1);
    border-left: 4px solid var(--success-color);
}

.leave-status-rejected { 
    background-color: rgba(249, 65, 68, 0.1);
    border-left: 4px solid var(--danger-color);
}

.leave-status-cancelled { 
    background-color: rgba(108, 117, 125, 0.1);
    border-left: 4px solid var(--gray-color);
}

.leave-pending:hover {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* ================ ALERTES ================ */
.alert {
    border-radius: var(--border-radius-sm);
    padding: 1rem 1.25rem;
    border: none;
}

.alert-info {
    background-color: rgba(58, 134, 255, 0.1);
    color: var(--primary-color);
}

.alert-warning {
    background-color: rgba(248, 150, 30, 0.1);
    color: var(--warning-color);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

/* ================ PAGINATION ================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-link {
    color: var(--primary-color);
    border-radius: var(--border-radius-sm) !important;
    margin: 0 3px;
    border: none;
    padding: 0.5rem 0.9rem;
    text-decoration: none;
}

.page-link:hover {
    color: var(--primary-dark);
    background-color: rgba(67, 97, 238, 0.1);
}

/* ================ AVATAR & ICONES ================ */
.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
    color: white;
    border-radius: 50%;
}

.xs-icon {
    font-size: 0.8rem;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

[data-bs-toggle="collapse"].collapsed .fa-chevron-down {
    transform: rotate(-90deg);
}

.flex-shrink-0 i {
    font-size: 1.25rem;
}

/* ================ PROGRESS BAR ================ */
.progress {
    border-radius: 10px;
    background-color: var(--gray-light);
}

.progress-bar {
    border-radius: 10px;
}

/* ================ LAYOUTS SPÉCIFIQUES ================ */
/* Dashboard */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Form sections */
.form-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

/* Login page */
.login-container {
    max-width: 400px;
    margin: 0 auto;
}

.login-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ================ MODULES SPÉCIFIQUES ================ */
/* Module qualité */
.qualite-dashboard .stats-cards {
    margin-bottom: 30px;
}

.controle-detail .controle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.resultats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.resultats-table th,
.resultats-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.resultats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.resultats-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.fa-check-circle.conforme {
    color: #28a745;
}

.fa-times-circle.non-conforme {
    color: #dc3545;
}

.mesures-correctives {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.non-conformite-container .gestion {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.non-conformite-container .description-content {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Plans de contrôle */
.plans-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.plan-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.plan-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-header h3 {
    margin: 0;
    font-size: 18px;
}

.plan-status .badge {
    font-size: 12px;
    padding: 4px 8px;
}

.plan-body {
    padding: 15px;
    flex-grow: 1;
}

.plan-frequence {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.plan-parametres {
    margin-top: 15px;
}

.plan-parametres h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

.plan-parametres ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.plan-parametres li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.plan-parametres li:last-child {
    border-bottom: none;
}

.plan-actions {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

/* Contrôle qualité */
.controle-qualite-container .form-section {
    margin-bottom: 25px;
}

.controle-qualite-container .form-norme {
    display: block;
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 3px;
}

.controle-qualite-container .full-width {
    grid-column: 1 / -1;
}

.parametres-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
}

/* Module emballage */
.emballage-dashboard {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fdff 0%, #e6f7ff 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(200, 230, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--emballage-primary);
}

.dashboard-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #2C3E50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.5px;
}

.dashboard-header h1 i {
    background: var(--emballage-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.7rem;
}

.quick-actions {
    display: flex;
    gap: 1rem;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.2rem;
}

.charts-column, .actions-column {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(230, 247, 255, 0.5);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2C3E50;
    border: 1px solid rgba(200, 230, 255, 0.5);
}

.action-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 149, 255, 0.15);
    background: white;
    border-color: rgba(0, 149, 255, 0.3);
}

.action-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.action-item span {
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    border-radius: 14px;
    background: rgba(230, 247, 255, 0.4);
    transition: all 0.3s ease;
    border: 1px solid rgba(200, 230, 255, 0.3);
}

.recent-item:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.recent-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.recent-info strong {
    color: #2C3E50;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.recent-info small {
    color: #7F8C8D;
    font-size: 0.85rem;
}

.recent-date {
    background: var(--emballage-primary);
    color: white;
    padding: 0.5rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 1rem;
    white-space: nowrap;
}

.recent-actions {
    display: flex;
    gap: 0.5rem;
}

.card-footer {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.card-footer a {
    color: #7F8C8D;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.card-footer a:hover {
    color: #2C3E50;
}

/* Tunnels de congélation */
.tunnel-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.tunnel-occupied {
    background-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

.tunnel-available {
    background-color: #27AE60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.3);
}

.tunnel-free {
    background-color: #27AE60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.3);
}

/* Module stockage */
.stockage-dashboard {
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    min-height: 100vh;
}

/* ================ ANIMATIONS ================ */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
    100% { 
        transform: scale(1); 
    }
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

@keyframes shimmer {
    0% { 
        transform: rotate(45deg) translateX(-100%); 
    }
    100% { 
        transform: rotate(45deg) translateX(100%); 
    }
}

@keyframes blink {
    0%, 100% { 
        opacity: 1; 
    }
    50% { 
        opacity: 0.7; 
    }
}

@keyframes highlight {
    0% { 
        background-color: transparent; 
    }
    50% { 
        background-color: rgba(52, 152, 219, 0.1); 
    }
    100% { 
        background-color: transparent; 
    }
}

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Appliquer les animations */
.stat-card, .dashboard-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.stat-card:nth-child(2) { 
    animation-delay: 0.1s; 
}

.stat-card:nth-child(3) { 
    animation-delay: 0.2s; 
}

.stat-card:nth-child(4) { 
    animation-delay: 0.3s; 
}

.table tbody tr {
    animation: fadeInRow 0.5s ease-out forwards;
}

.table tbody tr:nth-child(1) { 
    animation-delay: 0.05s; 
}

.table tbody tr:nth-child(2) { 
    animation-delay: 0.1s; 
}

.table tbody tr:nth-child(3) { 
    animation-delay: 0.15s; 
}

.table tbody tr:nth-child(4) { 
    animation-delay: 0.2s; 
}

.table tbody tr:nth-child(5) { 
    animation-delay: 0.25s; 
}

.table tbody tr:nth-child(6) { 
    animation-delay: 0.3s; 
}

.table tbody tr:nth-child(7) { 
    animation-delay: 0.35s; 
}

/* ================ UTILITAIRES ================ */
.transition-all {
    transition: var(--transition);
}

.text-muted {
    color: var(--gray-color) !important;
}

.border-bottom {
    border-bottom: 1px solid var(--gray-light) !important;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-grow-1 {
    flex-grow: 1;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.text-center {
    text-align: center;
}

.text-end {
    text-align: end;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-3 {
    margin-top: 1rem;
}

.w-100 {
    width: 100%;
}

.ms-3 {
    margin-left: 1rem;
}

/* ================ RESPONSIVE ================ */
@media (max-width: 1200px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .controle-detail .controle-grid {
        grid-template-columns: 1fr;
    }
    
    .plans-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
    }
    
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .plans-list {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .recent-date, .recent-actions {
        align-self: flex-end;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .emballage-dashboard {
        padding: 1.2rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .content {
        padding: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }
    
    .quick-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* ================ DASHBOARD SPECIFIC STYLES ================ */

/* Header du dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-header h1 i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Cartes de statistiques */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.cards .card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: white;
}

.cards .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon:not(.production):not(.delivery):not(.quality) {
    background: var(--primary-gradient);
}

.stat-icon.production {
    background: var(--success-gradient);
}

.stat-icon.delivery {
    background: var(--info-gradient);
}

.stat-icon.quality {
    background: var(--warning-gradient);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 0.95rem;
    color: var(--gray-color);
    margin: 0 0 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-content .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-change, .stat-target, .stat-details {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stat-change.positive {
    color: #27ae60;
}

.stat-change.negative {
    color: #e74c3c;
}

.stat-target {
    color: var(--gray-color);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.progress {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--success-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Sections du dashboard */
.dashboard-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Graphiques */
.chart-container {
    position: relative;
    height: 250px;
    margin-top: 1rem;
}

/* Alertes */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    background-color: #f8f9fa;
    border-left: 4px solid;
    gap: 1rem;
    transition: var(--transition);
}

.alert-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.alert-item.warning {
    border-left-color: #f39c12;
    background-color: rgba(243, 156, 18, 0.05);
}

.alert-item.info {
    border-left-color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
}

.alert-item.danger {
    border-left-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.alert-item.warning .alert-icon {
    background-color: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.alert-item.info .alert-icon {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.alert-item.danger .alert-icon {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.alert-desc {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0.25rem;
}

.alert-time {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.alert-action .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.no-alerts {
    text-align: center;
    padding: 2rem;
    color: var(--gray-color);
}

.no-alerts i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #27ae60;
    opacity: 0.5;
}

.no-alerts p {
    margin: 0;
    font-size: 1.1rem;
}

/* Actions rapides */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    color: var(--dark-color);
    position: relative;
    overflow: hidden;
}

.action-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.action-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: var(--dark-color);
}

.action-item:nth-child(1)::before { background: var(--warning-gradient); }
.action-item:nth-child(2)::before { background: var(--info-gradient); }
.action-item:nth-child(3)::before { background: var(--primary-gradient); }
.action-item:nth-child(4)::before { background: var(--danger-gradient); }

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.action-item:nth-child(1) .action-icon { background: var(--warning-gradient); }
.action-item:nth-child(2) .action-icon { background: var(--info-gradient); }
.action-item:nth-child(3) .action-icon { background: var(--primary-gradient); }
.action-item:nth-child(4) .action-icon { background: var(--danger-gradient); }

.action-item span {
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

.action-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-color);
}

/* Tableaux récents */
.data-table {
    margin-top: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: var(--light-color);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 1px solid var(--gray-light);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
    color: var(--dark-color);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Statuts dans les tableaux */
.status {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.en-préparation {
    background-color: #fff3cd;
    color: #856404;
}

.status.livré {
    background-color: #d4edda;
    color: #155724;
}

.status.en-attente {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 1200px) {
    .sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cards {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        overflow-x: auto;
    }
    
    .data-table table {
        min-width: 600px;
    }
}

@media (max-width: 576px) {
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .alert-item {
        flex-direction: column;
        text-align: center;
    }
    
    .alert-action {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .alert-action .btn {
        width: 100%;
    }
}

/* Animations spécifiques */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

.action-item:hover .action-icon {
    animation: pulse-glow 1.5s infinite;
}

/* Amélioration de la visibilité des pourcentages */
.stat-change i {
    font-size: 0.7rem;
}

/* Styles pour les états vides */
.text-center {
    text-align: center;
}

/* Amélioration des boutons d'action */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}
/* ================ LISTE RECEPTIONS STYLES ================ */

.liste-receptions {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.liste-receptions .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f2f5;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.liste-receptions .header h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.liste-receptions .header h1 i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.liste-receptions .header .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.liste-receptions .header .btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.liste-receptions .header .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.liste-receptions .header .btn-secondary {
    background: var(--gray-light);
    color: var(--dark-color);
    border: 1px solid var(--gray-light);
}

.liste-receptions .header .btn-secondary:hover {
    background: var(--gray-color);
    color: white;
    transform: translateY(-2px);
}

/* Filtres */
.liste-receptions .filters {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
}

.liste-receptions .filter-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.liste-receptions .form-group {
    display: flex;
    flex-direction: column;
}

.liste-receptions .form-group label {
    font-size: 0.9rem;
    color: var(--dark-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.liste-receptions .form-group input,
.liste-receptions .form-group select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
}

.liste-receptions .form-group input:focus,
.liste-receptions .form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
    outline: none;
}

.liste-receptions .filters .btn-secondary {
    padding: 0.75rem 1.5rem;
    height: fit-content;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tableau */
.liste-receptions .data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
}

.liste-receptions .data-table thead th {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-align: left;
    border: none;
}

.liste-receptions .data-table tbody tr {
    transition: var(--transition);
}

.liste-receptions .data-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.liste-receptions .data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: middle;
    color: var(--dark-color);
}

.liste-receptions .data-table tr:last-child td {
    border-bottom: none;
}

/* Badges de statut */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    min-width: 100px;
}

.status-badge.en-attente {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.contrôlé {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-badge.non-conforme {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Actions */
.liste-receptions .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.liste-receptions .actions .btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.liste-receptions .actions .btn:not(.btn-danger) {
    background: var(--gray-light);
    color: var(--dark-color);
}

.liste-receptions .actions .btn:not(.btn-danger):hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.liste-receptions .actions .btn-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.liste-receptions .actions .btn-danger:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
}

.liste-receptions .inline-form {
    display: inline;
}

/* Pagination */
.liste-receptions .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.liste-receptions .pagination span {
    font-weight: 500;
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.liste-receptions .pagination .btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.liste-receptions .pagination .btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--gray-light);
    box-shadow: var(--shadow-sm);
}

.liste-receptions .pagination .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 992px) {
    .liste-receptions {
        padding: 1.5rem;
    }
    
    .liste-receptions .filter-form .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .liste-receptions .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .liste-receptions .header .actions {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .liste-receptions .filter-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .liste-receptions .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .liste-receptions .data-table {
        min-width: 800px;
    }
    
    .liste-receptions .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .liste-receptions .actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .liste-receptions {
        padding: 1rem;
    }
    
    .liste-receptions .header h1 {
        font-size: 1.5rem;
    }
    
    .liste-receptions .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .liste-receptions .pagination .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* États vides */
.liste-receptions .data-table td[colspan] {
    text-align: center;
    padding: 2rem;
    color: var(--gray-color);
    font-style: italic;
}

/* Amélioration de l'affichage des dates */
.liste-receptions .data-table td:nth-child(2) {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Style pour le transport */
.liste-receptions .data-table td:nth-child(5) {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Style pour le poids */
.liste-receptions .data-table td:nth-child(6) {
    font-weight: 600;
    color: var(--dark-color);
    font-family: 'Courier New', monospace;
}

/* Effet de surbrillance au survol */
.liste-receptions .data-table tbody tr {
    transition: all 0.2s ease;
}

.liste-receptions .data-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateX(5px);
}

/* Style pour les lignes impaires */
.liste-receptions .data-table tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.liste-receptions .data-table tbody tr:nth-child(odd):hover {
    background-color: rgba(52, 152, 219, 0.07);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;      /* occupe exactement la hauteur de l’écran */
    overflow-y: auto;   /* si le menu est plus long, on pourra scroller dans la sidebar */
    width: 250px;       /* largeur fixée */
}

.main-content {
    margin-left: 150px; /* même largeur que la sidebar */
    flex: 1;
}
/* ================ LISTE TRANSPORTS STYLES ================ */

.liste-transports {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.liste-transports .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f2f5;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.liste-transports .header h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.liste-transports .header h1 i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.liste-transports .header .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.liste-transports .header .btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.liste-transports .header .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Tableau */
.liste-transports .data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
}

.liste-transports .data-table thead th {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.25rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-align: left;
    border: none;
}

.liste-transports .data-table thead th:first-child {
    border-top-left-radius: var(--border-radius);
}

.liste-transports .data-table thead th:last-child {
    border-top-right-radius: var(--border-radius);
}

.liste-transports .data-table tbody tr {
    transition: var(--transition);
}

.liste-transports .data-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.liste-transports .data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: middle;
    color: var(--dark-color);
}

.liste-transports .data-table tr:last-child td {
    border-bottom: none;
}

/* Badges de statut */
.liste-transports .status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    min-width: 100px;
}

.liste-transports .status-badge.disponible {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.liste-transports .status-badge.en-maintenance {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.liste-transports .status-badge.hors-service {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Actions */
.liste-transports .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.liste-transports .actions .btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.liste-transports .actions .btn:not(.btn-danger) {
    background: var(--gray-light);
    color: var(--dark-color);
}

.liste-transports .actions .btn:not(.btn-danger):hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.liste-transports .actions .btn-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.liste-transports .actions .btn-danger:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
}

.liste-transports .inline-form {
    display: inline;
}

/* États vides */
.liste-transports .data-table td[colspan] {
    text-align: center;
    padding: 2rem;
    color: var(--gray-color);
    font-style: italic;
}

/* Style pour le type de transport */
.liste-transports .data-table td:nth-child(1) {
    font-weight: 600;
    color: var(--dark-color);
}

/* Style pour l'immatriculation */
.liste-transports .data-table td:nth-child(2) {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

/* Style pour la capacité */
.liste-transports .data-table td:nth-child(3) {
    font-weight: 600;
    color: var(--dark-color);
    font-family: 'Courier New', monospace;
}

/* Effet de surbrillance au survol */
.liste-transports .data-table tbody tr {
    transition: all 0.2s ease;
}

.liste-transports .data-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateX(5px);
}

/* Style pour les lignes impaires */
.liste-transports .data-table tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.liste-transports .data-table tbody tr:nth-child(odd):hover {
    background-color: rgba(52, 152, 219, 0.07);
}

/* Responsive */
@media (max-width: 992px) {
    .liste-transports {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .liste-transports .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .liste-transports .header .btn {
        width: 100%;
        justify-content: center;
    }
    
    .liste-transports .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .liste-transports .data-table {
        min-width: 600px;
    }
    
    .liste-transports .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .liste-transports .actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .liste-transports {
        padding: 1rem;
    }
    
    .liste-transports .header h1 {
        font-size: 1.5rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Indicateur visuel pour les statuts */
.liste-transports .status-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.liste-transports .status-badge.disponible::before {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

.liste-transports .status-badge.en-maintenance::before {
    background-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.liste-transports .status-badge.hors-service::before {
    background-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
}

/* Style pour le tableau vide */
.liste-transports .data-table tbody tr td[colspan] {
    text-align: center;
    padding: 3rem;
    color: var(--gray-color);
    font-style: italic;
}

.liste-transports .data-table tbody tr td[colspan]::before {
    content: '🚚';
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}
/* ================ RAPPORTS RECEPTION STYLES ================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.container .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f2f5;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.container .header h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.container .header h1 i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.export-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.export-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.export-buttons .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.export-buttons .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.export-buttons .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.export-buttons .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Layout en grille */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Formulaire */
#reportForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
    outline: none;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Statistiques */
.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.stat-info {
    flex: 1;
}

.stat-info h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
}

.stat-info p {
    margin: 0.25rem 0 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Tableau de données */
.mt-4 {
    margin-top: 2rem;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--dark-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 2px solid var(--gray-light);
}

.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-light);
    color: var(--dark-color);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05) !important;
}

/* Style spécifique des colonnes */
.table td:nth-child(1) { /* N° Lot */
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.table td:nth-child(2) { /* Date */
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.table td:nth-child(4) { /* Famille */
    font-weight: 600;
}

.table td:nth-child(5) { /* Quantité */
    font-weight: 700;
    color: var(--dark-color);
    font-family: 'Courier New', monospace;
    text-align: right;
}

.table td:nth-child(6) { /* Valeur */
    font-weight: 700;
    color: #28a745;
    font-family: 'Courier New', monospace;
    text-align: right;
}

/* Badges de statut */
.table td:last-child span {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        padding: 1.5rem;
    }
    
    .row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .export-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .table {
        min-width: 800px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 1rem;
    }
    
    .container .header h1 {
        font-size: 1.5rem;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stat-info h4 {
        font-size: 1.25rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* États de chargement */
#reportsTable tbody tr td {
    text-align: center;
    padding: 2rem;
    color: var(--gray-color);
    font-style: italic;
}

#reportsTable tbody tr td::before {
    content: '📊';
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Style pour les montants */
.currency {
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

/* Amélioration visuelle des cartes statistiques */
.stat-item {
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateX(5px);
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius-sm);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
/* ================ CSS PARTIE RH ================ */

/* Styles généraux pour les pages RH */
.rh-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Cartes RH spécifiques */
.rh-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.rh-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.rh-card-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.rh-card-header.bg-success {
    background: var(--success-gradient);
}

.rh-card-header.bg-warning {
    background: var(--warning-gradient);
}

.rh-card-header.bg-info {
    background: var(--info-gradient);
}

.rh-card-header.bg-danger {
    background: var(--danger-gradient);
}

/* Badges RH */
.rh-badge {
    padding: 0.5em 1em;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85em;
}

.badge-attestation {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
}

.badge-stc {
    background: linear-gradient(135deg, #f46b45 0%, #eea849 100%);
    color: white;
}

.badge-paie {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.badge-status-pending {
    background: linear-gradient(135deg, #ffb347 0%, #ffcc33 100%);
    color: #333;
}

.badge-status-approved {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
}

.badge-status-paid {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    color: white;
}

.badge-status-cancelled {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

/* Formulaires RH */
.rh-form .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.rh-form .form-control,
.rh-form .form-select {
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.rh-form .form-control:focus,
.rh-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
}

.rh-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Tableaux RH */
.rh-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.rh-table thead th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    padding: 1rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.rh-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.rh-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.rh-table .table-actions {
    white-space: nowrap;
}

.rh-table .table-actions .btn {
    margin: 0 2px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Aperçu attestation */
.attestation-preview {
    background: white;
    border: 2px dashed #dee2e6;
    min-height: 300px;
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
}

.attestation-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.attestation-content h4 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Calculatrice STC */
.stc-calculator {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.calc-display {
    font-size: 3.5rem;
    font-weight: 700;
    text-align: center;
    margin: 1rem 0;
    transition: var(--transition);
}

.calc-display.positive {
    color: var(--success-color);
}

.calc-display.negative {
    color: var(--danger-color);
}

.calc-section {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.calc-section-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* Bulletin de paie */
.payroll-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.payroll-amount {
    font-size: 4rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.payroll-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.payroll-item {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.payroll-item-title {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payroll-item-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
}

.payroll-item-positive {
    color: var(--success-color);
}

.payroll-item-negative {
    color: var(--danger-color);
}

/* Paramètres de paie */
.param-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.param-section h5 {
    color: var(--primary-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.param-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    height: 100%;
    border-left: 4px solid var(--primary-color);
}

.param-card.bg-info {
    border-left-color: var(--info-color);
}

.param-card.bg-success {
    border-left-color: var(--success-color);
}

.param-card.bg-warning {
    border-left-color: var(--warning-color);
}

.param-card.bg-danger {
    border-left-color: var(--danger-color);
}

/* Boutons RH */
.btn-rh {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-rh i {
    margin-right: 8px;
}

.btn-rh-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-rh-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.btn-rh-secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn-rh-success {
    background: var(--success-gradient);
    color: white;
}

.btn-rh-danger {
    background: var(--danger-gradient);
    color: white;
}

/* Statistiques RH */
.rh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rh-stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.rh-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.rh-stat-card.bg-primary::before {
    background: var(--primary-gradient);
}

.rh-stat-card.bg-success::before {
    background: var(--success-gradient);
}

.rh-stat-card.bg-warning::before {
    background: var(--warning-gradient);
}

.rh-stat-card.bg-info::before {
    background: var(--info-gradient);
}

.rh-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
}

.rh-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.rh-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Timeline intégration */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-color);
}

.timeline-item.completed::before {
    background: var(--success-color);
    border-color: var(--success-color);
}

.timeline-item.in-progress::before {
    background: var(--warning-color);
    border-color: var(--warning-color);
}

.timeline-item.pending::before {
    background: var(--gray-color);
    border-color: var(--gray-color);
}

.timeline-content {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

/* Évaluations */
.evaluation-chart {
    height: 300px;
    position: relative;
}

.evaluation-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-excellent {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
}

.badge-good {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    color: white;
}

.badge-average {
    background: linear-gradient(135deg, #ffb347 0%, #ffcc33 100%);
    color: #333;
}

.badge-needs-improvement {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .rh-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .payroll-breakdown {
        grid-template-columns: 1fr;
    }
    
    .calc-display {
        font-size: 2.5rem;
    }
    
    .payroll-amount {
        font-size: 2.5rem;
    }
    
    .rh-table {
        display: block;
        overflow-x: auto;
    }
    
    .rh-form .row {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rh-animate {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading states */
.rh-loading {
    position: relative;
    overflow: hidden;
}

.rh-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Tooltips personnalisés */
.rh-tooltip {
    position: relative;
    display: inline-block;
}

.rh-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: var(--transition);
    font-size: 0.85rem;
}

.rh-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Alertes RH */
.rh-alert {
    border-radius: var(--border-radius-sm);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.rh-alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.rh-alert-success {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.1) 0%, rgba(0, 178, 72, 0.1) 100%);
    border-left: 4px solid var(--success-color);
}

.rh-alert-warning {
    background: linear-gradient(135deg, rgba(255, 171, 0, 0.1) 0%, rgba(255, 143, 0, 0.1) 100%);
    border-left: 4px solid var(--warning-color);
}

.rh-alert-danger {
    background: linear-gradient(135deg, rgba(255, 82, 82, 0.1) 0%, rgba(229, 57, 53, 0.1) 100%);
    border-left: 4px solid var(--danger-color);
}

.rh-alert-info {
    background: linear-gradient(135deg, rgba(0, 184, 212, 0.1) 0%, rgba(0, 163, 191, 0.1) 100%);
    border-left: 4px solid var(--info-color);
}

/* Pagination RH */
.rh-pagination .page-link {
    border: none;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    margin: 0 2px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.rh-pagination .page-link:hover {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-dark);
}

.rh-pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

/* Modales RH */
.rh-modal .modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.rh-modal .modal-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border: none;
}

.rh-modal .modal-footer {
    border-top: 1px solid #f0f0f0;
}

/* Progress bars */
.rh-progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
    overflow: hidden;
}

.rh-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.6s ease;
    border-radius: 5px;
}

.rh-progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

/* Cards hover effects */
.rh-hover-card {
    transition: var(--transition);
}

.rh-hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Filter section */
.rh-filter-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.rh-filter-section .form-control,
.rh-filter-section .form-select {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

/* Print styles */
@media print {
    .rh-print-hide {
        display: none !important;
    }
    
    .attestation-content,
    .payroll-summary {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .rh-card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .rh-form .form-control,
    .rh-form .form-select {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .rh-form .form-control::placeholder {
        color: #a0aec0;
    }
    
    .rh-table tbody td {
        border-bottom-color: #4a5568;
    }
    
    .rh-table tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* Utility classes */
.text-rh-primary { color: var(--primary-color) !important; }
.text-rh-success { color: var(--success-color) !important; }
.text-rh-warning { color: var(--warning-color) !important; }
.text-rh-danger { color: var(--danger-color) !important; }
.text-rh-info { color: var(--info-color) !important; }

.bg-rh-primary { background-color: var(--primary-color) !important; }
.bg-rh-success { background-color: var(--success-color) !important; }
.bg-rh-warning { background-color: var(--warning-color) !important; }
.bg-rh-danger { background-color: var(--danger-color) !important; }
.bg-rh-info { background-color: var(--info-color) !important; }

.border-rh-primary { border-color: var(--primary-color) !important; }
.border-rh-success { border-color: var(--success-color) !important; }
.border-rh-warning { border-color: var(--warning-color) !important; }
.border-rh-danger { border-color: var(--danger-color) !important; }
.border-rh-info { border-color: var(--info-color) !important; }

/* Scrollbar styling */
.rh-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.rh-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rh-scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.rh-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* File upload */
.rh-file-upload {
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius-sm);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.rh-file-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.rh-file-upload.dragover {
    border-color: var(--success-color);
    background-color: rgba(76, 201, 240, 0.1);
}

/* Signature area */
.rh-signature {
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius-sm);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.rh-signature:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.rh-signature.has-signature {
    border-style: solid;
    background-color: white;
}

/* Calendar picker */
.rh-calendar {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.rh-calendar-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem;
    text-align: center;
}

.rh-calendar-body {
    padding: 1rem;
    background: white;
}

/* Watermark */
.rh-watermark {
    position: relative;
}

.rh-watermark::after {
    content: 'RH - CONFIENDITIEL';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 3rem;
    color: rgba(0, 0, 0, 0.1);
    font-weight: bold;
    pointer-events: none;
    z-index: 1;
}

/* Quick actions */
.rh-quick-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rh-quick-action {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rh-quick-action:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Status indicators */
.rh-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rh-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.rh-status-dot.active {
    background-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(76, 201, 240, 0.3);
}

.rh-status-dot.inactive {
    background-color: var(--danger-color);
    box-shadow: 0 0 0 2px rgba(249, 65, 68, 0.3);
}

.rh-status-dot.pending {
    background-color: var(--warning-color);
    box-shadow: 0 0 0 2px rgba(248, 150, 30, 0.3);
}

/* Help text */
.rh-help-text {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-top: 0.25rem;
}

.rh-help-text.error {
    color: var(--danger-color);
}

.rh-help-text.success {
    color: var(--success-color);
}

/* Required field indicator */
.rh-required::after {
    content: ' *';
    color: var(--danger-color);
}

/* Loading spinner */
.rh-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(67, 97, 238, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.rh-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-color);
}

.rh-empty-state-icon {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

/* Confirmation dialog */
.rh-confirm-dialog {
    max-width: 400px;
    margin: 0 auto;
}

.rh-confirm-dialog .modal-content {
    border-radius: var(--border-radius);
}

.rh-confirm-dialog .modal-body {
    padding: 2rem;
    text-align: center;
}

.rh-confirm-dialog .modal-footer {
    justify-content: center;
    padding: 1rem 2rem 2rem;
}



/* ------------------------------------------------------------------
   🔥 FIX GLOBAL : rendre tout texte lisible par défaut
------------------------------------------------------------------- */

/* Texte par défaut sur fond clair : gris foncé */
body, p, span, label, input, select, textarea {
    color: #1c1c1c !important;
}

/* Correction des textes dans les cartes sur fond blanc */
.card, .card-body {
    background-color: #ffffff;
    color: #1a1a1a !important;
}

/* Si une section applique une couleur de fond claire → texte auto foncé */
.bg-light, .bg-white {
    color: #1c1c1c !important;
}

/* ------------------------------------------------------------------
   ✔ Titres dans tous les headers colorés
------------------------------------------------------------------- */
.card-header.bg-primary.text-white h1,
.card-header.bg-primary.text-white h2,
.card-header.bg-primary.text-white h3,
.card-header.bg-primary.text-white h4,
.card-header.bg-primary.text-white h5,
.card-header.bg-primary.text-white h6 {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.card-header.bg-success.text-white h1,
.card-header.bg-success.text-white h2,
.card-header.bg-success.text-white h3,
.card-header.bg-success.text-white h4,
.card-header.bg-success.text-white h5,
.card-header.bg-success.text-white h6 {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.card-header.bg-warning.text-white h1,
.card-header.bg-warning.text-white h2,
.card-header.bg-warning.text-white h3,
.card-header.bg-warning.text-white h4,
.card-header.bg-warning.text-white h5,
.card-header.bg-warning.text-white h6 {
    color: #ffffff !important;
    text-shadow: none;
}

.card-header.bg-danger.text-white h1,
.card-header.bg-danger.text-white h2,
.card-header.bg-danger.text-white h3,
.card-header.bg-danger.text-white h4,
.card-header.bg-danger.text-white h5,
.card-header.bg-danger.text-white h6 {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.card-header.bg-info.text-white h1,
.card-header.bg-info.text-white h2,
.card-header.bg-info.text-white h3,
.card-header.bg-info.text-white h4,
.card-header.bg-info.text-white h5,
.card-header.bg-info.text-white h6 {
    color: #ffffff !important;
}

/* Icônes lisibles dans headers */
.card-header.text-white .fas,
.card-header.text-white .far,
.card-header.text-white .fab {
    color: #ffffff !important;
}




/* 2. AMÉLIORATION DE LA BARRE DE NAVIGATION (BREADCRUMB) */
.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.page-header h2 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h2 .fas,
.page-header h2 .far,
.page-header h2 .fab {
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* Breadcrumb amélioré */
.breadcrumb-container {
    background: white;
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    background: transparent;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item {
    font-size: 0.95rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    transform: translateX(2px);
}

.breadcrumb-item.active {
    color: var(--dark-color);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    color: var(--gray-color);
    font-size: 1.2rem;
    padding: 0 0.5rem;
}

/* 3. STYLES SPÉCIFIQUES POUR LES PAGES RH */
.rh-page-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.rh-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(63, 55, 201, 0.05) 100%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.rh-page-header h1,
.rh-page-header h2 {
    color: var(--primary-dark);
    font-weight: 800;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.rh-page-header .lead {
    color: var(--gray-color);
    font-size: 1.1rem;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* 4. AMÉLIORATION DES CARTES RH */
.rh-card .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.rh-card .card-header h5 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.rh-card .card-header .fas {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    opacity: 0.9;
}

/* 5. CONTRASTE AMÉLIORÉ POUR LES TITRES */
.text-contrast-primary {
    color: white !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    display: inline-block;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.text-contrast-success {
    color: white !important;
    background: linear-gradient(135deg, var(--success-color) 0%, #0097a7 100%);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    display: inline-block;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 6. SHADOW ET DÉGRADÉ POUR LES HEADERS */
.card-header-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    border-bottom: none;
}

.card-header-gradient-success {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%) !important;
    border-bottom: none;
}

.card-header-gradient-warning {
    background: linear-gradient(135deg, #ffb347 0%, #ffcc33 100%) !important;
    border-bottom: none;
}

.card-header-gradient-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%) !important;
    border-bottom: none;
}

.card-header-gradient-info {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%) !important;
    border-bottom: none;
}

/* 7. STYLES POUR LES BOUTONS D'ACTION */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-button {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: var(--transition);
    border: none;
}

.action-button-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.action-button-primary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.action-button-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.action-button-secondary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* 8. RESPONSIVE */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        font-size: 0.9rem;
    }
    
    .rh-page-header {
        padding: 1.5rem 1rem;
    }
    
    .rh-page-header h1,
    .rh-page-header h2 {
        font-size: 1.5rem;
    }
    
    .card-header h5 {
        font-size: 1.1rem;
    }
}

/* 9. ANIMATIONS POUR LA NAVIGATION */
.breadcrumb-item a,
.action-button {
    position: relative;
    overflow: hidden;
}

.breadcrumb-item a::after,
.action-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.breadcrumb-item a:hover::after {
    width: 100%;
}

/* 10. VISUAL INDICATORS */
.current-page-indicator {
    position: relative;
    padding-left: 1.5rem;
}

.current-page-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(67, 97, 238, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
    }
}

/* 11. SEPARATEURS VISUELS */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 2rem 0;
    border: none;
}

/* 12. TOOLTIPS POUR LA NAVIGATION */
.nav-tooltip {
    position: relative;
}

.nav-tooltip:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-md);
}

/* 13. BADGES DANS LA NAVIGATION */
.breadcrumb-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-navigation {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

/* 14. ÉTATS ACTIFS AMÉLIORÉS */
.breadcrumb-item.active {
    position: relative;
    padding-right: 1.5rem;
}

.breadcrumb-item.active::after {
    content: '📍';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 15. BACKGROUND PATTERNS POUR LES HEADERS */
.pattern-dots {
    background-image: radial-gradient(currentColor 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
}

.card-header.pattern-bg {
    position: relative;
    overflow: hidden;
}

.card-header.pattern-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}
/* HEADER UNIQUE — FOND FONCÉ + TEXTE BLANC */
.card-header {
    background: var(--primary-gradient); /* dégradé bleu foncé */
    color: white !important;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
/* ================ STYLES SPÉCIFIQUES EMBALLAGE ================ */

/* En-tête de page */
.emballage-header {
    background: linear-gradient(135deg, #0063B2 0%, #0095FF 50%, #00BFFF 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.emballage-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.emballage-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.emballage-header .lead {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Indicateurs de statut */
.status-indicators {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-badge i {
    font-size: 1.2rem;
}

.status-badge.status-success {
    background: rgba(76, 201, 240, 0.2);
    border-color: rgba(76, 201, 240, 0.4);
}

.status-badge.status-info {
    background: rgba(72, 149, 239, 0.2);
    border-color: rgba(72, 149, 239, 0.4);
}

.status-badge.status-warning {
    background: rgba(248, 150, 30, 0.2);
    border-color: rgba(248, 150, 30, 0.4);
}

/* Section des tunnels */
.tunnels-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.tunnels-section h4 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tunnels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tunnel-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tunnel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tunnel-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(67, 97, 238, 0.1) 100%);
}

.tunnel-card.tunnel-free {
    border-left: 4px solid var(--success-color);
}

.tunnel-card.tunnel-occupied {
    border-left: 4px solid var(--warning-color);
    opacity: 0.6;
    cursor: not-allowed;
}

.tunnel-card.tunnel-occupied:hover {
    transform: none;
}

.tunnel-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tunnel-card.tunnel-free .tunnel-icon {
    background: linear-gradient(135deg, var(--success-color) 0%, #00b894 100%);
    color: white;
}

.tunnel-card.tunnel-occupied .tunnel-icon {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e17055 100%);
    color: white;
}

.tunnel-info {
    flex: 1;
}

.tunnel-info h5 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.tunnel-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.tunnel-info p i {
    width: 16px;
    text-align: center;
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.tunnel-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.tunnel-status-badge.status-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #00b894 100%);
    color: white;
}

.tunnel-status-badge.status-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e17055 100%);
    color: white;
}

/* Section formulaire */
.emballage-form-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h4 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-color);
    font-size: 0.95rem;
}

/* Formulaire amélioré */
.emballage-form .form-group {
    margin-bottom: 1.5rem;
}

.emballage-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.emballage-form label i {
    color: var(--primary-color);
}

.emballage-form label .required {
    color: var(--danger-color);
}

.input-with-info {
    position: relative;
}

.select-with-icon {
    padding-left: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234361ee'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 1.2rem;
}

.input-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-color);
}

.input-info i {
    color: var(--info-color);
}

.input-with-unit {
    position: relative;
}

.input-with-unit .form-control {
    padding-right: 3rem;
}

.input-unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-weight: 500;
}

.datetime-input {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

.datetime-input:focus {
    background-color: white;
    border-color: var(--primary-color);
}

/* Validation */
.capacity-validation {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-success {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
    border-left: 3px solid var(--success-color);
}

.validation-error {
    background: rgba(249, 65, 68, 0.1);
    color: var(--danger-color);
    border-left: 3px solid var(--danger-color);
}

/* Boutons d'action */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.form-actions .btn {
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-color);
}

.empty-state i {
    margin-bottom: 1rem;
    color: var(--warning-color);
}

.empty-state h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Overlay de chargement */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(67, 97, 238, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--dark-color);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .emballage-header {
        padding: 1.5rem 1rem;
    }
    
    .emballage-header h2 {
        font-size: 1.8rem;
    }
    
    .status-indicators {
        flex-direction: column;
    }
    
    .tunnels-grid {
        grid-template-columns: 1fr;
    }
    
    .tunnel-card {
        flex-direction: column;
        text-align: center;
    }
    
    .tunnel-icon {
        margin: 0 auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Animation pour les cartes de tunnel */
@keyframes pulse-free {
    0% { box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 201, 240, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 201, 240, 0); }
}

.tunnel-card.tunnel-free:hover {
    animation: pulse-free 2s infinite;
}

/* Style pour les icônes de température */
.temperature-icon {
    color: #2196F3;
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
}

/* Gradient spécifique emballage */
.gradient-emballage {
    background: linear-gradient(135deg, #0063B2 0%, #0095FF 50%, #00BFFF 100%);
}

.gradient-congelation {
    background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 50%, #E6F3FF 100%);
}

/* Badge pour les quantités */
.quantity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(67, 97, 238, 0.2) 100%);
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid rgba(67, 97, 238, 0.3);
}

/* Tooltip personnalisé */
.tooltip-emballage {
    position: relative;
    display: inline-block;
}

.tooltip-emballage .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: var(--transition);
    font-size: 0.85rem;
}

.tooltip-emballage:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
/* ================ STYLES SPÉCIFIQUES TUNNELS ================ */

/* En-tête */
.tunnels-header {
    background: linear-gradient(135deg, #0063B2 0%, #0095FF 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.tunnels-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tunnels-header .lead {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-action:hover {
    transform: translateY(-2px);
}

/* Cartes de statistiques */
.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
    transition: var(--transition);
    border-left: 4px solid;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stats-card.stats-free {
    border-left-color: var(--success-color);
}

.stats-card.stats-occupied {
    border-left-color: var(--warning-color);
}

.stats-card.stats-capacity {
    border-left-color: var(--info-color);
}

.stats-card.stats-utilization {
    border-left-color: var(--primary-color);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.stats-card.stats-free .stats-icon {
    background: linear-gradient(135deg, var(--success-color) 0%, #00b894 100%);
}

.stats-card.stats-occupied .stats-icon {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e17055 100%);
}

.stats-card.stats-capacity .stats-icon {
    background: linear-gradient(135deg, var(--info-color) 0%, #0984e3 100%);
}

.stats-card.stats-utilization .stats-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4834d4 100%);
}

.stats-content {
    flex: 1;
}

.stats-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stats-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stats-percentage {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.stats-trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Vue grille des tunnels */
.tunnels-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tunnel-card-view {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tunnel-card-view:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tunnel-card-view.tunnel-free {
    border-top: 3px solid var(--success-color);
}

.tunnel-card-view.tunnel-occupied {
    border-top: 3px solid var(--warning-color);
}

.tunnel-header {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tunnel-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tunnel-badge {
    background: var(--primary-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.tunnel-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-success {
    background-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(76, 201, 240, 0.3);
}

.status-warning {
    background-color: var(--warning-color);
    box-shadow: 0 0 0 2px rgba(248, 150, 30, 0.3);
}

.status-danger {
    background-color: var(--danger-color);
    box-shadow: 0 0 0 2px rgba(249, 65, 68, 0.3);
}

.tunnel-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: white;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-action-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tunnel-body {
    padding: 1.5rem;
}

.tunnel-info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.tunnel-info-row i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.info-label {
    color: var(--gray-color);
    min-width: 80px;
}

.info-value {
    font-weight: 500;
    color: var(--dark-color);
}

.temperature-value {
    color: #2196F3;
    font-weight: 600;
}

.tunnel-footer {
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.tunnel-progress {
    height: 8px;
    margin-bottom: 0.5rem;
}

/* Tableau */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.75rem;
}


/* ===== GÉNÉRAL EMBALLAGE ===== */
.emballage-container {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== EN-TÊTE ET TITRES ===== */
.page-header {
    background: var(--primary-gradient);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
}

.page-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.page-header .breadcrumb {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.page-header .breadcrumb a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.page-header .breadcrumb a:hover {
    color: var(--warning-color);
}

/* ===== CARTES DE RÉSUMÉ ===== */
.summary-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-light);
}

.summary-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.summary-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.summary-item:nth-child(2)::before { background: var(--success-color); }
.summary-item:nth-child(3)::before { background: var(--warning-color); }
.summary-item:nth-child(4)::before { background: var(--info-color); }

.summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.summary-label {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== FILTRES ET RECHERCHE ===== */
.filters-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.filter-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
}

.filter-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    grid-column: span 2;
}

.search-box i {
    position: absolute;
    left: 1rem;
    color: var(--gray-color);
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* ===== TABLEAU ===== */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.table-container thead {
    background: var(--primary-gradient);
}

.table-container th {
    padding: 1.25rem 1.5rem;
    color: white;
    font-weight: 600;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.table-container th:hover {
    background: rgba(255, 255, 255, 0.1);
}

.table-container th::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.table-container tbody tr {
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

.table-container tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.03);
}

.table-container td {
    padding: 1.25rem 1.5rem;
    color: var(--dark-color);
    font-size: 0.95rem;
}

/* Indicateurs de statut */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-completed { background-color: var(--success-color); }
.status-in-progress { background-color: var(--warning-color); }
.status-pending { background-color: var(--danger-color); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tonnage-badge {
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
    border: 1px solid #bae7ff;
    color: #006d75;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

/* Boutons d'action */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

.btn-info {
    background: var(--info-gradient);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--dark-color);
}

.btn-warning {
    background: var(--warning-gradient);
    color: white;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-link {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    background: white;
    border: 1px solid var(--gray-light);
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* ===== OPTIONS AVANCÉES ===== */
.advanced-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
    margin-top: 2rem;
}

.advanced-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.advanced-toggle:hover {
    color: var(--primary-dark);
}

.export-btn {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* ===== ÉTAT VIDE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-color);
}

.empty-state i {
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .summary-card {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters-container {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .summary-card {
        grid-template-columns: 1fr;
    }
    
    .page-header h2 {
        font-size: 2rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .advanced-options {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.summary-item, .table-container {
    animation: fadeIn 0.5s ease-out forwards;
}

/* ===== STYLES SPÉCIFIQUES POUR CONTRÔLE QUALITÉ ===== */
.controle-form {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--gray-light);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.form-group input[readonly] {
    background-color: var(--gray-light);
    cursor: not-allowed;
}

/* Informations emballage */
.emballage-info {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.85rem;
    color: var(--gray-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.1rem;
    color: var(--dark-color);
    font-weight: 600;
}

/* Boutons d'action */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 2px solid var(--gray-light);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Icônes dans les sections */
.form-section h2 i {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.1);
    padding: 0.75rem;
    border-radius: 12px;
}

/* Responsive pour contrôle qualité */
@media (max-width: 768px) {
    .controle-form {
        padding: 1.5rem;
    }
    
    .form-section h2 {
        font-size: 1.25rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* Indicateurs visuels pour les champs obligatoires */
.form-group label[for]:after {
    content: " *";
    color: var(--danger-color);
    font-weight: bold;
}

.form-group label[for$="_ecaille"]:after,
.form-group label[for$="_epines"]:after,
.form-group label[for$="_peritoine"]:after {
    content: "";
}

/* Styles pour les pourcentages */
.form-group input[type="number"] {
    text-align: right;
    padding-right: 2rem;
}

.form-group input[type="number"]::after {
    content: "%";
    position: absolute;
    right: 1rem;
    color: var(--gray-color);
}
.lot-detail-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.lot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.lot-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
}

.lot-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lot-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.lot-reference {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.lot-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.meta-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.meta-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Sections d'information */
.info-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.card-header i {
    color: #667eea;
    font-size: 1.5rem;
}

.card-header h3 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.info-grid {
    display: grid;
    gap: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

/* Valeurs spéciales */
.valeur-positif { color: #10b981; }
.valeur-negatif { color: #ef4444; }
.valeur-neutre { color: #6b7280; }

/* Actions */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-action-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-action-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Statut */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-en-stock { background: #d1fae5; color: #065f46; }
.status-vendu { background: #fef3c7; color: #92400e; }
.status-perime { background: #fee2e2; color: #991b1b; }

/* Graphiques et visualisation */
.visualization {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.visualization h3 {
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 10px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .lot-detail-container {
        padding: 1rem;
    }
    
    .lot-header {
        padding: 1.5rem;
    }
    
    .lot-title h1 {
        font-size: 1.8rem;
    }
    
    .info-sections {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}


.saisie-inventaire-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.inventaire-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.header-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.info-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Formulaire de saisie */
.saisie-form-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.lot-item {
    display: grid;
    grid-template-columns: 1fr 150px 150px 100px auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.lot-item:hover {
    background-color: #f9fafb;
}

.lot-info h5 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

.lot-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.meta-badge {
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.input-field {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ecart-display {
    font-weight: 600;
    font-size: 1.1rem;
}

.ecart-positif { color: #10b981; }
.ecart-negatif { color: #ef4444; }
.ecart-zero { color: #6b7280; }

.ecart-pourcentage {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
}

/* Résumé */
.resume-section {
    background: #f9fafb;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Actions */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
    margin-top: 2rem;
}

.btn-action {
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .lot-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .input-group {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .input-label {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .saisie-inventaire-container {
        padding: 1rem;
    }
    
    .header-info {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
    }
}
/* ================ CORRECTIONS POUR LES CARTES ================ */

/* 1. Reset des cartes pour utiliser toute la largeur disponible */
.card,
.summary-item,
.stat-card,
.rh-stat-card,
.dashboard-card,
.stats-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 2. Correction des conteneurs de cartes */
.stats-cards,
.dashboard-cards,
.rh-stats-grid,
.summary-card,
.cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(400, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin: 0 0 2rem 0 !important;
    padding: 0 !important;
}

/* 3. Suppression des largeurs fixes problématiques */
.container,
.container-fluid,
.wrapper,
#content,
.main-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 4. Correction des grilles spécifiques */
.dashboard-sections,
.sections {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100% !important;
}

/* 5. Correction pour les tableaux */
.table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.data-table {
    min-width: 800px !important;
    width: 100% !important;
}

/* 6. Correction pour les formulaires */
.emballage-form-section,
.controle-form,
.saisie-form-container,
.rh-form {
    width: 100% !important;
    max-width: 100% !important;
}

/* 7. Correction pour les graphiques */
.chart-container {
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
}

/* 8. Media queries pour les petits écrans */
@media (max-width: 768px) {
    .dashboard-sections,
    .sections {
        grid-template-columns: 1fr !important;
    }
    
    .stats-cards,
    .dashboard-cards,
    .rh-stats-grid,
    .summary-card,
    .cards {
        grid-template-columns: 1fr !important;
    }
    
    .container-fluid,
    #content .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* 9. Correction des cartes dans les colonnes Bootstrap */
.row > [class*="col-"] {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.row > [class*="col-"] > .card,
.row > [class*="col-"] > .summary-item,
.row > [class*="col-"] > .stat-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 10. Correction spécifique pour les cartes dans #content */
#content .card,
#content .summary-item,
#content .stat-card {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 11. Suppression des marges négatives problématiques */
.row {
    margin-left: -0.75rem !important;
    margin-right: -0.75rem !important;
    width: calc(100% + 1.5rem) !important;
}

/* 12. Correction pour les en-têtes de page */
.page-header,
.rh-page-header,
.emballage-header,
.tunnels-header {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 13. Correction pour les filtres */
.filters-container {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 14. Correction pour la pagination */
.pagination {
    width: 100% !important;
    justify-content: center !important;
}

/* 15. Correction pour les états vides */
.empty-state {
    width: 100% !important;
    text-align: center !important;
}





/* 17. Correction pour les tableaux dans les cartes */
.card .table-responsive {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* 18. Ajustement des marges internes des cartes */
.card-body {
    padding: 1.5rem !important;
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem !important;
    }
}

/* 19. Correction pour les titres dans les cartes */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5 {
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* 20. Force l'alignement correct du contenu */
* {
    box-sizing: border-box !important;
}

/* 21. Correction pour les stats avec icônes */
.stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1.5rem !important;
}

.stat-icon {
    flex-shrink: 0 !important;
}

.stat-content {
    flex: 1 !important;
    min-width: 0 !important; /* Évite le débordement du texte */
}

.stat-content h3,
.stat-content .stat-value,
.stat-content .stat-label {
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* 22. Suppression des conflits avec les anciennes classes */
[class*="col-"] .card,
[class*="col-"] .summary-item {
    width: 100% !important;
}

/* 23. Correction pour les badges et petits éléments */
.badge {
    display: inline-flex !important;
    white-space: nowrap !important;
}

/* 24. Amélioration du responsive pour les très petits écrans */
@media (max-width: 480px) {
    .stat-card {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .stat-content {
        width: 100% !important;
    }
    
    .card-header {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.5rem !important;
    }
    
    .card-header .btn,
    .card-header .action-buttons {
        width: 100% !important;
    }
}

/* ================ VARIABLES ET RESET ================ */
:root {
    /* Couleurs principales */
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --info-color: #4895ef;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --light-color: #f8f9fa;
    --dark-color: #1c1c1c;

    /* Couleurs spécifiques */
    --sidebar-bg: #2b2d42;
    --sidebar-active: #3a86ff;
    --gray-color: #6c757d;
    --gray-light: #e9ecef;
    --white-color: #ffffff;

    /* Dégradés */
    --primary-gradient: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
    --secondary-gradient: linear-gradient(135deg, #00b0ff 0%, #0091ea 100%);
    --success-gradient: linear-gradient(135deg, #00c853 0%, #00b248 100%);
    --warning-gradient: linear-gradient(135deg, #ffab00 0%, #ff8f00 100%);
    --danger-gradient: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
    --info-gradient: linear-gradient(135deg, #00b8d4 0%, #00a3bf 100%);

    /* Ombres et effets */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.05), 0 6px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);

    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: all 0.5s ease;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f5f7fb;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #495057;
    line-height: 1.6;
}





#sidebar .sidebar-header {
    text-align: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar .sidebar-header img {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

#sidebar .sidebar-header h4 {
    font-size: 1.2rem;
    margin: 0;
    color: white;
}

#sidebar .sidebar-content {
    padding: 1rem;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

#sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

#sidebar .nav-link.active {
    color: white;
    background-color: var(--sidebar-active);
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.3);
}

#sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1rem;
}

#sidebar .nav-link .fa-chevron-down {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s;
}

#sidebar .nav-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

#sidebar .nav .nav {
    list-style: none;
    padding-left: 1rem;
}

#sidebar .nav .nav .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

#sidebar .nav .nav .nav-link.small {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
}

#sidebar .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

#sidebar .user-info {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}





/* ================ BADGES ================ */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 30px;
}

/* ================ BOUTONS ================ */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #283593 0%, #1a237e 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-gradient);
    border: none;
}

.btn-info {
    background: var(--info-gradient);
    border: none;
}

.btn-warning {
    background: var(--warning-gradient);
    border: none;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ================ TABLEAUX ================ */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--gray-light);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
    cursor: pointer;
}

/* ================ ALERTES ================ */
.alert {
    border-radius: var(--border-radius-sm);
    border: none;
    box-shadow: var(--shadow-sm);
}

/* ================ FOOTER ================ */
footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-light);
}

/* ================ UTILITAIRES ================ */
.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}



/* ================ ANIMATIONS ================ */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s;
}
.fade-enter, .fade-leave-to {
    opacity: 0;
}
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
/* ================ CORRECTIONS URGENTES POUR LES CARTES ================ */

/* 1. Correction de la classe cards avec l'unité manquante */
.cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-bottom: 2.5rem !important;
    width: 100% !important;
}





/* 3. Suppression de la règle conflictuelle .main-content */
.main-content {
    margin-left: 0 !important; /* Annule la règle précédente */
}

/* 4. Force toutes les cartes à prendre 100% de largeur */
.card,
.summary-item,
.stat-card,
.rh-stat-card,
.dashboard-card,
.stats-card,
.liste-receptions .card,
.emballage-card,
.tunnel-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 5. Correction des conteneurs de grille */
.stats-cards,
.dashboard-cards,
.rh-stats-grid,
.summary-card,
.dashboard-sections,
.sections,
.row.g-3.mb-4 .col-12 {
    width: 100% !important;
    margin: 0 !important;
}

/* 6. Correction spécifique pour les colonnes Bootstrap */
.row {
    margin-left: -0.75rem !important;
    margin-right: -0.75rem !important;
    width: calc(100% + 1.5rem) !important;
}

.row > [class*="col-"] {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.row > [class*="col-"] > .card {
    width: 100% !important;
}

/* 7. Correction pour l'en-tête de page */
.page-header {
    width: 100% !important;
    margin-bottom: 2rem !important;
}

/* 8. Correction pour les tableaux responsives */
.table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
}

/* 9. Correction pour les cartes de statistiques */
.stat-card {
    display: flex !important;
    align-items: center !important;
    padding: 1.5rem !important;
    width: 100% !important;
}

.stat-icon {
    flex-shrink: 0 !important;
}

.stat-content {
    flex: 1 !important;
    min-width: 0 !important;
}



@media (max-width: 576px) {
    #content .container-fluid {
        padding: 0.75rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}





/* 2. Correction de la classe cards (supprimer l'unité manquante) */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* 3. Correction des cartes statistiques */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    width: 100%;
    border: none;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-card .stat-icon.bg-primary { background: var(--primary-gradient); }
.stat-card .stat-icon.bg-success { background: var(--success-gradient); }
.stat-card .stat-icon.bg-warning { background: var(--warning-gradient); }

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
}

.stat-card .stat-value small {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-color);
}

/* 4. Correction des cartes avec en-tête */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    width: 100%;
    margin-bottom: 1.5rem;
}

.card-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 1.5rem;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.card-header h5, 
.card-header .card-title {
    color: white;
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
    background: white;
}

/* 5. Correction des tableaux */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius-sm);
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* 6. Correction des filtres */
.filters-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
    width: 100%;
}

/* 7. Correction des en-têtes de page */
.page-header {
    background: var(--primary-gradient);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius-lg);
    color: white;
    margin-bottom: 2rem;
    width: 100%;
}

/* 8. Suppression des !important inutiles */
.container-fluid,
.row,
[class*="col-"] {
    width: 100% !important; /* Garder seulement ceux vraiment nécessaires */
}

/* 9. Correction des animations qui causent des problèmes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.4s ease-out forwards;
}



@media (max-width: 576px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .card-body {
        padding: 1rem;
    }
}
/* ================ VARIABLES ET RESET ================ */
:root {
    /* Couleurs principales - palette moderne */
    --primary-color: #4361ee;
    --primary-light: #6c8cff;
    --primary-dark: #2a3fbf;
    --secondary-color: #3f37c9;
    --success-color: #2ecc71;
    --success-dark: #27ae60;
    --info-color: #3498db;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #1a1a2e;

    /* Neutres */
    --gray-100: #f7f8fc;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Dégradés */
    --primary-gradient: linear-gradient(135deg, #4361ee 0%, #3a56d4 50%, #2a3fbf 100%);
    --secondary-gradient: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    --success-gradient: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    --warning-gradient: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    --danger-gradient: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    --info-gradient: linear-gradient(135deg, #3498db 0%, #2980b9 100%);

    /* Ombres */
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 60px rgba(0,0,0,0.15);

    /* Rayons */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Espacement */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;
    --space-10: 4rem;
}

/* ================ RESET AMÉLIORÉ ================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}




/* Scrollbar personnalisée */
#sidebar::-webkit-scrollbar {
    width: 4px;
}
#sidebar::-webkit-scrollbar-track {
    background: transparent;
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}

.sidebar-header {
    padding: 1.75rem 1.5rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-header img {
    width: 72px;
    height: auto;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.sidebar-header h4 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.sidebar-content {
    padding: 0.75rem 0.75rem 1rem;
}

/* Navigation */
.nav-pills .nav-link {
    color: rgba(255,255,255,0.65);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
}

.nav-pills .nav-link i {
    width: 1.2rem;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.4);
    transition: var(--transition);
}

.nav-pills .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    transform: translateX(4px);
}

.nav-pills .nav-link:hover i {
    color: #fff;
}

.nav-pills .nav-link.active {
    color: #fff;
    background: rgba(67, 97, 238, 0.4);
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.15);
}

.nav-pills .nav-link.active i {
    color: #fff;
}

.nav-pills .nav-link .float-end {
    font-size: 0.6rem;
    opacity: 0.4;
    transition: transform 0.3s;
    margin-left: auto;
}

.nav-pills .nav-link[aria-expanded="true"] .float-end {
    transform: rotate(180deg);
    opacity: 0.8;
}

/* Sous-menus */
.nav .nav {
    padding-left: 0.5rem;
}

.nav .nav .nav-link {
    padding: 0.4rem 0.8rem 0.4rem 2.2rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    border-radius: var(--radius-sm);
}

.nav .nav .nav-link i {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.25);
}

.nav .nav .nav-link:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
}

.nav .nav .nav-link.active {
    color: #fff;
    background: rgba(67, 97, 238, 0.25);
}

.nav .nav .nav .nav-link {
    padding-left: 3.2rem;
    font-size: 0.75rem;
}

/* Badges de notification */
.nav-link .badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    margin-left: auto;
}

/* User info */
.user-info {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
}

.user-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

.user-info .btn-outline-light {
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.user-info .btn-outline-light:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}



#content .container-fluid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

/* ================ EN-TÊTE DE PAGE ================ */
.page-header {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1, 
.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 i,
.page-header h2 i {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.page-header .header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ================ CARTES STATISTIQUES MODERNES ================ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.6;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-card .stat-icon.bg-primary { background: var(--primary-gradient); }
.stat-card .stat-icon.bg-success { background: var(--success-gradient); }
.stat-card .stat-icon.bg-warning { background: var(--warning-gradient); }
.stat-card .stat-icon.bg-danger { background: var(--danger-gradient); }
.stat-card .stat-icon.bg-info { background: var(--info-gradient); }

.stat-card .stat-content {
    flex: 1;
    min-width: 0;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 0.15rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
}

.stat-card .stat-value small {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray-500);
}

.stat-card .stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    margin-top: 0.25rem;
}

.stat-card .stat-change.positive {
    color: var(--success-color);
    background: rgba(46, 204, 113, 0.1);
}

.stat-card .stat-change.negative {
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.1);
}

.stat-card .stat-change.neutral {
    color: var(--gray-500);
    background: rgba(0,0,0,0.04);
}

/* ================ CARTES GÉNÉRIQUES ================ */
.card {
    background: #fff;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-header .card-title i {
    color: var(--primary-color);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--gray-100);
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ================ TABLEAUX ================ */
.table-container {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-100);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid var(--gray-200);
}

.table tbody td {
    padding: 0.85rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.table tbody tr:hover {
    background: var(--gray-100);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ================ BADGES ================ */
.badge {
    padding: 0.35rem 0.85rem;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: var(--radius-full);
}

.badge-success {
    background: rgba(46, 204, 113, 0.12);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.12);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.12);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(52, 152, 219, 0.12);
    color: var(--info-color);
}

.badge-primary {
    background: rgba(67, 97, 238, 0.12);
    color: var(--primary-color);
}

/* ================ BOUTONS ================ */
.btn {
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(67, 97, 238, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(67, 97, 238, 0.35);
}

.btn-success {
    background: var(--success-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.25);
}

.btn-success:hover {
    box-shadow: 0 6px 24px rgba(46, 204, 113, 0.35);
}

.btn-danger {
    background: var(--danger-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 6px 24px rgba(231, 76, 60, 0.35);
}

.btn-warning {
    background: var(--warning-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(243, 156, 18, 0.25);
}

.btn-warning:hover {
    box-shadow: 0 6px 24px rgba(243, 156, 18, 0.35);
}

.btn-info {
    background: var(--info-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.25);
}

.btn-info:hover {
    box-shadow: 0 6px 24px rgba(52, 152, 219, 0.35);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
}

/* ================ FORMULAIRES ================ */
.form-control, 
.form-select {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.35rem;
}

/* ================ ALERTES ================ */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: rgba(46, 204, 113, 0.08);
    color: var(--success-dark);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.08);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.08);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(52, 152, 219, 0.08);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* ================ FILTRES ================ */
.filters-container {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ================ PAGINATION ================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin: 1.5rem 0;
}

.page-link {
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition);
    background: #fff;
    text-decoration: none;
}

.page-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
}

/* ================ PROGRESS BAR ================ */
.progress {
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    overflow: hidden;
}

.progress-bar {
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
}

/* ================ EMPTY STATE ================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* ================ RESPONSIVE ================ */
@media (max-width: 992px) {
    #sidebar {
        position: fixed;
        transform: translateX(-100%);
        width: 280px;
        min-width: 280px;
        height: 100vh;
        box-shadow: var(--shadow-xl);
    }

    #sidebar.show {
        transform: translateX(0);
    }

    #content .container-fluid {
        padding: 1rem 1.25rem;
    }

    .sidebar-toggle {
        display: flex !important;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: #fff;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: var(--dark-color);
        cursor: pointer;
        transition: var(--transition);
    }

    .sidebar-toggle:hover {
        background: var(--primary-color);
        color: #fff;
    }
}

@media (max-width: 768px) {
    #content .container-fluid {
        padding: 0.75rem 1rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1.25rem;
    }

    .page-header .header-actions {
        justify-content: center;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .filters-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-card .stat-icon {
        margin: 0 auto;
    }

    .card-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        text-align: center;
    }

    .card-header .btn {
        justify-content: center;
    }
}

/* ================ ANIMATIONS ================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.stat-card {
    animation: fadeInUp 0.4s ease-out forwards;
}

.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

/* ================ UTILITAIRES ================ */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }

.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-hover {
    transition: var(--transition);
}
.shadow-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* ================ OVERLAY DE CHARGEMENT ================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ================ LAYOUT PRINCIPAL ================ */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ================ SIDEBAR ================ */
#sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: white;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    margin: 0;
    padding: 0;
}

/* ================ MAIN CONTENT - UNIFIÉ ================ */
#content {
    flex: 1 1 auto;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    margin-left: 0;
    padding: 0;
    background-color: #f5f7fb;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

#content .container-fluid {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 2rem;
    margin: 0;
    padding-left: 2rem;
}

/* ================ CORRECTION POUR LE CONTENU ================ */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

[class*="col-"] {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* ================ RESPONSIVE ================ */
@media (max-width: 992px) {
    #sidebar {
        position: fixed;
        transform: translateX(-100%);
        width: 280px;
        min-width: 280px;
        height: 100vh;
        box-shadow: 2px 0 20px rgba(0,0,0,0.15);
        z-index: 1050;
        transition: transform 0.3s ease;
    }

    #sidebar.show {
        transform: translateX(0);
    }

    #content {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    #content .container-fluid {
        padding: 1rem 1.25rem;
    }

    .sidebar-toggle {
        display: flex !important;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1060;
        background: #fff;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.1);
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: #1e293b;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .sidebar-toggle:hover {
        background: var(--primary-color);
        color: #fff;
    }
}

@media (max-width: 768px) {
    #content .container-fluid {
        padding: 0.75rem 1rem;
    }

    .cards {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        flex-direction: row;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1.25rem;
    }

    .page-header .header-actions {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    #content .container-fluid {
        padding: 0.5rem 0.75rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-card .stat-icon {
        margin: 0 auto;
    }

    .card-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        text-align: center;
    }

    .card-header .btn {
        justify-content: center;
    }
}
/* Ajoutez ceci en fin de fichier pour forcer */
#content .container-fluid {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* ================ CORRECTION FINALE SIDEBAR ================ */
.wrapper {
    display: flex !important;
    width: 100% !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

#sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    min-width: 280px !important;
    height: 100vh !important;
    z-index: 1050 !important;
    overflow-y: auto !important;
    background: #1a1d23 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#content {
    margin-left: 280px !important;
    flex: 1 !important;
    min-height: 100vh !important;
    padding: 0 !important;
    background: #f4f6fb !important;
    width: calc(100% - 280px) !important;
    max-width: calc(100% - 280px) !important;
    overflow-x: hidden !important;
}

#content .container-fluid {
    padding: 1.5rem 2rem !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Correction pour les rows Bootstrap */
#content .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

#content [class*="col-"] {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    #sidebar {
        position: fixed !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        width: 280px !important;
        min-width: 280px !important;
        height: 100vh !important;
    }

    #sidebar.show {
        transform: translateX(0) !important;
    }

    #content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    #content .container-fluid {
        padding: 1rem !important;
    }

    .sidebar-toggle {
        display: flex !important;
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        z-index: 1060 !important;
        background: #fff !important;
        border: none !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.15) !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.2rem !important;
        color: #1e293b !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sidebar-toggle:hover {
        background: #0d6efd !important;
        color: #fff !important;
    }
}

@media (max-width: 576px) {
    #content .container-fluid {
        padding: 0.75rem !important;
    }
}