/* ============================================
   VARIABLES CSS - COULEURS ET THÈME
   ============================================ */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --bg-dark: #111827;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ============================================
   TITRES RÉDUITS
   ============================================ */
h1 { font-size: 1.5rem; } /* Réduit */
h2 { font-size: 1.25rem; } /* Réduit */
h3 { font-size: 1.125rem; } /* Réduit */
h4 { font-size: 1rem; } /* Réduit */
h5 { font-size: 0.9375rem; } /* Réduit */
h6 { font-size: 0.875rem; } /* Réduit */

/* ============================================
   STYLES POUR LES BANNIÈRES
   ============================================ */
.banner-wrapper {
    width: 100%;
}

.banner-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.banners-container.banners-footer .banner-wrapper {
    display: inline-block;
    margin: 0 10px;
}

.banners-container.banners-header .banner-wrapper {
    display: inline-block;
    margin: 0 5px;
}

.banners-container.banners-content_top,
.banners-container.banners-content_bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.banners-container.banners-content_top .banner-wrapper,
.banners-container.banners-content_bottom .banner-wrapper {
    flex: 1 1 auto;
    min-width: 200px;
    max-width: 100%;
}

/* ============================================
   STYLES POUR LES WIDGETS DE CATÉGORIES
   ============================================ */
.category-widget {
    margin-bottom: 2rem;
}

.category-widget h3 {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: #ffffff;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-sm);
}

.category-widget-carousel {
    position: relative;
}

.category-widget-carousel .carousel-item {
    padding: 0 15px;
}

.category-widget-carousel .carousel-control-prev,
.category-widget-carousel .carousel-control-next {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0.8;
    top: 50%;
    transform: translateY(-50%);
}

.category-widget-carousel .carousel-control-prev-icon,
.category-widget-carousel .carousel-control-next-icon {
    width: 14px;
    height: 14px;
    background-size: 14px 14px;
}

.category-widget-carousel .carousel-control-prev:hover,
.category-widget-carousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

/* Styles pour les widgets dans les sidebars */
.category-widget-sidebar_left,
.category-widget-sidebar_right {
    max-width: 100%;
}

.category-widget-sidebar_left .row,
.category-widget-sidebar_right .row {
    margin: 0;
}

.category-widget-sidebar_left .col-md-6,
.category-widget-sidebar_left .col-lg-4,
.category-widget-sidebar_right .col-md-6,
.category-widget-sidebar_right .col-lg-4 {
    padding: 0.5rem;
}

/* Styles pour les widgets en liste */
.category-widget .row:not(.g-3) {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-widget .col-12:not(.col-md-6):not(.col-lg-4) {
    width: 100%;
}

/* ============================================
   RESET ET BASE
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.5;
    font-size: 0.875rem; /* Réduction de la taille de base du texte */
}

main {
    flex: 1;
}

/* ============================================
   NAVBAR AMÉLIORÉE
   ============================================ */
.navbar {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f8fafc 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    transition: all var(--transition-base);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem; /* Réduit de 1.5rem */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-base);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    transition: transform var(--transition-base);
}

.navbar-brand:hover img {
    transform: scale(1.1);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.375rem 0.75rem !important; /* Réduit */
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    font-size: 0.875rem; /* Réduction de la taille du texte */
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width var(--transition-base);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* ============================================
   BOUTONS AMÉLIORÉS
   ============================================ */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.375rem 0.75rem; /* Réduit de 0.625rem 1.25rem */
    font-size: 0.8125rem; /* Réduction de la taille du texte */
    transition: all var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #34d399 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 0.5rem 1rem; /* Réduit */
    font-size: 0.875rem; /* Réduit */
}

.btn-sm {
    padding: 0.25rem 0.5rem; /* Réduit encore plus */
    font-size: 0.75rem; /* Plus petit */
}

/* ============================================
   CARTES AMÉLIORÉES
   ============================================ */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    overflow: hidden;
    background: var(--bg-white);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-slow);
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

.card-body {
    padding: 0.875rem; /* Réduit de 1.25rem */
}

.card-body.text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem; /* Réduit */
    font-size: 0.9375rem; /* Réduit de 1.125rem */
    line-height: 1.3;
    text-align: center;
}

.card-body.text-center .card-title {
    text-align: center;
}

.card-text {
    color: var(--text-gray);
    font-size: 0.8125rem; /* Réduit de 0.9375rem */
}

.ad-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ad-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ad-badge-urgent {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.ad-badge-exchange {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   FORMULAIRES AMÉLIORÉS
   ============================================ */
.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem; /* Réduit */
    transition: all var(--transition-base);
    font-size: 0.8125rem; /* Réduit de 1rem */
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.375rem; /* Réduit */
    font-size: 0.8125rem; /* Réduit */
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.input-group .btn {
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ============================================
   ALERTES AMÉLIORÉES
   ============================================ */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 0.625rem 0.875rem; /* Réduit */
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
    font-size: 0.8125rem; /* Réduit */
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left-color: var(--success-color);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left-color: var(--danger-color);
    color: #991b1b;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left-color: var(--info-color);
    color: #1e40af;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: var(--warning-color);
    color: #92400e;
}

/* ============================================
   CAROUSEL AMÉLIORÉ
   ============================================ */
.carousel-item img {
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all var(--transition-base);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background: white;
    box-shadow: var(--shadow-lg);
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    transition: all var(--transition-base);
}

.carousel-indicators button.active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* ============================================
   FOOTER AMÉLIORÉ
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1f2937 100%) !important;
    color: white;
    padding: 3rem 0 1.5rem !important;
    margin-top: 4rem;
    border-top: 4px solid var(--primary-color);
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width var(--transition-base);
}

