/* =========================================================================
   MODERN.CSS - DESIGN SOPHISTIQUÉ & GLASSMORPHISM (SHOPACT)
   Cette couche CSS vient surcharger style.css avec des effets premium.
   ========================================================================= */

:root {
    /* Ombres Ultra-Premium */
    --shadow-sm: 0 4px 12px rgba(26, 42, 64, 0.05);
    --shadow-md: 0 10px 30px rgba(26, 42, 64, 0.08);
    --shadow-lg: 0 20px 50px rgba(26, 42, 64, 0.12);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    
    /* Variables de Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: blur(16px);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---------- 1. HEADER GLASSMORPHISM ---------- */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

/* ---------- 2. ANIMATIONS DES BOUTONS ---------- */
.btn {
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.4);
}

.btn-outline:hover {
    background: var(--color-bg-subtle);
    transform: translateY(-1px);
}

.icon-btn:hover {
    transform: scale(1.05);
}

/* ---------- 3. CARTES PRODUITS PREMIUM ---------- */
.product-card {
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.03);
    background: #ffffff;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0,0,0,0.08);
}

/* Effet zoom délicat sur l'image au survol */
.product-card .img-placeholder img {
    transition: transform 0.5s ease;
}
.product-card:hover .img-placeholder img {
    transform: scale(1.03);
}

/* ---------- 4. MODALES GLASSMORPHISM ---------- */
.modal-overlay,
.cart-overlay {
    background: rgba(26, 42, 64, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.modal-dialog {
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

/* Bottom Sheet Cart (Panier) premium */
.cart-drawer {
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

/* ---------- 5. BADGES & TYPOGRAPHIE ---------- */
.hero-badge,
.product-badge {
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    letter-spacing: 0.5px;
    font-weight: 600;
}

h1, h2, h3, .logo span {
    letter-spacing: -0.5px; /* Touche moderne typographique */
}

/* Agrandissement des vignettes dans la modale */
.modal-thumbnails { display: flex; gap: 12px; width: 100%; flex-wrap: wrap; justify-content: center; margin-top: 15px; }
.modal-thumb { flex: 1 1 0; min-width: 60px; max-width: 120px; height: 90px; border-radius: var(--radius-md); cursor: pointer; transition: transform 0.2s ease; }
.modal-thumb:hover { transform: scale(1.05); }


/* Agrandissement léger de l'image principale de la modale */
.modal-main-image { height: 320px; max-height: 50vh; }
@media (min-width: 768px) { .modal-main-image { max-height: 400px; height: 400px; } }


/* Ajustement mobile de la modale pour eviter le scroll horizontal */
.modal-dialog { overflow-x: hidden; }
@media (max-width: 767px) {
    .modal-body { padding: 16px; }
}


/* Eviter que le texte des boutons et du titre ne se coupe sur petits ecrans */
.modal-body { word-wrap: break-word; overflow-wrap: break-word; }
.modal-body .btn { white-space: normal; text-align: center; line-height: 1.2; height: auto; padding-top: 12px; padding-bottom: 12px; }

/* ---------- 6. SKELETON LOADING ---------- */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-card {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.skeleton-shimmer {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: inherit;
}

.skeleton-shimmer::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.8s infinite;
}

/* ---------- 7. ANIMATIONS AU SCROLL (IntersectionObserver) ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Délai progressif pour l'effet cascade (appliqué via JS) */
.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.06s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.12s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.18s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.24s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.30s; }

/* ---------- 8. MICRO-ANIMATIONS PREMIUM ---------- */

/* Effet ripple au clic sur les boutons */
.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 60%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.btn:active::after {
    opacity: 1;
    transform: scale(2.5);
    transition: 0s;
}

/* Pulse amélioré sur le badge panier */
@keyframes cart-pulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.35); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.cart-count {
    transition: background 0.3s ease;
}

.bounce .cart-count,
.bounce {
    animation: cart-pulse 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Transition douce sur les boutons de taille quand sélectionnés */
.size-btn {
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.size-btn.selected {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(26, 42, 64, 0.2);
}

/* Effet glow sur le bouton Commander via WhatsApp */
@keyframes glow-orange {
    0%, 100% { box-shadow: 0 4px 14px rgba(255, 102, 0, 0.35); }
    50% { box-shadow: 0 4px 24px rgba(255, 102, 0, 0.55), 0 0 12px rgba(255, 102, 0, 0.2); }
}

.btn-order,
.btn-modal-whatsapp,
.btn-whatsapp-direct {
    animation: glow-orange 3s ease-in-out infinite;
}

/* ---------- 9. HERO IMMERSIF ---------- */
@keyframes hero-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(26,42,64,0.92) 0%, rgba(26,42,64,0.85) 40%, rgba(255,102,0,0.15) 100%);
    background-size: 200% 200%;
    animation: hero-gradient-shift 8s ease infinite;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,102,0,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255,102,0,0.03) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.hero-overlay,
.hero-content {
    position: relative;
    z-index: 1;
}

/* ---------- 10. PANIER AMÉLIORÉ ---------- */
.cart-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.cart-total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-top: 8px;
    border-top: 2px solid var(--color-navy);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-navy);
}

/* ---------- 11. QUANTITÉ MODALE ---------- */
.qty-selector {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.qty-selector button {
    width: 38px;
    height: 38px;
    background: #f8fafc;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--color-navy);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-selector button:hover {
    background: #e2e8f0;
}

.qty-selector span {
    min-width: 36px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-navy);
}

