/* css/style.css */

/* ===== GOOGLE FONTS & VARIABLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Lato:wght@400;700&display=swap');

:root {
    /* Palette générée à partir du logo Innov-Group */
    --primary-color: #F37021; /* Orange vif du logo */
    --secondary-color: #008B99; /* Cyan/Bleu du logo */
    --accent-color: #FFC107; /* Jaune de l'ampoule */
    
    /* Thème Clair */
    --bg-color-light: #F8F9FA;
    --surface-color-light: #FFFFFF;
    --text-color-light: #212529;
    --text-muted-light: #6c757d;

    /* Thème Sombre */
    --bg-color-dark: #121822;
    --surface-color-dark: #1A222F;
    --text-color-dark: #EAEAEA;
    --text-muted-dark: #a0aec0;

    /* Typographie */
    --font-family-headings: 'Poppins', sans-serif;
    --font-family-body: 'Lato', sans-serif;

    /* Autres variables */
    --header-height: 5rem;
    --border-radius: 8px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease-in-out;
}

/* ===== BASE & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    transition: var(--transition);
}

body.dark-mode {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

h1, h2, h3, h4 {
    font-family: var(--font-family-headings);
    color: inherit;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== UTILITIES & LAYOUT ===== */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: -2rem;
    font-size: 1.1rem;
    color: var(--text-muted-light);
}

body.dark-mode .section-subtitle {
    color: var(--text-muted-dark);
}

/* ===== BOUTONS ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family-headings);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 112, 33, 0.3);
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* ===== PRELOADER ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color-light);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.logo-loader {
    width: 150px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== HEADER & NAVIGATION ===== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
}

#header.sticky {
    background-color: var(--surface-color-light);
    box-shadow: var(--box-shadow);
}

body.dark-mode #header.sticky {
     background-color: var(--surface-color-dark);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.nav-logo img {
    height: 45px;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    color: #fff;
    position: relative;
    padding-bottom: 5px;
}

#header.sticky .nav-link {
    color: var(--text-color-light);
}

body.dark-mode #header.sticky .nav-link {
    color: var(--text-color-dark);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#theme-toggle, .language-switcher button {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
}

#header.sticky #theme-toggle, #header.sticky .language-switcher button {
    color: var(--text-color-light);
}

body.dark-mode #header.sticky #theme-toggle, body.dark-mode #header.sticky .language-switcher button {
    color: var(--text-color-dark);
}

.language-switcher .active {
    color: var(--primary-color);
    font-weight: bold;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    color: #fff;
}

#header.sticky .nav-toggle {
    color: var(--text-color-light);
}
body.dark-mode #header.sticky .nav-toggle {
    color: var(--text-color-dark);
}


/* ===== HERO ===== */
#hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    text-align: center;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-container {
    position: relative;
    z-index: 2;
    color: #fff;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-title span {
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-stats {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 4rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.stat-item {
    color: #fff;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ===== PRESENTATION (ABOUT) ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.about-card {
    background-color: var(--surface-color-light);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}
body.dark-mode .about-card {
    background-color: var(--surface-color-dark);
}
.about-card:hover {
    transform: translateY(-10px);
}
.about-card i {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}
.about-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* ===== PRODUITS (PRODUCTS) ===== */
#products {
    background-color: var(--bg-color-light);
}
body.dark-mode #products {
    background-color: var(--bg-color-dark);
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.product-card {
    background-color: var(--surface-color-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}
body.dark-mode .product-card {
    background-color: var(--surface-color-dark);
}
.product-card:hover {
    transform: translateY(-10px);
}
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.product-card-content {
    padding: 1.5rem;
}
.product-card-content h3 {
    margin-bottom: 0.5rem;
}
.product-card-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted-light);
}
body.dark-mode .product-card-content p {
    color: var(--text-muted-dark);
}

/* ===== VISION ===== */
.vision-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}
.vision-image img {
    border-radius: var(--border-radius);
}
.vision-text blockquote {
    font-size: 1.5rem;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
    margin-bottom: 2rem;
}
.vision-text cite {
    display: block;
    font-style: normal;
}
.founder-name {
    display: block;
    font-weight: bold;
    font-family: var(--font-family-headings);
}

/* ===== PROCESS (SCROLLYTELLING) ===== */
.process-wrapper {
    position: relative;
    display: flex;
    max-width: 800px;
    margin: 0 auto;
}
.process-line-container {
    position: absolute;
    left: 29px;
    top: 0;
    height: 100%;
    width: 4px;
}
.process-svg {
    position: sticky;
    top: 150px;
    height: 50vh;
    width: 100%;
}
#process-line {
    stroke: var(--primary-color);
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
}
.process-steps {
    padding-left: 80px;
    width: 100%;
}
.process-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8rem;
    opacity: 0.5;
    transition: var(--transition);
    position: relative;
}
.process-step.active {
    opacity: 1;
    transform: scale(1.05);
}
.process-step-icon {
    position: absolute;
    left: -80px;
    top: 0;
    width: 60px;
    height: 60px;
    background-color: var(--surface-color-light);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    flex-shrink: 0;
    z-index: 2;
}
body.dark-mode .process-step-icon {
    background-color: var(--surface-color-dark);
}
.process-step-content {
    background-color: var(--surface-color-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
body.dark-mode .process-step-content {
     background-color: var(--surface-color-dark);
}

/* ===== TEMOIGNAGES ===== */
#testimonials {
    background-color: var(--secondary-color);
    color: #fff;
}
.testimonial-carousel {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.testimonial-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.testimonial-slide {
    min-width: 100%;
    padding: 2rem;
    text-align: center;
}
.testimonial-text {
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.testimonial-author {
    font-weight: bold;
    font-style: normal;
}
.testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
}
.testimonial-nav button {
    background-color: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    cursor: pointer;
}

/* ===== FAQ ACCORDION ===== */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    border-bottom: 1px solid #ddd;
}
body.dark-mode .faq-item {
    border-color: #333;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    color: var(--text-color-light);
}
body.dark-mode .faq-question {
    color: var(--text-color-dark);
}
.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.faq-answer p {
    padding: 0 0 1.5rem 0;
    line-height: 1.7;
}
.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* ===== GALERIE (LOGIQUE UNIFIÉE) ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.gallery-item {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: var(--box-shadow);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-overlay i {
    color: #fff;
    width: 48px;
    height: 48px;
}
.gallery-item.video-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background-color: var(--secondary-color);
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-family: var(--font-family-headings);
    font-size: 1.2rem;
    transition: var(--transition);
}
.gallery-item.video-card:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}
.gallery-item.video-card i {
    width: 60px;
    height: 60px;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-content-wrapper {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    background-color: rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0,0,0,0.6);
}

