/* ==========================================================================
   VARIABLES ET CONFIGURATION
   ========================================================================== */
:root {
    --primary-color: #2c3e50;    /* Bleu nuit pour le texte et le footer */
    --accent-color: #c0392b;     /* Rouge bordeaux pour souligner les titres */
    --cart-bg: #f5f6fa;          /* Fond grisé pour le panier */
    --cart-text: #7f8c8d;        /* Texte gris pour le panier */
    --bg-card: rgba(255, 255, 255, 0.96); /* Fond des pages (effet papier) */
    --text-color: #2d3436;
}

/* ==========================================================================
   STRUCTURE GÉNÉRALE ET FIX DU VIDE EN HAUT
   ========================================================================== */
html, body {
    margin: 0 !important;      /* Supprime la marge navigateur qui crée le vide */
    padding: 0 !important;
    min-height: 100vh;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: url("../img/fondEcran.avif") no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    line-height: 1.7;
}

.header-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
}

.header-nav a {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    transition: color 0.3s;
}

.header-nav a:hover {
    color: #007bff; /* Ou la couleur de ton choix */
}

/* --- Style Desktop (par défaut) --- */
.burger-menu {
    position: absolute;
    top: 60px; /* Ajuster selon la hauteur du header */
    
    display: none; /* Caché sur PC */
    cursor: pointer;
    background: none;
    border: none;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
}

@media (max-width: 900px) {
    .header-left {
        display: none !important; /* Caché par défaut sur mobile */
    }
    .header-right {
        display: none !important; /* Caché par défaut sur mobile */
    }
}

/* --- Style Mobile (max 768px) --- */
@media (max-width: 768px) {
    .burger-menu 
     {
        display: block !important;
        width: 25px !important;
        height: 3px !important;
        margin: 5px auto !important;
        background-color: #333 !important;
        transition: 0.3s !important;
        position:absolute !important;
        top: 40px !important;
        z-index: 100 !important;   
    }

    .bar {
    display: block !important;
 position: static !important;
    }


    .nav-links {
        display: none !important; /* On cache le menu par défaut */
        flex-direction: column;
        background-color: #fff;
        position: absolute;
        width: auto;
        left: 0;
        top: 60px; /* Ajuster selon la hauteur du header */
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .nav-links.active {
        display: flex; /* S'affiche quand on clique */
    }

    .nav-links li {
        padding: 15px;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
}



/* ==========================================================================
   HEADER : FLUIDE ET SANS MARGE FANTÔME
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;          /* Zéro padding vertical pour supprimer le vide */
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: auto;       
}

/* Suppression de la marge naturelle du H1 qui pousse le header vers le bas */
header h1, .header-center h1 {
    margin: 0 !important;   
    padding: 10px 0;        /* Contrôle seul la hauteur du bandeau */
    line-height: 1.2;
}

.header-left, .header-right { 
    flex: 1; 
    display: flex; 
    align-items: center; 
}

.header-center { 
    flex: 2; 
    text-align: center; 
}

.header-right { 
    justify-content: flex-end; 
}

#ai-assistant {
    visibility: hidden;
    width: 0;
}

#signature {
    height: 45px;
    width: auto;
    display: block;
}

/* SUPPRESSION ÉLÉMENTS INUTILES */
#vocal-toggle, [class*="sdec"], [id*="sdec"], .vocal-mention {
    display: none !important;
    visibility: hidden !important;
}

/* PANIER */
.btn-cart {
    background-color: var(--cart-bg);
    color: var(--cart-text);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dcdde1;
}

/* ==========================================================================
   MAIN : CORRECTION DE L'ALIGNEMENT DES PAVÉS
   ========================================================================== */
main {
    display: flex;
    flex-direction: row;      /* Force l'alignement horizontal */
    justify-content: center; 
    align-items: flex-start; 
    gap: 20px;               
    padding: 40px 20px;       /* Ajoute un peu d'air autour des cartes */
    flex-wrap: nowrap;       
}

.content-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    flex: 1;                 /* Permet aux deux cartes de partager l'espace */
    max-width: 600px;        /* Largeur max équilibrée pour deux pavés */
}

.content-card h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {

    color: white;
    background-color: #2d3436;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    min-height: 60px;
    margin-top: auto;        /* Pousse le footer vers le bas */
}

.footer-left, .footer-right { flex: 1; display: flex; align-items: center; }
.footer-center { flex: 2; text-align: center; font-family: sans-serif; font-size: 0.85rem; }
.footer-right { justify-content: flex-end; }

#signature-footer {
    height: 30px;
    opacity: 0.5;
    filter: grayscale(1) brightness(2); 
}

.footer-links a {
    color: #81ecec;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    font-size: 0.85rem;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 900px) {
    main {
        flex-direction: column; /* Aligne l'un sous l'autre sur petit écran */
        align-items: center;
    }
    .content-card {
        width: 100%;
        max-width: 850px;
    }
}

    /* Reset de base */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: sans-serif;
    }


    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Menu de navigation */
    .nav-menu {
        display: flex;
        list-style: none;
        gap: 20px;
    }

    .nav-menu a {
        color: white;
        text-decoration: none;
        font-weight: bold;
    }

    /* Bouton Burger (masqué sur desktop) */
    .burger-btn {
        display: none;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 10;
    }

    .bar {
        width: 100%;
        height: 3px;
        background-color: white;
        border-radius: 10px;
        transition: all 0.3s linear;
    }

    /* Responsive : Mobile */
    @media (max-width: 768px) {
        .burger-btn {
            display: flex;
        }

        .nav-menu {
            position: fixed;
            right: -100%;
            /* Hors écran */
            top: 60px;
            flex-direction: column;
            background-color: #34495e;
            width: 100%;
            text-align: center;
            transition: 0.3s;
            padding: 2rem 0;
            box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        }

        .nav-menu.active {
            right: 0;
            /* Glisse vers l'intérieur */
        }

        .nav-menu li {
            margin: 2.5rem 0;
        }
    }

    
            /* Grille Responsive */
            .product-grid {
                display: grid;
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
                gap: 25px;
                max-width: 1200px;
                margin: 0 auto;
            }

            /* Carte Produit */
            .product-card {
                background: white;
                border-radius: 10px;
                overflow: hidden;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
                transition: transform 0.3s ease;
            }

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

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

            .product-info {
                padding: 15px;
            }

            .product-info h3 {
                margin: 0 0 10px 0;
                font-size: 1.2rem;
            }

            .description {
                color: #666;
                font-size: 0.9rem;
                height: 40px;
            }

            .price {
                font-weight: bold;
                color: #2c3e50;
                font-size: 1.2rem;
                margin: 15px 0;
            }

            /* Bouton */
            .add-to-cart {
                width: 100%;
                padding: 10px;
                background-color: #3498db;
                color: white;
                border: none;
                border-radius: 5px;
                cursor: pointer;
                font-weight: bold;
            }

            .add-to-cart:hover {
                background-color: #2980b9;
            }
            /* Conteneur principal du panier */
.cart-container {
    display: flex;
    flex-direction: column; /* Force le titre au-dessus du formulaire */
    width: 100%;
    max-width: 900px; /* Ajustez selon votre besoin */
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
}

/* Style du titre pour qu'il prenne toute la largeur */
.cart-title {
    width: 100%;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    text-align: left;
}

/* Force le formulaire et le tableau à utiliser 100% de l'espace */
form, .table-responsive, .cart-table {
    width: 100% !important;
}

.cart-table {
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}