/* ==========================================================================
   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: #887766;
}

/* ==========================================================================
   STRUCTURE GÉNÉRALE ET FIX DU VIDE EN HAUT
   ========================================================================== */
html, body {
    margin: 2vh !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/fond.jpg") no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    line-height: 1.7;
}
.son {
    width: 50px;
    height: 45px;
    color:black;
}

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

.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;
   /* Zéro padding vertical pour supprimer le vide */
    min-height: auto;       
}

body {
  padding-top: 140px; /* Augmenté pour laisser respirer le header complet */

/* 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 {
    padding: 30px;
    border-radius: 8px;
     background: rgba(128, 128, 128, 0.25);
    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 */
    opacity: 0.75;
}

.content-card h1 {
    font-size: 1.8rem;
    margin-top: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */


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

    /* 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;
}










/* Conteneur principal de la carte d'information */
.book-availability {
    background: rgba(128, 128, 128, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 25px 30px;
    border-radius: 12px;
    max-width: 600px;
    margin: 30px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    color: #FFFFFF;
    text-align: left;
    font-family: inherit;
    opacity: 0.75;
}

.book-availability h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.25rem;
    color: #111;
}

.book-availability p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Grille ou conteneur pour les boutons des libraires */
.retailer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Style des boutons d'action */
.btn-retailer {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-retailer:hover {
    transform: translateY(-1px);
}

/* Variantes optionnelles par enseigne */
.btn-retailer.fnac {
    background-color: #e20613;
    color: #fff;
}

.btn-retailer.cultura {
    background-color: #00539f;
    color: #fff;
}

.btn-retailer.bod {
    background-color: #333;
    color: #fff;
}





/* 1. Fixer le header en haut sur toute la largeur */
header {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
   backdrop-filter: blur(5px); 
}

header div {
    position: absolute; 
    align-self: center;
}
/* 2. Centrer verticalement le titre et la navigation */
.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;  /* Force le centrage horizontal de tous les enfants */
  text-align: center;
  width: 100%;
}

.header-center h1 {
  margin: 0 0 8px 0;
  font-size: 1.8rem;
}

/* 3. Navigation et liste des liens centrées */
.header-nav {
  display: flex;
  justify-content: center;
  width: 100%;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;            /* Espacement régulier entre les liens */
  list-style: none;
  margin: 0;
  padding: 0;           /* Supprime le décalage par défaut des ul en HTML */
}

/* 4. Éviter que le contenu principal ne passe sous le header fixe */


footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  text-align: center;
  
  /* Arrière-plan et padding pour l'esthétique et la lisibilité */

  
  padding: 10px 0;
  box-sizing: border-box;
  
  
  
  
  
  
  


    color: white;
   /* background-color: #2d3436;*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    min-height: 60px;
       



/* Important : ajouter un padding-bottom au body pour que le texte de vos pages 
   ne passe pas sous le footer fixe */

}

/* Style par défaut des liens */
a {
  color: #ffffff;
  text-decoration: none; /* Supprime le soulignement si nécessaire */
  transition: color 0.2s ease-in-out; /* Transition douce pour le survol */
}

/* Style des liens au survol (hover) */
a:hover {
  color: #007bff; /* Même bleu que celui du menu du haut */
}


/* Espace sous le titre principal */
.main-title {
    color: #BBBBBB;;
  margin-bottom: 0.8rem; /* Ajustez la valeur selon l'espacement désiré */
}

/* Espace sous le sous-titre ("Mon tout premier roman") */
.subtitle {
    color: #BBBBBB;
  margin-bottom: 1.2rem;
}

.book-title {
 color: #BBBBBB;
    text-align: center;
}


