/* ============================================================
   UniPlace — Style global
   ============================================================
   Ce fichier contient tout le CSS principal du site.
   Pour modifier le design, édite ici.
   Pour le mobile, voir mobile.css
   ============================================================ */

body { background-color: #f4f6f8; }
        .navbar-brand { font-weight: 700; font-size: 1.4rem; }
        footer { background: #ffffff; border-top: 1px solid #e5e5e5; margin-top: 60px; }
        .card-produit { transition: transform 0.15s ease, box-shadow 0.15s ease; }
        .card-produit:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.1); }
        .prix-fcfa { font-weight: 700; color: #0056b3; font-size: 1.15rem; }
        .badge-stock { font-size: .75rem; }
        .timeline-statut { list-style: none; padding-left: 0; }
        .timeline-statut li { padding: 8px 0 8px 30px; position: relative; border-left: 2px solid #dee2e6; margin-left: 10px; }
        .timeline-statut li.fait { border-left-color: #198754; }
        .timeline-statut li.fait::before { content: "✓"; position: absolute; left: -11px; top: 8px; background: #198754; color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
        .timeline-statut li.actif { border-left-color: #0d6efd; font-weight: 600; }
        .timeline-statut li.actif::before { content: "●"; position: absolute; left: -11px; top: 8px; background: #0d6efd; color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
        .timeline-statut li::before { content: ""; position: absolute; left: -11px; top: 8px; background: #dee2e6; border-radius: 50%; width: 20px; height: 20px; }

        @media (max-width: 768px) {
            body { font-size: 15px; }
            .navbar { padding: 10px 15px; }
            .navbar-brand { font-size: 1.1rem; }
            .navbar-brand img { height: 28px; width: 28px; }
            .navbar-nav .nav-link { padding: 10px 12px; font-size: 16px; }
            .container { padding-left: 12px; padding-right: 12px; }
            .container-fluid { padding-left: 12px !important; padding-right: 12px !important; }
            h1, .h1 { font-size: 1.5rem; }
            h1.h3, .h3 { font-size: 1.25rem; }
            h2, .h2 { font-size: 1.3rem; }
            .display-5 { font-size: 1.75rem; }
            .btn { padding: 10px 16px; font-size: 15px; }
            .btn-lg { padding: 14px 20px; font-size: 16px; min-height: 48px; }
            .btn-sm { padding: 6px 12px; font-size: 13px; }
            .card-body { padding: 14px; }
            .card-produit img { height: 160px !important; }
            .card-produit .card-title { font-size: 14px; }
            .card-produit .prix-fcfa { font-size: 15px; }
            .table-responsive { font-size: 0.85rem; }
            .table td, .table th { padding: 8px 6px; }
            .prix-fcfa { font-size: 1rem; }
            .carousel-item img { height: 300px !important; }
            .timeline-statut li { padding-left: 28px; margin-left: 8px; }
        }

        @media (max-width: 400px) {
            .container { padding-left: 10px; padding-right: 10px; }
            h1.h3 { font-size: 1.15rem; }
            .card-produit img { height: 140px !important; }
        }

        .btn, .nav-link, .card-produit, a { -webkit-tap-highlight-color: transparent; }
        html { scroll-behavior: smooth; }

        .user-avatar-nav {
            width: 32px; height: 32px; border-radius: 50%;
            background: linear-gradient(135deg, #0d6efd, #6610f2);
            color: white; display: flex; align-items: center; justify-content: center;
            font-weight: bold; font-size: 14px; box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3); transition: transform 0.2s;
        }
        .nav-link:hover .user-avatar-nav { transform: scale(1.1); }

        .user-menu-modern {
            min-width: 260px; border: none; border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12); padding: 8px; margin-top: 8px !important; animation: fadeInMenu 0.2s ease;
        }
        @keyframes fadeInMenu { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
        .user-menu-header { padding: 12px; border-bottom: 1px solid #e9ecef; margin-bottom: 6px; }
        .user-avatar-large {
            width: 44px; height: 44px; border-radius: 50%;
            background: linear-gradient(135deg, #0d6efd, #6610f2);
            color: white; display: flex; align-items: center; justify-content: center;
            font-weight: bold; font-size: 18px; box-shadow: 0 3px 10px rgba(13, 110, 253, 0.3); flex-shrink: 0;
        }
        .user-menu-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 500; color: #333; transition: all 0.15s; margin-bottom: 2px; }
        .user-menu-item:hover { background: #f8f9fa; transform: translateX(3px); color: #0d6efd; }
        .user-menu-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
        .user-menu-logout:hover { background: #fff5f5 !important; color: #dc3545 !important; }
        
        @media (max-width: 768px) {
            .user-menu-modern { min-width: 240px; margin-right: 8px; }
            .user-avatar-nav { width: 28px; height: 28px; font-size: 12px; }
            .dropdown-menu-end { right: 0 !important; left: auto !important; }
        }

        .btn-nav-login { border-radius: 8px; padding: 6px 14px; font-weight: 500; transition: all 0.2s; }
        .btn-nav-login:hover { background: #0d6efd; color: white; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25); }
        .btn-nav-signup { border-radius: 8px; padding: 6px 16px; font-weight: 600; transition: all 0.2s; box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3); }
        .btn-nav-signup:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(13, 110, 253, 0.45); }

        @media (max-width: 991px) {
            .btn-nav-login, .btn-nav-signup { width: 100%; margin-top: 6px; text-align: center; }
        }

        .checkout-stepper { display: flex; justify-content: center; align-items: center; gap: 0; margin-bottom: 30px; padding: 20px 10px; background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
        .stepper-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; max-width: 180px; }
        .stepper-circle { width: 44px; height: 44px; border-radius: 50%; background: #e9ecef; color: #6c757d; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; margin-bottom: 8px; transition: all 0.3s ease; z-index: 2; position: relative; }
        .stepper-step.active .stepper-circle { background: #0d6efd; color: white; box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4); transform: scale(1.1); }
        .stepper-step.done .stepper-circle { background: #198754; color: white; }
        .stepper-label { font-size: 13px; color: #6c757d; font-weight: 500; text-align: center; }
        .stepper-step.active .stepper-label { color: #0d6efd; font-weight: 700; }
        .stepper-step.done .stepper-label { color: #198754; }
        .stepper-step::after { content: ""; position: absolute; top: 22px; left: 50%; width: 100%; height: 3px; background: #e9ecef; z-index: 1; }
        .stepper-step:last-child::after { display: none; }
        .stepper-step.done::after { background: #198754; }
        @media (max-width: 576px) {
            .checkout-stepper { padding: 15px 5px; }
            .stepper-circle { width: 36px; height: 36px; font-size: 14px; }
            .stepper-label { font-size: 11px; }
        }

        #uniplace-install-btn {
            position: fixed; bottom: 80px; right: 20px;
            z-index: 1040; display: none; align-items: center; gap: 8px; padding: 12px 20px;
            background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%); color: #fff; border: none; border-radius: 50px;
            font-weight: 600; font-size: 15px; box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4); cursor: pointer; transition: all 0.25s ease;
            animation: pulse-install 2s infinite;
        }
        #uniplace-install-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(13, 110, 253, 0.55); }
        #uniplace-install-btn.show { display: inline-flex; }
        #uniplace-install-btn i { font-size: 1.2rem; }
        #uniplace-install-btn .close-x { margin-left: 6px; opacity: 0.7; font-size: 1rem; }
        #uniplace-install-btn .close-x:hover { opacity: 1; }
        @keyframes pulse-install { 0%, 100% { box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4); } 50% { box-shadow: 0 6px 28px rgba(13, 110, 253, 0.7); } }

        #ios-install-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1060; align-items: center; justify-content: center; padding: 20px; }
        #ios-install-modal.show { display: flex; }
        #ios-install-modal .modal-box { background: #fff; border-radius: 16px; max-width: 380px; width: 100%; padding: 24px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
        #ios-install-modal h5 { color: #0d6efd; font-weight: 700; margin-bottom: 16px; }
        #ios-install-modal ol { text-align: left; padding-left: 20px; margin: 16px 0; }
        #ios-install-modal ol li { margin-bottom: 10px; }
        #ios-install-modal .icon-share { display: inline-block; background: #0d6efd; color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 0.9rem; }
        
        @media (max-width: 768px) {
            #uniplace-install-btn { bottom: 80px; right: 15px; padding: 10px 16px; font-size: 14px; }
        }

        body.chat-page, body.messages-page { background: #e5ddd5; overflow: hidden; }
        body.chat-page nav.navbar, body.chat-page .navbar, body.chat-page footer, body.chat-page .footer, body.chat-page #uniplace-install-btn,
        body.messages-page nav.navbar, body.messages-page .navbar, body.messages-page footer, body.messages-page .footer, body.messages-page #uniplace-install-btn { display: none !important; }
        body.chat-page main, body.messages-page main { padding: 0 !important; margin: 0 !important; height: 100vh; height: 100dvh; overflow: hidden; }

        .wishlist-overlay-wrapper { position: relative; overflow: hidden; }
        .wishlist-btn-overlay { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); transition: transform 0.2s, background 0.2s; z-index: 10; padding: 0; }
        .wishlist-btn-overlay:hover { transform: scale(1.1); background: #ffffff; }
        .wishlist-btn-overlay:active { transform: scale(0.95); }
        .wishlist-btn-overlay i { font-size: 20px; color: #dc3545; transition: color 0.2s; }
        .wishlist-btn-overlay.is-active { background: #ffffff; }
        
        .mobile-bottom-nav {
            position: fixed; bottom: 0; left: 0; width: 100%; background: #ffffff;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.05); display: flex; justify-content: space-around; align-items: center;
            padding: 8px 0; padding-bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 1030; border-top: 1px solid #eee;
        }
        .mobile-bottom-nav .nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #888; font-size: 10px; font-weight: 500; gap: 3px; transition: color 0.2s; }
        .mobile-bottom-nav .nav-item i { font-size: 22px; }
        .mobile-bottom-nav .nav-item.active { color: #198754; }
        
        body.chat-page .mobile-bottom-nav { display: none !important; }

        @media (max-width: 768px) {
            main { padding-bottom: 100px !important; }
            body.chat-page main { padding-bottom: 0 !important; }
            footer { display: none !important; }
            body.is-auth main { padding-bottom: 140px !important; }
        }

        @media (max-width: 768px) {
            .container { padding-left: 6px !important; padding-right: 6px !important; }
            .row.g-3 { --bs-gutter-x: 4px; --bs-gutter-y: 4px; }
            .card-produit { border-radius: 8px !important; box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; background: #fff; border: none !important; overflow: hidden; }
            .card-produit .card-img-top { height: 170px !important; object-fit: cover; border-radius: 0 !important; }
            .card-produit .card-body { padding: 6px 8px !important; }
            .card-produit .card-title { font-size: 12px !important; line-height: 1.2; height: 29px; white-space: normal !important; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 4px !important; font-weight: 500; }
            .card-produit .prix-fcfa { font-size: 14px !important; font-weight: 800 !important; color: #198754 !important; }
            .card-produit .rating-stars { font-size: 10px; margin-bottom: 3px; }
        }

        body.dark-mode { background-color: #121212 !important; color: #e0e0e0 !important; }
        body.dark-mode .text-dark, body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 { color: #ffffff !important; }
        body.dark-mode .text-muted { color: #a0a0a0 !important; }
        body.dark-mode .navbar, body.dark-mode .card, body.dark-mode .dropdown-menu, body.dark-mode .bg-white, body.dark-mode .bg-light, body.dark-mode .mobile-bottom-nav { background-color: #1e1e1e !important; color: #e0e0e0 !important; border-color: #333333 !important; }
        body.dark-mode .border-bottom, body.dark-mode .border-top, body.dark-mode hr { border-color: #333333 !important; }
        body.dark-mode .nav-link, body.dark-mode .dropdown-item { color: #e0e0e0 !important; }
        body.dark-mode .dropdown-item:hover { background-color: #333333 !important; }
        body.dark-mode .card-produit { background-color: #1e1e1e !important; }
        body.dark-mode .card-produit .card-title { color: #ffffff !important; }
        body.dark-mode .form-control, body.dark-mode .form-select, body.dark-mode textarea { background-color: #2c2c2c !important; color: #ffffff !important; border-color: #444 !important; }
/* ============================================================
   🚑 FIX FINAL CSS GLOBAL — Anti-décalage et Plein Écran
   ============================================================ */
@media (max-width: 991px) {
    /* 1. On verrouille la largeur du site sur celle de l'écran */
    html, body {
        overflow-x: hidden !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 2. Le conteneur principal prend toute la largeur sans marges */
    .container, .container-fluid, main {
        width: 100vw !important;
        max-width: 100vw !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }

    /* 3. On garde un petit espace de 15px pour le texte à l'intérieur */
    .container > p, .container > h1, .container > h2, .container > h3, 
    .container > .row, .container > .card, 
    .container > div:not([class*="banner"]):not([style*="background"]) {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* 4. La navbar prend TOUTE la largeur et l'avatar n'est plus coupé */
    .navbar.navbar-expand-lg {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .navbar.navbar-expand-lg .container {
        width: 100vw !important;
        max-width: 100vw !important;
        padding-left: 12px !important;
        padding-right: 12px !important; 
    }

    /* 5. La barre du bas prend TOUTE la largeur et espace bien les icônes */
    .mobile-bottom-nav {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        padding: 8px 12px !important;
        margin: 0 !important;
    }
}
