        /* =========================================
           1. VARIABLES & RESET
           ========================================= */
        :root {
            --color-primary: #050b14;
            --color-secondary: #0a1128;
            --color-accent: #d4af37;
            --color-accent-light: #f3e5ab;
            --color-accent-hover: #b5952f;
            --color-bg: #f8fafc;
            --color-text: #334155;
            --color-text-light: #64748b;
            --color-white: #ffffff;
            --border-radius: 12px;
            --transition-speed: 0.3s;
            --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            --shadow-gold: 0 20px 40px -10px rgba(212, 175, 55, 0.4);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body {
            font-family: 'Inter', sans-serif;
            color: var(--color-text);
            background-color: var(--color-bg);
            line-height: 1.6;
            overflow-x: hidden;
        }
        h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--color-primary); line-height: 1.2; }
        a { text-decoration: none; color: inherit; transition: color var(--transition-speed); }
        ul { list-style: none; }
        img, video { max-width: 100%; height: auto; display: block; }
        .container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }

        /* =========================================
           2. HEADER & NAVIGATION
           ========================================= */
        .site-header {
            position: fixed; top: 0; left: 0; width: 100%;
            background: rgba(5, 11, 20, 0.95);
            backdrop-filter: blur(15px);
            z-index: 1000;
            border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        }
        .header-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }
        .logo { display: flex; align-items: center; gap: 12px; color: var(--color-white); font-weight: 700; font-size: 1.25rem; }
        .logo-icon {
            width: 44px; height: 44px;
            background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
            color: var(--color-primary);
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.1rem;
            box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
        }
        .main-nav .nav-list { display: flex; gap: 32px; align-items: center; }
        .main-nav a { color: rgba(255, 255, 255, 0.85); font-weight: 500; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; padding: 8px 0; position: relative; }
        .main-nav a:hover, .main-nav a.active { color: var(--color-accent); }
        .main-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--color-accent); transition: width var(--transition-speed); }
        .main-nav a:hover::after { width: 100%; }
        
        .has-dropdown { position: relative; }
        .dropdown {
            position: absolute; top: 100%; left: -20px;
            background: var(--color-white); min-width: 300px;
            border-radius: var(--border-radius); box-shadow: var(--shadow-lg);
            opacity: 0; visibility: hidden; transform: translateY(10px);
            transition: all var(--transition-speed); padding: 12px 0; z-index: 100;
            border-top: 3px solid var(--color-accent);
        }
        .has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
        .dropdown li a { display: flex; align-items: center; padding: 12px 20px; color: var(--color-text); gap: 16px; }
        .dropdown li a:hover { background: var(--color-bg); color: var(--color-primary); }
        .dropdown li a::after { display: none; }
        .dd-icon { width: 44px; height: 44px; background: rgba(212, 175, 55, 0.1); color: var(--color-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
        .dd-text { display: flex; flex-direction: column; }
        .dd-title { font-weight: 600; font-size: 0.95rem; color: var(--color-primary); }
        .dd-desc { font-size: 0.8rem; color: var(--color-text-light); margin-top: 2px; }

        .mobile-menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
        .mobile-menu-toggle span { width: 24px; height: 2px; background: var(--color-white); transition: all var(--transition-speed); }

        /* =========================================
           3. HERO SECTION (VIBRANT METALS THEME)
           ========================================= */
        .hero-section {
            position: relative; min-height: 100vh;
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            padding: 120px 24px 140px;
            background: radial-gradient(ellipse at bottom, #1a233a 0%, #0a1128 40%, #050b14 100%);
            overflow: hidden;
        }

        /* Vibrant Background Elements */
        .hero-bg-pattern {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background-image: 
                linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
                linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
            background-size: 80px 80px;
            z-index: 1;
            animation: gridMove 40s linear infinite;
        }
        @keyframes gridMove { 0% { background-position: 0 0; } 100% { background-position: 80px 80px; } }

        .hero-bg-shapes .shape { position: absolute; z-index: 2; pointer-events: none; }

        /* Glowing Orbs (High Visibility) */
        .orb-gold {
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(212, 175, 55, 0.2) 40%, transparent 70%);
            filter: blur(60px);
            mix-blend-mode: screen;
        }
        .orb-silver {
            border-radius: 50%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(192, 192, 192, 0.1) 40%, transparent 70%);
            filter: blur(50px);
            mix-blend-mode: screen;
        }
        .orb-1 { width: 600px; height: 600px; top: -10%; left: -5%; animation: floatOrb1 15s ease-in-out infinite; }
        .orb-2 { width: 500px; height: 500px; bottom: 10%; right: -5%; animation: floatOrb2 18s ease-in-out infinite; }
        .orb-3 { width: 400px; height: 400px; top: 40%; left: 45%; animation: floatOrb3 20s ease-in-out infinite; }

        /* Floating Gold Coins (High Contrast) */
        .coin-gold {
            width: 100px; height: 100px; border-radius: 50%;
            background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.4);
            display: flex; align-items: center; justify-content: center;
            border: 3px solid rgba(255, 255, 255, 0.3);
        }
        .coin-inner { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.5rem; color: #4a3b10; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5); }
        .coin-1 {top: 12%;right: 50%; animation: floatCoin1 8s ease-in-out infinite, rotateCoin 12s linear infinite; }
        .coin-2 { bottom: 25%; left: 8%; width: 70px; height: 70px; animation: floatCoin2 10s ease-in-out infinite, rotateCoin 15s linear infinite reverse; }
        .coin-2 .coin-inner { font-size: 1.1rem; }

        /* Floating Silver Bars */
        .bar-silver {
            background: linear-gradient(135deg, #e0e0e0, #ffffff, #a0a0a0, #ffffff, #c0c0c0);
            border-radius: 6px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.9);
        }
        .bar-1 { width: 140px; height: 70px; top: 20%; left: 5%; transform: rotate(-15deg); animation: floatBar1 12s ease-in-out infinite; }
        .bar-2 { width: 100px; height: 50px; bottom: 15%; right: 8%; transform: rotate(10deg); animation: floatBar2 14s ease-in-out infinite; }

        /* Abstract Geometric Lines */
        .geo-line { height: 2px; background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.8), transparent); }
        .line-1 { width: 400px; top: 30%; right: 0; transform: rotate(45deg); animation: pulseLine 4s ease-in-out infinite; }
        .line-2 { width: 300px; bottom: 30%; left: 0; transform: rotate(-30deg); animation: pulseLine 5s ease-in-out infinite 1s; }

        /* Animations */
        @keyframes floatOrb1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 60px) scale(1.1); } }
        @keyframes floatOrb2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, -40px) scale(1.15); } }
        @keyframes floatOrb3 { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-40%, -60%) scale(1.2); } }
        @keyframes floatCoin1 { 0%, 100% { transform: translateY(0px) rotateY(0deg); } 50% { transform: translateY(-30px) rotateY(180deg); } }
        @keyframes floatCoin2 { 0%, 100% { transform: translateY(0px) rotateY(0deg); } 50% { transform: translateY(-40px) rotateY(180deg); } }
        @keyframes rotateCoin { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
        @keyframes floatBar1 { 0%, 100% { transform: rotate(-15deg) translateY(0px); } 50% { transform: rotate(-10deg) translateY(-25px); } }
        @keyframes floatBar2 { 0%, 100% { transform: rotate(10deg) translateY(0px); } 50% { transform: rotate(15deg) translateY(-35px); } }
        @keyframes pulseLine { 0%, 100% { opacity: 0.3; transform: scaleX(1); } 50% { opacity: 0.8; transform: scaleX(1.2); } }
        @keyframes float1 { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }
        @keyframes float2 { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }
        @keyframes float3 { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }

        .float-anim-1 { animation: float1 6s ease-in-out infinite; }
        .float-anim-2 { animation: float2 7s ease-in-out infinite 0.5s; }
        .float-anim-3 { animation: float3 5s ease-in-out infinite 1s; }

        .hero-cards-container {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
            width: 100%; max-width: 1400px; z-index: 10; position: relative;
        }
        .hero-card {
            position: relative; height: 480px; border-radius: 16px; overflow: hidden;
            display: flex; flex-direction: column; justify-content: flex-end;
            color: var(--color-white); box-shadow: var(--shadow-lg);
            transition: transform 0.4s ease, box-shadow 0.4s ease;
            border: 1px solid rgba(212, 175, 55, 0.3);
        }
        .hero-card:hover { transform: translateY(-10px) scale(1.02) !important; box-shadow: var(--shadow-gold); z-index: 10; border-color: var(--color-accent); }
        .hero-card video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
        .card-overlay {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(to top, rgba(5, 11, 20, 0.98) 0%, rgba(5, 11, 20, 0.6) 40%, rgba(5, 11, 20, 0.2) 100%);
            z-index: 1;
        }
        .card-content { position: relative; z-index: 2; padding: 32px; text-align: left; }
        .card-content h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 12px; color: var(--color-accent); }
        .card-content p { font-size: 1rem; line-height: 1.6; margin-bottom: 24px; opacity: 0.9; font-weight: 300; }

        .btn {
            display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
            transition: all var(--transition-speed); cursor: pointer; border: none;
        }
        .btn-primary { background: var(--color-accent); color: var(--color-primary); }
        .btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-2px); }
        
        .btn-gold {
            background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
            color: var(--color-primary); font-size: 1rem; padding: 16px 32px;
            box-shadow: var(--shadow-gold); border: 1px solid rgba(255,255,255,0.3);
        }
        .btn-gold:hover { transform: translateY(-3px); box-shadow: 0 25px 50px -12px rgba(212, 175, 55, 0.6); }
        
        .btn-outline-gold {
            background: transparent; color: var(--color-accent);
            border: 2px solid var(--color-accent); padding: 14px 30px;
        }
        .btn-outline-gold:hover { background: rgba(212, 175, 55, 0.1); transform: translateY(-3px); }

        .hero-bottom-cta {
            width: 100%;
            position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
            z-index: 10; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
            animation: fadeInUp 1s ease-out 0.5s both;
        }
        @keyframes fadeInUp { from { opacity: 0; transform: translate(-50%, 30px); } to { opacity: 1; transform: translate(-50%, 0); } }

        /* =========================================
           4. SERVICES & SEARCH
           ========================================= */
        .search-section { padding: 100px 0; background: var(--color-bg); }
        .section-header { text-align: center; max-width: 700px; margin: 0 auto 48px; }
        .section-header h2 { font-size: 2.5rem; margin-bottom: 16px; }
        .section-header p { color: var(--color-text-light); font-size: 1.1rem; }
        .search-wrapper { max-width: 600px; margin: 0 auto 48px; position: relative; }
        .search-input-group { position: relative; display: flex; align-items: center; }
        .search-input-group i.fa-search { position: absolute; left: 20px; color: var(--color-text-light); font-size: 1.1rem; }
        .search-input-group input {
            width: 100%; padding: 18px 50px 18px 52px; border: 2px solid #e2e8f0;
            border-radius: 50px; font-size: 1rem; font-family: 'Inter', sans-serif;
            transition: all var(--transition-speed); background: var(--color-white);
        }
        .search-input-group input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1); }
        .clear-btn { position: absolute; right: 16px; background: none; border: none; color: var(--color-text-light); cursor: pointer; font-size: 1.1rem; padding: 4px; display: none; }
        .result-count { display: block; text-align: right; margin-top: 12px; font-size: 0.9rem; color: var(--color-text-light); font-weight: 500; }
        .cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
        .searchable-card {
            background: var(--color-white); border-radius: var(--border-radius); padding: 32px;
            box-shadow: var(--shadow-sm); transition: all 0.4s ease; border: 1px solid transparent;
        }
        .searchable-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(212, 175, 55, 0.3); }
        .searchable-card.hidden { display: none; }
        .searchable-card.fade-out { opacity: 0; transform: translateY(20px); }
        .card-icon { width: 56px; height: 56px; background: rgba(212, 175, 55, 0.1); color: var(--color-accent); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
        .searchable-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
        .searchable-card p { color: var(--color-text-light); font-size: 0.95rem; line-height: 1.6; }
        .no-results { text-align: center; padding: 60px 20px; color: var(--color-text-light); display: none; }
        .no-results i { font-size: 3rem; margin-bottom: 16px; color: var(--color-accent); }

        /* =========================================
           5. AGENCES SECTION (MAP & LIST)
           ========================================= */
        .agences-section {
            padding: 100px 0;
            background: linear-gradient(135deg, #0a1128 0%, #050b14 100%);
            color: var(--color-white);
            position: relative;
            overflow: hidden;
        }
        .agences-section .section-header h2 { color: var(--color-white); }
        .agences-section .section-header p { color: rgba(255,255,255,0.7); }
        
        .agences-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            align-items: center;
            margin-top: 10px;
        }

        /* Agency List / Info Panel */
        .agency-info-panel {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(212, 175, 55, 0.2);
            border-radius: 16px;
            padding: 32px;
            backdrop-filter: blur(10px);
            min-height: 400px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .agency-info-panel h3 {
            color: var(--color-accent);
            font-size: 1.5rem;
            margin-bottom: 8px;
        }
        .agency-info-panel .agency-address {
            color: rgba(255,255,255,0.8);
            margin-bottom: 24px;
            display: flex;
            align-items: flex-start;
            gap: 12px;
        }
        .agency-info-panel .agency-address i { color: var(--color-accent); margin-top: 4px; }
        .agency-details-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 32px;
        }
        .agency-detail-item {
            display: flex;
            align-items: center;
            gap: 12px;
            color: rgba(255,255,255,0.9);
        }
        .agency-detail-item i {
            width: 36px; height: 36px;
            background: rgba(212, 175, 55, 0.1);
            color: var(--color-accent);
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.9rem;
        }
        .agency-detail-item span { font-size: 0.9rem; }
        .agency-actions { display: flex; gap: 12px; margin-top: auto; }

        /* Map Container */
        .map-container {
            position: relative;
            width: 100%;
            aspect-ratio: 1/1;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(212, 175, 55, 0.1);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .map-svg {
            width: 100%;
            height: 100%;
        }
        .map-svg path {
            fill: rgba(212, 175, 55, 0.05);
            stroke: rgba(212, 175, 55, 0.4);
            stroke-width: 2;
            transition: all 0.3s;
        }
        
        /* Map Dots */
        .map-dot {
            cursor: pointer;
            transition: all 0.3s;
        }
        .map-dot circle.dot-core {
            fill: var(--color-accent);
            filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
            transition: all 0.3s;
        }
        .map-dot circle.dot-pulse {
            fill: #03A9F4;
            stroke: var(--color-accent);
            stroke-width: 2;
            animation: ripple 2s infinite;
            opacity: 0;
        }
        .map-dot.active circle.dot-core {
            fill: #22c089;
            filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.9));
            r: 8;
        }
        .map-dot.active circle.dot-pulse {
            stroke: #fff;
        }
        @keyframes ripple {
            0% { r: 6; opacity: 1; stroke-width: 2; }
            100% { r: 25; opacity: 0; stroke-width: 0; }
        }

        /* =========================================
           6. MODAL (COURS DES MÉTAUX)
           ========================================= */
        .modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(5, 11, 20, 0.85); backdrop-filter: blur(8px);
            z-index: 2000; display: flex; align-items: center; justify-content: center;
            opacity: 0; visibility: hidden; transition: all 0.4s ease;
        }
        .modal-overlay.active { opacity: 1; visibility: visible; }
        .modal-content {
            background: var(--color-white); border-radius: 20px; width: 90%; max-width: 600px;
            padding: 40px; position: relative; transform: translateY(30px) scale(0.95);
            transition: all 0.4s ease; box-shadow: 0 30px 60px rgba(0,0,0,0.5);
            border-top: 5px solid var(--color-accent);
        }
        .modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
        .modal-close {
            position: absolute; top: 20px; right: 20px; background: none; border: none;
            font-size: 1.5rem; color: var(--color-text-light); cursor: pointer;
            width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            transition: all 0.3s;z-index:1000;
        }
        .modal-close:hover { background: var(--color-bg); color: var(--color-primary); }
        .modal-header { text-align: center; margin-bottom: 32px; padding-top: 20px;}
        .modal-header h2 { font-size: 1.8rem; margin-bottom: 8px; }
        .modal-header p { color: var(--color-text-light); }
        .live-badge {
            display: inline-flex; align-items: center; gap: 6px;
            background: #fee2e2; color: #dc2626; padding: 4px 12px;
            border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-top: 12px;
        }
        .live-badge::before {
            content: ''; width: 8px; height: 8px; background: #dc2626;
            border-radius: 50%; animation: blink 1s infinite;
        }
        @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
        
        .metal-table { width: 100%; border-collapse: collapse; }
        .metal-table th { text-align: left; padding: 12px 16px; background: var(--color-bg); color: var(--color-text-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
        .metal-table td { padding: 16px; border-bottom: 1px solid #e2e8f0; font-weight: 500; }
        .metal-table tr:last-child td { border-bottom: none; }
        .metal-name { display: flex; align-items: center; gap: 12px; }
        .metal-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
        .metal-icon.gold { background: linear-gradient(135deg, #d4af37, #f3e5ab); color: #4a3b10; }
        .metal-icon.silver { background: linear-gradient(135deg, #c0c0c0, #ffffff); color: #4a4a4a; }
        .metal-icon.platinum { background: linear-gradient(135deg, #e5e4e2, #bcc6cc); color: #333; }
        .price-up { color: #16a34a; font-weight: 600; }
        .price-down { color: #dc2626; font-weight: 600; }

        /* =========================================
           7. FOOTER
           ========================================= */
        .site-footer { background: #020617; color: rgba(255, 255, 255, 0.7); padding: 80px 0 40px; border-top: 1px solid rgba(212, 175, 55, 0.2); }
        .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; margin-bottom: 60px; }
        .footer-brand .logo { margin-bottom: 20px; }
        .footer-brand p { font-size: 0.95rem; line-height: 1.7; margin-bottom: 24px; }
        .social-links { display: flex; gap: 16px; }
        .social-links a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; color: var(--color-white); transition: all var(--transition-speed); }
        .social-links a:hover { background: var(--color-accent); color: var(--color-primary); transform: translateY(-3px); }
        .footer-col h4 { color: var(--color-white); font-size: 1.1rem; margin-bottom: 24px; font-family: 'Inter', sans-serif; font-weight: 600; }
        .footer-col ul li { margin-bottom: 12px; }
        .footer-col ul li a { font-size: 0.95rem; }
        .footer-col ul li a:hover { color: var(--color-accent); padding-left: 4px; }
        .footer-contact li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
        .footer-contact i { color: var(--color-accent); margin-top: 4px; }
        .footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 32px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }

        /* =========================================
           8. RESPONSIVE
           ========================================= */
        @media (max-width: 1024px) {
            .hero-cards-container { grid-template-columns: 1fr; gap: 20px; }
            .hero-card { height: 350px; }
            .hero-bottom-cta { position: relative; bottom: auto; left: auto; transform: none; margin-top: 40px; width: 100%; animation: fadeInUpMobile 1s ease-out 0.5s both; }
            @keyframes fadeInUpMobile { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
            .agences-container { grid-template-columns: 1fr; }
            .map-container { max-width: 100%; aspect-ratio: 1/1; }
            .footer-grid { grid-template-columns: 1fr 1fr; }
        }
        @media (max-width: 768px) {
            .mobile-menu-toggle { display: flex; }
            .main-nav {
                position: fixed; top: 80px; left: 0; width: 100%; height: calc(100vh - 80px);
                background: var(--color-primary); padding: 24px; transform: translateX(100%);
                transition: transform var(--transition-speed); overflow-y: auto;
            }
            .main-nav.active { transform: translateX(0); }
            .main-nav .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
            .main-nav > .nav-list > li { width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
            .main-nav > .nav-list > li > a { padding: 16px 0; font-size: 1.1rem; justify-content: space-between; }
            .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: rgba(255, 255, 255, 0.03); max-height: 0; overflow: hidden; transition: max-height 0.4s ease; padding: 0; border-top: none; min-width: 100%; }
            .dropdown.active { max-height: 500px; padding: 12px 0; }
            .dropdown li a { color: rgba(255, 255, 255, 0.7); padding: 12px 16px; }
            .dropdown li a:hover { background: rgba(255, 255, 255, 0.05); color: var(--color-accent); }
            .dd-icon { background: rgba(212, 175, 55, 0.2); }
            .dd-title { color: var(--color-white); }
            .dd-desc { color: rgba(255, 255, 255, 0.6); }
            .footer-grid { grid-template-columns: 1fr; gap: 40px; }
            .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
            .agency-details-grid { grid-template-columns: 1fr; }
            .hero-bottom-cta { flex-direction: column; align-items: stretch; }
            .hero-bottom-cta .btn { width: 100%; }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
        }
        *:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
        
/* =========================================
   ADVANCED COURS MODAL STYLES
   ========================================= */
.modal-cours {
    max-width: 850px;
    width: 95%;
    padding: 0;
    overflow: hidden;
    max-height: 90%;
    overflow: auto;
}

.modal-cours .modal-header {
    padding: 32px 40px 24px;
    border-bottom: 1px solid #e2e8f0;
}

/* Table Wrapper */
.cours-table-wrapper {
    padding: 24px 40px;
    border-bottom: 1px solid #e2e8f0;
}

/* Table Flash Animations */
@keyframes priceFlashGreen {
    0% { background-color: rgba(22, 163, 74, 0.15); }
    100% { background-color: transparent; }
}
@keyframes priceFlashRed {
    0% { background-color: rgba(220, 38, 38, 0.15); }
    100% { background-color: transparent; }
}
.flash-green { animation: priceFlashGreen 2s ease-out; }
.flash-red { animation: priceFlashRed 2s ease-out; }

.metal-table td {
    transition: background-color 0.3s;
}

/* Tabs Container */
.cours-tabs {
    display: flex;
    position: relative;
    border-bottom: 2px solid #e2e8f0;
    margin: 0 40px;
    background: #f8fafc;
    border-radius: 8px 8px 0 0;
}

.cours-tab {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: color 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    border-radius: 8px 8px 0 0;
}

.cours-tab:hover {
    color: var(--color-primary);
    background: rgba(212, 175, 55, 0.05);
}

.cours-tab.active {
    color: var(--color-primary);
    background: var(--color-white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}

.cours-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cours-tab.active::after {
    transform: scaleX(1);
}

/* Chart Wrapper */
.cours-chart-wrapper {
    position: relative;
    height: 320px;
    padding: 24px 40px 40px;
    background: var(--color-white);
}

.chart-loading {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: var(--color-text-light);
    z-index: 10;
    backdrop-filter: blur(2px);
    border-radius: 0 0 20px 20px;
}

.chart-loading i {
    margin-right: 10px;
    color: var(--color-accent);
    font-size: 1.2rem;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-cours .modal-header,
    .cours-table-wrapper,
    .cours-tabs,
    .cours-chart-wrapper {
        padding-left: 20px;
        padding-right: 20px;
        margin-left: 0;
        margin-right: 0;
    }
    .cours-tab { font-size: 0.85rem; padding: 12px 8px; }
    /*.cours-tab i { display: none; }  Hide icons on small screens to save space */
}



/* =========================================
   TAB PANES & CONTENT WRAPPER
   ========================================= */
.cours-content-wrapper {
    position: relative;
    min-height: 380px; /* Prevents layout jump when switching between table and chart */
}

.cours-pane {
    display: none;
    animation: fadeInPane 0.4s ease;
}

.cours-pane.active {
    display: block;
}

@keyframes fadeInPane {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Adjust Table Wrapper (now inside a pane) */
.cours-table-wrapper {
    padding: 24px 40px;
    border-bottom: none; /* Removed bottom border since it's inside a pane */
}

/* Adjust Chart Wrapper */
.cours-chart-wrapper {
    position: relative;
    height: 320px;
    padding: 24px 40px 40px;
    background: var(--color-white);
}

/* =========================================
   MODAL: PRENDRE RDV (MULTI-STEP)
   ========================================= */
.modal-rdv {
    max-width: 750px;
    width: 95%;
    padding: 0;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.rdv-progress {
    height: 4px;
    background: #e2e8f0;
    width: 100%;
}
.rdv-progress-bar {
    height: 100%;
    background: var(--color-accent);
    transition: width 0.4s ease;
}

.rdv-steps-indicator {
    display: flex;
    justify-content: space-between;
    padding: 60px 40px 20px;
    position: relative;
    background: #bcd6ea;
}
.rdv-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    z-index: 2;
}
.rdv-step-dot.active {
    background: var(--color-accent);
    color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}
.rdv-step-dot.completed {
    background: var(--color-accent);
    color: var(--color-primary);
}

.rdv-pane {
    display: none;
    padding: 24px 40px;
    overflow-y: auto;
    flex: 1;
    animation: fadeInPane 0.4s ease;
}
.rdv-pane.active {
    display: flex;
    flex-direction: column;
}

.rdv-header {
    text-align: center;
    margin-bottom: 24px;
}
.rdv-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.rdv-header p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Motif Grid */
.motif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.motif-card {
    background: var(--color-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.motif-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.motif-card.selected {
    border-color: var(--color-accent);
    background: rgba(212, 175, 55, 0.05);
}
.motif-card i {
    font-size: 1.25rem;
    color: var(--color-accent);
    width: 24px;
    text-align: center;
}
.motif-card span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
}

/* Agency Select Grid */
.agency-select-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.agency-card-select {
    display: flex;
    background: var(--color-white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}
.agency-card-select:hover {
    box-shadow: var(--shadow-sm);
    border-color: rgba(212, 175, 55, 0.3);
}
.agency-card-img {
    width: 140px;
    min-height: 140px;
    position: relative;
    flex-shrink: 0;
}
.agency-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.agency-city {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(5,11,20,0.9), transparent);
    color: var(--color-white);
    padding: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}
.agency-card-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.agency-card-info p {
    font-size: 0.9rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.agency-card-info p i {
    color: var(--color-accent);
    width: 16px;
}
.agency-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
}
.btn-link {
    background: none;
    border: none;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}
.agency-detail-box {
    margin-top: 8px;
    padding: 12px;
    background: var(--color-bg);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    animation: fadeInPane 0.3s ease;
}
.agency-detail-box p {
    margin-bottom: 4px;
}

/* Form Styles */
.rdv-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-primary);
}
.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}
.form-group input.error {
    border-color: #dc2626;
}
.error-msg {
    color: #dc2626;
    font-size: 0.8rem;
    min-height: 16px;
}

/* Success Message */
.rdv-success {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes successPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}
.rdv-success h2 {
    color: #16a34a;
}

/* Navigation Buttons */
.rdv-nav {
    padding: 20px 40px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    background: var(--color-bg);
}

/* Notification System */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .rdv-pane { padding: 20px; }
    .rdv-nav { padding: 16px 20px; }
    .rdv-steps-indicator { padding: 60px 20px 20px; }
    .motif-grid { grid-template-columns: 1fr; }
    .agency-card-select { flex-direction: column; }
    .agency-card-img { width: 100%; height: 120px; }
}

.map-svg{
    background-image:url("medias/map_or.jpg");
    border-radius: 10px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

/* =========================================
   MODAL: ESTIMER MON BIEN
   ========================================= */
.modal-estimation {
    max-width: 750px;
    width: 95%;
    padding: 0;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    padding: 20px 20px;
    min-height: 200px;
    text-align: center;
    background: rgba(212, 175, 55, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.upload-zone::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.upload-zone:hover::before, .upload-zone.dragover::before {
    opacity: 1;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--color-accent);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.upload-zone i {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 16px;
    display: block;
    transition: transform 0.3s;
}
.upload-zone:hover i, .upload-zone.dragover i {
    transform: translateY(-5px);
}
.upload-zone p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.upload-zone span {
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.upload-link {
    color: var(--color-accent);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.upload-zone small {
    display: block;
    margin-top: 12px;
    color: var(--color-text-light);
    font-size: 0.8rem;
}

/* Upload Previews */
.upload-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.upload-preview {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.3s;
    animation: fadeInPane 0.4s ease;
}
.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.remove-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}
.remove-preview:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Estimation Note */
.estimation-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    color: #2563eb;
    font-size: 0.9rem;
    line-height: 1.5;
}
.estimation-note i {
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Responsive adjustments for Estimation Modal */
@media (max-width: 768px) {
    .upload-previews {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   SECTION: COURS DES MÉTAUX EN DIRECT
   ========================================= */
.live-cours-section {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(135deg, #0a1128 0%, #050b14 50%, #1a233a 100%);
    color: var(--color-white);
    overflow: hidden;
}

.live-cours-section .section-header {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto 30px;
}

.live-cours-section .section-header h2 {
    color: var(--color-white);
    font-size: 2.75rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.live-cours-section .section-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--color-accent);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.live-badge-section {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #dc2626;
    border-radius: 50%;
    animation: blink 1.2s infinite;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.8);
}

/* Background Elements */
.section-bg-elements {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.live-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen;
}
.live-orb-1 {
    width: 500px; height: 500px;
    top: -10%; left: -10%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, transparent 70%);
    animation: floatOrb1 20s ease-in-out infinite;
}
.live-orb-2 {
    width: 400px; height: 400px;
    bottom: -10%; right: -5%;
    background: radial-gradient(circle, rgba(192, 192, 192, 0.3) 0%, transparent 70%);
    animation: floatOrb2 25s ease-in-out infinite;
}

.live-grid-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.live-coin {
    position: absolute;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.live-coin-1 {
    top: 15%; right: 10%;
    animation: floatCoin1 8s ease-in-out infinite, rotateCoin 12s linear infinite;
}
.live-coin-2 {
    top: 15%; left: 8%;
    width: 80px; height: 80px;
    animation: floatCoin2 10s ease-in-out infinite, rotateCoin 12s linear infinite reverse;
}
.live-coin .coin-inner {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #4a3b10;
    font-size: 1.1rem;
}

/* Section Wrapper */
.cours-section-wrapper {
    position: relative;
    z-index: 2;
}

/* Section Tabs */
.section-cours-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.section-cours-tab {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
}

.section-cours-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
}

.section-cours-tab.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    color: var(--color-accent);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.section-cours-tab .metal-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tab-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 2px;
}

.tab-name {
    font-weight: 600;
    font-size: 1rem;
}

.tab-symbol {
    font-size: 0.75rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

/* Content Grid */
.cours-section-content {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Chart Card */
.chart-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 28px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.chart-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 20px 40px -10px rgba(212, 175, 55, 0.15);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.chart-card-header h3 {
    color: var(--color-white);
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.chart-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.current-price-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.current-price-display .price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent);
    font-family: 'Playfair Display', serif;
    line-height: 1;
}

.price-change-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
}
.price-change-badge.down {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

.chart-wrapper-section {
    position: relative;
    height: 300px;
}

.chart-wrapper-section .chart-loading {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 17, 40, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    z-index: 5;
    border-radius: 12px;
    backdrop-filter: blur(2px);
}

.chart-wrapper-section .chart-loading i {
    margin-right: 8px;
    color: var(--color-accent);
}

/* Table Card */
.table-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 28px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.table-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 20px 40px -10px rgba(212, 175, 55, 0.15);
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.table-card-header h3 {
    color: var(--color-white);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-card-header h3 i {
    color: var(--color-accent);
}

.table-update-info {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.table-wrapper-section {
    flex: 1;
    margin-bottom: 20px;
}

.section-metal-table {
    width: 100%;
    border-collapse: collapse;
}

.section-metal-table th {
    text-align: left;
    padding: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.section-metal-table td {
    padding: 18px 12px;
    color: var(--color-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 500;
}

.section-metal-table tr:last-child td {
    border-bottom: none;
}

.section-metal-table .metal-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-metal-table .metal-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.section-metal-table .metal-icon.gold {
    background: linear-gradient(135deg, #d4af37, #f3e5ab);
    color: #4a3b10;
}

.section-metal-table .metal-icon.silver {
    background: linear-gradient(135deg, #c0c0c0, #ffffff);
    color: #4a4a4a;
}

.section-metal-table .metal-icon.platinum {
    background: linear-gradient(135deg, #e5e4e2, #bcc6cc);
    color: #333;
}

.section-metal-table .price-up {
    color: #4ade80;
    font-weight: 600;
}

.section-metal-table .price-down {
    color: #f87171;
    font-weight: 600;
}

.table-card-footer {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.table-card-footer .btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.85rem;
}

.table-card-footer .btn-outline-gold {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Stats Grid */
.cours-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 14px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.stat-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.gold {
    background: rgba(212, 175, 55, 0.15);
    color: var(--color-accent);
}

.stat-icon.silver {
    background: rgba(192, 192, 192, 0.15);
    color: #e5e7eb;
}

.stat-icon.platinum {
    background: rgba(229, 228, 226, 0.15);
    color: #f3f4f6;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-white);
}

/* Responsive */
@media (max-width: 1024px) {
    .cours-section-content {
        grid-template-columns: 1fr;
    }
    .cours-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .live-cours-section { padding: 80px 0; }
    .live-cours-section .section-header h2 { font-size: 2rem; }
    
    .section-cours-tabs {
        flex-direction: column;
        padding: 6px;
    }
    .section-cours-tab {
        padding: 14px;
    }
    
    .chart-card, .table-card {
        padding: 20px;
    }
    
    .chart-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .current-price-display {
        align-items: flex-start;
    }
    
    .cours-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-card-footer {
        flex-direction: column;
    }
    
    .live-coin { display: none; }
}

.cours-section-content .metal-table th{
    background: #182437;
}

/* =========================================
   TOP TICKER BAR - LIVE METAL PRICES
   ========================================= */
.top-ticker-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 42px;
    background: linear-gradient(90deg, #020617 0%, #0a1128 50%, #020617 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    z-index: 1001;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Live Badge (Fixed Left) */
.ticker-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 100%;
    background: rgba(220, 38, 38, 0.1);
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.ticker-live-dot {
    width: 8px;
    height: 8px;
    background: #dc2626;
    border-radius: 50%;
    animation: blink 1.2s infinite;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.8);
}

.ticker-live-text {
    color: #fca5a5;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* Clock (Fixed Right) */
.ticker-clock {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 100%;
    background: rgba(212, 175, 55, 0.05);
    border-left: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    font-variant-numeric: tabular-nums;
}

.ticker-clock i {
    font-size: 0.85rem;
}

/* Ticker Track Wrapper */
.ticker-track-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    /* Fade edges for smooth entry/exit */
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: tickerScroll 45s linear infinite;
    will-change: transform;
}

.top-ticker-bar:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Individual Ticker Item */
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 28px;
    height: 42px;
    border-right: 1px solid rgba(212, 175, 55, 0.15);
    transition: background 0.3s;
    cursor: default;
}

.ticker-item:hover {
    background: rgba(212, 175, 55, 0.05);
}

.ticker-item-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ticker-item-icon.gold {
    background: linear-gradient(135deg, #d4af37, #f3e5ab);
    color: #4a3b10;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.ticker-item-icon.silver {
    background: linear-gradient(135deg, #c0c0c0, #ffffff);
    color: #4a4a4a;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.4);
}

.ticker-item-icon.platinum {
    background: linear-gradient(135deg, #e5e4e2, #bcc6cc);
    color: #333;
    box-shadow: 0 0 8px rgba(229, 228, 226, 0.4);
}

.ticker-item-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.ticker-item-price {
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}

.ticker-item-change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s;
}

.ticker-item-change.up {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
}

.ticker-item-change.down {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

.ticker-item-change i {
    font-size: 0.65rem;
}

/* Flash animation on price update */
@keyframes tickerFlashGreen {
    0% { background-color: rgba(22, 163, 74, 0.3); }
    100% { background-color: transparent; }
}

@keyframes tickerFlashRed {
    0% { background-color: rgba(220, 38, 38, 0.3); }
    100% { background-color: transparent; }
}

.ticker-item.flash-green { animation: tickerFlashGreen 1.5s ease-out; }
.ticker-item.flash-red { animation: tickerFlashRed 1.5s ease-out; }

/* Adjust header position to account for ticker bar */
.site-header {
    top: 42px;
}

/* Adjust hero section padding */
.hero-section {
    padding-top: 162px; /* 120px + 42px for ticker */
}

/* Responsive */
@media (max-width: 768px) {
    .top-ticker-bar {
        height: 38px;
    }
    
    .site-header {
        top: 38px;
    }
    
    .hero-section {
        padding-top: 158px;
    }
    
    .ticker-live-badge {
        padding: 0 10px;
    }
    
    .ticker-live-text {
        display: none; /* Hide "LIVE" text on mobile, keep dot */
    }
    
    .ticker-clock {
        padding: 0 10px;
        font-size: 0.75rem;
    }
    
    .ticker-item {
        padding: 0 18px;
    }
    
    .ticker-item-name {
        display: none; /* Hide name on mobile to save space */
    }
    
    .ticker-item-icon {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }
    
    .ticker-item-price {
        font-size: 0.8rem;
    }
    
    .ticker-item-change {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    @keyframes tickerScroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
    
    .ticker-track {
        animation-duration: 30s; /* Faster on mobile */
    }
}

@media (max-width: 480px) {
    .ticker-clock i {
        display: none;
    }
    
    .ticker-item {
        padding: 0 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none;
    }
    
    .ticker-item.flash-green,
    .ticker-item.flash-red {
        animation: none;
    }
}


/* =========================================
PRODUCTS SECTION - ENTERPRISE STYLE
========================================= */
.products-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 50%, #f8fafc 100%);
    min-height: 100vh;
}

.products-bg-elements {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.products-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.products-orb-1 {
    width: 500px; height: 500px;
    top: -10%; left: -10%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
    animation: floatOrb1 25s ease-in-out infinite;
}

.products-orb-2 {
    width: 400px; height: 400px;
    bottom: -10%; right: -5%;
    background: radial-gradient(circle, rgba(192, 192, 192, 0.2) 0%, transparent 70%);
    animation: floatOrb2 30s ease-in-out infinite;
}

.products-grid-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* =========================================
ACTION BAR
========================================= */
.products-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: var(--color-white);
    background: rgb(133 110 36);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    flex-wrap: wrap;
    position: sticky;
    top: 130px;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.action-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 300px;
}

.sidebar-toggle-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--color-bg);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--color-text);
}

.sidebar-toggle-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.products-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.products-search-wrapper i.fa-search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.products-search-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: var(--color-bg);
}

.products-search-wrapper input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.products-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 4px;
    display: none;
    transition: color 0.3s;
}

.products-search-clear:hover {
    color: var(--color-primary);
}

.products-sort-wrapper select {
    padding: 12px 36px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    background: var(--color-bg);
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.products-sort-wrapper select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.action-bar-center {
    display: flex;
    align-items: center;
}

.selection-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.03));
    background: linear-gradient(135deg, var(--color-primary), #1a233a);
    color: var(--color-white);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.selection-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
}

.selection-count i {
    color: var(--color-accent);
}

.selection-total {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 20px;
    border-left: 1px solid rgba(212, 175, 55, 0.2);
}

.total-label {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.total-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
    font-family: 'Playfair Display', serif;
}

.action-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-toggle {
    display: flex;
    background: var(--color-bg);
    background: linear-gradient(135deg, var(--color-primary), #1a233a);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid #182138;
    
}

.view-btn {
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-light);
    transition: all 0.3s;
}

.view-btn.active {
    background: var(--color-white);
    color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-simulation {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--color-primary), #1a233a);
    color: var(--color-white);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(5, 11, 20, 0.3);
}

.btn-simulation:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 11, 20, 0.4);
}

.btn-simulation i {
    color: var(--color-accent);
}

.fullscreen-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.3s;
}

.fullscreen-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* =========================================
MAIN LAYOUT
========================================= */
.products-main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* =========================================
SIDEBAR
========================================= */
.products-sidebar {
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.1);
    overflow: hidden;
    position: sticky;
    top: 220px;
    max-height: calc(100vh - 240px);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--color-primary), #1a233a);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    color: var(--color-white);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.sidebar-header h3 i {
    color: var(--color-accent);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-item {
    margin-bottom: 4px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    transition: all 0.3s;
    color: var(--color-text);
    text-decoration: none;
}

.category-link:hover {
    background: rgba(212, 175, 55, 0.05);
}

.category-item.active > .category-link {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.05));
    color: var(--color-primary);
    font-weight: 600;
}

.category-item.active > .category-link .category-arrow {
    color: var(--color-accent);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.3s;
}

.category-icon.silver {
    background: rgba(192, 192, 192, 0.15);
    color: #6b7280;
}

.category-item.active > .category-link .category-icon {
    background: var(--color-accent);
    color: var(--color-primary);
}

.category-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-name {
    font-size: 0.9rem;
}

.category-count {
    font-size: 0.75rem;
    background: var(--color-bg);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--color-text-light);
    font-weight: 600;
}

.category-item.active > .category-link .category-count {
    background: var(--color-accent);
    color: var(--color-primary);
}

.category-arrow {
    color: var(--color-text-light);
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.category-item.active > .category-link .category-arrow {
    transform: rotate(90deg);
}

/* Subcategories */
.subcategory-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 52px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.category-item.active .subcategory-list {
    max-height: 200px;
}

.subcategory-item {
    margin: 2px 0;
}

.subcategory-item a {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.subcategory-item a:hover {
    color: var(--color-accent);
    background: rgba(212, 175, 55, 0.05);
}

.subcategory-item.active a {
    color: var(--color-accent);
    font-weight: 600;
    background: rgba(212, 175, 55, 0.08);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    background: var(--color-bg);
}

.sidebar-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-white);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.sidebar-cta i {
    width: 36px;
    height: 36px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-cta strong {
    display: block;
    font-size: 0.85rem;
    color: var(--color-primary);
}

.sidebar-cta span {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* =========================================
PRODUCTS CONTENT
========================================= */
.products-content {
    min-width: 0;
}

.products-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: var(--color-white);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 12px;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.results-info span {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
}

.active-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-primary);
    animation: fadeInScale 0.3s ease;
}

.filter-tag button {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 0;
    font-size: 0.7rem;
    transition: color 0.3s;
}

.filter-tag button:hover {
    color: #dc2626;
}

.results-actions {
    display: flex;
    gap: 8px;
}

.select-all-btn,
.clear-selection-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-bg);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--color-text);
}

.select-all-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.clear-selection-btn {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.clear-selection-btn:hover {
    background: rgba(220, 38, 38, 0.05);
    border-color: #dc2626;
}

/* =========================================
PRODUCTS GRID
========================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    height: auto;
}

.products-grid.list-view .product-image-wrapper {
    height: 180px;
}

/* =========================================
PRODUCT CARD
========================================= */
.product-card {
    position: relative;
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

.product-card.selected {
    border-color: var(--color-accent);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
}

.product-card.selected .product-select-wrapper .checkbox-custom {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.product-card.selected .product-select-wrapper .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.product-card.hidden {
    display: none;
}

.product-card.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

/* Product Select Checkbox */
.product-select-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.product-checkbox {
    display: block;
    cursor: pointer;
}

.product-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    background: var(--color-white);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: var(--color-primary);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s;
}

.product-checkbox:hover .checkbox-custom {
    border-color: var(--color-accent);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    padding: 4px 12px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.product-badge.enchère {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: var(--color-white);
}

.product-badge.best-seller {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: var(--color-white);
}

.product-badge.premium {
    background: linear-gradient(135deg, var(--color-primary), #1a233a);
    color: var(--color-accent);
}

/* Stock Indicator */
.product-stock-indicator {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;
    padding: 4px 10px;
    background: rgba(220, 38, 38, 0.9);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Product Image */
.product-image-wrapper {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 11, 20, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.quick-view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-white);
    color: var(--color-primary);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transform: translateY(10px);
    transition: all 0.3s;
}

.product-card:hover .quick-view-btn {
    transform: translateY(0);
}

.quick-view-btn:hover {
    background: var(--color-accent);
}

/* Product Info */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-accent);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    width: fit-content;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 6px;
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
}

.product-description {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.product-specs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--color-bg);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--color-text);
}

.spec-item i {
    color: var(--color-accent);
    font-size: 0.7rem;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    gap: 12px;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Playfair Display', serif;
}

.price-unit {
    font-size: 0.7rem;
    color: var(--color-text-light);
}

.product-actions {
    display: flex;
    gap: 8px;
}

.add-to-compare-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-compare-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.add-to-selection-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-selection-btn:hover {
    background: var(--color-accent);
    color: var(--color-primary);
}

.add-to-selection-btn i {
    font-size: 0.7rem;
}

/* =========================================
NO RESULTS
========================================= */
.products-no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-white);
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.products-no-results i {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.products-no-results h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.products-no-results p {
    color: var(--color-text-light);
    margin-bottom: 20px;
}

/* =========================================
FULLSCREEN MODE
========================================= */
.products-section.fullscreen-mode{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1500;
    padding: 20px;
    overflow-y: auto;
    background: var(--color-bg);
}
.live-cours-section.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1500;
    padding: 20px;
    overflow-y: auto;
}
.live-cours-section .fullscreen-btn{
    position: absolute;
    top: 30px;
    right: 30px;
    background: #2a2826;
    color: #fff;
}

.products-section.fullscreen-mode .products-action-bar {
    top: 0px;
}

.products-section.fullscreen-mode .products-sidebar {
    top: 90px;
    max-height: calc(100vh - 120px);
}

.fullscreen-exit-notice {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1600;
    padding: 12px 20px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 12px;
    font-size: 0.85rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.3s ease;
}

.products-section.fullscreen-mode ~ .fullscreen-exit-notice {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================
SIMULATION MODAL
========================================= */
.modal-simulation {
    max-width: 600px;
    width: 95%;
    padding: 0;
    overflow: hidden;
}

.sim-header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.simulation-body {
    padding: 0 32px 24px;
        max-height: 440px;
    overflow: auto;
}

.sim-selected-summary {
    margin-bottom: 24px;
}

.sim-selected-summary h4 {
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
}

.sim-selected-summary h4 i {
    color: var(--color-accent);
}

.sim-products-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
}

.sim-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.sim-product-item:hover {
    background: var(--color-bg);
}

.sim-product-item + .sim-product-item {
    border-top: 1px solid #f1f5f9;
}

.sim-product-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-primary);
}

.sim-product-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
}

.sim-options {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--color-bg);
    border-radius: 12px;
}

.sim-option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.sim-option-group label i {
    color: var(--color-accent);
}

.sim-margin-input,
.sim-variation-input {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sim-margin-input input,
.sim-variation-input input {
    flex: 1;
    height: 6px;
    appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

.sim-margin-input input::-webkit-slider-thumb,
.sim-variation-input input::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.sim-margin-input span,
.sim-variation-input span {
    min-width: 50px;
    text-align: center;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.sim-results {
    background: var(--color-white);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 20px;
}

.sim-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--color-text);
}

.sim-result-row + .sim-result-row {
    border-top: 1px solid #f1f5f9;
}

.sim-result-row.total {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid var(--color-accent);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.sim-result-row.total span:last-child {
    color: var(--color-accent);
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 32px;
    border-top: 1px solid #e2e8f0;
    background: var(--color-bg);
}

.modal-footer .btn {
    flex: 1;
}

/* =========================================
QUICK VIEW MODAL
========================================= */
.modal-quickview {
    max-width: 700px;
    width: 95%;
    padding: 0;
    overflow: hidden;
}

.quickview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.quickview-image {
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.quickview-image img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

.quickview-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.quickview-info .product-category-tag {
    margin-bottom: 12px;
}

.quickview-info h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.quickview-info .product-description {
    margin-bottom: 20px;
}

.quickview-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.quickview-spec {
    padding: 12px;
    background: var(--color-bg);
    border-radius: 10px;
}

.quickview-spec label {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.quickview-spec span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}

.quickview-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent);
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
}

.quickview-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.quickview-actions .btn {
    flex: 1;
}

/* =========================================
RESPONSIVE
========================================= */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 1024px) {
    .products-main-layout {
        grid-template-columns: 1fr;
    }
    
    .products-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        max-height: 100vh;
        z-index: 1100;
        border-radius: 0;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .products-sidebar.active {
        left: 0;
    }
    
    .sidebar-close {
        display: flex;
    }
    
    .sidebar-toggle-btn {
        display: flex;
    }
    
    .products-action-bar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .products-section {
        padding: 60px 0;
    }
    
    .products-action-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }
    
    .action-bar-left {
        flex-direction: column;
        min-width: auto;
    }
    
    .products-search-wrapper {
        max-width: 100%;
    }
    
    .action-bar-center {
        order: 3;
    }
    
    .selection-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }
    
    .selection-total {
        padding-left: 0;
        border-left: none;
        padding-top: 8px;
        border-top: 1px solid rgba(212, 175, 55, 0.2);
        width: 100%;
    }
    
    .action-bar-right {
        justify-content: space-between;
        width: 100%;
    }
    
    .btn-sim-text {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .products-results-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quickview-content {
        grid-template-columns: 1fr;
    }
    
    .quickview-image {
        min-height: 200px;
        padding: 20px;
    }
    
    .quickview-info {
        padding: 24px;
    }
    
    .simulation-body {
        padding: 0 20px 20px;
    }
    
    .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .product-actions {
        width: 100%;
    }
    
    .add-to-selection-btn {
        flex: 1;
        justify-content: center;
    }
}


