/* ============================================
   SAMANOURSHOP - STYLES COMPLETS
   ============================================ */

/* IMPORTATION DES POLICES */
/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Open+Sans:wght@300;400;600&display=swap'); */
/* Utilisation des polices système pour chargement rapide */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
/* ============================================
   VARIABLES GLOBALES
   ============================================ */
:root {
    --vert-fonce: #0B3D2E;
    --vert-clair: #165F44;
    --dore: #C9A43B;
    --blanc: #FFFFFF;
    --gris-clair: #F5F5F5;
    --gris-texte: #666666;
    --noir: #1a1a1a;
}

/* ============================================
   RESET ET BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--noir);
    line-height: 1.6;
    background-color: var(--blanc);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--vert-fonce);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   SYSTÈME D'ARRIÈRE-PLAN AVEC OVERLAY
   ============================================ */

/* Conteneur de page avec background */
.page-background {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Overlay sombre par-dessus l'image */
.page-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 61, 46, 0.85); /* Vert foncé avec transparence */
    z-index: 1;
}

/* Contenu par-dessus l'overlay */
.page-content {
    position: relative;
    z-index: 2;
}

/* Backgrounds spécifiques pour chaque page */
.bg-home {
    background-image: url('../images/backgrounds/home-bg.jpg');
}

.bg-shop {
    background-image: url('../images/backgrounds/shop-bg.jpg');
}

.bg-category {
    background-image: url('../images/backgrounds/category-bg.jpg');
}

.bg-about {
    background-image: url('../images/backgrounds/about-bg.jpg');
}

.bg-contact {
    background-image: url('../images/backgrounds/contact-bg.jpg');
}

.bg-login {
    background-image: url('../images/backgrounds/login-bg.jpg');
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.main-header {
    background: var(--blanc);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vert-fonce);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    color: var(--noir);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: var(--vert-clair);
    color: var(--blanc);
}

.nav-menu a.active {
    background: var(--dore);
    color: var(--blanc);
}

/* ICÔNES HEADER */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 45px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-text {
    background: linear-gradient(135deg, #1B4730 0%, #519F65 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: none;
}


.header-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-cart {
    position: relative;
    color: var(--vert-fonce);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.icon-cart:hover {
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.icon-logout {
    color: #c00;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.icon-logout:hover {
    transform: scale(1.1);
}

/* MENU MOBILE */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--vert-fonce);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--blanc);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        gap: 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 80px 5%;
    background: var(--blanc);
}

.section-dark {
    background: var(--gris-clair);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--vert-fonce);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--dore);
}

/* ============================================
   GRILLE PRODUITS
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: var(--blanc);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: var(--gris-clair);
}

.product-info {
    padding: 1.5rem;
}

.product-badge {
    display: inline-block;
    background: var(--dore);
    color: var(--blanc);
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--vert-fonce);
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dore);
    margin-bottom: 1rem;
}

.product-price-old {
    text-decoration: line-through;
    color: var(--gris-texte);
    font-size: 1rem;
    margin-left: 0.5rem;
}

.btn-whatsapp {
    background: #25D366;
    color: var(--blanc);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    border: none;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.05);
}

/* ============================================
   TÉMOIGNAGES
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--blanc);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.testimonial-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
    border: 3px solid var(--dore);
}

.testimonial-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--vert-fonce);
    margin-bottom: 0.5rem;
}

.testimonial-rating {
    color: var(--dore);
    margin-bottom: 1rem;
}

.testimonial-message {
    font-style: italic;
    color: var(--gris-texte);
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: var(--vert-fonce);
    color: var(--gris-clair); /* Texte général en gris clair pour contraster avec le vert foncé */
    padding: 3rem 5%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Minmax réduit légèrement pour mieux s'adapter */
    gap: 2rem; /* Réduit l'espace entre les colonnes pour les petits écrans */
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--dore); /* Les titres restent en doré */
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(201, 164, 59, 0.3); /* Ligne fine dorée sous le titre */
    padding-bottom: 0.5rem;
}

.footer-section p {
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.6rem;
}

.footer-section a {
    color: var(--gris-clair);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 300;
}

.footer-section a:hover {
    color: var(--dore); /* Survol en doré */
    text-decoration: underline;
}

