/* Style Général */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #f4f4f4; 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

/* En-tête du Catalogue */
.header { 
    width: 100%; 
    background: white; 
    padding: 15px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-sizing: border-box; 
}

#cart-status { 
    background: #2c3e50; 
    color: white; 
    padding: 10px 20px; 
    border-radius: 25px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.3s;
}

/* Conteneur du Flipbook (Ajustement Responsive) */
.container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 85vh; 
    width: 100%; 
    padding: 20px; 
    box-sizing: border-box; 
}

/* Catalogue Réduit et Sécurisé pour l'écran */
.flip-book { 
    max-width: 100%; 
    max-height: 70vh; /* Empêche le débordement vertical */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
    margin: 0 auto;
}

/* Style des Pages */
.page { 
    background: white; 
    padding: 20px; 
    border: 1px solid #ddd; 
    box-sizing: border-box; 
}

.page-content { 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: space-between; 
    position: relative; 
    box-shadow: inset 10px 0 15px -10px rgba(0,0,0,0.1); 
}

.page-cover { 
    background: #2c3e50; 
    color: white; 
    text-align: center; 
}

/* Éléments de Produit (Format Compact) */
.page img { 
    width: 100%; 
    max-height: 200px; /* Taille réduite pour format compact */
    object-fit: contain; 
    border-radius: 10px; 
}

h3 { 
    margin: 10px 0; 
    color: #333; 
    font-size: 1.2em; 
}

.price { 
    font-weight: bold; 
    color: #27ae60; 
    font-size: 1.1em; 
}

/* Contrôles de Navigation (Regroupés après le numéro) */
.navigation-controls { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 15px; 
    margin-top: 20px; 
    background: white; 
    padding: 10px 20px; 
    border-radius: 50px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}

#page-number { 
    font-weight: bold; 
    color: #2c3e50; 
    min-width: 90px; 
    text-align: center; 
}

.btn-group {
    display: flex;
    gap: 10px;
}

.nav-btn { 
    background: #2c3e50; 
    color: white; 
    border: none; 
    width: 35px; /* Boutons compacts et ronds */
    height: 35px; 
    border-radius: 50%; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    transition: 0.3s;
}

.nav-btn:hover { 
    background: #34495e; 
    transform: scale(1.1); 
}

/* Formulaires et Boutons d'action */
select, input {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 0.9em;
}

.add-btn { 
    background: #2c3e50; 
    color: white; 
    border: none; 
    padding: 12px; 
    width: 100%; 
    border-radius: 5px; 
    cursor: pointer; 
    font-weight: bold; 
    text-transform: uppercase;
}

.moq-badge { 
    position: absolute; 
    top: 0; 
    right: 0; 
    background: #e67e22; 
    color: white; 
    padding: 4px 10px; 
    font-size: 0.75em; 
    border-radius: 5px; 
    font-weight: bold; 
}

/* Modal Panier */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
}

.modal-content { 
    background: white; 
    margin: 10% auto; 
    padding: 25px; 
    width: 90%; 
    max-width: 400px; 
    border-radius: 15px; 
    position: relative; 
}

.whatsapp-send { 
    background: #25D366; 
    color: white; 
    border: none; 
    padding: 15px; 
    width: 100%; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer; 
    margin-top: 15px; 
}

/* Responsive Mobile */
@media (max-width: 600px) {
    .flip-book { max-width: 95vw; }
    .page { padding: 10px; }
    .page img { max-height: 150px; }
    h3 { font-size: 1em; }
    #page-number { font-size: 0.85em; min-width: 70px; }
}