/* --- RESET & BASES --- */
html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --accent-color: #888888;
    --highlight-color: #ffffff;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
}

/* --- HEADER --- */
header {
    padding: 20px 40px;
    position: sticky;
    top: 0;
    background-color: rgba(18, 18, 18, 0.95);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links a {
    color: var(--accent-color);
    text-decoration: none;
    margin-left: 30px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--highlight-color);
}

.hamburger {
    display: none;
}

/* --- SECTIONS --- */
section {
    scroll-margin-top: 80px;
}

.page-section {
    padding: 60px 0;
}

.section-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #333, transparent);
    margin: 0 auto;
    width: 80%;
}

/* --- HERO & PORTFOLIO --- */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 300;
}

.subtitle {
    color: var(--accent-color);
}

.gallery-container {
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry {
    column-count: 3;
    column-gap: 20px;
}

.item {
    margin-bottom: 20px;
    break-inside: avoid;
}

.item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    filter: grayscale(20%);
    transition: 0.3s;
    cursor: pointer;
}

.item img:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* --- CORRECTION API OBSOLÈTE (H1) --- */
/* On force la taille des titres H1 dans les sections pour que le navigateur ne devine pas */
.product-details h1,
.about-text h1 {
    font-size: 2.5rem;
    /* Taille explicite */
    line-height: 1.2;
    margin-bottom: 15px;
    font-weight: 600;
    /* On s'assure qu'ils sont bien gras */
}

/* --- SHOP SECTION --- */
.shop-section {
    background-color: #161616;
    width: 100%;
}

.shop-container {
    display: flex;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    gap: 60px;
}

.product-image,
.product-details {
    flex: 1;
}