footer a:hover {
    color: white;
}

footer a:hover::after {
    width: 100%;
}

/* ============================================
   BADGES ET TAGS
   ============================================ */
.badge {
    padding: 0.25rem 0.5rem; /* Réduit */
    border-radius: var(--radius-sm); /* Réduit */
    font-weight: 500;
    font-size: 0.6875rem; /* Réduit de 0.75rem */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ============================================
   PAGINATION AMÉLIORÉE
   ============================================ */
.pagination .page-link {
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    padding: 0.375rem 0.75rem; /* Réduit */
    margin: 0 0.125rem; /* Réduit */
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 0.8125rem; /* Réduit */
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* ============================================
   ACCORDION AMÉLIORÉ
   ============================================ */
.accordion-button {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f9fafb 100%);
    border: none;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md) !important;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ============================================
   UTILITAIRES
   ============================================ */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============================================
   SCROLLBAR PERSONNALISÉE
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border {
    border-width: 3px;
}

/* ============================================
   FLOAT BUTTON MESSAGES
   ============================================ */
#float-button-new-messages .btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: var(--shadow-xl);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   CROP TEXT UTILITIES
   ============================================ */
.crop-text-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.crop-text-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   CARTES D'ANNONCES AMÉLIORÉES
   ============================================ */
.ad-card {
    position: relative;
    overflow: hidden;
}

.ad-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ad-card .card-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.ad-card .card-title a:hover {
    color: var(--primary-color);
}

.ad-card .price-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.ad-card .card-text {
    font-size: 0.875rem;
    color: var(--text-gray);
    flex-grow: 1;
}

.ad-card .fa-heart {
    transition: all var(--transition-fast);
}

.ad-card .btn-outline-danger:hover .fa-heart,
.ad-card .btn-danger .fa-heart {
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.1);
    }
}

/* ============================================
   STATISTICS CARD SUR LA PAGE D'ACCUEIL
   ============================================ */
.stats-card {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f9fafb 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stats-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.stats-card .card-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.stats-card i {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

/* ============================================
   FILTRES AMÉLIORÉS
   ============================================ */
.bg-light {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f9fafb 100%) !important;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.accordion-item {
    border: none;
    margin-bottom: 1rem;
}

.accordion-item:last-child {
    margin-bottom: 0;
}

/* ============================================
   SECTIONS "COMMENT ÇA MARCHE"
   ============================================ */
section .border {
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

section .border:hover {
    border-color: var(--primary-color) !important;
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

section .display-3 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   DROPDOWN MENU AMÉLIORÉ
   ============================================ */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    transition: all var(--transition-fast);
    margin-bottom: 0.25rem;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: var(--primary-color);
    transform: translateX(4px);
}

.dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.dropdown-item.text-danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
    color: var(--danger-color);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--border-color);
}

/* ============================================
   SEARCH BAR AMÉLIORÉE (si ajoutée)
   ============================================ */
.search-bar {
    position: relative;
}

.search-bar .form-control {
    padding-right: 3rem;
}

.search-bar .search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    pointer-events: none;
}

/* ============================================
   LOADING SPINNER AMÉLIORÉ
   ============================================ */
.spinner-border-primary {
    border-color: var(--primary-color);
    border-right-color: transparent;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all var(--transition-base);
    cursor: pointer;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.back-to-top.show {
    display: flex;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
}

/* ============================================
   PROGRESS BAR PERSONNALISÉE
   ============================================ */
.progress {
    height: 8px;
    border-radius: var(--radius-md);
    background-color: var(--bg-light);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transition: width var(--transition-base);
}

/* ============================================
   TOOLTIP PERSONNALISÉ
   ============================================ */
.tooltip-inner {
    background: var(--bg-dark);
    color: white;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
}

/* ============================================
   MODAL AMÉLIORÉ
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 2px solid var(--border-color);
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-white) 0%, #f9fafb 100%);
}

.modal-footer {
    border-top: 2px solid var(--border-color);
    padding: 1.5rem;
    background: linear-gradient(135deg, #f9fafb 0%, var(--bg-white) 100%);
}

.modal-title {
    font-weight: 600;
    color: var(--text-dark);
}

/* ============================================
   NAV TABS AMÉLIORÉS
   ============================================ */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-gray);
    font-weight: 500;
    padding: 0.5rem 0.875rem; /* Réduit */
    font-size: 0.8125rem; /* Réduit */
    transition: all var(--transition-fast);
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--primary-light);
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
    font-weight: 600;
}

/* ============================================
   LIST GROUP ITEMS AMÉLIORÉS
   ============================================ */
