/* ==========================================================================
   223 ZOOM - STYLESHEET (Mobile-First Luxury & iOS/Android Touch Optimized)
   ========================================================================== */

/* --- Custom Variables & Theme Tokens --- */
:root {
    --brand-primary: #ea580c;
    --brand-primary-hover: #c2410c;
    --brand-secondary: #e11d48;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

/* Glass Panel Component (High Performance Backdrop Filter) */
.glass-panel {
    background-color: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

html.dark .glass-panel {
    background-color: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Base resets & Mobile Smoothness */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
    min-width: 320px;
    -webkit-tap-highlight-color: transparent;
}

/* iOS & Android Mobile Input Optimization (Stops Auto-Zoom on Focus) */
@media (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="tel"],
    input[type="email"],
    input[type="date"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
        min-height: 44px;
    }
}

/* Fast Click & Touch Target Rules */
button, a, input, select, textarea {
    touch-action: manipulation;
}

/* Custom Modern Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

/* Hide Scrollbar for Horizontal Touch Swiping */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* Navigation Tabs */
.nav-tab {
    transition: all 0.2s ease-in-out;
    font-weight: 600; /* Slightly bolder */
    color: var(--color-slate-700, #374151); /* Default text color */
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    text-decoration: none;
}

/* Hover effect for better visibility */
.nav-tab:hover {
    background-color: rgba(234, 88, 12, 0.08); /* Light orange overlay */
    color: var(--brand-primary);
}

/* Active tab styling */
.nav-tab.active {
    background-color: rgba(234, 88, 12, 0.2);
    color: #ffffff;
    font-weight: 700;
    border-bottom: 2px solid var(--brand-primary);
}

/* Dark mode adjustments */
html.dark .nav-tab {
    color: #d1d5db; /* Light slate */
}
html.dark .nav-tab:hover {
    background-color: rgba(234, 88, 12, 0.15);
    color: #ffffff;
}
html.dark .nav-tab.active {
    background-color: rgba(234, 88, 12, 0.3);
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Hero Carousel Transitions */
.hero-slide {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 10;
}

/* Series Cards Touch & Hover Effect */
.series-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
    .series-card:hover {
        transform: translateY(-4px);
        border-color: rgba(234, 88, 12, 0.5) !important;
    }
}

/* Category Pills in Sidebar & Horizontal Filter Bar */
.category-pill-btn.active {
    background-color: rgba(234, 88, 12, 0.2) !important;
    color: #ea580c !important;
    border-color: rgba(234, 88, 12, 0.4) !important;
}

/* Image Anti-Scraping Protection */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.series-card img, .hero-slide img {
    -webkit-touch-callout: none;
}

/* Safe Area Insets for Modern Smartphones (iPhone X -> iPhone 16 Pro, Samsung Galaxy, Pixel) */
.safe-bottom-padding {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.safe-top-padding {
    padding-top: max(0.5rem, env(safe-area-inset-top));
}

/* Mobile Quick Navigation Floating Bar */
.mobile-bottom-bar {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

/* ═══════════════════════════════════════════════
   BEFORE / AFTER COMPARATOR SLIDER
   ═══════════════════════════════════════════════ */
.ba-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
    touch-action: pan-y;
}

.ba-overlay-clip {
    will-change: clip-path;
    transition: none;
}

.ba-divider-line {
    width: 2px;
    background: #ea580c;
    box-shadow: 0 0 10px rgba(234, 88, 12, 0.9);
    pointer-events: none;
    transform: translateX(-50%);
}

.ba-handle {
    user-select: none;
    cursor: ew-resize;
    touch-action: none;
}

/* ═══════════════════════════════════════════════
   RECEIPT PRINT STYLES (Factures & Reçus Studio)
   ═══════════════════════════════════════════════ */
@media print {
    body * {
        visibility: hidden;
    }
    #receipt-modal, #receipt-modal * {
        visibility: visible;
    }
    #receipt-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
        color: black !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    .no-print {
        display: none !important;
    }
}


