/* assets/css/shop.css */

/* --- VARIABLES SPÉCIFIQUES BOUTIQUE --- */
:root { 
    --shop-bg: #fafafa; 
    --shop-card-bg: #ffffff; 
    --shop-text: #1a1a1a; 
    --shop-accent: #000000; 
    --shop-highlight: #00f2ea; 
    --shop-success: #00C853; 
    --shop-danger: #FF3B30; 
    --shop-wave: #0085CC;
    --shop-radius: 18px;
    --shop-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
    --story-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* On force le body de la boutique pour avoir le bon fond */
body.shop-page { 
    background: var(--shop-bg); 
    color: var(--shop-text); 
    font-family: 'Poppins', sans-serif; 
    padding-bottom: 100px; 
    -webkit-tap-highlight-color: transparent;
}

.shop-container { max-width: 600px; margin: 0 auto; min-height: 100vh; }

/* --- HEADER & STORIES --- */
.shop-header { background: #000; color: white; padding: 40px 20px 30px; text-align: center; border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; margin-bottom: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.video-header { width: 100%; height: 320px; object-fit: cover; border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; }

/* Photo Profil & Badge */
.profile-pic-container { position: relative; width: 85px; height: 85px; margin: 0 auto; z-index: 2; display: inline-block; cursor: pointer; }
.profile-pic { width: 100%; height: 100%; border-radius: 50%; border: 4px solid #fff; object-fit: cover; box-shadow: 0 5px 15px rgba(0,0,0,0.2); position: relative; z-index: 3; background: #333; }
.story-ring { position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px; border-radius: 50%; background: var(--story-gradient); z-index: 1; animation: spin 10s linear infinite; }
.story-badge { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); background: red; color: white; font-size: 0.6rem; font-weight: 800; padding: 3px 8px; border-radius: 10px; white-space: nowrap; border: 2px solid white; z-index: 10; animation: bounce 1s infinite; }

/* --- BARRE DE RECHERCHE & CATÉGORIES --- */
.search-box { padding: 15px 20px; position: sticky; top: 0; background: rgba(250,250,250,0.95); backdrop-filter: blur(10px); z-index: 99; }
.search-input { width: 100%; padding: 14px 20px; border-radius: 50px; border: none; outline: none; background: white; box-shadow: 0 4px 15px rgba(0,0,0,0.05); font-family: 'Poppins', sans-serif; font-size: 0.95rem; }

.cat-bar { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px 15px; white-space: nowrap; scrollbar-width: none; }
.cat-btn { padding: 8px 18px; background: white; border: none; border-radius: 30px; color: #666; font-size: 0.85rem; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: 0.3s; text-decoration: none; }
.cat-btn.active { background: #000; color: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transform: scale(1.05); }

/* --- GRILLE PRODUITS & CARTES --- */
.products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 15px; }

.shop-card { 
    background: var(--shop-card-bg); 
    border-radius: var(--shop-radius); 
    border: none; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    box-shadow: var(--shop-shadow); 
    position: relative; 
    transition: transform 0.2s; 
    opacity: 0; 
    animation: fadeInUp 0.6s ease-out forwards; 
}
.shop-card:active { transform: scale(0.97); }

/* Slider Images */
.slider-container { width: 100%; aspect-ratio: 1/1; position: relative; background: #f0f0f0; }
.slider-scroll { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.slider-scroll::-webkit-scrollbar { display: none; }
.slider-item { min-width: 100%; height: 100%; scroll-snap-align: center; position: relative; }
.slider-item img { width: 100%; height: 100%; object-fit: cover; }

/* Badges Produits */
.badge-vedette { position: absolute; top: 10px; left: 10px; background: rgba(255, 215, 0, 0.9); backdrop-filter: blur(4px); color: #000; padding: 4px 10px; font-size: 0.65rem; font-weight: 800; border-radius: 8px; z-index: 5; animation: breathe 2s infinite; }
.badge-promo { position: absolute; top: 10px; right: 10px; background: rgba(255, 59, 48, 0.9); color: white; padding: 4px 10px; font-size: 0.65rem; font-weight: 800; border-radius: 8px; z-index: 5; animation: breathe 2s infinite; }
.img-counter { background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); border-radius: 12px; font-size: 0.65rem; padding: 4px 8px; position: absolute; top: 10px; right: 10px; color: white; z-index: 4; }
.countdown-timer { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: white; text-align: center; font-size: 0.7rem; font-weight: 600; padding: 15px 0 5px; z-index: 4; display:none; }
.btn-play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,0.25); backdrop-filter: blur(5px); border: 2px solid white; color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; z-index: 10; cursor: pointer; animation: breathe 2s infinite; }

/* Infos & Boutons */
.info { padding: 12px; display: flex; flex-direction: column; justify-content: space-between; flex-grow: 1; }
.prod-title { font-size: 0.85rem; font-weight: 500; color: #444; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.price { color: #000; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.5px; }
.old-price { text-decoration: line-through; color: #aaa; font-size: 0.8rem; font-weight: 400; }
.btn-add { width: 100%; background: #000; color: white; border: none; padding: 10px; border-radius: 12px; font-weight: 600; font-size: 0.8rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: 0.2s; }
.btn-add:active { transform: scale(0.95); background: #333; }

/* --- MODALES & PANIER --- */
.floating-cart { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: rgba(30, 30, 30, 0.95); backdrop-filter: blur(10px); padding: 12px 25px; border-radius: 50px; font-weight: 600; color: white; display: flex; align-items: center; gap: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); z-index: 999; cursor: pointer; min-width: 200px; justify-content: center; border: 1px solid rgba(255,255,255,0.1); }
.modal-overlay, .tiktok-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 2000; display: none; align-items: center; justify-content: center; }
.modal-content { background: #fff; width: 85%; max-width: 400px; border-radius: 25px; padding: 25px; text-align: center; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 50px rgba(0,0,0,0.3); }

/* Inputs Formulaire */
.commune-select { width: 100%; padding: 14px; margin: 10px 0; border-radius: 12px; border: 1px solid #eee; background: #f9f9f9; font-size: 1rem; font-family: 'Poppins', sans-serif; outline: none; box-sizing: border-box; }
.commune-select:focus { border-color: #000; background: #fff; }
.btn-valid-wa { width: 100%; background: #25D366; color: white; font-weight: bold; padding: 14px; border-radius: 50px; border: none; font-size: 1rem; cursor: pointer; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); margin-top: 10px;}

/* Zone Wave Spécifique */
.wave-container { background:#f0f8ff; padding:15px; border-radius:12px; margin:15px 0; border:1px solid #b6d4fe; text-align:left; }
.wave-number-box { font-size:1.4rem; font-weight:bold; color:var(--shop-wave); text-align:center; background:white; padding:8px; border-radius:8px; margin:5px 0; border:2px solid var(--shop-wave); }
.wave-input-error { border-color: red !important; }

/* --- STORY VIEWER & TIKTOK --- */
#story-viewer { background: #000; }
.story-container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.story-media { max-width: 100%; max-height: 100vh; object-fit: contain; }
.story-close-btn { position: absolute; top: 40px; right: 20px; color: white; font-size: 2rem; cursor: pointer; z-index: 3000; background: rgba(0,0,0,0.5); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;}
.story-nav-area { position: absolute; top: 0; bottom: 0; width: 30%; z-index: 2500; }
.story-prev { left: 0; } .story-next { right: 0; }

.tiktok-overlay { background: #000; z-index: 3000; flex-direction: column; }
.tiktok-video { width: 100%; height: 100%; object-fit: contain; max-width: 500px; }
.tiktok-close { position: absolute; top: 20px; right: 20px; color: white; font-size: 2rem; cursor: pointer; z-index: 3002; }
.tiktok-footer { position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,0.9)); color: white; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.tiktok-btn { background: #25D366; color: white; border: none; padding: 15px; width: 100%; max-width: 400px; border-radius: 50px; font-weight: bold; font-size: 1.1rem; }

/* --- ANIMATIONS & EXTRAS --- */
.fomo-notification { position: fixed; bottom: 90px; left: 10px; background: white; padding: 10px 15px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 10px; z-index: 1500; transform: translateX(-150%); transition: transform 0.5s; border-left: 5px solid var(--shop-success); max-width: 250px; font-size: 0.85rem; font-weight: 500;}
.flying-img { position: fixed; z-index: 9999; border-radius: 18px; pointer-events: none; transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1); box-shadow: var(--shop-shadow); }

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.1); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
/* --- SECTION AVIS (NOUVEAU) --- */
.reviews-section { background: #f9f9f9; padding: 15px; border-top: 1px solid #eee; display: none; /* Caché par défaut */ }
.reviews-section.active { display: block; animation: fadeInUp 0.3s; }

.review-btn-toggle { background: transparent; border: 1px solid #ddd; padding: 8px; width: 100%; border-radius: 8px; font-size: 0.8rem; margin-top: 10px; cursor: pointer; color: #555; }
.review-btn-toggle:hover { background: #eee; }

.star-rating { color: #FFD700; font-size: 0.9rem; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 5px; }
.star-input input { display: none; }
.star-input label { font-size: 1.5rem; color: #ddd; cursor: pointer; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #FFD700; }

.single-review { border-bottom: 1px solid #eee; padding: 10px 0; }
.single-review:last-child { border-bottom: none; }
.rev-header { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: bold; margin-bottom: 3px; }
.rev-text { font-size: 0.85rem; color: #555; line-height: 1.4; }
.rev-date { font-size: 0.7rem; color: #aaa; }

.review-form input, .review-form textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 10px; font-family: inherit; box-sizing: border-box; }
.btn-submit-review { background: #000; color: white; border: none; padding: 10px; border-radius: 8px; width: 100%; font-weight: bold; cursor: pointer; }
