/* ═══════════════════════════════════════════════════════════════
   Design V2 — Option A « Force & Précision »
   Force Mobiles | Charte graphique renforcée
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1. Remplacement de l'accent orange (plus vif, meilleur contraste) ─── */
:root {
    --accent:        #FF6B00;
    --accent-dark:   #e05500;
    --accent-light:  #ff8c38;
    --success:       #00C853;
    --success-dark:  #00a844;
    --warning:       #FF9800;
}

/* ─── 2. Boutons primaires — dégradé diagonal + ombre colorée ─────────── */
.btn-primary,
.btn.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
    border: none !important;
    box-shadow: 0 6px 22px rgba(255,107,0,0.32) !important;
    transition: all 0.25s cubic-bezier(0.25,0.8,0.25,1) !important;
}
.btn-primary:hover,
.btn.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%) !important;
    box-shadow: 0 10px 30px rgba(255,107,0,0.45) !important;
    transform: translateY(-2px) !important;
}

/* Bouton secondaire (WhatsApp hero) — conservé vert mais plus vif */
.btn-secondary,
.btn.btn-secondary {
    transition: all 0.25s cubic-bezier(0.25,0.8,0.25,1) !important;
}
.btn-secondary:hover,
.btn.btn-secondary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(37,211,102,0.4) !important;
}

/* ─── 3. Cartes produits — bordure supérieure colorée par marque ──────── */
/* ─── 3. Cartes produits — bordure supérieure colorée par marque ──────── */
.product-card {
    border-top: 4px solid transparent;
    /* Suppression des transitions transform et box-shadow pour améliorer les perfs */
    transition: border-color 0.2s !important;
    overflow: visible !important;
}

