/* Réinitialisation de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de couleur et polices */
:root {
    --bg-color: #FEFBF8; /* Rose très pâle du logo */
    --text-color: #1a1a1a; /* Noir doux */
    --primary-color: #E83E8C; /* Rose du logo */
    --card-bg-color: rgba(255, 255, 255, 0.9);
    --footer-bg-color: #1a1a1a;
    --font-main: 'Roboto', sans-serif;
    --font-headings: 'Montserrat', sans-serif;
}

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

/* Header et Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top:0rem;
    padding-bottom:0rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: var(--bg-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo {
    height: 100px;
    width: auto;
}

/* Menu Burger */
.burger-menu {
    position: relative;
}

.burger-icon {
    width: 30px;
    height: 22px;
    cursor: pointer;
    z-index: 101;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.line {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.burger-menu.active .line1 {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active .line2 {
    opacity: 0;
}

.burger-menu.active .line3 {
    transform: rotate(-45deg) translate(7px, -8px);
}

/* Liens de navigation */
.nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(254, 251, 248, 0.95);
    backdrop-filter: blur(5px);
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.nav-links.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.nav-links li {
    margin: 2rem 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 2rem;
    font-family: var(--font-headings);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Section Hero */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
    padding-top: 140px; 
}

.hero .content {
    padding: 1rem;
    z-index: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 95vw;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
}

.overlay {
    display: none;
}

/* Sections (Produits, Contact) */
.products-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 1rem 4rem 1rem;
    text-align: center;
}

h2 {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.products-container, .videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1400px; 
    align-items: stretch; 
}

/* Carte Produit (état teaser) */
.product-card, .video-card {
    background-color: var(--card-bg-color);
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 15px;
    transition: all 0.4s ease;
    display: flex; 
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.product-card:hover:not(.expanded) {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.product-card h3 {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0.2rem 0;
    line-height: 1.3;
}

.teaser-image-wrapper + h3 {
    margin-top: 1rem;
}

.product-card p {
    font-size: 1rem;
    color: #555;
}

.product-card p.price {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.product-card.hidden {
    display: none;
    opacity: 0;
}

/* STRUCTURE POUR L'ALIGNEMENT */
.product-content.teaser {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1; 
}

.teaser-image-wrapper {
    flex-grow: 1; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    width: 100%;
    margin-bottom: 1rem; 
}

.teaser-image, .teaser-image-wrapper > video {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}


/* Carte Produit (état étendu) */
.product-card.expanded {
    grid-column: 1 / -1; 
    background-color: var(--card-bg-color);
}

.product-content.full {
    display: none;
    width: 100%;
}

.full-product-title {
    font-family: var(--font-headings);
    font-size: 2rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
}

/* Conteneur du contenu complet */
.full-content-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 2rem;
}

.full-content-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #eee;
    text-align: left;
}

.full-content-card img.zoomable-image {
    width: 100%;
    border-radius: 8px;
    height: 400px;
    object-fit: cover;
    cursor: zoom-in;
}

.full-content-card.description h4 {
    font-family: var(--font-headings);
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}
.full-content-card.description h4:first-child {
    margin-top: 0;
}

.full-content-card.description p {
    font-size: 1rem;
    line-height: 1.6;
}
.full-content-card.description p strong {
    color: var(--primary-color);
}

/* Aperçu flottant de l'image */
.image-preview-float {
    position: fixed;
    display: none;
    z-index: 9999;
    pointer-events: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: opacity 0.2s ease-in-out;
}

.image-preview-float img {
    display: block;
    max-height: 85vh;
    max-width: 85vw;
    width: auto;
    height: auto;
    border-radius: 10px;
}


/* Boutons */
.product-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background-color: var(--text-color);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-headings);
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.product-button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.product-button a {
    color: inherit;
    text-decoration: none;
}

.product-button.product-return {
    margin-top: 1rem;
    /* Styles spécifiques supprimés pour qu'il hérite du style de .product-button */
}


/* Checkbox et Stripe */
.terms-checkbox {
    margin: 15px 0;
    font-size: 12px;
    color: #666;
    text-align: center;
    width: 100%;
}
.terms-checkbox input[type="checkbox"] {
    margin-right: 8px;
}
.terms-checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.visually-hidden {
    display: none !important;
}

.stripe-placeholder-button {
    background-color: #ddd; 
    color: #888;
    border: none;
    padding: 12px 20px;    
    font-size: 16px;      
    border-radius: 50px;    
    cursor: not-allowed;   
    opacity: 0.8;          
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
    text-align: center;
    font-family: var(--font-headings);
    margin-top: 10px;
}

.stripe-button-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top:2rem;
}

/* ----- STYLES POUR LA SECTION VIDEOS ----- */
.videos-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.video-card {
    padding: 0;
    justify-content: center;
    align-items: center;
}

.tiktok-embed {
    max-width: 100% !important;
    width: 100% !important;
    min-height: 600px;
    border: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.tiktok-thanks {
    grid-column: 1 / -1; /* Prend toute la largeur de la grille */
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 2rem 0;
}

/* Footer */
.footer {
    background-color: var(--footer-bg-color);
    padding: 2rem 1rem;
    text-align: center;
    color: #fff;
}

.footer-content a {
    color: #fff;
    text-decoration: none;
    margin: 0 0.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--primary-color);
}

/* ----- STYLES POUR LA VUE PRODUIT AGRANDIE (PC UNIQUEMENT) ----- */
@media (min-width: 769px) {
    /* Quand un produit est agrandi, le body devient un conteneur flex vertical */
    body.product-view-active {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    
    /* Le 'main' prend tout l'espace disponible entre le header et le footer */
    body.product-view-active main {
       flex-grow: 1;
       display: flex;
       flex-direction: column;
    }
    
    /* La section #products s'étire et centre son contenu (la carte agrandie) */
    body.product-view-active #products.products-section {
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 1rem;
    }

    /* On agrandit la carte pour qu'elle soit plus imposante */
    body.product-view-active .product-card.expanded {
        width: 100%;
        max-width: 1500px;
    }

    /* On agrandit la hauteur des images en se basant sur la hauteur de la fenêtre */
    body.product-view-active .full-content-card img.zoomable-image {
        height: 55vh; 
    }
}


/* Responsive Design */
@media (max-width: 1250px) { 
    .products-container, .videos-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}


@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }

    .products-container, .videos-container {
        grid-template-columns: 1fr; 
    }

    .full-content-container {
        grid-template-columns: 1fr;
    }

    .full-content-card img.zoomable-image {
        height: auto; 
    }
    
    .hero {
        padding-top: 100px;
    }

    .navbar {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-top:0rem;
        padding-bottom:0rem;
    }
    
    .logo {
        height: 80px;
    }
}