* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8faf9;
    color: #1a2e2a;
}

/* ========== HEADER ========== */
.header {
    background: linear-gradient(135deg, #0d3b4f, #1a4d3e);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 20, 10, 0.15);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 800;
    color: white;
    text-decoration: none;
    transition: 0.2s;
}

.logo i {
    color: #4caf50;
    font-size: 28px;
}

.logo:hover {
    transform: scale(1.02);
}

.main-nav {
    display: flex;
    gap: 28px;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: white;
    border-bottom-color: #4caf50;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Boutons header */
.btn-login, .btn-register, .btn-logout, .btn-cart {
    padding: 8px 18px;
    border: none;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-login {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.18);
}

.btn-register {
    background: #4caf50;
    color: white;
}

.btn-register:hover {
    background: #388e3c;
    transform: scale(1.03);
}

.btn-logout {
    background: rgba(192, 57, 43, 0.6);
    color: white;
}

.btn-logout:hover {
    background: #c0392b;
}

.btn-cart {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    position: relative;
}

.btn-cart:hover {
    background: rgba(255, 255, 255, 0.12);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 40px;
    min-width: 18px;
    text-align: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-email {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
}

.user-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    padding: 2px 12px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 600;
}

.hidden { display: none !important; }

/* ========== HERO ========== */
.hero {
    max-width: 1300px;
    margin: 40px auto 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    color: #1a3a32;
    margin-bottom: 16px;
}

.hero-content h1 span {
    color: #2e7d32;
    position: relative;
}

.hero-content h1 span::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2e7d32, #1a6b5e);
    border-radius: 4px;
}

.hero-content p {
    font-size: 18px;
    color: #4a665a;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
}

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

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1a4d3e;
}

.stat-label {
    font-size: 14px;
    color: #6b8a7a;
}

.btn-hero {
    background: linear-gradient(95deg, #2e7d32, #1b6b5e);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 60px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(30, 80, 50, 0.25);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(30, 80, 50, 0.35);
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* ========== SECTION GENERALE ========== */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a3a32;
}

.section-header h2 i {
    color: #2e7d32;
    margin-left: 8px;
}

.section-header p {
    color: #6b8a7a;
    font-size: 16px;
    margin-top: 4px;
}

/* ========== CATÉGORIES ========== */
.categories-section {
    max-width: 1300px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: 0.25s;
    border: 1px solid #e6eee9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 30, 20, 0.06);
    border-color: #4caf50;
}

.category-card i {
    font-size: 32px;
    color: #2e7d32;
    margin-bottom: 8px;
}

.category-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a32;
}

/* ========== PRODUITS ========== */
.products-section {
    max-width: 1300px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

.product-filters {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.product-filters input,
.product-filters select {
    padding: 10px 18px;
    border: 1px solid #dce8e2;
    border-radius: 40px;
    font-size: 14px;
    background: white;
    outline: none;
    transition: 0.2s;
}

.product-filters input:focus,
.product-filters select:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.product-filters input {
    min-width: 250px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.product-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    transition: 0.3s;
    border: 1px solid #e6eee9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 30, 20, 0.08);
    border-color: #b8d5c8;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    background: #f3f8f5;
}

.product-card h4 {
    margin: 14px 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #1a3a32;
}

.product-card .price {
    font-size: 22px;
    font-weight: 700;
    color: #1a6b4a;
}

.product-card .old-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 14px;
    font-weight: 400;
    margin-right: 10px;
}

.product-card .stock {
    font-size: 12px;
    color: #6b8a7a;
    margin-top: 4px;
}

.product-card .badge-discount {
    background: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 40px;
    font-weight: 600;
    display: inline-block;
}

/* ========== À PROPOS ========== */
.about-section {
    background: linear-gradient(135deg, #f0f7f3, #e8f0ec);
    padding: 60px 24px;
}

.about-content {
    max-width: 1300px;
    margin: 0 auto;
}

.about-content h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a3a32;
    margin-bottom: 40px;
}

.about-content h2 span {
    color: #2e7d32;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.about-card {
    text-align: center;
    padding: 32px 20px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    border: 1px solid #e6eee9;
}

.about-card i {
    font-size: 40px;
    color: #2e7d32;
    margin-bottom: 12px;
}

.about-card h3 {
    font-size: 18px;
    color: #1a3a32;
    margin-bottom: 8px;
}

.about-card p {
    color: #6b8a7a;
    font-size: 14px;
    line-height: 1.6;
}

/* ========== FOOTER ========== */
.footer {
    background: #0d1f1a;
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 24px 20px;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: white;
    font-size: 20px;
    margin-bottom: 12px;
}

.footer-section h3 i {
    color: #4caf50;
}

.footer-section h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 12px;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-bottom: 8px;
    transition: 0.2s;
}

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

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.social-links a {
    background: rgba(255, 255, 255, 0.06);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: 0.2s;
}

