/* 🎨 Système de Design - Version 2 / Design System - Version 2 */
:root {
    /* 🎨 Couleur exacte du texte du logo (Coups De Main) */
    --logo-blue: #00A8FF;
    --primary: #00A8FF; /* Bleu Cyan vif du logo */
    --primary-dark: #008cd6;
    --primary-light: #e6f6ff;
    
    --secondary: #00A8FF; /* Footer aligné sur la couleur du texte du logo */
    
    --background: #fdfdfd;
    --card-bg: rgba(255, 255, 255, 0.7);
    --text-main: #2d3436;
    --text-muted: #636e72;
    
    /* Jetons de Glassmorphism / Glassmorphism Tokens */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --glass-blur: blur(10px);
    
    /* Rayons et Espacement / Radii and Spacing */
    --radius-lg: 24px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
    /* Sticky Footer - Flexbox */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

a {
    transition: var(--transition-smooth);
    text-decoration: none;
}

/* Animations Globales / Global Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s ease forwards;
}
/* --- 💬 INTERFACE CHAT PREMIUM (WHATSAPP STYLE) --- */
.chat-container {
    height: 500px;
    overflow-y: auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

.chat-bubble {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    position: relative;
    line-height: 1.5;
    animation: fadeInBubble 0.3s ease-out;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@keyframes fadeInBubble {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble-sent {
    align-self: flex-end;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-bubble-received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3436;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0,0,0,0.05);
}

.chat-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
    text-align: right;
}

.chat-bubble-received .chat-time {
    color: #636e72;
}

.chat-input-group {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.chat-input-group:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.chat-input-group input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    outline: none;
}

.chat-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-send {
    background: #6a11cb;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-send:hover {
    background: #2575fc;
    transform: scale(1.1) rotate(-10deg);
}

/* Custom scrollbar for chat */
.chat-container::-webkit-scrollbar {
    width: 6px;
}
.chat-container::-webkit-scrollbar-track {
    background: transparent;
}
.chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 🧊 Utilitaires Glassmorphism / Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* Composants / Components */
.btn-premium {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-v2 {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary-v2:hover {
    box-shadow: 0 10px 20px rgba(65, 193, 186, 0.3);
    filter: brightness(1.1);
    color: white;
}

/* 🧭 En-tête / Header avec Fond Blanc et Bordure Bleue Logo #00A8FF */
header.sticky-top,
.site-header {
    background-color: #ffffff !important;
    border-bottom: 3px solid var(--logo-blue) !important;
    box-shadow: 0 4px 20px rgba(0, 168, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-logo-row {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 168, 255, 0.15);
}

.nav-link-v2 {
    color: #1e293b !important;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

.nav-link-v2:hover {
    background: rgba(0, 168, 255, 0.08);
    color: var(--logo-blue) !important;
}

/* Pied de page / Footer avec la couleur exacte du texte du logo (#00A8FF) */
footer {
    background-color: var(--logo-blue) !important;
    color: #ffffff;
    padding: 4rem 0 2rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-shrink: 0;
}

footer .hover-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

footer .hover-link:hover {
    color: #ffffff !important;
    padding-left: 6px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* ✨ Utilitaires Premium / Premium Utilities */
.bg-gradient-premium {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.icon-circle {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.object-fit-cover {
    object-fit: cover;
}

/* 💬 Système de Chat / Chat System */
.chat-container {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.chat-bubble {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 20px;
    margin-bottom: 15px;
    position: relative;
    font-size: 0.95rem;
    animation: fadeInUp 0.3s ease;
}

.chat-bubble-sent {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble-received {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-input-group {
    background: white;
    border-radius: 50px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.chat-input-group input {
    border: none;
    outline: none;
    padding: 10px;
    flex-grow: 1;
}

.btn-send {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-send:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--primary-dark);
}

.conv-item {
    padding: 15px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.conv-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border);
    transform: translateX(5px);
}

.conv-item.active {
    background: var(--primary);
    color: white;
}

/* 📝 Formulaires Premium V2 / Premium Forms V2 */
.form-control-v2 {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    color: var(--primary-dark);
    backdrop-filter: blur(5px);
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.form-control-v2:focus {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(65, 193, 186, 0.2);
    /* Note: le code HTML utilisera aussi les 'form-floating' de Bootstrap */
}

.form-control-v2::placeholder {
    color: rgba(45, 52, 54, 0.4);
}

/* 📊 Dashboard & Profile V2 */
.nav-pills-premium {
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.nav-pills-premium .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-pills-premium .nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(65, 193, 186, 0.2);
}

.nav-pills-premium .nav-link:not(.active):hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
    border-color: var(--primary);
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

/* 📋 Toggle List/Grid */
.ads-viewer.list-view .annonce-grid-item {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.ads-viewer.list-view .glass-card {
    flex-direction: row !important;
    height: auto !important;
    min-height: 200px !important;
}

.ads-viewer.list-view .card-img-wrapper {
    width: 250px !important;
    min-width: 250px !important;
    height: 100% !important;
    aspect-ratio: auto !important;
}

.ads-viewer.list-view .card-img-wrapper img {
    height: 100% !important;
}

.ads-viewer.grid-view .card-img-wrapper {
    aspect-ratio: 4 / 3;
    height: auto;
}

.ads-viewer.grid-view .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ads-viewer.list-view .card-body {
    flex: 1;
}

.btn-toggle-view {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.btn-toggle-view.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 🖼️ Format uniformisé pour toutes les photos d'annonces (Ratio 4:3) */
.card-img-container {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f8f9fa;
    display: block;
    width: 100%;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-img-container:hover img {
    transform: scale(1.05);
}

/* 📏 Alignement Rigoureux des Cartes */
.glass-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 240px; /* Force une hauteur minimale pour le corps */
}

.glass-card .card-title {
    min-height: 3rem; /* Force 2 lignes de titre */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5rem;
}

.glass-card .card-text {
    min-height: 3rem; /* Force 2 lignes de description */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.5rem !important;
}

.glass-card .mt-auto {
    margin-top: auto !important;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* 📍 Autocomplétion d'adresse / Address Autocomplete */
.address-suggestions {
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 5px;
    display: none; /* Caché par défaut */
}

.address-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.address-suggestion-item:last-child {
    border-bottom: none;
}

.address-suggestion-item:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.address-suggestion-item i {
    color: var(--primary);
}

/* --- 🪄 RECHERCHE MAGIQUE PREMIUM (V4.12.3) --- */
.magic-field-group .form-control-v2 {
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.icecat-premium-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(84, 160, 255, 0.4);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border-left: 6px solid var(--primary);
    animation: fadeInUp 0.5s ease-out;
}

.icecat-badge-certified {
    background: linear-gradient(135deg, #0cebeb, #20e3b2);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.spec-pill {
    background: #f1f2f6;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.85rem;
    display: inline-block;
    margin: 2px;
    border: 1px solid rgba(0,0,0,0.03);
}

.magic-suggestion-btn {
    transition: var(--transition-smooth);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.magic-suggestion-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* 🎨 Branding & Logos Responsive */
.navbar-logo {
    height: 80px;
    max-height: 85px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.navbar-logo:hover {
    transform: scale(1.03);
}

.hero-logo {
    max-width: 460px;
    width: 90%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

/* 📱 Navbar Mobile Responsive & Bouton Burger */
.navbar-toggler {
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.navbar-toggler:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3) !important;
}

.navbar-toggler-icon {
    display: inline-block !important;
    width: 1.5em !important;
    height: 1.5em !important;
    vertical-align: middle !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815, 23, 42, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% !important;
}

/* 🧭 Logo Navbar - Hauteur fixée à 125px (+20%) */
.navbar-logo {
    height: 125px !important;
    max-height: 125px !important;
    width: auto !important;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.navbar-logo:hover {
    transform: scale(1.03);
}

@media (max-width: 991.98px) {
    .navbar > .container,
    .navbar > .container-fluid {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .navbar-brand {
        margin: 0 auto !important;
        text-align: center;
        display: flex !important;
        justify-content: center !important;
    }
    .navbar-toggler {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1050;
    }
    .navbar-logo {
        height: 114px !important;
        max-height: 115px !important;
    }
    .hero-logo {
        max-width: 320px;
        width: 85%;
    }
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 1.25rem;
        border-radius: 16px;
        margin-top: 0.75rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    }
    .navbar-collapse .nav-link-v2 {
        display: block;
        padding: 0.75rem 1rem;
        color: #0f172a !important;
        font-weight: 600;
        border-radius: 10px;
    }
    .navbar-collapse .nav-link-v2:hover {
        background: rgba(13, 110, 253, 0.08);
        color: #0d6efd !important;
    }
    .navbar-collapse .btn-premium {
        width: 100%;
        text-align: center;
        margin-left: 0 !important;
        padding: 0.75rem 1rem !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-logo {
        height: 84px !important;
        max-height: 85px !important;
    }
    .hero-logo {
        max-width: 280px;
        width: 90%;
    }
}



