/* ==================== RESET ET STYLES DE BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==================== EN-TÊTE ==================== */
.header {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.user-info i {
    font-size: 1.5rem;
}

/* Logo area */
.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notification-bell {
    position: relative;
    cursor: pointer;
}

.badge-notification {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Menu toggle mobile */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.2rem;
}

/* ==================== CONTENU PRINCIPAL ==================== */
.main-content {
    display: flex;
    flex: 1;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 250px;
    background-color: white;
    padding: 2rem 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 5px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar a:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
    border-left-color: #4a6491;
}

.sidebar li.active a {
    background-color: #eef2f7;
    color: #2c3e50;
    border-left-color: #2c3e50;
    font-weight: 600;
}

/* Active indicator */
.active-indicator {
    margin-left: auto;
    width: 6px;
    height: 6px;
    background-color: #2ecc71;
    border-radius: 50%;
}

/* Navigation section */
.nav-section {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #95a5a6;
    letter-spacing: 1px;
}

/* ==================== CONTENU PRINCIPAL ==================== */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.content h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    margin-bottom: 0;
}

.page-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.link-view-all {
    color: #3498db;
    text-decoration: none;
    font-size: 0.85rem;
}

.link-view-all:hover {
    text-decoration: underline;
}

/* Search bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.search-bar i {
    color: #95a5a6;
}

.search-bar input {
    border: none;
    outline: none;
    padding: 0.25rem;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input i {
    position: absolute;
    left: 10px;
    color: #95a5a6;
}

.search-input input {
    padding: 8px 10px 8px 35px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 250px;
}

/* ==================== CARTES STATISTIQUES ==================== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-3px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.card-icon.blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.card-icon.green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.card-icon.orange { background: linear-gradient(135deg, #e67e22, #d35400); }
.card-icon.red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.card-icon.purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.card-icon.teal { background: linear-gradient(135deg, #1abc9c, #16a085); }
.card-icon.cyan { background: linear-gradient(135deg, #00bcd4, #0097a7); }

.card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.card-content p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Card trend */
.card-trend {
    font-size: 0.7rem;
    display: inline-block;
    margin-top: 5px;
}

.card-trend.up {
    color: #27ae60;
}

.card-trend.down {
    color: #e74c3c;
}

/* ==================== ALERTES ==================== */
.alerts-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.alert-list {
    margin-top: 1rem;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #fff9e6;
    border-left: 4px solid #f1c40f;
    margin-bottom: 10px;
    border-radius: 5px;
}

.alert-item .product-name {
    font-weight: 600;
    color: #d35400;
}

