 :root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e67e22;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 60px;
}

/* LOGO AVEC IMAGE */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    z-index: 2;
    position: relative;
}

.logo-image {
    height: 50px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    display: none; /* Caché par défaut, visible si image ne charge pas */
}

.logo span {
    color: var(--accent-color);
}

/* Si l'image ne charge pas, afficher le texte */
.logo:has(.logo-image:not([src])) .logo-text {
    display: block;
}

/* ===== STATUS BADGE ===== */
.status-badge {
    background: var(--success-color);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulse 2s infinite;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.status-badge.closed {
    background: var(--danger-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Menu Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
    z-index: 2;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

/* Navigation */
.nav-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

nav a:hover::before {
    left: 0;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Bouton Connexion */
.auth-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Cart Icon */
.cart-icon {
    position: relative;
    cursor: pointer;
    z-index: 2;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* ===== MODALS ===== */
/* Garder tous les styles de modal existants */

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(52, 152, 219, 0.9)),
                url('https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    color: white;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(50px);
    opacity: 0;
    animation: slideUpFadeIn 1s ease forwards;
}

@keyframes slideUpFadeIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Boutons */
.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-color), #e74c3c);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(231, 126, 34, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 100px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 15px auto 40px;
    border-radius: 2px;
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
    background: white;
}

/* Filtres */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--secondary-color);
    background: white;
    color: var(--secondary-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

/* Grille de produits - 2 COLONNES SUR MOBILE */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Carte produit */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    min-height: 40px;
    display: flex;
    align-items: center;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
}

.old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

/* BOUTONS PRODUITS */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-order {
    width: 100%;
    background: linear-gradient(45deg, var(--secondary-color), #2980b9);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-order:hover {
    background: linear-gradient(45deg, #2980b9, var(--secondary-color));
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.btn-order.btn-command {
    background: linear-gradient(45deg, var(--accent-color), #e74c3c);
}

.btn-order.btn-command:hover {
    background: linear-gradient(45deg, #e74c3c, var(--accent-color));
    box-shadow: 0 10px 20px rgba(231, 126, 34, 0.3);
}

/* ===== CONTACT PAGE ===== */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.contact-item {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-10px);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.contact-info h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 10px;
    color: #666;
}

.contact-map {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ===== BOUTONS FLOTTANTS ===== */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.floating-btn.whatsapp {
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.floating-btn.location {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

.floating-btn.call {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.floating-btn i {
    font-size: 1.5rem;
}

.btn-tooltip {
    position: absolute;
    right: 70px;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.floating-btn:hover .btn-tooltip {
    opacity: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .status-badge {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
    }
    
    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .nav-container.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    nav a {
        display: block;
        padding: 15px;
        border-radius: 10px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-image {
        height: 40px;
    }
}

/* 2 COLONNES SUR MOBILE */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .product-actions .btn-order {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 1rem;
        min-height: 40px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .floating-buttons {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .contact-details {
        grid-template-columns: 1fr;
    }
    
    .floating-buttons {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
    }
    
    .floating-btn i {
        font-size: 1.2rem;
    }
}