.list-group-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    padding: 0.5rem 0.75rem; /* Réduit */
    font-size: 0.8125rem; /* Réduit */
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background-color: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
}

.list-group-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    font-weight: 600;
}

/* ============================================
   CHAT MESSAGES STYLES
   ============================================ */
#chat-box-container {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-light);
}

#chat-box-container::-webkit-scrollbar {
    width: 6px;
}

#chat-box-container::-webkit-scrollbar-track {
    background: var(--bg-light);
}

#chat-box-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* ============================================
   TABLES AMÉLIORÉES
   ============================================ */
.table {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.table thead th {
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

/* ============================================
   STATISTICS CARD
   ============================================ */
.stats-card {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f9fafb 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.stats-card:hover::before {
    transform: scaleX(1);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.stats-card .card-text {
    font-size: 1.125rem; /* Réduit de 1.5rem */
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

.stats-card h3,
.stats-card h6 {
    text-align: center;
    width: 100%;
}

.stats-card a.stretched-link {
    z-index: 1;
}

/* ============================================
   DASHBOARD SPECIFIC STYLES
   ============================================ */
.dashboard-nav .list-group-item {
    border-left: 3px solid transparent;
    transition: all var(--transition-fast);
}

.dashboard-nav .list-group-item:hover {
    border-left-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
    padding-left: 1rem; /* Réduit de 1.5rem */
}

.dashboard-nav .list-group-item.active {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   ADMIN DASHBOARD STYLES
   ============================================ */
.admin-stats-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1rem; /* Réduit de 1.5rem */
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border-top: 4px solid;
    position: relative;
}

.admin-stats-card.border-primary {
    border-top-color: var(--primary-color);
}

.admin-stats-card.border-success {
    border-top-color: var(--success-color);
}

.admin-stats-card.border-danger {
    border-top-color: var(--danger-color);
}

.admin-stats-card.border-info {
    border-top-color: var(--info-color);
}

.admin-stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   ADMIN DASHBOARD SPECIFIC STYLES
   ============================================ */
.admin-dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    min-height: 100vh;
}

.admin-dashboard .card {
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.admin-dashboard .card:hover {
    border-color: var(--primary-light);
}

.admin-dashboard .table {
    font-size: 0.8125rem;
}

.admin-dashboard .table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.admin-dashboard .badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
}

.admin-dashboard .form-select-sm,
.admin-dashboard .form-control-sm {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}

.admin-dashboard .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* Amélioration des list-group dans l'admin */
.admin-dashboard .list-group-item {
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.admin-dashboard .list-group-item:hover {
    background-color: rgba(37, 99, 235, 0.05);
    border-left-color: var(--primary-color);
    padding-left: 1rem;
}

.admin-dashboard .list-group-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* Progress bars améliorées */
.admin-dashboard .progress {
    height: 10px;
    border-radius: var(--radius-md);
    background-color: rgba(0, 0, 0, 0.05);
}

.admin-dashboard .progress-bar {
    border-radius: var(--radius-md);
    transition: width 0.6s ease;
}

/* Amélioration des cartes de statistiques admin */
.admin-dashboard .stats-card {
    cursor: pointer;
}

.admin-dashboard .stats-card:hover {
    transform: translateY(-6px) scale(1.02);
}

/* Tables améliorées dans l'admin */
.admin-dashboard .table-responsive {
    border-radius: var(--radius-md);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-dashboard .table tbody tr {
    transition: all var(--transition-fast);
}

.admin-dashboard .table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.03);
    transform: scale(1.01);
}

.admin-dashboard .table th:last-child,
.admin-dashboard .table td:last-child {
    display: table-cell !important;
    visibility: visible !important;
    white-space: nowrap;
}

.admin-dashboard .table .btn-group {
    display: inline-flex !important;
    gap: 0.25rem;
}

/* Filtres améliorés */
.admin-dashboard .card-body form {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Empty states améliorés */
.admin-dashboard .empty-state {
    padding: 3rem 2rem;
}

.admin-dashboard .empty-state i {
    font-size: 3rem;
    opacity: 0.5;
}

/* ============================================
   PRICE DISPLAY
   ============================================ */
.price-display {
    font-size: 1rem; /* Réduit de 1.5rem */
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    padding: 0.375rem 0.75rem; /* Réduit */
    border-radius: var(--radius-md);
    display: inline-block;
}

/* ============================================
   MINIATURES D'IMAGES SUR PAGE DÉTAILS ANNONCE
   ============================================ */
.ad-thumbnails-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin-top: 1rem !important;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.ad-thumbnail {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    cursor: pointer !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.ad-thumbnail:hover {
    border-color: var(--primary-color) !important;
    transform: scale(1.1) !important;
    box-shadow: var(--shadow-md);
    z-index: 10;
    position: relative;
}

.ad-thumbnail:active {
    transform: scale(0.95) !important;
}

/* Assurer la visibilité sur mobile */
@media (max-width: 768px) {
    .ad-thumbnails-container {
        gap: 0.25rem !important;
        padding: 0.25rem !important;
    }
    
    .ad-thumbnail {
        width: 60px !important;
        height: 60px !important;
    }
} 