/* Correction Contraste : Texte sous le slider */
.product-image p {
    color: #e0e0e0 !important;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}

/* Nouveaux styles textes Shop */
.hook-text {
    font-size: 1.1rem;
    color: #eee;
    margin-bottom: 25px;
    line-height: 1.6;
    font-style: italic;
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
}

.benefits-list {
    list-style: none;
    margin-bottom: 30px;
}

.benefits-list li {
    margin-bottom: 10px;
    color: #e0e0e0;
    font-size: 0.95rem;
}

/* Éclairci pour le contraste */
.benefits-list strong {
    color: white;
}

.price {
    font-size: 2rem;
    margin-bottom: 20px;
    color: white;
}

a.lemonsqueezy-button {
    display: inline-block !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 36px !important;
    border-radius: 4px !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
}

a.lemonsqueezy-button:hover {
    background: #e0e0e0 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2) !important;
}

a.lemonsqueezy-button:active {
    transform: translateY(0);
}

/* Correction Contraste : Texte Sécurité */
.secure-info {
    font-size: 0.8rem;
    color: #e0e0e0;
    margin-top: 15px;
}

/* --- STORYTELLING BLOCK --- */
.storytelling-block {
    max-width: 800px;
    margin: 40px auto 80px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.storytelling-block h2 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 1.5rem;
}

.story-content p {
    margin-bottom: 20px;
    color: #ccc;
    text-align: justify;
}

.story-content .lead {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 30px;
}

/* --- FEATURES TILES (Tuiles cliquables) --- */
.features-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.feature-item {
    flex: 1;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
    position: relative;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-item .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.read-more {
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Accent color était trop sombre */

/* --- ABOUT SECTION --- */
.about-container {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    gap: 60px;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    filter: grayscale(100%);
}

.about-text {
    flex: 1.5;
}

.contact-box {
    margin-top: 40px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Correction Hiérarchie : Style pour le H2 (anciennement H3) */
.contact-box h2 {
    margin-top: 0;
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.email-link {
    color: white;
    font-size: 1.2rem;
}

/* --- SLIDER AVANT/APRÈS --- */
.ba-slider {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    overflow: hidden;
    border-radius: 4px;
}

.ba-before,
.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ba-before img,
.ba-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-after {
    width: 50%;
    border-right: 2px solid white;
    z-index: 2;
    overflow: hidden;
}

/* IMPORTANT : Empêcher l'image 'Après' d'être déformée quand on coupe le conteneur */
.ba-after img {
    width: 100vw;
    max-width: 600px;
    /* Ajuste cette valeur selon la largeur réelle de ta colonne image sur PC */
}

.ba-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: col-resize;
    z-index: 10;
    margin: 0;
}

.ba-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
}

/* --- MODALE TEXTE (Pop-up Tuiles) --- */
.text-modal-overlay {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.text-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.text-modal-content {
    background-color: #1a1a1a;
    padding: 40px;
    border-radius: 8px;
    max-width: 850px;
    /* 1. On élargit (était 600px) */
    width: 90%;
    max-height: 85vh;
    /* 2. La fenêtre ne dépassera jamais 85% de l'écran */
    overflow-y: auto;
    /* 3. Active le scroll interne si ça dépasse */
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.text-modal-overlay.active .text-modal-content {
    transform: translateY(0);
}

.close-text-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #888;
    z-index: 10;
}

.close-text-modal:hover {
    color: white;
}

#modal-title {
    margin-bottom: 20px;
    color: white;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.modal-body p {
    color: #ddd;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- NOUVEAU : GESTION IMAGE / TEXTE CÔTE À CÔTE (sur PC uniquement) --- */
@media (min-width: 768px) {
    .modal-body {
        display: flex;
        gap: 30px;
        /* Espace entre l'image et le texte */
        align-items: flex-start;
    }

    #modal-image {
        width: 45% !important;
        /* L'image prend 45% de l'espace à gauche */
        margin-bottom: 0 !important;
        flex-shrink: 0;
        /* Empêche l'image de s'écraser */
    }

    #modal-text {
        flex: 1;
        /* Le texte prend tout l'espace restant à droite */
    }
}

/* Personnalisation de la petite barre de scroll (Bonus esthétique) */
.text-modal-content::-webkit-scrollbar {
    width: 8px;
}

.text-modal-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.text-modal-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.text-modal-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .masonry {
        column-count: 1;
    }

    .shop-container,
    .about-container,
    .features-section {
        flex-direction: column;
        gap: 30px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 1500;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .nav-links.open {
        display: flex;
        opacity: 1;
    }

    .nav-links a {
        font-size: 1.5rem;
        margin: 20px 0;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 2000;
        position: relative;
    }

    .hamburger span {
        display: block;
        width: 30px;
        height: 3px;
        background: white;
        margin: 6px 0;
        transition: 0.4s;
    }

    .hamburger.toggle span:nth-child(1) {
        transform: rotate(-45deg) translate(-6px, 7px);
    }

    .hamburger.toggle span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.toggle span:nth-child(3) {
        transform: rotate(45deg) translate(-6px, -7px);
    }

    /* Ajustement Slider Mobile */
    .ba-after img {
        max-width: 90vw;
    }
}

/* --- SECTION EXEMPLES FINAUX --- */
.examples-section {
    max-width: 1200px;
    margin: 80px auto 40px auto;
    /* Espace au-dessus et en-dessous */
    padding: 0 20px;
    text-align: center;
}

.examples-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-subtitle {
    color: #ccc;
    /* Éclairci pour le contraste (était accent-color) */
    margin-bottom: 40px;
    font-style: italic;
}

.examples-grid {
    display: grid;
    /* Grid magique : s'adapte auto (4 colonnes sur grand écran, 2 sur moyen, 1 sur petit) */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.examples-grid img {
    width: 100%;
    height: 300px;
    /* On force une hauteur identique pour l'alignement */
    object-fit: cover;
    /* Coupe l'image proprement si le ratio n'est pas bon */
    border-radius: 4px;
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.examples-grid img:hover {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.5);
    z-index: 10;
}

/* --- LIGHTBOX IMAGES --- */
.lightbox {
    display: none;
    /* Caché par défaut */
    position: fixed;
    /* C'est ÇA le secret : sort du flux normal */
    z-index: 5000;
    /* Au-dessus de tout (Menu, Header, Textes...) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    /* Fond noir quasi opaque */
    justify-content: center;
    /* Centre l'image horizontalement */
    align-items: center;
    /* Centre l'image verticalement */
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    /* L'image ne dépasse jamais 90% de l'écran */
    max-height: 90vh;
    /* L'image ne dépasse jamais 90% de la hauteur */
    border: 2px solid white;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    animation: zoom 0.3s;
    /* Petite animation d'ouverture */
    object-fit: contain;
    /* Assure que l'image entière est visible */
}

/* Bouton fermer (X) */
.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 5001;
}

.close:hover {
    color: #bbb;
}

/* Animation de zoom simple */
@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ajustement mobile pour la croix */
@media (max-width: 768px) {
    .close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
}