.product-card[data-brand="Blackview"] { border-top-color: #0d4a96; }
.product-card[data-brand="Ulefone"]   { border-top-color: #FF6B00; }
.product-card[data-brand="Oukitel"]   { border-top-color: #2e7d32; }
.product-card[data-brand="Doogee"]    { border-top-color: #7b1fa2; }

/* Suppression des animations de survol (hover) pour alléger la page d'accueil */
.product-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Forcer la désactivation de l'animation de l'image issue de styles.min.css */
.product-card:hover .product-image {
    transform: none !important;
}


/* ─── 4. Badge catégorie — style pill coloré par catégorie ───────────── */
.product-badge {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 4px 12px !important;
    border-radius: 50px !important;
    display: inline-block !important;
    margin-bottom: 8px !important;
}
.product-card[data-brand="Blackview"] .product-badge { background: #e8f0fd; color: #0d4a96; }
.product-card[data-brand="Ulefone"]   .product-badge { background: #fff3e0; color: #e05500; }
.product-card[data-brand="Oukitel"]   .product-badge { background: #e8f5e9; color: #2e7d32; }
.product-card[data-brand="Doogee"]    .product-badge { background: #f3e5f5; color: #7b1fa2; }

/* ─── 5. Badge En stock — vert succès #00C853 ─────────────────────────── */
.product-card-stock {
    color: var(--success) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
}
.product-card-stock i {
    font-size: 0.5rem !important;
    vertical-align: middle;
    /* Animation clignotante retirée */
    animation: none !important;
}

/* Forcer la désactivation de toute animation sur les boutons de la carte pour éviter tout clignotement résiduel */
.product-card-actions .btn {
    animation: none !important;
}

/* ─── 6. Badges spéciaux (Meilleure vente / Nouveau) ─────────────────── */
.badge-bestseller,
.badge-new,
.badge-promo {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 5px 11px;
    border-radius: 50px;
    color: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    pointer-events: none;
}
.badge-bestseller {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 3px 14px rgba(255,107,0,0.35);
}
.badge-new {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    box-shadow: 0 3px 14px rgba(0,200,83,0.35);
}
.badge-promo {
    background: linear-gradient(135deg, #e53935, #b71c1c);
    box-shadow: 0 3px 14px rgba(229,57,53,0.35);
}

/* Positionnement relatif nécessaire pour les badges absolus */
.product-card {
    position: relative;
}


/* ─── 8. Skeleton loading ────────────────────────────────────────────── */
@keyframes skeletonShimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton-pulse {
    background: linear-gradient(90deg, #f0f4f8 25%, #e4eaf2 50%, #f0f4f8 75%);
    background-size: 800px 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}
.product-card-skeleton {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(6,44,89,0.06);
    border-top: 4px solid #e8ecf4;
}
.skeleton-img  { height: 200px; width: 100%; }
.skeleton-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.skeleton-line { height: 12px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-price { height: 22px; width: 35%; }
.skeleton-btn   { height: 40px; width: 100%; border-radius: 50px; margin-top: 8px; }


/* ─── 10. Filtre prix slider ─────────────────────────────────────────── */
.price-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.price-filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary, #062c59);
    display: flex;
    align-items: center;
    gap: 6px;
}
.price-range-input {
    -webkit-appearance: none;
    appearance: none;
    width: 180px;
    height: 5px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--pct, 100%), #d1d9e6 var(--pct, 100%), #d1d9e6 100%);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}
.price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(255,107,0,0.4);
    cursor: pointer;
    transition: transform 0.15s;
}
.price-range-input::-webkit-slider-thumb:hover { transform: scale(1.2); }
.price-range-input::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    box-shadow: 0 2px 8px rgba(255,107,0,0.4);
    cursor: pointer;
}
.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-sec, #6b7a99);
    width: 180px;
}
#price-range-label {
    font-weight: 800;
    color: var(--accent);
}

/* ─── 11. Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .price-range-input { width: 130px; }
    .price-range-labels { width: 130px; }
}

/* ─── 11b. Fiche Technique — tableau mobile-responsive ───────────────── */
.specs-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(6,44,89,0.07);
}
.specs-table {
    min-width: 340px; /* force scroll on very narrow screens */
    width: 100%;
    border-collapse: collapse;
}
.specs-table th {
    white-space: nowrap;
    min-width: 120px;
}
@media (max-width: 600px) {
    .specs-table th,
    .specs-table td {
        font-size: 0.82rem;
        padding: 9px 12px;
    }
    .specs-table th {
        min-width: 100px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   12. Menu Mobile amélioré
   ═══════════════════════════════════════════════════════════════ */

/* Overlay sombre derrière le menu */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 998;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 900px) {
    /* Panneau latéral glissant */
    .nav {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: min(320px, 85vw) !important;
        height: 100dvh !important;
        background: linear-gradient(160deg, #062c59 0%, #0a3d7a 100%) !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: none !important;
        transition: left 0.32s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
        z-index: 999 !important;
        overflow-y: auto !important;
        box-shadow: 6px 0 40px rgba(0,0,0,0.25) !important;
        display: flex !important;
    }
    .nav.active {
        left: 0 !important;
        pointer-events: all !important;
    }

    /* En-tête du menu mobile */
    .nav-mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        flex-shrink: 0;
    }
    .nav-mobile-header .logo-text {
        color: #fff;
        font-family: 'Montserrat', sans-serif;
        font-weight: 800;
        letter-spacing: .04em;
    }
    .nav-mobile-header .logo-text span { color: var(--accent, #FF6B00); }

    /* Bouton fermer */
    .nav-close {
        background: rgba(255,255,255,0.1);
        border: none;
        color: #fff;
        width: 36px; height: 36px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 1rem;
        cursor: pointer;
        transition: background 0.2s;
        flex-shrink: 0;
    }
    .nav-close:hover { background: rgba(255,255,255,0.2); }

    /* Liste des liens */
    .nav-links {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 12px 0 !important;
        flex: 1;
    }
    .nav-links > li { width: 100%; }
    .nav-links > li > a,
    .nav-links > li > .nav-dropdown-toggle {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 14px 22px !important;
        color: rgba(255,255,255,0.88) !important;
        font-size: 0.97rem !important;
        font-weight: 600 !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
        transition: background 0.18s, color 0.18s !important;
        text-decoration: none;
        width: 100%;
        box-sizing: border-box;
    }
    .nav-links > li > a:hover,
    .nav-links > li > .nav-dropdown-toggle:hover {
        background: rgba(255,255,255,0.08) !important;
        color: #fff !important;
    }

    /* Icône dans les items nav */
    .nav-item-icon {
        width: 18px;
        text-align: center;
        opacity: 0.7;
        font-size: 0.88rem;
    }

    /* Flèche accordion */
    .nav-arrow {
        margin-left: auto !important;
        transition: transform 0.25s ease !important;
        font-size: 0.75rem !important;
        opacity: 0.6;
    }
    .nav-dropdown.open .nav-arrow { transform: rotate(180deg) !important; }

    /* Sous-menu accordion */
    .nav-submenu {
        position: static !important;
        background: rgba(0,0,0,0.2) !important;
        box-shadow: none !important;
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 1 !important;
        transform: none !important;
        transition: max-height 0.3s ease !important;
        padding: 0 !important;
        border-radius: 0 !important;
        pointer-events: none !important;
    }
    .nav-dropdown.open .nav-submenu {
        max-height: 400px !important;
        pointer-events: all !important;
    }
    .nav-submenu li a {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 12px 22px 12px 44px !important;
        color: rgba(255,255,255,0.75) !important;
        font-size: 0.88rem !important;
        font-weight: 500 !important;
        border-bottom: 1px solid rgba(255,255,255,0.04) !important;
        transition: background 0.15s, color 0.15s !important;
        text-decoration: none;
    }
    .nav-submenu li a:hover {
        background: rgba(255,255,255,0.08) !important;
        color: #fff !important;
    }
    .nav-submenu li a i { width: 16px; text-align: center; opacity: .75; }

    /* Point coloré pour les marques */
    .brand-dot {
        display: inline-block;
        width: 10px; height: 10px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    /* Pied de menu mobile — bouton WhatsApp */
    .nav-mobile-footer {
        display: flex !important;
        padding: 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
        flex-shrink: 0;
    }
    .nav-whatsapp-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 13px 20px;
        background: linear-gradient(135deg, #25D366, #1ebe5d);
        color: #fff !important;
        font-weight: 700;
        font-size: 0.9rem;
        border-radius: 50px;
        text-decoration: none !important;
        box-shadow: 0 4px 16px rgba(37,211,102,0.35);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .nav-whatsapp-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(37,211,102,0.5);
    }
    .nav-whatsapp-btn i { font-size: 1.1rem; }
}

/* Desktop : cacher les éléments mobile-only */
@media (min-width: 901px) {
    .nav-mobile-header,
    .nav-mobile-footer,
    .nav-overlay { display: none !important; }
    .nav-item-icon { display: none; }
    .brand-dot { display: none; }
}