/* ICÔNES SOCIALES */
.social-icons {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background: var(--dore);
    color: var(--vert-fonce); /* Icônes en vert foncé sur fond doré */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.social-icons a:hover {
    background: var(--vert-clair); /* Survol en vert clair */
    color: var(--blanc);
    transform: rotate(360deg);
}

/* BOUTON WHATSAPP dans le footer */
.footer-section .btn-whatsapp {
    /* Style hérité de la classe générale .btn-whatsapp, mais avec ajustement pour le footer */
    background: var(--dore) !important;
    color: var(--vert-fonce) !important;
    font-weight: 700 !important;
    display: flex; /* Alignement de l'icône et du texte */
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.footer-section .btn-whatsapp:hover {
    background: var(--vert-clair) !important;
    color: var(--blanc) !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.85rem;
}

/* ============================================
   FORMULAIRES
   ============================================ */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--blanc);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--vert-fonce);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--gris-clair);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--dore);
}

.btn-submit {
    background: var(--dore);
    color: var(--blanc);
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--vert-clair);
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    /* Menu mobile avec checkbox (pas de JavaScript) */
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--blanc);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    /* Utiliser le pseudo-sélecteur :target pour afficher/masquer */
    #mobile-menu-checkbox {
        display: none;
    }
    
    #mobile-menu-checkbox:checked ~ .nav-menu {
        display: flex;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--blanc);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
}
/* ===========================================
   ALERTES (SUCCESS/ERROR MESSAGES)
   ============================================ */

.alert-container {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.alert-success {
    background-color: #e6ffed; /* Vert très clair */
    color: #1a8f1a; /* Vert foncé */
    border: 1px solid #7bc67b;
}

.alert-error {
    background-color: #ffebe6; /* Rouge très clair */
    color: #d11a2a; /* Rouge foncé */
    border: 1px solid #ff7a7a;
}

.alert-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: inherit; /* Utilise la couleur du texte parent (vert ou rouge) */
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

/* Style de base pour les pages admin si vous ne l'aviez pas */
.admin-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: var(--blanc);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* ===========================================
   SAMANOURSHOP - STYLES COMPLETS
   ============================================ */
/* ... (Contenu existant de style.css) ... */
/* */


/* ============================================
   AMÉLIORATIONS CARTES PRODUITS (DEMANDE CLIENT)
   - Zoom léger au survol de l'image
   - Boutons d'action 'Détails' et 'Commander' (WhatsApp)
   ============================================ */

/* Conteneur de l'image pour l'effet de zoom */
.product-image-wrapper {
    overflow: hidden; /* Cache la partie de l'image qui dépasse */
    position: relative;
    height: 300px; /* Hauteur fixe pour un rendu uniforme dans la grille */
}

/* L'image elle-même */
.product-card .product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* Transition douce pour l'animation */
}

/* Zoom au survol de la carte */
.product-card:hover .product-image-wrapper img {
    transform: scale(1.1); /* Zoom léger de 10% */
}

/* Réajustement de la carte pour faire de la place aux boutons */
.products-grid .product-card {
    position: relative;
    padding-bottom: 50px; /* Espace pour les boutons d'action */
}

/* Section d'action (Boutons) - Positionnement absolu pour flotter */
.product-actions {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    gap: 10px;
    
    /* Positionnement au bas de la carte */
    position: absolute; 
    bottom: 10px; 
    left: 0;
    right: 0;
    padding: 0 10px;
}

/* Affichage au survol de la carte */
.product-card:hover .product-actions {
    opacity: 1;
    visibility: visible;
}

/* Styles des boutons */
.product-actions .btn-view,
.product-actions .btn-whatsapp {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
    flex-grow: 1; /* Permet aux boutons de s'étirer */
    text-align: center;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

/* Bouton 'Voir détails' (Vert Clair) */
.product-actions .btn-view {
    background-color: var(--vert-clair);
    color: var(--blanc);
}

.product-actions .btn-view:hover {
    background-color: #086948;
    transform: translateY(-1px);
}

/* Bouton 'Commander sur WhatsApp' (Doré) */
.product-actions .btn-whatsapp {
    background-color: var(--dore);
    color: var(--vert-fonce);
}

.product-actions .btn-whatsapp:hover {
    background-color: #e0b445;
    transform: translateY(-1px);
}

/* S'assurer que les prix sont toujours visibles (ajustement de l'espace) */
.product-info {
    padding: 1rem 10px;
    min-height: 120px; /* Maintient une hauteur minimale pour le texte */
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    /* ... (Contenu existant) ... */
    
    /* Sur mobile, pour que les boutons restent visibles même sans hover (si vous le souhaitez) */
    .product-card .product-actions {
        /* On retire l'effet hover pour le tactile et on les rend toujours visibles */
        opacity: 1 !important;
        visibility: visible !important;
        position: static; /* Les remet dans le flux pour mobile */
        margin-top: 10px;
        margin-bottom: 0;
    }
    .products-grid .product-card {
        padding-bottom: 10px; /* Retire le padding nécessaire pour le positionnement absolu */
    }
}