/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header et Navigation */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c5aa0;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: #2c5aa0;
}

.nav-link.active {
    color: #2c5aa0;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2c5aa0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 20px;
    padding: 8px 16px;
    width: 250px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.search-box button {
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.cart-btn {
    position: relative;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-count {
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: absolute;
    top: -8px;
    right: -8px;
}

.mobile-menu-btn {
    display: none !important;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 10px;
    transition: color 0.3s ease;
    flex-shrink: 0;
    order: 3;
}

.mobile-menu-btn:hover {
    color: #2c5aa0;
}

/* Main content */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    background: #2c5aa0;
    color: white;
    text-align: center;
    padding: 80px 20px;
    border-radius: 15px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-hero {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-hero:hover {
    background: white;
    color: #667eea;
}

/* Boutons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3d6f;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #2c5aa0;
    color: #2c5aa0;
}

.btn-outline:hover {
    background: #2c5aa0;
    color: white;
}

/* Grid système */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.col-1 { flex: 0 0 8.333%; }
.col-2 { flex: 2 2 16.666%; }
.col-3 { flex: 2 2 23%; }
.col-4 { flex: 2 2 33.333%; }
.col-6 { flex: 2 2 50%; }
.col-8 { flex: 0 0 66.666%; }
.col-12 { flex: 0 0 100%; }

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.card-text {
    color: #666;
    margin-bottom: 15px;
}

.card-price {
    font-size: 20px;
    font-weight: bold;
    color: #2c5aa0;
    margin-bottom: 15px;
}

/* Product cards spécifiques */
.product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.product-image:hover img {
    transform: scale(1.05);
}

.product-image.contain img {
    object-fit: contain;
    padding: 10px;
}

.product-image.fill img {
    object-fit: fill;
}

.product-image.aspect-ratio img {
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.product-price {
    font-size: 22px;
    font-weight: bold;
    color: #2c5aa0;
    margin-bottom: 15px;
}

.product-price .old-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #2c5aa0;
}

/* Panier */
.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ccc;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #2c5aa0;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.quantity-btn:hover {
    background: #f8f9fa;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
}

.cart-summary,
.order-summary {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 90px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 600;
    border-top: 2px solid #eee;
    margin-top: 15px;
    padding-top: 15px;
    color: #2c5aa0;
}

/* Tables */
.table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.table thead {
    background: #f8f9fa;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    font-weight: 600;
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Status badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-shipped {
    background: #d1ecf1;
    color: #0c5460;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

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

/* Admin styles */
.admin-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: between;
    align-items: center;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c5aa0;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.table-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.action-btn.edit {
    background: #1e3d6f;
    color: white;
}

.action-btn.delete {
    background: #dc3545;
    color: white;
}

.action-btn.view {
    background: #6c757d;
    color: white;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-50px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: #fff;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Pagination Bootstrap Style */
.pagination {
    display: flex !important;
    flex-direction: row !important;
    padding-left: 0;
    list-style: none;
    border-radius: 0.375rem;
    margin: 0;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.pagination li,
.pagination .page-item {
    display: block;
    margin: 0;
}

.pagination .page-link {
    position: relative;
    display: block;
    color: #2c5aa0;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    font-size: 1rem;
    line-height: 1.25;
    min-width: 44px;
    text-align: center;
}

.pagination .page-link:hover {
    z-index: 2;
    color: #1e3d6f;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-link:focus {
    z-index: 3;
    color: #1e3d6f;
    background-color: #e9ecef;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.pagination .page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #2c5aa0;
    border-color: #2c5aa0;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: default;
}

.justify-content-center {
    justify-content: center !important;
}

#paginationContainer .pagination {
    width: auto !important;
    max-width: none !important;
    flex-basis: auto !important;
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
        min-width: 36px;
    }
}
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: start;
        padding-top: 50px;
        transition: left 0.3s;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .search-box {
        width: 200px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .row {
        flex-direction: column;
    }

    .col-1, .col-2, .col-3, .col-4, .col-6, .col-8, .col-12 {
        flex: 0 0 100%;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utilitaires */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.p-20 { padding: 20px; }
.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.w-full { width: 100%; }
.h-full { height: 100%; }

.alert {
    font-family: Arial, sans-serif;
    padding: 8px 30px;
    border-radius: 4px;
    font-weight: 400;
    position: fixed;
    /*top: 20px;*/
    top: 100px;
    right: 20px;
    font-size: 16px;
    color: #fff;
    z-index: 10000;
}


.alert-success {
    background-color: green;
    color: #fff;
}

.alert-danger {
    background: #d14130;
    color: #fff;
}

.alert-warning {
    color: #FFF;
    background: #00baf3;
    border-color: #faebcc;
}

@media only screen and (max-width: 1050px) {
    .flash {
        text-align: center;
        right: 0;
        left: 50%;
        width: 300px;
        margin-left: -150px;
    }
}
/* ===== RESPONSIVE MOBILE ===== */
@media screen and (max-width: 768px) {
    .titre{
        display: none;
    }
    /* FORCER l'affichage du bouton hamburger */
    .mobile-menu-btn {
        display: block !important;
        z-index: 1001;
    }

    /* Cacher le menu principal sur mobile */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 50px 0;
        transition: left 0.3s ease-in-out;
        z-index: 1000;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        margin: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Liens du menu mobile */
    .nav-menu li {
        margin: 0 0 20px 0;
        width: 90%;
        text-align: center;
    }

    .nav-link {
        font-size: 18px;
        padding: 15px 20px;
        display: block;
        width: 100%;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        background-color: #f8f9fa;
        color: #2c5aa0;
    }

    /* Ajustements des actions sur mobile */
    .nav-actions {
        gap: 10px;
    }

    .search-box {
        width: 180px;
        padding: 6px 12px;
    }

    .search-box input {
        font-size: 13px;
    }

    /* Bouton panier sur mobile */
    .cart-btn {
        padding: 8px 12px;
        font-size: 14px;
        gap: 6px;
    }

    /* Cacher le texte "Panier" sur mobile si nécessaire */
    .cart-text {
        display: none;
    }

    /* Container principal */
    .nav-container {
        padding: 0 15px;
        position: relative;
    }
}

/* ===== TRÈS PETITS ÉCRANS ===== */
@media screen and (max-width: 480px) {

    .nav-container {
        padding: 0 10px;
    }

    .logo {
        font-size: 20px;
    }

    .search-box {
        width: 140px;
        padding: 6px 10px;
    }

    .search-box input {
        font-size: 12px;
    }

    .cart-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .mobile-menu-btn {
        font-size: 22px;
        padding: 8px;
    }

    /* Actions plus compactes */
    .nav-actions {
        gap: 8px;
    }
}

/* ===== ÉCRANS EXTRA PETITS ===== */
@media screen and (max-width: 360px) {
    .search-box {
        width: 120px;
    }

    .nav-actions {
        gap: 5px;
    }

    .cart-btn i {
        font-size: 16px;
    }

    .mobile-menu-btn i {
        font-size: 20px;
    }
}

/* Overlay pour fermer le menu */
@media screen and (max-width: 768px) {
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }

    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }
}
