/* =========================================
   VARIABLES & RESET
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Couleurs facilement adaptables avec votre logo */
    --primary-color: #046c4e; /* Vert Émeraude - accent */
    --primary-hover: #03543f;
    --dark-bg: #0f172a; /* Anthracite B2B */
    --light-bg: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --white: #ffffff;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   TYPOGRAPHIE & BOUTONS
========================================= */
h1, h2, h3, h4 {
    color: var(--dark-bg);
    font-weight: 600;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container img {
    height: 50px; /* Ajustez selon votre logo */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--light-bg); /* Remplace l'image par un fond clair */
    padding-top: 100px;
    padding-bottom: 60px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
    text-align: left; /* Force le texte à gauche */
}

.hero-content h1 {
    color: var(--dark-bg); /* Texte en foncé pour être visible sur fond clair */
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start; /* Boutons alignés à gauche */
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Pousse l'image vers la droite */
}

.hero-image img {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1; /* Garde votre format carré 750x750 parfait */
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover); /* Ajoute une belle petite ombre autour de l'image */
}

/* =========================================
   POURQUOI NOUS CHOISIR
========================================= */
.features {
    padding: 80px 0;
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px 30px;
    background-color: var(--light-bg);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* =========================================
   CATALOGUE APERÇU / GRILLE PRODUITS
========================================= */
.catalog-preview {
    padding: 80px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
}

.product-img {
    height: 250px;
    width: 100%;
    object-fit: cover;
    cursor: pointer; /* Indique que l'image est cliquable */
    transition: opacity 0.3s ease;
}

.product-img:hover {
    opacity: 0.8; /* Petit effet visuel au survol */
}

.product-content {
    padding: 25px;
}

.product-content h3 {
    margin-bottom: 10px;
}

.product-features {
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.product-features li {
    margin-bottom: 5px;
}

.product-features i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* =========================================
   FILTRES CATALOGUE (Page 2)
========================================= */
.catalog-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #cbd5e1;
    background: var(--white);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.search-bar {
    max-width: 500px;
    margin: 0 auto 30px auto;
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
}

.search-bar button {
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* =========================================
   TÉMOIGNAGES
========================================= */
.testimonials {
    padding: 80px 0;
    background-color: var(--dark-bg);
    color: var(--white);
}

.testimonials .section-title, .testimonials .section-subtitle {
    color: var(--white);
}

.testimonials-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 20px;
    scrollbar-width: none; /* Firefox */
}

.testimonials-carousel::-webkit-scrollbar {
    display: none; /* Chrome */
}

.testimonial-card {
    min-width: 350px;
    scroll-snap-align: start;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
}

.stars {
    color: #fbbf24;
    margin-bottom: 15px;
}

.client-info {
    margin-top: 20px;
    font-weight: 600;
}

.client-city {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 400;
}

/* =========================================
   CONTACT & FOOTER
========================================= */
.contact-section {
    padding: 80px 0;
    background-color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
}

.contact-form {
    display: grid;
    gap: 20px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-color);
}

footer {
    background-color: var(--dark-bg);
    color: #94a3b8;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
    height: 40px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--white);
}

.social-icons a {
    color: var(--white);
    font-size: 1.5rem;
    margin-right: 15px;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* =========================================
   FLOATING BUTTONS & UTILS
========================================= */
.float-btn {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: var(--shadow-hover);
    z-index: 99;
    transition: var(--transition);
}

.whatsapp-btn {
    right: 30px;
    background-color: #25D366;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.top-btn {
    right: 90px;
    background-color: var(--dark-bg);
    opacity: 0;
    pointer-events: none;
}

.top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   MODALE / LIGHTBOX POUR IMAGES
========================================= */
.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 2000; /* S'affiche par-dessus tout le reste */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9); /* Fond anthracite transparent */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease; /* Animation fluide */
}

@keyframes zoomIn {
    from {transform: scale(0.8)} 
    to {transform: scale(1)}
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--primary-color); /* Devient vert au survol */
}

#modalCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--white);
    padding: 15px 0;
    font-size: 1.2rem;
    font-weight: 500;
}

/* =========================================
   RESPONSIVE (MOBILES ET TABLETTES)
========================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* MODIFICATIONS HERO SECTION MOBILE ICI */
    .hero {
        padding-top: 80px; 
        min-height: auto; 
    }

    .hero-container {
        flex-direction: column-reverse; /* Met l'image au-dessus, texte en dessous */
        align-items: center; 
        text-align: center;
        gap: 30px; 
        margin-top: 0;
    }
    
    .hero-content {
        text-align: center;
        width: 100%;
        padding: 0 15px; 
    }

    .hero-content h1 {
        font-size: 2.2rem; 
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 1rem; 
        margin-bottom: 30px;
        max-width: 100%; 
    }

    .hero-buttons {
        flex-direction: column; 
        gap: 15px;
        justify-content: center;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%; 
        max-width: 300px; 
    }

    /* CORRECTION DU BUG SAFARI IPHONE POUR L'IMAGE */
    .hero-image {
        width: 100%; 
        display: block; /* On retire "flex" qui cause le bug sur Safari */
        text-align: center;
        margin-top: 20px;
    }

    .hero-image img {
        width: 85%; 
        min-width: 280px; /* Sécurité absolue : empêche Safari de la rendre minuscule */
        max-width: 400px; 
        height: auto; 
        margin: 0 auto; /* Centre l'image parfaitement */
        display: block;
        flex-shrink: 0; /* Interdit à Safari d'écraser l'image */
        box-shadow: var(--shadow-sm); 
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .top-btn {
        display: none; /* Cache le bouton top sur mobile pour éviter l'encombrement */
    }
}