/* style.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    /* On ajoute un padding en bas pour que le contenu ne soit pas caché par la barre flottante */
    padding-bottom: 90px; 
}

/* --- PAGE PUBLIQUE (index.html) --- */
.viewer-container {
    display: flex;
    max-width: 1400px;
    margin: 20px auto;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: 80vh; 
    border-radius: 12px;
    overflow: hidden;
}

.video-section {
    flex: 2.5;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-section iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.product-section {
    flex: 1;
    padding: 25px;
    background: #fff;
    height: 100%; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.product-card {
    flex: 1; 
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease;
    min-height: 0; 
}

.product-img {
    width: 100%;
    height: 250px; 
    object-fit: contain;
    margin-bottom: 15px;
    flex-shrink: 0; 
}

.product-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    flex-shrink: 0;
}

#p-desc {
    flex-grow: 1; 
    min-height: 0; 
    overflow-y: auto; 
    margin-bottom: 15px;
    padding-right: 10px;
    line-height: 1.5;
    color: #555;
    scrollbar-width: thin;
}

.price-tag {
    font-size: 2rem;
    color: #e91e63;
    font-weight: bold;
    margin: 10px 0;
    flex-shrink: 0; 
}

/* On cache le bouton principal sur mobile si on veut ne garder que la barre flottante, 
   mais par sécurité on le laisse ici en desktop */
.btn-buy {
    display: block;
    background: #000;
    color: white;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    flex-shrink: 0; 
    text-transform: uppercase;
}
.btn-buy:hover { background: #333; }

.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #888;
}

/* --- NOUVEAU : BARRE FLOTTANTE (STICKY BAR) --- */
.sticky-product-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: white;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    transform: translateY(100%); /* Caché par défaut (en bas) */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sticky-product-bar.visible {
    transform: translateY(0); /* Visible */
}

.sb-content {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: space-between;
}

.sb-left {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden; /* Pour couper le texte trop long */
}

.sb-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #eee;
}

.sb-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.sb-name {
    font-weight: bold;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.sb-price {
    color: #e91e63;
    font-weight: bold;
    font-size: 1rem;
}

.sb-btn {
    background: #000;
    color: white;
    padding: 12px 25px;
    border-radius: 30px; /* Bouton arrondi style "Pill" */
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-left: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 1024px) {
    .viewer-container {
        flex-direction: column;
        height: auto;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
    }
    
    .video-section { 
        height: 40vh; /* Vidéo un peu plus grande */
    }
    
    .product-section { 
        padding: 20px;
        min-height: 400px; /* Espace pour scroller la description */
    }

    /* Ajustement barre flottante mobile */
    .sticky-product-bar {
        height: 70px;
        padding: 0 15px;
    }
    
    .sb-img {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .sb-name { font-size: 0.95rem; }
    
    .sb-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
}