/* ===== CORRECTION FINALE POUR LA ROTATION VIDÉO DANS LE LIGHTBOX ===== */

.lightbox-content video {
    /* Fait pivoter la vidéo de 90 degrés pour la mettre en paysage */
    transform: rotate(-90deg);

    /* Ajuste la taille pour remplir l'espace après la rotation */
    /* La largeur de la vidéo devient la hauteur de l'écran */
    width: 100vh;
    /* La hauteur de la vidéo devient la largeur de l'écran */
    height: 100vw;

    /* Assure que la vidéo ne dépasse pas les dimensions maximales */
    max-width: 100vh;
    max-height: 100vw;
}

/* ===== CONTACT ===== */
#contact {
    background-color: var(--bg-color-light);
}
body.dark-mode #contact {
    background-color: var(--bg-color-dark);
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}
.contact-item i {
    color: var(--primary-color);
}
.contact-socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}
.contact-socials a {
    color: var(--text-color-light);
}
body.dark-mode .contact-socials a {
    color: var(--text-color-dark);
}
.contact-map iframe {
    border-radius: var(--border-radius);
    height: 100%;
    min-height: 300px;
}

/* ===== FOOTER ===== */
#footer {
    background-color: #1c1c1c;
    color: #a0aec0;
    padding-top: 4rem;
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}
.footer-logo img {
    height: 50px;
    margin-bottom: 1rem;
}
.footer-column h3 {
    color: #fff;
    margin-bottom: 1.5rem;
}
.footer-column ul li {
    margin-bottom: 0.8rem;
}
.footer-column ul li a {
    color: #a0aec0;
}
.newsletter-form {
    display: flex;
}
.newsletter-form input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #4a5568;
    background-color: #2d3748;
    color: #fff;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}
.newsletter-form button {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.footer-bottom {
    border-top: 1px solid #4a5568;
    text-align: center;
    padding: 1.5rem 0;
}

/* ===== POP-UPS & MODALS ===== */
.popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}
.popup-content {
    background: var(--surface-color-light);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    position: relative;
    width: 90%;
    max-width: 500px;
    transform: scale(0.9);
    transition: var(--transition);
    text-align: center;
}
body.dark-mode .popup-content {
    background-color: var(--surface-color-dark);
}
.popup-overlay.active .popup-content {
    transform: scale(1);
}
.popup-close {
    position: absolute;
    top: 10px; right: 15px;
    background: none; border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted-light);
}
body.dark-mode .popup-close {
    color: var(--text-muted-dark);
}
.popup-content i {
    width: 60px;
    height: 60px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* WhatsApp Bubble */
.whatsapp-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transform: scale(0);
    transition: transform 0.3s ease;
}
.whatsapp-popup.active {
    transform: scale(1);
}
.whatsapp-popup a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #25D366;
    color: #fff;
    padding: 0.7rem 1.2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .vision-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--surface-color-light);
        transition: var(--transition);
        padding-top: 6rem;
        box-shadow: -10px 0 20px rgba(0,0,0,0.1);
    }
    body.dark-mode .nav-menu {
        background-color: var(--surface-color-dark);
    }
    .nav-menu.show-menu {
        right: 0;
    }
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }
    .nav-link, #header.sticky .nav-link, body.dark-mode #header.sticky .nav-link {
        color: var(--text-color-light);
    }
    body.dark-mode .nav-link {
        color: var(--text-color-dark);
    }
    .nav-toggle {
        display: block;
        z-index: 1001;
    }
    .hero-title { font-size: 2.5rem; }
    .hero-stats { flex-direction: column; gap: 2rem; padding: 1.5rem; }
}

/* ===== ANIMATIONS ON SCROLL ===== */
[class*="anim-"] {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.anim-fade-in { transform: translateY(20px); }
.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}
/* ===== POSITIONNEMENT DES POPUPS WHATSAPP ===== */

/* Le popup de "Question" (vert) reste en bas */
#whatsapp-popup-question {
    bottom: 20px;
}

/* Le popup de "Commande" (orange) se place au-dessus */
#whatsapp-popup-order {
    bottom: 90px; /* 20px (base) + 60px (hauteur du 1er) + 10px (marge) */
}

/* On change la couleur du bouton "Commander" pour qu'il soit orange */
#whatsapp-popup-order a {
    background-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(243, 112, 33, 0.4);
}