.alert-item .warehouse {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.alert-item .stock-level {
    color: #e67e22;
    font-weight: 500;
}

.alert-info {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.alert-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Alert messages */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.success {
    background-color: #d5f4e6;
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.alert.error {
    background-color: #fadbd8;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

.alert i {
    font-size: 1.2rem;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* ==================== FORMULAIRES ==================== */
.form-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ==================== BOUTONS ==================== */
.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1c5a87);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #ecf0f1;
    color: #2c3e50;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #d5dbdb;
}

.btn-small {
    background-color: #ecf0f1;
    color: #2c3e50;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-small:hover {
    background-color: #d5dbdb;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #7f8c8d;
    transition: all 0.3s;
}

.btn-icon:hover {
    color: #3498db;
}

.btn-icon.btn-danger:hover {
    color: #e74c3c;
}

/* ==================== TABLES ==================== */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border-radius: 5px;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 500;
}

.data-table tbody tr {
    border-bottom: 1px solid #eee;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table td {
    padding: 12px 15px;
    color: #555;
}

.data-table .actions {
    display: flex;
    gap: 5px;
}

/* SKU badge */
.sku-badge {
    background-color: #ecf0f1;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
}

/* Quantity cell */
.quantity-cell {
    font-weight: 600;
}

.quantity-cell.low-quantity {
    color: #e74c3c;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    gap: 5px;
    margin-top: 1.5rem;
    justify-content: center;
    align-items: center;
}

.pagination a {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #ddd;
    color: #3498db;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #f8f9fa;
}

.pagination a.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-first,
.pagination-last,
.pagination-prev,
.pagination-next {
    font-size: 0.8rem;
}

/* ==================== CARTES ENTREPÔTS ==================== */
.warehouse-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.warehouse-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.warehouse-card:hover {
    transform: translateY(-3px);
}

.warehouse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.warehouse-header h4 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warehouse-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.warehouse-status.active {
    background-color: #d5f4e6;
    color: #27ae60;
}

.warehouse-details p {
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.capacity-info {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 5px;
    font-size: 0.8rem;
}

.capacity-percent {
    font-weight: 600;
    color: #2c3e50;
}

.capacity-bar {
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 4px;
    transition: width 0.3s;
}

.capacity-stats {
    margin-top: 5px;
    font-size: 0.75rem;
    color: #7f8c8d;
}

.warehouse-actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

/* ==================== FILTRES ==================== */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filters select,
.filters input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    min-width: 200px;
}

.filters input {
    flex: 1;
}

/* ==================== BADGES DE STATUT ==================== */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-success {
    background-color: #d5f4e6;
    color: #27ae60;
}

.status-warning {
    background-color: #fdebd0;
    color: #e67e22;
}

.status-danger {
    background-color: #fadbd8;
    color: #e74c3c;
}

.status-info {
    background-color: #d6eaf8;
    color: #3498db;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-inbound {
    background-color: #d6eaf8;
    color: #3498db;
}

.badge-outbound {
    background-color: #d5f4e6;
    color: #27ae60;
}

.badge-received {
    background-color: #fdebd0;
    color: #e67e22;
}

.badge-processed {
    background-color: #d5f4e6;
    color: #27ae60;
}

.badge-error {
    background-color: #fadbd8;
    color: #e74c3c;
}

/* ==================== CARTES RAPPORTS ==================== */
.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.report-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.report-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.report-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.report-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.report-format {
    font-size: 0.7rem;
    color: #95a5a6;
}

/* Export section */
.export-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.export-section h3 {
    margin-bottom: 1rem;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== STRATÉGIES PICKING ==================== */
.strategies-section, .waves-section, .recent-inventory {
    margin-top: 2rem;
}

.strategies-section h3, .waves-section h3, .recent-inventory h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.strategy-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    text-align: center;
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.strategy-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 1rem;
}

.strategy-icon.fifo { background: linear-gradient(135deg, #3498db, #2980b9); }
.strategy-icon.lifo { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.strategy-icon.fefo { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.strategy-icon.zone { background: linear-gradient(135deg, #2ecc71, #27ae60); }

.strategy-card h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.strategy-card p {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.badge-strategy {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 10px;
    background-color: #ecf0f1;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #2c3e50;
}

/* Wave card */
.wave-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #3498db;
    cursor: pointer;
    transition: all 0.3s;
}

.wave-card:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.wave-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.wave-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.wave-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.progress-bar {
    height: 6px;
    background-color: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.7rem;
    color: #7f8c8d;
    text-align: right;
    display: block;
    margin-top: 5px;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

/* ==================== DATE RANGE ==================== */
.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* ==================== MESSAGES INFO ==================== */
.info-message {
    background-color: #e8f4fc;
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 5px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.no-alerts {
    color: #7f8c8d;
    font-style: italic;
    padding: 15px;
    text-align: center;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s;
        width: 280px;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .header-actions .user-details {
        display: none;
    }
    
    .content {
        padding: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filters select,
    .filters input {
        min-width: 100%;
    }
    
    .strategies-grid {
        grid-template-columns: 1fr;
    }
    
    .warehouse-cards {
        grid-template-columns: 1fr;
    }
    
    .report-cards {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .date-range {
        flex-wrap: wrap;
    }
    
    .alert-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .alert-stats {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .user-details {
        display: none;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1rem;
    }
    
    .card-content h3 {
        font-size: 1.5rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card,
.strategy-card,
.report-card,
.warehouse-card,
.wave-card {
    animation: fadeIn 0.3s ease-out;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}