.social-links a:hover {
    background: #2e7d32;
    color: white;
}

.footer-bottom {
    max-width: 1300px;
    margin: 32px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 13px;
}

/* ========== MODAL ========== */
.modal {
    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;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 32px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #95a5a6;
    transition: 0.2s;
}

.close:hover {
    color: #1a3a32;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #1a3a32;
}

.auth-form h2 i {
    color: #2e7d32;
}

.auth-form input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 1px solid #dce8e2;
    border-radius: 40px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
    background: #f8fbfa;
}

.auth-form input:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.auth-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a665a;
    margin-bottom: 16px;
}

.auth-form .checkbox-label input {
    width: auto;
    margin: 0;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(95deg, #2e7d32, #1b6b5e);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(30, 80, 50, 0.2);
}

.auth-form p {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #6b8a7a;
}

.auth-form p a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 600;
}

.auth-form p a:hover {
    text-decoration: underline;
}

/* ========== ADMIN PANEL ========== */
.admin-panel {
    background: white;
    border-radius: 32px;
    max-width: 1300px;
    margin: 40px auto;
    padding: 32px;
    border: 1px solid #e6eee9;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.admin-container h2 {
    font-size: 28px;
    color: #1a3a32;
    margin-bottom: 24px;
}

.admin-container h2 i {
    color: #2e7d32;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e6eee9;
    padding-bottom: 12px;
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #6b8a7a;
    cursor: pointer;
    border-radius: 40px;
    transition: 0.2s;
}

.tab-btn:hover {
    background: #f0f7f3;
    color: #1a3a32;
}

.tab-btn.active {
    background: #2e7d32;
    color: white;
}

.admin-tab-content {
    padding: 16px 0;
}

.admin-tab-content h3 {
    font-size: 20px;
    color: #1a3a32;
    margin-bottom: 16px;
}

.admin-form {
    background: #f8fbfa;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
    padding: 12px 16px;
    border: 1px solid #dce8e2;
    border-radius: 40px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
    background: white;
}

.form-grid textarea {
    border-radius: 16px;
    resize: vertical;
}

.form-grid input:focus,
.form-grid textarea:focus {
    border-color: #4caf50;
}

.form-grid input[type="file"] {
    padding: 8px 16px;
}

.admin-form .btn-primary {
    width: auto;
    padding: 12px 32px;
    margin-top: 12px;
}

.admin-form .btn-secondary {
    padding: 12px 32px;
    border: 1px solid #dce8e2;
    background: white;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 8px;
}

.admin-form .btn-secondary:hover {
    background: #f0f7f3;
}

.admin-products-list,
.admin-users-list {
    display: grid;
    gap: 8px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fbfa;
    border-radius: 12px;
    border: 1px solid #e6eee9;
}

.admin-item .item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-item .item-info img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-item .item-actions {
    display: flex;
    gap: 8px;
}

.admin-item .item-actions button {
    padding: 4px 12px;
    border: none;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-edit {
    background: #2196f3;
    color: white;
}

.btn-edit:hover {
    background: #1976d2;
}

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

.btn-delete:hover {
    background: #c0392b;
}

.btn-toggle {
    background: #ff9800;
    color: white;
}

.btn-toggle:hover {
    background: #f57c00;
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 16px 28px;
    border-radius: 16px;
    background: #1a3a32;
    color: white;
    font-weight: 500;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    animation: slideIn 0.3s ease;
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left-color: #e74c3c;
    background: #3d1a1a;
}

.toast.success {
    border-left-color: #4caf50;
    background: #1a3a32;
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateX(40px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .hero-content p {
        max-width: 100%;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-image img {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-left {
        gap: 16px;
    }
    .main-nav {
        display: none;
    }
    .hero-content h1 {
        font-size: 32px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .admin-item {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .product-filters input {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-wrap: wrap;
        gap: 8px;
    }
    .btn-login, .btn-register {
        padding: 6px 12px;
        font-size: 12px;
    }
    .modal-content {
        padding: 24px;
        margin: 16px;
    }
    .hero-stats {
        gap: 20px;
    }
    .stat-number {
        font-size: 22px;
    }
}