/* Styles de base pour le corps */
/* Désactiver complètement le défilement horizontal */
html, body {
      -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif
}

.text-sm {
    font-weight: 500;
}

.fa, .fas, .far, .fab {
  font-family: "Font Awesome 6 Free" !important;
          font-family: 'FontAwesome' !important;
}
button.action-btn[data-action="share"][onclick] {
    display: none !important;
}

/* Structure principale */
.main-layout {
  /*  display: flex;
    height: calc(100vh - 80px); /* 80px = hauteur du header 
    overflow: hidden; /* Désactive tout débordement */
}

/* Style de base - ascenseurs cachés */
.annonces-content,
.filters-sidebar {
    /* scrollbar-width: none; Firefox */
   /* -ms-overflow-style: none;  IE/Edge */
}

/* Masquer la scrollbar WebKit par défaut */
.annonces-content::-webkit-scrollbar,
.filters-sidebar::-webkit-scrollbar {

    width: 0;
    height: 0;
    background: transparent;
}

/* Afficher la scrollbar au focus/hover */
.annonces-content:focus::-webkit-scrollbar,
.annonces-content:hover::-webkit-scrollbar,
.filters-sidebar:focus::-webkit-scrollbar,
.filters-sidebar:hover::-webkit-scrollbar {
   /* display: block;*/
    width: 8px;
    height: 8px;
}

/* Style de la scrollbar visible */
.annonces-content::-webkit-scrollbar-thumb,
.filters-sidebar::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.4);
    border-radius: 4px;
}

.annonces-content::-webkit-scrollbar-thumb:hover,
.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.8);
}

/* Assurer que le contenu reste scrollable */
.annonces-content,
.filters-sidebar {
   /* overflow-y: auto;
    -webkit-overflow-scrolling: touch;*/
}

/* Animation fluide */
.annonces-content,
.filters-sidebar {
    transition: scrollbar-color 0.3s ease; /* Firefox */
}

.annonces-content:hover,
.filters-sidebar:hover,
.annonces-content:focus,
.filters-sidebar:focus {
    scrollbar-color: rgba(249, 115, 22, 0.4) transparent; /* Firefox */
}

/* Style pendant le défilement */
.scrolling-active {
    outline: 2px solid rgba(249, 115, 22, 0.3);
    outline-offset: -2px;
}

/* Transition fluide */
.annonces-content,
.filters-sidebar {
    transition: outline 0.2s ease, scrollbar-color 0.3s ease;
}

@supports (scrollbar-color: auto) {
    .annonces-content,
    .filters-sidebar {
        scrollbar-color: transparent transparent;
        scrollbar-width: thin;
    }
    
    .annonces-content:hover,
    .annonces-content:focus,
    .filters-sidebar:hover,
    .filters-sidebar:focus {
        scrollbar-color: rgba(249, 115, 22, 0.4) transparent;
    }
}

/*********************MENU GAUCHE - ASCENSEUR************/

/* Style général du sidebar */
#categories-panel {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(249, 115, 22, 0.2) transparent; /* Firefox plus transparent */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* WebKit Scrollbar (Chrome, Safari, Edge) */
#categories-panel::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#categories-panel::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
}

#categories-panel::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.15); /* Transparence augmentée */
    border-radius: 3px;
    border: 1px solid transparent; /* Bordure transparente */
    transition: background 0.3s ease;
}

#categories-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.3); /* Légèrement plus visible au hover */
}

/* Style pour le mode compact */
#categories-panel.sidebar-compact::-webkit-scrollbar {
    width: 4px;
}

#categories-panel.sidebar-compact::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.1); /* Encore plus discret en mode compact */
}

/* Animation fluide */
#categories-panel {
    transition: scrollbar-color 0.3s ease;
}

#categories-panel:hover {
    scrollbar-color: rgba(249, 115, 22, 0.25) transparent; /* Firefox */
}

/* Style mobile spécifique */
@media (max-width: 1024px) {
    #categories-panel {
       /* scrollbar-width: none;*/
    }
    
    #categories-panel::-webkit-scrollbar {
       /* display: none;*/
    }
    
    #categories-panel.mobile-visible {
        scrollbar-width: thin;
        scrollbar-color: rgba(249, 115, 22, 0.15) transparent;
    }
    
    #categories-panel.mobile-visible::-webkit-scrollbar {
        display: block;
        width: 4px;
    }
    
    #categories-panel.mobile-visible::-webkit-scrollbar-thumb {
        background: rgba(249, 115, 22, 0.15);
    }
}

/*******************************************
*******************************************/

/* Colonne des annonces */
.annonces-content {
    flex: 1;
   /*  overflow-y: auto; Ascenseur vertical seulement */
    overflow-x: hidden;
    padding: 1rem;
}

/* Panneau des filtres */
.filters-sidebar {
   /* overflow-y: auto;  Ascenseur vertical indépendant */
    overflow-x: hidden;
    height: calc(100vh - 80px);
}

/* Correction pour mobile */
/* Nouveau style mobile */
@media (max-width: 1025px) {
    .main-layout {
     /*   display: flex;
        flex-direction: column;
        min-height: calc(100vh - 80px); /* S'adapte au contenu */
    }
    
    .annonces-content {
        flex: 1;
       /* overflow-y: visible;  Scroll naturel */
        padding: 0.5rem;
    }
    
    /* Correction pour le header fixe */
    body {
        padding-top: 80px; /* Compense le header fixe */
        padding-left: 2px !important;
        padding-right: 10px !important;
    }
}

/* Styles pour le panneau de catégories */
/* ==================== SIDEBAR ==================== */
#categories-panel {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 300px;
    position: fixed;
    left: 0;
    top: 80px;
    height: calc(100vh - 80px);
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 16px;
    overflow-y: auto;
    /*scrollbar-width: none;*/
   /* -ms-overflow-style: none;*/
}

#categories-panel::-webkit-scrollbar {
    width: 0;
    transition: width 0.2s ease;
}

#categories-panel:hover::-webkit-scrollbar {
    width: 8px;
}

#categories-panel::-webkit-scrollbar-track {
    background: transparent;
}

#categories-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

#categories-panel:hover {
    scrollbar-width: thin;
}

#sidebar-hover-zone {
    width: 20px;
    height: 100%;
    position: absolute;
    left: 0;
}

/* Sidebar compact mode */
#categories-panel.sidebar-compact {
    width: 60px;
    padding: 16px 8px;
    z-index: 10;
}

#categories-panel.sidebar-compact .sidebar-text,
#categories-panel.sidebar-compact .panel-title,
#categories-panel.sidebar-compact .category-title,
#categories-panel.sidebar-compact .payment-methods {
    display: none;
}

#categories-panel.sidebar-compact .category-item,
#categories-panel.sidebar-compact .ad-type-item,
#categories-panel.sidebar-compact .tontine-item {
    justify-content: center;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 8px;
}

#categories-panel.sidebar-compact .category-item i,
#categories-panel.sidebar-compact .ad-type-item span.w-2,
#categories-panel.sidebar-compact .tontine-item i {
    font-size: 1em;
}

#categories-panel.sidebar-compact .pin-sidebar {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 8px;
}

#sidebar-toggle.active,
#sidebar-state-toggle.active,
#pin-sidebar.pinned {
    background: #4b5563;
    color: white;
    padding-left: 4px;
    padding-right: 4px;
}

/* Sidebar items */
.category-item,
.ad-type-item,
.tontine-item {
    transition: all 0.2s ease;
}

.category-item:hover,
.ad-type-item:hover,
.tontine-item:hover {
    background-color: #fed7aa;
    transform: scale(1.05);
}

#categories-panel.sidebar-compact .category-item:hover,
#categories-panel.sidebar-compact .ad-type-item:hover,
#categories-panel.sidebar-compact .tontine-item:hover {
    background-color: #fed7aa;
    transform: scale(1.05);
}

#categories-panel.sidebar-compact .category-item.active,
#categories-panel.sidebar-compact .ad-type-item.active,
#categories-panel.sidebar-compact .tontine-item.active {
    background-color: #ea580c;
    color: white;
}

#categories-panel.sidebar-compact .panel-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
}

#categories-panel.sidebar-compact .category-section::after,
#categories-panel.sidebar-compact .ad-type-section::after,
#categories-panel.sidebar-compact .tontine-section::after {
    content: '';
    display: block;
    width: 80%;
    height: 1px;
    background-color: #e5e7eb;
    margin: 12px auto;
}

/* Styles pour les contrôles de la carte */
.map-controls {
    position: fixed;
    bottom: 6.5rem;
    right: 0.5rem;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: all 200ms ease;
}

.control-btn:hover,
.control-btn.active,
.control-btn:active {
    background-color: #ea580c;
    color: #ffffff;
}

.control-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ea580c;
}

.control-btn i {
    font-size: 1.125rem;
}

/* Style pour le copyright */
.copyright {
    position: fixed;
    bottom: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    font-size: 0.75rem;
    padding: 3px 20px;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-family: 'Arial', sans-serif;
    backdrop-filter: blur(4px);
    pointer-events: auto;
    min-width: 250px;
}

.copyright a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
}

.copyright a:hover {
    text-decoration: underline;
}

/* Styles spécifiques à annonces.php */
/*************************************************/

/* REMPLACER VOTRE CSS EXISTANT PAR CES MODIFICATIONS */

/* Layout principal - inchangé */
.main-layout {
    display: flex;
    flex-direction: row;
   /* margin-top: 65px; /**/
    margin-left: 0px;
    transition: margin-left 0.3s ease;
    
max-width: 1280px;

    padding-left: 1rem;
    padding-right: 1rem;

    margin-left: auto;
    margin-right: auto;    
}

.main-layout.sidebar-compact {
    margin-left: 60px;
}

@media (min-width: 640px) {
.annonces-content {
    flex-grow: 1;
    padding: 1rem; /* Réduit de 1.5rem à 1rem */
    box-sizing: border-box;
    z-index: 20;
}

/* Vue grille - OPTIMISÉE pour plus d'annonces */
.annonces-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}



/* Style pour le badge sponsorisé */
.type-badge.bg-purple-600 {
    background-color: #6B46C1; /* Violet pour le badge sponsorisé */
}

/* Contenu compact */
.annonce-card .p-4 {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Titre compact */
.annonce-card h2 {
    font-size: 0.875rem !important;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
        font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.annonce-card h2 {
    text-transform: lowercase;
}

.annonce-card h2::first-letter {
    text-transform: uppercase;
}


/* Prix en évidence mais compact */
.annonce-card .text-xl {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0rem;
        font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: .9rem;
        font-weight: 700;
        /* margin-top: .4rem; */
        margin-bottom: .3rem;
        font-size: 17px !important;
        font-weight: 500;
        color: #ea580c;
}

/* Info compacte (catégorie + date) */
.annonce-card .text-sm {
    font-size: 0.75rem;
    margin-bottom: 0px !important;
    gap: 1rem;
    margin-top: 3px !important;
        font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Rating compact */
.rating {
    margin-bottom: 0.5rem;
    gap: 1px;
}

.rating i {
    font-size: 0.75rem;
}

/* Description compacte */
.annonce-card .line-clamp-2 {
    font-size: 0.90rem;
    line-height: 1.4 !important;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* overflow: hidden; */
    padding-top: 5px;
    padding-top: 3px;
    /* font-weight: 550; */
    font-size: 0.90rem !important;
    white-space: normal;
    /* overflow: visible !important; */
    text-overflow: ellipsis;
    font-weight: 400;
}

/* Boutons d'action compacts */
.annonce-card .flex.gap-2 {
    gap: 0.25rem;
    margin-top: auto;
    /*padding-left: 0px !important;*/
    margin-left: 0px;    
    /*padding-bottom: 3px;*/
}

.action-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-height: 32px;
}

.action-btn i {
    font-size: 0.75rem;
}

/* Badges compacts */
.type-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.6rem;
}

.absolute.top-3.right-3 {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem;
}

.absolute.top-3.left-3 {
    top: 0.5rem;
    /*left: 78%;*/
}

/* Vue liste - optimisée pour annonces normales et sponsorisées */
.annonces-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.annonces-grid.list-view .annonce-card,
.annonces-grid.list-view .sponsored-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

.annonces-grid.list-view .annonce-image {
    width: 180px;
    height: 120px;
    flex-shrink: 0;
}

/* Vue mosaïque - optimisée pour annonces normales et sponsorisées */
.annonces-grid.mosaic-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.annonces-grid.mosaic-view .annonce-card,
.annonces-grid.mosaic-view .sponsored-card {
    height: 200px;
}

.annonces-grid.mosaic-view .annonce-image {
    height: 100px;
}

/* RESPONSIVE - Optimisations mobiles */
@media (max-width: 1200px) {
    .annonces-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* RESPONSIVE MOBILE - Vues miniatures */
@media (max-width: 640px) {
    /* Vue grille mobile - miniature */
    .annonces-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.5rem;
    }
    
    .annonces-grid.grid-view .annonce-card,
    .annonces-grid.grid-view .sponsored-card {
        height: 200px;
        border-radius: 6px;
    }
    
    .annonces-grid.grid-view .annonce-image {
        height: 80px;
    }
    
    .annonces-grid.grid-view .p-4 {
        padding: 0.5rem;
    }
    
    .annonces-grid.grid-view h2 {
        font-size: 0.75rem;
        line-height: 1.1;
        -webkit-line-clamp: 1;
        margin-bottom: 0.25rem;
    }
    
    .annonces-grid.grid-view .text-xl {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .annonces-grid.grid-view .text-sm {
        font-size: 0.625rem;
        gap: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .annonces-grid.grid-view .rating {
        margin-bottom: 0.25rem;
        overflow: hidden;
    }
    
    .annonces-grid.grid-view .rating i {
        font-size: 0.625rem;
    }
    
    .annonces-grid.grid-view .line-clamp-2 {
        font-size: 0.625rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 1;
    }
    
    .annonces-grid.grid-view .action-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.625rem;
        min-height: 24px;
    }
    
    .annonces-grid.grid-view .action-btn i {
        font-size: 0.625rem;
    }
    
    /* Vue liste mobile - miniature */
    .annonces-grid.list-view {
        gap: 0.5rem;
    }
    
    .annonces-grid.list-view .annonce-card,
    .annonces-grid.list-view .sponsored-card {
        height: 80px;
        border-radius: 6px;
    }
    
    .annonces-grid.list-view .annonce-image {
        width: 100px;
        height: 80px;
    }
    
    .annonces-grid.list-view .p-4 {
        padding: 0.5rem;
        justify-content: space-between;
    }
    
    .annonces-grid.list-view h2 {
        font-size: 0.75rem;
        line-height: 1.1;
        -webkit-line-clamp: 1;
        margin-bottom: 0.125rem;
    }
    
    .annonces-grid.list-view .text-xl {
        font-size: 0.875rem;
        margin-bottom: 0.125rem;
    }
    
    .annonces-grid.list-view .text-sm {
        font-size: 0.625rem;
        gap: 0.25rem;
        margin-bottom: 0.125rem;
    }
    
    .annonces-grid.list-view .rating {
        margin-bottom: 0.125rem;
        overflow: hidden;
    }
    
    .annonces-grid.list-view .rating i {
        font-size: 0.625rem;
    }
    
    .annonces-grid.list-view .line-clamp-2 {
        display: none;
    }
    
    .annonces-grid.list-view .flex.gap-2 {
        gap: 0.125rem;
        flex-wrap: nowrap;
    }
    
    .annonces-grid.list-view .action-btn {
        padding: 0.25rem 0.375rem;
        font-size: 0.625rem;
        min-height: 20px;
        flex: 1;
    }
    
    .annonces-grid.list-view .action-btn i {
        font-size: 0.625rem;
        margin-right: 0.125rem;
    }
    
    /* Vue mosaïque mobile - miniature */
    .annonces-grid.mosaic-view {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.375rem;
    }
    
    .annonces-grid.mosaic-view .annonce-card,
    .annonces-grid.mosaic-view .sponsored-card {
        height: 140px;
        border-radius: 6px;
    }
    
    .annonces-grid.mosaic-view .annonce-image {
        height: 60px;
    }
    
    .annonces-grid.mosaic-view .p-4 {
        padding: 0.375rem;
    }
    
    .annonces-grid.mosaic-view h2 {
        font-size: 0.625rem;
        line-height: 1.1;
        -webkit-line-clamp: 1;
        margin-bottom: 0.125rem;
    }
    
    .annonces-grid.mosaic-view .text-xl {
        font-size: 0.75rem;
        margin-bottom: 0.125rem;
    }
    
    .annonces-grid.mosaic-view .text-sm {
        display: none;
    }
    
    .annonces-grid.mosaic-view .rating {
        margin-bottom: 0.125rem;
        overflow: hidden;
    }
    
    .annonces-grid.mosaic-view .rating i {
        font-size: 0.5rem;
    }
    
    .annonces-grid.mosaic-view .line-clamp-2 {
        display: none;
    }
    
    .annonces-grid.mosaic-view .flex.gap-2 {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .annonces-grid.mosaic-view .action-btn {
        padding: 0.25rem;
        font-size: 0.5rem;
        min-height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .annonces-grid.mosaic-view .action-btn i {
        font-size: 0.5rem;
        margin-right: 0;
    }
    
    .annonces-grid.mosaic-view .action-btn:first-child {
        flex: 1;
    }
    
    .annonces-grid.mosaic-view .action-btn:not(:first-child) {
        width: 100%;
        padding: 0.125rem;
    }
}
    

/******************************ANNONCES SPONSORISES***************************/

/****************************** ANNONCES SPONSORISÉES ***************************/

/* Style de base pour les cartes sponsorisées */
.sponsored-card {
   /* border: 2px solid #FFD700 !important;*/
    background-color: #FFF9E6 !important;
    position: relative;
}

/* Badge "Sponsorisé" */
.type-badge.bg-purple-600 {
    background-color: #6B46C1 !important;
}

/* Couleurs spécifiques pour les sponsors */
.sponsored-card .text-yellow-600 {
    color: #D97706 !important;
}

.sponsored-card .text-yellow-500 {
    color: #F59E0B !important;
}

.sponsored-card .bg-yellow-500 {
    background-color: #F59E0B !important;
}

.sponsored-card .hover\:bg-yellow-600:hover {
    background-color: #D97706 !important;
}

.sponsored-card .focus\:ring-yellow-500:focus {
    --tw-ring-color: #F59E0B !important;
}

.sponsored-card .group-hover\:text-yellow-600:hover {
    color: #D97706 !important;
}

/* Animation discrète pour les cartes sponsorisées */
@keyframes subtlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

.sponsored-card:hover {
   /* animation: subtlePulse 1.5s infinite;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);*/
}

/* Icône étoile pour les sponsors */
.sponsored-card .fa-star {
    color: #F59E0B !important;
}

/* Style des boutons pour les sponsors */
.sponsored-card .action-btn {
    transition: all 0.2s ease;
}

/* Styles spécifiques pour chaque vue */

/* VUE GRILLE */
.annonces-grid.grid-view .sponsored-card {
    height: 280px;
    display: flex;
    flex-direction: column;
}

/* VUE LISTE */
.annonces-grid.list-view .sponsored-card {
    display: flex;
    flex-direction: row;
    height: 120px;
}

.annonces-grid.list-view .sponsored-card .annonce-image {
    width: 180px;
    height: 120px;
}

/* VUE MOSAIQUE */
.annonces-grid.mosaic-view .sponsored-card {
    height: 200px;
}

.annonces-grid.mosaic-view .sponsored-card .annonce-image {
    height: 100px;
}

/* RESPONSIVE MOBILE */
@media (max-width: 640px) {
    /* Vue grille mobile */
    .annonces-grid.grid-view .sponsored-card {
        height: 200px;
    }
    
    /* Vue liste mobile */
    .annonces-grid.list-view .sponsored-card {
        height: 80px;
    }
    
    .annonces-grid.list-view .sponsored-card .annonce-image {
        width: 100px;
        height: 80px;
    }
    
    /* Vue mosaïque mobile */
    .annonces-grid.mosaic-view .sponsored-card {
        height: 140px;
    }
    
    .annonces-grid.mosaic-view .sponsored-card .annonce-image {
        height: 60px;
    }
}

/* Effet de surbrillance au survol */
.sponsored-card:hover {
 /*   box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.2), 
                0 4px 6px -4px rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);*/
}

/* Style du badge catégorie pour les sponsors */
.sponsored-card .absolute.top-3.right-3 {
    /*background-color: var(--top10-primary) !important;*/
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style du texte de description */
.sponsored-card .text-gray-600 {
    color: #4B5563 !important;
}

/* Style des icônes d'information */
.sponsored-card .text-gray-500 {
    color: #6B7280 !important;
        margin-top: 5px !important;
}

/* Style des boutons secondaires */
.sponsored-card .bg-gray-100 {
    background-color: #F3F4F6 !important;
}

.sponsored-card .hover\:bg-red-100:hover {
    background-color: #FEE2E2 !important;
}

.sponsored-card .hover\:bg-blue-100:hover {
    background-color: #DBEAFE !important;
}

    /* Badges mobiles - tous les modes */
    /***************************************************************************/
    .type-badge {
        padding: 0.125rem 0.25rem;
        font-size: 0.5rem;
        border-radius: 0.25rem;
    }
    
    .absolute.top-3.right-3 {
        top: 0.45rem;
        left: 1rem;
        padding: 0.125rem;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .absolute.top-3.right-3 i {
        font-size: 0.5rem;
    }
    
    .absolute.top-3.left-3 {
        top: 0.25rem;
        /*left: 78%;*/
    }
    
    /* État vide mobile */
    .empty-state {
        padding: 2rem 1rem !important;
    }
    
    .empty-state i {
        font-size: 2rem !important;
    }
    
    .empty-state h3 {
        font-size: 1rem;
    }
    
    .empty-state p {
        font-size: 0.875rem;
    }
}

/* Breakpoint très petit écran (iPhone SE, etc.) */
@media (max-width: 375px) {
    .annonces-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .annonces-grid.mosaic-view {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .annonces-grid.list-view .annonce-image {
        width: 80px;
    }
}


/*section des boutons de vue :*/
/*********************************************/
.view-btn {
    min-width: 36px; /* Empêche la disparition */
    transition: all 0.2s ease;
}

.view-toggle {
    min-width: fit-content; /* Garde la taille constante */
}

.view-btn.active {
    background-color: #ea580c;
    color: white;
}

/* Styles pour le panneau de filtres */
.filters-sidebar {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(0);
    opacity: 1;
}

.filters-sidebar.hidden {
    transform: translateX(100%);
    opacity: 0;
    width: 0;
    border: none;
}

.main-layout.filters-hidden {
   /* margin-right: 0;*/
}

/* Bouton toggle filters */
#toggle-filters-sidebar.active {
    background-color: #ea580c;
    color: white;
}



/* Bouton filtre mobile */
#toggle-filters-mobile {
    display: none; /* Caché par défaut */
}

@media (max-width: 1024px) {
    #toggle-filters-mobile {
        display: flex; /* Visible seulement sur mobile/tablette */
    }
    
    #toggle-filters-sidebar {

    }
    
    /* Ajustement du padding pour compenser le header fixe */
    .annonces-content {
        padding-top: 0.5rem;
    }
}

/* Style spécifique pour l'icône du bouton filtre mobile */
#toggle-filters-mobile i.fa-filter {
    font-size: 1.1rem; /* Taille légèrement plus grande */
    color: white; /* Couleur blanche explicite */
    transition: transform 0.2s ease;
}

#toggle-filters-mobile:hover i.fa-filter {
    transform: scale(1.1); /* Effet de zoom au survol */
}

/* Style pour le bouton desktop */
#toggle-filters-sidebar i {
    font-size: 1rem;
    color: #4b5563; /* Couleur grise pour le mode desktop */
    transition: all 0.2s ease;
}

#toggle-filters-sidebar:hover i {
   /* color: white;  Devient blanc au survol */
}

#toggle-filters-sidebar.active i {
    color: white; /* Blanc quand actif */
}

/* Styles pour les popups Leaflet */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
    width: 280px;
}

.region-popup, .ad-popup, .user-location-popup {
    background: transparent;
}

.region-popup .interactive, .ad-popup .interactive, .user-location-popup .interactive {
    pointer-events: none;
    width: 100%;
}

.region-popup .labels-container, .ad-popup .labels-container, .user-location-popup .labels-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.region-popup .labels-container:hover, .ad-popup .labels-container:hover, .user-location-popup .labels-container:hover {
    background: rgba(255, 165, 0, 0.1);
}

.region-popup .buttons-container, .ad-popup .buttons-container, .user-location-popup .buttons-container {
    background: transparent;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.region-popup button, .ad-popup button, .user-location-popup button {
    pointer-events: auto;
    flex: 1 1 calc(50% - 3px);
    padding: 6px 8px;
    font-size: 0.75rem;
    line-height: 1.25;
}

.region-popup .text-content, .ad-popup .text-content, .user-location-popup .text-content,
.ad-popup img {
    pointer-events: none;
}

/* Styles pour le menu mobile */
#toggle-categories {
    display: none !important;
}

#map-btn span {
    display: block;
}

/* Media queries */
@media (max-width: 1095px) {

}
/* Media queries */
@media (max-width: 640px) {

    .categories-sidebar, .filters-sidebar {
   /* display: none;*/
    position: relative;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 999922222222;
    overflow-y: auto;

    padding: 0px;
    
    overflow-x: hidden !important;
        scrollbar-width: none !important;
        overflow-y: hidden !important; 

    }

    .main-layout {
        margin-left: 0 !important;
        margin-top: 10px;
    }

    .map-controls {
        bottom: 6rem;
        gap: 0.75rem;
    }

    .control-btn {
        width: 2.5rem;
        height: 2.5rem;
    }

    .control-btn i {
        font-size: 1rem;
    }

    .copyright {
        font-size: 0.7rem;
        padding: 3px 6px;
    }

    #categories-panel {
        width: 100%;
        transform: translateX(-100%);
        z-index: 60;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
    }

    #categories-panel.mobile-visible {
        transform: translateX(0);
    }

    #categories-panel.sidebar-compact {
        display: none;
    }

    #pin-sidebar {
        display: none;
    }

    .sidebar-overlay {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 50;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .sidebar-overlay.visible {
        opacity: 1;
        visibility: visible;
    }

    #toggle-categories {
        display: block !important;
    }

    #map-btn span {
        display: none;
    }
}


@media (min-width: 641px) and (max-width: 1026px) { 
}

@media (min-width: 1026px) {

}

@media (min-width: 1391px) {
  
}

/*****************************************/
/******************************************/

.annonce-image {
    height: 160px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
}

.placeholder-icon {
    background: 
        linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)),
        repeating-linear-gradient(
            -45deg,
            #f3f4f6,
            #f3f4f6 10px,
            #e5e7eb 10px,
            #e5e7eb 20px
        );
    z-index: 1;
}

/* Style pour les annonces sponsorisées */
.sponsored-card .placeholder-icon {
    background: 
        linear-gradient(rgba(255,248,225,0.8), rgba(255,248,225,0.8)),
        repeating-linear-gradient(
            -45deg,
            #fffbeb,
            #fffbeb 10px,
            #fef3c7 10px,
            #fef3c7 20px
        );
}

.sponsored-card .placeholder-icon i {
    color: #d97706 !important;
}

/* Version mobile */
@media (max-width: 640px) {
    .annonce-image {
        height: 120px;
    }
    .placeholder-icon i {
        font-size: 2rem;
    }
    .placeholder-icon span {
        font-size: 0.7rem;
    }
}

/***************************************************
****************************************************/

/* Style du placeholder (inspiré d'Unsplash) */
.placeholder-content {
    background-image: 
        linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(245,245,245,0.8) 100%),
        repeating-linear-gradient(
            45deg,
            rgba(229, 231, 235, 0.5),
            rgba(229, 231, 235, 0.5) 10px,
            rgba(243, 244, 246, 0.5) 10px,
            rgba(243, 244, 246, 0.5) 20px
        );
}

/* Version sponsorisée */
.sponsored-card .placeholder-content {
    background-image: 
        linear-gradient(135deg, rgba(255, 251, 235, 0.8) 0%, rgba(254, 243, 199, 0.8) 100%),
        repeating-linear-gradient(
            45deg,
            rgba(253, 230, 138, 0.4),
            rgba(253, 230, 138, 0.4) 10px,
            rgba(254, 243, 199, 0.4) 10px,
            rgba(254, 243, 199, 0.4) 20px
        );
}

/* Mobile */
@media (max-width: 640px) {
    .annonce-image { height: 120px; }
    .placeholder-content i { font-size: 2.5rem; }
}

/***********************************/

/* Styles améliorés pour les badges d'annonces */
.type-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    background-color: #3b82f6;
    border-radius: 6px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Badge pour les annonces sponsorisées */
.type-badge.bg-purple-600 {
    background: linear-gradient(135deg, #7c3aed 0%, #6b46c1 100%);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 6px rgba(107, 70, 193, 0.4);
}

/* Badge pour les offres */
.type-badge[data-type="offre"] {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Badge pour les demandes */
.type-badge[data-type="demande"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Badge pour les échanges */
.type-badge[data-type="echange"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1f2937;
}

/* Badge pour les urgents */
.type-badge[data-type="urgent"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 2s infinite;
}

/* Badge pour les gratuits */
.type-badge[data-type="gratuit"] {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Animation pour les urgents */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Effet au survol */
.type-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Styles spécifiques pour chaque vue */

/* Vue grille */
.annonces-grid.grid-view .type-badge {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.65rem;
    max-width: 70px;
}

/* Vue liste */
.annonces-grid.list-view .type-badge {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.6rem;
    min-width: 65px;
}

/* Vue mosaïque */
.annonces-grid.mosaic-view .type-badge {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.55rem;
    min-width: 60px;
}

/* Responsive mobile */
@media (max-width: 640px) {
    .type-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.55rem;
        min-width: 55px;
        border-radius: 4px;
    }

    .annonces-grid.grid-view .type-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.55rem;
        min-width: 55px;
    }

    .annonces-grid.list-view .type-badge {
        top: 0.4rem;
        right: 0.4rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.5rem;
        min-width: 50px;
    }

    .annonces-grid.mosaic-view .type-badge {
        top: 0.3rem;
        right: 0.3rem;
        padding: 0.15rem 0.3rem;
        font-size: 0.45rem;
        min-width: 45px;
    }
}

/* Très petits écrans */
@media (max-width: 375px) {
    .type-badge {
        top: 0.4rem;
        right: 0.4rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.5rem;
        min-width: 50px;
    }

    .annonces-grid.grid-view .type-badge {
        min-width: 45px;
    }

    .annonces-grid.list-view .type-badge,
    .annonces-grid.mosaic-view .type-badge {
        min-width: 40px;
        font-size: 0.4rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Style pour le badge "Sponsorisé" */
.sponsored-card .type-badge {
    top: 0.5rem;
    left: 0.5rem;
    right: auto;
    background: linear-gradient(135deg, #8b5cf6 0%, #6b46c1 100%);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
    font-weight: 700;
}

/* Icône pour le badge sponsorisé */
.sponsored-card .type-badge::before {
    content: "? ";
    font-size: 0.7em;
    vertical-align: middle;
}

/* Position différente pour les cartes en mode liste */
.annonces-grid.list-view .sponsored-card .type-badge {
    top: 0.75rem;
    left: 0.5rem;
    right: auto;
}

/* ---- Badge Principal (Type) ---- */
.type-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Couleurs par type */
.type-offre {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.type-demande {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.type-urgent {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 1.5s infinite;
}

/* ---- Badge Sponsor (secondaire) ---- */
.sponsor-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.55rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1f2937;
    border-radius: 3px;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-transform: uppercase;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .type-badge {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.55rem;
    }
    
    .sponsor-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.5rem;
    }
}

/* Animation pour "urgent" */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/*********************/

/* Style de base pour le conteneur d'image */
.annonce-image {
    position: relative;
    height: 160px;
    background-color: #f3f4f6;
    overflow: hidden;
}

/* Style de l'image qui s'applique seulement si elle charge */
.annonce-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

/* Placeholder qui s'affiche par défaut */
.annonce-image .image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(243,244,246,0.9) 0%, rgba(229,231,235,0.9) 100%);
    z-index: 0;
}

/* Quand l'image charge, on cache le placeholder */
.annonce-image img:not([src=""]) + .image-fallback {
    display: none;
}

/* Icône et texte du placeholder */
.image-fallback i {
    font-size: 2rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.image-fallback span {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 500;
}

/* Version pour annonces sponsorisées */
.sponsored-card .image-fallback {
    background: linear-gradient(135deg, rgba(254,243,199,0.9) 0%, rgba(253,230,138,0.9) 100%);
}

/* Conteneur principal des annonces par catégorie */
.annonces-by-category {
    margin-bottom: 2rem;
}

/* Titre de catégorie */
.category-title-container {
    padding-bottom: 0rem;
    border-bottom: 0px solid #ea580c;/**/
    margin-top: 1rem;
    margin-bottom: 0rem;
    /*background-color: #fff7ed;
    color: #374151;*/
    color: #fff;
    padding-left: 10px;
    padding-top: 5px; 
    /*border-radius: 15px;
    background-color: rgb(218, 245, 11);*/  
    background-color: #ff6b00;
}

.category-title-container h2{
    /*color:#374151;*/
    color:#fff;
}

.category-title {
   /* font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;*/
}

/* Section des annonces sponsorisées */
.sponsored-section {
    margin-bottom: 1.5rem;
}

.sponsored-section h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    padding-left: 0.5rem;
    border-left: 3px solid #f59e0b;
    margin-bottom: 0.75rem;
}

/* Section des annonces normales */
.regular-section {
    margin-bottom: 1.5rem;
}

.regular-section h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    padding-left: 0.5rem;
    border-left: 3px solid #3b82f6;
    margin-bottom: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .category-title-container {
        margin-top: 0rem;
        margin-bottom: 1.75rem;
        margin-bottom: 0rem !important;        
    }

    .category-title {
        font-size: 1.1rem;
    }

    .sponsored-section h3,
    .regular-section h3 {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .sponsored-section,
    .regular-section {
        margin-bottom: 1rem;
    }
}

/* Style pour les sections de catégorie */
.category-section {
    /*padding: 1rem; 
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);*/
    margin-top: 15px;
}

.category-title-container {
    padding-bottom: 0.5rem;
    border-bottom: 0px solid #ea580c;/**/
    margin-bottom: 0.70rem;
}

/* Style pour les sections sponsorisées */
.sponsored-section {
    background: #fff9e6;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ffe8a1;
}

/* Style pour le titre des annonces sponsorisées */
.sponsored-section h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    padding-left: 0.5rem;
    border-left: 3px solid #f59e0b;
}

@media (min-width: 640px) {
/* Styles pour le carrousel d'annonces */
.annonces-carousel-container {
    padding: 0rem;
    margin: 0 0rem;
    margin-top: 20px;
}

.annonces-carousel.grid-view .annonce-card {
    flex: 0 0 205px;
    scroll-snap-align: start;
    height: 340px;
    background: #f3f4f6;
    background: #fff;
}

.annonces-carousel.grid-view {
    display: grid;
    gap: 1.5rem;
    row-gap: 55px;    
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 0;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));    
}

.annonces-carousel {
           display: grid;
            gap: 7px;
            row-gap: 65px;
            overflow-x: visible;
            scroll-snap-type: none;
            padding: 0;
            grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
}

.annonces-carousel::-webkit-scrollbar {
    display: none; /* Masque la scrollbar pour Chrome/Safari */
}

.annonces-carousel.grid-view .annonce-card {
    flex: 0 0 235px ; /* Largeur fixe pour chaque carte */
    scroll-snap-align: start;
    height: 340px;
}
}
.carousel-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.carousel-arrow:hover {
    opacity: 1;
}

.carousel-arrow i {
    font-size: 1.2rem;
}

.voir-plus-btn {
    flex: 0 0 220px;
    height: 270px;
    scroll-snap-align: start;
    margin-top: 2.6rem;
}

/* Masquer les flèches sur mobile */
@media (max-width: 640px) {
    .carousel-arrow {
        display: none;
    }
    
    .annonces-carousel-container {
        padding: 0;
    }
    
    .annonces-carousel.list-view .annonce-card {
        /* display: flex; */
        flex-direction: row;
        height: 150px;
        width: 100%;
        border-radius: 5px;
        border: 1px solid #a9bad5 !important;
        border-bottom: 0px !important;
        border-left: 0px !important;
        border-right: 0px !important;
        padding: 10px;
        padding-bottom: 0px;
    }    
    
    .annonces-carousel.list-view .annonce-image-container {
        flex: 0 0 150px;
    }    
    
}

/* Style des cartes sponsorisées */
.sponsored-card {
    border: 1px solid #FFD700 !important;
    background-color: #FFF9E6 !important;
    position: relative;
}

/* Animation discrète pour les cartes sponsorisées */
@keyframes subtlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

.sponsored-card:hover {
 /*   animation: subtlePulse 1.5s infinite;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);*/
}

/* Style du badge sponsor */
.sponsor-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.55rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1f2937;
    border-radius: 8px;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-transform: uppercase;
     /*   width: 70px !important;*/
}

/* Style du prix pour les sponsorisées */
.sponsored-card .text-yellow-600 {
    color: #D97706 !important;
}

/* Style des boutons pour les sponsorisées */
.sponsored-card .bg-yellow-500 {
    background-color: #F59E0B !important;
}

.sponsored-card .hover\:bg-yellow-600:hover {
    background-color: #D97706 !important;
}

/* Responsive */
@media (max-width: 640px) {
    .sponsor-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.5rem;
    }
}

/* Structure de base 
.annonce-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 250px;
  display: flex;
  flex-direction: column;
  background: white;
}

.annonce-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

 Conteneur image (60% de la carte) 
.annonce-image-container {
  position: relative;
  height: 60%;
  overflow: hidden;
}

.annonce-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.annonce-card:hover .annonce-image {
  transform: scale(1.05);
}*/

/* Overlay sur l'image */
.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
      padding: 10px !important;
}

.annonce-price {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.annonce-badges {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-category {
  background: rgba(255,255,255,0.9);
  color: #333;
}


/* Bouton favori */
.favorite-btn {
    left: 79% !important;
    position: absolute;
    top: 35px !important;
    right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.favorite-btn:hover {
  background: #ea580c;
  color: white;
  transform: scale(1.1);
}

/* Contenu texte (40% de la carte) */
.annonce-content {
  padding: 18px;
  height: 40%;
  display: flex;
  flex-direction: column;
}

.annonce-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.annonce-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #666;
}

.meta-item i {
  margin-right: 5px;
  color: #ea580c;
}

.annonce-excerpt {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.annonce-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn.primary {
  background: #ea580c;
  color: white;
  border: none;
  flex-grow: 1;
  justify-content: center;
}

.action-btn.primary:hover {
  background: #E05D00;
}

.action-btn.secondary {
  background: white;
  color: #555;
  border: 1px solid #ddd;
  width: 40px;
  justify-content: center;
}

.action-btn.secondary:hover {
  background: #f5f5f5;
  color: #ea580c;
}

/**************************************/



@media (min-width: 1140px) {
    #toggle-categories {
        display: none !important;
    }
    #categories-panel {
        display: block !important;
    }
    .main-layout {
      /*  display: flex;
        flex-direction: row;
        margin-top: 80px;
        margin-left: 60px;*/
    }    
}

@media (max-width: 1139px) {
    #toggle-categories {
        display: block !important;
    }
    #categories-panel {
        display: none !important;
    }
    .main-layout {
       /* display: flex;
        flex-direction: row;*/
       /* margin-top: 30px;
       /* margin-left: 20px;*/
    }
}

/*
@media (min-width: 1025px) {
    .lg\:hidden { 
        display: none;
    }
}*/

.max-w-5xl {
    max-width: 100% !important;
    padding-left: 5rem;
    padding-right: 5rem;
}


/*************************************************************/

/* Styles pour les infos vendeur (avant l'image, fond #f3f4f6) */
.vendeur-info {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    gap: 8px; /* Space between elements */
    padding: 6px 0px; /* Compact padding */
    background: #f3f4f6; /* Light gray background */
    border-radius: 6px; /* Rounded corners */
    margin: 0 12px 8px 12px; /* Align with content padding */
    width: calc(100% - 24px); /* Full width minus margins */
   /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle shadow */
   background: #fff;
}

/* Seller initial bubble */
/* Seller initial bubble */
.vendeur-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50%;
    text-transform: uppercase;
}

/* Seller name styling */
.vendeur-name {
    font-weight: 600;
    font-size: 0.85rem; /* Readable but compact */
    color: #222; /* Dark color for contrast */
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Handle long names */
}

/* Seller rating styling */
.vendeur-rating {
    font-size: 0.8rem;
    color: #444; /* Darker gray for readability */
    font-weight: 500;
}

/* Seller stats styling */
.vendeur-stats {
    font-size: 0.75rem;
    color: #555; /* Medium gray for secondary info */
    font-weight: 500;
}

/* PRO badge styling */
.pro-badge {
    background: #ea580c; /* Orange badge for PRO */
    padding: 2px 2px;
    border-radius: 4px;
    font-size: 0.5rem;
    font-weight: 600;
    margin: 0px;
    color:#fff;
    width: 42px;
}



/* Image container styling */
.annonce-image-container {
    position: relative;
    overflow: hidden;
    height: 60%; /* Maintain original height */
    margin: 0; /* No margins to align with card top */
}

/* Image scaling for hover effect */
.annonce-image-container img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.annonce-card:hover .annonce-image-container img {
  /*  transform: scale(1.05); /* Keep the zoom effect */
}


/* Responsive adjustments for smaller screens */
@media (max-width: 640px) {
    .vendeur-info {
        padding: 4px 8px;
        margin: 0 8px 6px 8px;
        width: calc(100% - 16px);
    }
    .vendeur-initial {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    .vendeur-name {
        font-size: 0.75rem;
    }
    .vendeur-rating {
        font-size: 0.7rem;
    }
    .vendeur-stats {
        font-size: 0.65rem;
    }
    .pro-badge {
        font-size: 0.65rem;
        padding: 1px 5px;
    }
    .annonce-card {
        border-radius: 6px;
    }
    .annonce-content {
        padding: 8px;
    }
}

/******************************/

/* Structure de base 
.annonce-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 380px;
  display: flex;
  flex-direction: column;
  background: white;
}


.annonce-card {
  height: 380px; 
  display: flex;
  flex-direction: column;
}

.annonce-card {
     width: 215px;
    height: 340px;
    scroll-snap-align: start;
    transition: all 0.3s ease;
}


.annonce-content {
    padding: 12px; 
    height: 40%;
    display: flex;
    flex-direction: column;
}

.annonce-card {
    background: white; 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid #e5e7eb; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 
    display: flex;
    flex-direction: column;
}

.annonce-card {
  transform: translateZ(0);
  backface-visibility: hidden;
}
/* Content area styling */

/* Image container styling with rounded corners */
.annonce-image-container {
    position: relative;
    overflow: hidden;
    height: 60%; /* Maintain original height */
    margin: 0; /* No margins to align with card top */
    border-radius: 0px !important; /* Round all four corners */
}

@media(min-width: 640px) {
    .annonce-card.sponsored-card .annonce-image-container {
        /*height: 53%;*/
    }
}

/* Image styling to follow container's rounded corners */
.annonce-image-container img {
   /* transition: transform 0.5s ease;*/
    width: 100%;
    height: 100%;
    object-fit: unset !important;
    /*border-radius: 8px !important;
    border-radius: 8px 8px 8px 8px; /* Round all four corners */
}

.annonces-carousel.grid-view .annonce-card {
    flex: 0 0 205px;
    scroll-snap-align: start;
    height: 455px;/**/
    background: #f3f4f6;
    background: #fff;
}

/* Contenu compact */
.annonce-card .p-4 {
    padding: 0rem;
    padding-left: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
        min-height: 110px !important;

}


/* Contenu texte (40% de la carte) */
.annonce-content {
  padding: 18px;
  height: 0%;
  display: flex;
  flex-direction: column;
    background: #fff;
    border-radius: 0px 0px 16px 16px; /* Round all four corners */
}

/***************************************/

.sponsored-card {
    background: #fffef0;
    background: #fff;
}
.sponsored-card {
    border: 0px solid #FFD700 !important; 
    background-color: #f3f4f6;
    background: #fff !important;
    position: relative;
}




/*********************************/

/* Style pour le lien "Voir plus" */
.voir-plus {
    display: flex;
    align-items: center;
    gap: 0.25rem; /* Espacement entre le texte et l'icône */
    font-size: 0.8rem;
    transition: color 0.2s ease;
    margin-right: 20px;
}

.voir-plus:hover {
    text-decoration: underline;
}

.image-container img {
    image-rendering: -webkit-optimize-contrast; /* Webkit */
    image-rendering: crisp-edges; /* Firefox */
    image-rendering: pixelated; /* Fallback */
    backface-visibility: hidden; /* Améliore le rendu des transformations */
}

/**********************VENDREDI 12 SEMP 2025 ************************/


/* Styles pour le composant de recherche de localisation */
.location-search-container {
    position: relative;
    width: 100%;
}

.location-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-search-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.location-search-input::placeholder {
    color: #9ca3af;
}

.location-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.location-dropdown.show {
    display: block;
}

.location-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.location-option:hover, .location-option.highlighted {
    background-color: #fef3e2;
}

.location-option.region {
    font-weight: 600;
    background-color: #f9fafb;
    color: #374151;
}

.location-option.ville {
    padding-left: 24px;
    color: #4b5563;
}

.location-option.commune {
    padding-left: 36px;
    color: #6b7280;
    font-size: 13px;
}

.location-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.location-clear-btn:hover {
    color: #f97316;
}

.location-option.adresse {
    padding-left: 48px;
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
}

.location-option.adresse:hover, .location-option.adresse.highlighted {
    background-color: #f0f9ff;
}

.location-option.selected-option {
    background-color: #fef3e2; /* Fond orange clair */
    border-left: 3px solid #f97316; /* Bordure gauche orange */
    font-weight: 500;
    color: #ea580c; /* Texte orange foncé */
}

.location-option.selected-option i {
    color: #f97316; /* Icône orange */
}

/* Pour différencier la sélection actuelle du survol */
.location-option.highlighted {
    background-color: #f3f4f6; /* Gris clair pour le survol */
}

/* Si les deux classes sont présentes (sélectionné ET survolé) */
.location-option.selected-option.highlighted {
    background-color: #fed7aa; /* Orange plus foncé */
}

/*************************/


/* Styles pour le système de nœuds hiérarchiques */
.location-option {
    position: relative;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.location-option:hover, .location-option.highlighted {
    background-color: #fef3e2;
}

/* Indicateurs de nœuds hiérarchiques */
.location-option.has-children {
    padding-right: 40px;
}

.location-option.has-children::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid #6b7280;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transition: transform 0.2s ease;
}

.location-option.has-children.expanded::after {
    transform: translateY(-50%) rotate(90deg);
}

/* Styles pour les niveaux hiérarchiques */
.location-option.region {
    font-weight: 600;
    background-color: #f9fafb;
    color: #374151;
    border-left: 4px solid #f97316;
}

.location-option.ville {
    padding-left: 32px;
    color: #4b5563;
    border-left: 2px solid #d1d5db;
    margin-left: 8px;
}

.location-option.commune {
    padding-left: 48px;
    color: #6b7280;
    font-size: 13px;
    border-left: 1px solid #e5e7eb;
    margin-left: 16px;
}

.location-option.adresse {
    padding-left: 64px;
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
    margin-left: 24px;
}

/* Indicateurs visuels de hiérarchie */
.location-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background-color 0.2s ease;
}

.location-option.region::before {
    background: #f97316;
}

.location-option.ville::before {
    background: #3b82f6;
    left: 8px;
    width: 2px;
}

.location-option.commune::before {
    background: #10b981;
    left: 16px;
    width: 1px;
}

.location-option.adresse::before {
    background: #8b5cf6;
    left: 24px;
    width: 1px;
}

/* États des nœuds */
.location-option.collapsed + .location-option.ville,
.location-option.collapsed + .location-option.commune,
.location-option.collapsed + .location-option.adresse {
    display: none;
}

.location-option.region.collapsed ~ .location-option:not(.region) {
    display: none;
}

.location-option.ville.collapsed ~ .location-option.commune {
    display: none;
}

.location-option.commune.collapsed ~ .location-option.adresse {
    display: none;
}

/* Compteurs de nœuds enfants */
.node-count {
    margin-left: auto;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
    min-width: 18px;
    text-align: center;
}

.location-option.region .node-count {
    background: #fef3e2;
    color: #ea580c;
}

.location-option.ville .node-count {
    background: #eff6ff;
    color: #2563eb;
}

.location-option.commune .node-count {
    background: #f0fdf4;
    color: #059669;
}

/*****************************************/


            .location-search-container {
                position: relative;
                width: 100%;
            }
            
            .location-search-input {
                width: 100%;
                padding: 12px 40px 12px 16px; /* Plus de padding à droite pour la flèche */
                border: 1px solid #d1d5db;
                border-radius: 8px;
                font-size: 14px;
                background-color: white;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            
            .location-search-input:focus {
                outline: none;
                border-color: #f97316;
                box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
            }
            
            /* Flèche dropdown */
            .location-dropdown-arrow {
                position: absolute;
                right: 12px;
                top: 50%;
                transform: translateY(-50%);
                color: #6b7280;
                pointer-events: none;
                transition: transform 0.2s ease;
                font-size: 12px;
            }
            
            /* Rotation de la flèche quand le dropdown est ouvert */
            .location-search-container.open .location-dropdown-arrow {
                transform: translateY(-50%) rotate(180deg);
            }
            
            .location-clear-btn {
                position: absolute;
                right: 32px; /* Décalé pour laisser place à la flèche */
                top: 50%;
                transform: translateY(-50%);
                background: none;
                border: none;
                color: #9ca3af;
                cursor: pointer;
                padding: 4px;
                border-radius: 4px;
                transition: color 0.2s ease;
                z-index: 1;
            }
            
            .location-clear-btn:hover {
                color: #f97316;
            }
            
            .location-dropdown {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: white;
                border: 1px solid #d1d5db;
                border-top: none;
                border-radius: 0 0 8px 8px;
                max-height: 300px;
                overflow-y: auto;
                z-index: 1000;
                display: none;
            }
            
            .location-dropdown.show {
                display: block;
            }
            

/* ****************NOEUD *******************/

.node-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.node-arrow i {
    font-size: 10px;
    transition: transform 0.2s ease;
    color: #6b7280;
}

.location-option.has-children {
    padding-right: 40px;
    position: relative;
}

/*******************************************/

.location-option.search-match {
    background-color: #fff8e6 !important;
    border-left: 3px solid #ffd54f !important;
}

.location-option.search-match .node-count {
    background-color: #ffd54f !important;
    color: #333 !important;
}

.node-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.node-arrow i {
    font-size: 10px;
    transition: transform 0.2s ease;
    color: #6b7280;
}

.location-option.has-children {
    padding-right: 40px;
    position: relative;
}

.selected-highlight {
    background-color: #fff8e6 !important;
    border-left: 3px solid #ffd54f !important;
    font-weight: 600 !important;
    color: #ea580c !important;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 2px;
}

.dropdown-separator {
    height: 1px;
    background-color: #e5e7eb;
    margin: 4px 0;
}

.scroll-highlight {
    animation: pulse-highlight 1s ease-in-out;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.5);
    border-radius: 4px;
}

@keyframes pulse-highlight {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); }
    50% { box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

.location-dropdown {
    max-height: 300px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.location-option.selected-option {
    background-color: #fef3e2; /* Fond orange clair */
    border-left: 3px solid #f97316; /* Bordure gauche orange */
    font-weight: 500;
    color: #ea580c; /* Texte orange foncé */
}

.location-option.selected-option i {
    color: #f97316; /* Icône orange */
}

/* Pour différencier la sélection actuelle du survol */
.location-option.highlighted {
    background-color: #f3f4f6; /* Gris clair pour le survol */
}

/* Si les deux classes sont présentes (sélectionné ET survolé) */
.location-option.selected-option.highlighted {
    background-color: #fed7aa; /* Orange plus foncé */
}

/************************* STYLES CATEGORIES ***********************************/   

.subcategory-list {
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.subcategory-list:not(.hidden) {
    max-height: 500px; /* Augmenté pour permettre plus de contenu */
    opacity: 1;
    overflow-y: auto; /* Ajout du défilement si nécessaire */
}

.subcategory-toggle {
    transition: transform 0.2s ease;
}

.subcategory-item {
    border-left: 2px solid #f97316;
    margin-left: 8px;
    padding-left: 8px;
    white-space: nowrap; /* Empêche le texte de se casser sur plusieurs lignes */
    overflow: hidden;
    text-overflow: ellipsis; /* Ajoute "..." si le texte est trop long */
}

.category-group {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0px;
    margin-bottom: 0px;
    position: relative; /* Pour le positionnement des enfants */
}

.category-parent {
    font-weight: 500;
}

#category-search-input {
    background-color: #f9fafb;
}

#category-search-input:focus {
    background-color: white;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

/* Améliorer les compteurs */
.category-filter-item span:last-child {
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0; /* Empêche le compteur de réduire */
}

/* Animation pour les toggles */
.subcategory-toggle i {
    transition: transform 0.2s ease;
}

/* Styles pour améliorer la disposition */
.category-filter-item {
    display: flex;
    align-items: center;
    min-height: 2.5rem; /* Hauteur minimale uniforme */
}

.category-filter-item span {
    /*flex: 1;  Permet au texte de prendre l'espace disponible */
    min-width: 0; /* Permet à flex:1 de fonctionner correctement */
}

/* Responsive */
@media (max-width: 768px) {
    .subcategory-list {
        margin-left: 1rem;
    }
    
    #category-search-input {
        font-size: 16px; /* Éviter le zoom sur mobile */
    }
    
    .category-filter-item {
        flex-wrap: wrap; /* Permet le retour à la ligne sur mobile */
    }
    
    .subcategory-item {
        white-space: normal; /* Permet le retour à la ligne sur mobile */
    }
}

/****** RECHERCHE CATEGORIE AVANCEE *******/

.search-highlight {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 500;
}

.category-search-loading {
    position: relative;
}

.category-search-loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/************************************/

/* Ajouter ce CSS à votre fichier de styles */
.match-badge {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
}

.search-highlight {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 500;
}

#search-results-counter {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
    text-align: center;
}

.category-search-loading {
    position: relative;
}

.category-search-loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #f97316;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/**************************************************/

/************************* STYLES DEBUG ***********************************/   

.debug-info {
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.debug-info[data-debug-toggle="true"] {
    max-height: 500px;
    opacity: 1;
}

.debug-tags span, .debug-features div {
    font-size: 0.7rem;
}

/* Style pour le mode debug actif */
body.debug-mode .subcategory-container {
    border-left: 2px solid #e5e7eb;
    margin-left: 4px;
}

body.debug-mode .subcategory-item {
    background-color: #f9fafb;
}

/************** LUNDI 15 09 2025 ********************************/

.my-5 {
    margin-bottom: 0px !important;
}

.space-y-4>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.55rem * calc(1 - var(--tw-space-y-reverse))) !important;
    margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

/***** CSS FILTRE TYPE ANNONCE ******/

/* Styles pour le filtre par type d'annonce */
.type-option {
    transition: all 0.2s ease-in-out;
}

/* État non sélectionné */
.type-option input[type="checkbox"]:not(:checked) + div + span {
    color: #6b7280; /* text-gray-600 */
    opacity: 0.7;
}
.type-option input[type="checkbox"]:not(:checked) + div {
    opacity: 0.5;
}
.type-option input[type="checkbox"]:not(:checked) {
    background-color: #fef3c7; /* bg-orange-100 */
    border-color: #fed7aa; /* border-orange-300 */
}

/* État sélectionné */
.type-option input[type="checkbox"]:checked + div + span {
    color: #111827; /* text-gray-900 */
    font-weight: 600;
}
.type-option input[type="checkbox"]:checked + div {
    opacity: 1;
    transform: scale(1.1);
}
.type-option input[type="checkbox"]:checked {
    background-color: #ffedd5; /* bg-orange-200 */
    border-color: #f97316; /* border-orange-500 */
}

/* Hover pour les options non sélectionnées */
.type-option:hover input[type="checkbox"]:not(:checked) {
    background-color: #ffedd5; /* bg-orange-200 */
    border-color: #fb923c; /* border-orange-400 */
}

/* Hover pour les options sélectionnées */
.type-option:hover input[type="checkbox"]:checked {
    background-color: #fed7aa; /* bg-orange-300 */
    border-color: #ea580c; /* border-orange-600 */
}

/**************** Styles pour le filtre par date ***************/
.date-option {
    transition: all 0.2s ease-in-out;
}

/* État non sélectionné */
.date-option input[type="radio"]:not(:checked) + div + span {
    color: #6b7280; /* text-gray-600 */
    opacity: 0.7;
}
.date-option input[type="radio"]:not(:checked) + div {
    opacity: 0.5;
}
.date-option input[type="radio"]:not(:checked) {
    background-color: #fef3c7; /* bg-orange-100 */
    border-color: #fed7aa; /* border-orange-300 */
}

/* État sélectionné */
.date-option input[type="radio"]:checked + div + span {
    color: #111827; /* text-gray-900 */
    font-weight: 600;
}
.date-option input[type="radio"]:checked + div {
    opacity: 1;
    transform: scale(1.1);
}
.date-option input[type="radio"]:checked {
    background-color: #ffedd5; /* bg-orange-200 */
    border-color: #f97316; /* border-orange-500 */
}

/* Hover pour les options non sélectionnées */
.date-option:hover input[type="radio"]:not(:checked) {
    background-color: #ffedd5; /* bg-orange-200 */
    border-color: #fb923c; /* border-orange-400 */
}

/* Hover pour les options sélectionnées */
.date-option:hover input[type="radio"]:checked {
    background-color: #fed7aa; /* bg-orange-300 */
    border-color: #ea580c; /* border-orange-600 */
}

/************ Styles pour le filtre par type de vendeur ***************/
.seller-type-option {
    transition: all 0.2s ease-in-out;
}

/* État non sélectionné */
.seller-type-option input[type="checkbox"]:not(:checked) + div + span {
    color: #6b7280; /* text-gray-600 */
    opacity: 0.7;
}
.seller-type-option input[type="checkbox"]:not(:checked) + div {
    opacity: 0.5;
}
.seller-type-option input[type="checkbox"]:not(:checked) {
    background-color: #fef3c7; /* bg-orange-100 */
    border-color: #fed7aa; /* border-orange-300 */
}

/* État sélectionné */
.seller-type-option input[type="checkbox"]:checked + div + span {
    color: #111827; /* text-gray-900 */
    font-weight: 600;
}
.seller-type-option input[type="checkbox"]:checked + div {
    opacity: 1;
    transform: scale(1.1);
}
.seller-type-option input[type="checkbox"]:checked {
    background-color: #ffedd5; /* bg-orange-200 */
    border-color: #f97316; /* border-orange-500 */
}

/* Hover pour les options non sélectionnées */
.seller-type-option:hover input[type="checkbox"]:not(:checked) {
    background-color: #ffedd5; /* bg-orange-200 */
    border-color: #fb923c; /* border-orange-400 */
}

/* Hover pour les options sélectionnées */
.seller-type-option:hover input[type="checkbox"]:checked {
    background-color: #fed7aa; /* bg-orange-300 */
    border-color: #ea580c; /* border-orange-600 */
}

/********************** Mercedi 17 septembre 2025 - Badge vérifié ****************/

/* Container principal - 205px max */
.vendeur-info-compact {
    max-width: 205px;
    margin: 0 auto;
    position: relative;
    transition: all 0.2s ease;
}

/* Initial */
.vendeur-initial-compact {
    flex-shrink: 0;
    min-width: 24px;
}

/* Pseudo - priorité maximale pour l'espace */
.vendeur-pseudo-container {
    min-width: 0;
    flex: 1 1 auto;
}

.vendeur-pseudo-text {
    max-width: 80px;
    line-height: 1.3;
}

/* Badges compacts */
.pro-badge-compact {
    line-height: 1;
    font-size: 9px;
    padding: 1px 3px;
    box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ea580c 0%, #FF8C00 100%);
}
/*
    background: linear-gradient(135deg, #ea580c 0%, #FF8C00 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    */

.verified-badge-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.verified-badge-mini:hover {
    transform: scale(1.2);
}

/* Stats - masquées automatiquement si manque de place */
.vendeur-stats-compact {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Media queries pour gestion responsive de l'espace */
@media (max-width: 205px) {
    .vendeur-info-compact {
        flex-wrap: nowrap;
    }
    
    .vendeur-pseudo-text {
        max-width: 60px;
    }
    
    /* Masquer les stats si l'espace est très limité */
    .vendeur-stats-compact {
        display: none !important;
    }
}

/* Classes utilitaires pour le JavaScript */
.stats-hidden .vendeur-stats-compact {
    display: none !important;
}

.badges-hidden .vendeur-badges-compact {
    display: none !important;
}

.pseudo-truncated .vendeur-pseudo-text {
    max-width: 50px;
}

.border-t {
    border-top-width: 0px;
}

/*********** BADGE SOUS CATEGORIE *************/
.comments-badge, .view-badge, .badge-type{
    display:none !important;
}

/* Container pour les badges de sous-catégories */
.subcategory-badges-container {
    min-width: 0;
    flex: 1 1 auto;
    display:none !important;
}

/* Badge de sous-catégorie avec ajustement automatique */
.subcategory-badge {
    display: inline-flex;
    align-items: center;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
 /*   transition: all 0.2s ease;*/
    border: 1px solid rgba(255, 255, 255, 0.3);
   /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);*/
}

/* Ajustement responsive de la taille de police */
@media (max-width: 640px) {
    .subcategory-badge {
        font-size: 11px;
        padding: 0.4rem 0.6rem;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .subcategory-badge {
        font-size: 10px;
        padding: 0.3rem 0.5rem;
        max-width: 90px;
    }
    
    .image-overlay {
        padding: 0.5rem;
    }
}

/* Pour les très petits écrans */
@media (max-width: 380px) {
    .subcategory-badge {
        font-size: 9px;
        padding: 0.25rem 0.4rem;
        max-width: 80px;
    }
}

/* Ajustement automatique de la taille de police en fonction de la longueur du texte */
.subcategory-badge[data-text-length="short"] {
    font-size: 12px;
}

.subcategory-badge[data-text-length="medium"] {
    font-size: 11px;
}

.subcategory-badge[data-text-length="long"] {
    font-size: 10px;
}

.subcategory-badge[data-text-length="very-long"] {
    font-size: 9px;
    letter-spacing: -0.02em;
}

/* Badge type */
.badge-type {
    /*background: rgba(255, 255, 255, 0.15);*/
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.15rem 0.8rem;
    border-radius: 1rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    display:none !important;
}

/* Hover effects */
.subcategory-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    max-width: none;
    overflow: visible;
    z-index: 10;
}

/* Tooltip pour les textes tronqués */
.subcategory-badge[data-tooltip] {
    position: relative;
}

.subcategory-badge[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 20;
    margin-bottom: 0.5rem;
}

.subcategory-badge[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.25rem solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    margin-bottom: 0.1rem;
}

/**********************************************/

/* Styles pour les badges de sous-catégories */
.subcategory-badge {
    backdrop-filter: blur(10px);
    color: white;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border-width: 1px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.2);
    border-image: initial;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
}

.subcategory-badge:hover {
    transform: none !important; /* Supprime le mouvement au survol */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
   /* background: #f9fafb !important; /* gray-50 au survol */
}

/* Badge type amélioré */
.badge-type {
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: none !important;
}

.badge-type:hover {
   /* background: rgba(0, 0, 0, 0.8) !important;*/
    transform: none !important;
}

/* Assurer la visibilité sur tous les fonds */
.image-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent) !important;
}

/* Pour les écrans sombres, renforcer le contraste */
@media (prefers-color-scheme: dark) {
    .subcategory-badge {
       /* background: #f3f4f6 !important; /* gray-100 */
        color: #111827 !important; /* gray-900 */
        border-color: #d1d5db !important; /* gray-300 */
    }
}

/* Tooltip pour textes tronqués */
.subcategory-badge[data-title]:hover::after {
    content: attr(data-title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    /*background: rgba(0, 0, 0, 0.9);*/
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

/*********************/

/* Badge type styling */
.badge-type {
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    padding-top: 3px;
}

.badge-type[data-type="offre"] {
    /* background: #28A745; Vert pour les offres */
    background-color: rgba(59, 130, 246, var(--tw-bg-opacity));/* bleu */
}

.badge-type[data-type="recherche"] {
    background: #28A745; /* Vert pour les demande */
}

.badge-type[data-type="echange"] {
    background: #DC3545; /* Rouge pour les demandes */
}

/********** Masquer les barres de défilement mais permettre le défilement ************/

/* Masquer les barres de défilement mais permettre le défilement */
#category-filter-container {
   /* scrollbar-width: none;  Firefox */
    /* -ms-overflow-style: none; IE and Edge */
}

#category-filter-container::-webkit-scrollbar {
  /*  display: none;  Chrome, Safari and Opera */
}

/* Animation subtile au défilement */
#category-filter-container {
    transition: box-shadow 0.3s ease;
}

#category-filter-container.scrolling {
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* Style amélioré pour le conteneur */
#category-filter-container {
    max-height: 16rem; /* équivalent à max-h-64 */
    overflow-y: auto;
    padding-right: 2px; /* espace pour éviter que le contenu ne soit coupé */
    margin-right: -2px; /* compensation de l'espace ajouté */
}

/* Pour assurer que les éléments sont bien visibles */
.category-filter-item {
    margin-right: 2px; /* compensation pour l'espace de défilement masqué */
}


/************ JEUDI 18 SEPTEMBRE 2025 *******************************/

     body {
           /* font-family: 'Roboto', sans-serif;*/
            background-color: #f8f9fa;
            margin: 0;
           /* padding: 20px;*/
            color: #333;
           /* display: flex;*/
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        h1 {
            color: #ea580c;
            text-align: center;
            margin-bottom: 30px;
        }
        .filter-section {
            background-color: #f9f9f9;
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 30px;
            border: 1px solid #eee;
        }
        .location-search-container {
            position: relative;
            margin-bottom: 15px;
        }
        
        /* Style amélioré pour le bouton Deals à proximité */
        .btn-proximite {
    background: linear-gradient(135deg, #ea580c 0%, #FF8C00 100%);
    color: white;
    border: none;
    padding: 5px 10px 5px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    position: relative; /* clé pour positionner le badge */
    box-shadow: 0 4px 8px rgba(255, 107, 0, 0.3);
    transition: all 0.3s ease;
    width: 100%;
}

.btn-proximite i {
    position: absolute;
    left: 5px;
    font-size: 15px;
}

.location-badge {
    background-color: white;
    color: #ea580c;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);

    /* Position en exposant */
    position: absolute;
    top: -17px;   /* ajuste verticalement */
    right: -8px; /* ajuste horizontalement */
}

.location-badge:empty {
    display: none;
}

        
        /* Style pour le dropdown de localisation */
        .location-dropdown {
            border: 1px solid #ddd;
            border-radius: 8px;
            margin-top: 10px;
            max-height: 200px;
            overflow-y: auto;
            background: white;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .location-option {
            padding: 12px 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            border-bottom: 1px solid #f0f0f0;
            transition: background-color 0.2s;
        }
        .location-option:hover {
            background-color: #fff5eb;
        }
        .location-option i {
            margin-right: 10px;
            color: #ea580c;
            width: 16px;
        }
        .location-option:last-child {
            border-bottom: none;
        }
        
        .code-block {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 8px;
            overflow-x: auto;
            margin: 20px 0;
            font-family: 'Fira Code', monospace;
            font-size: 14px;
        }
        
        .explanation {
            background-color: #f0f7ff;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-left: 4px solid #4a90e2;
        }
        
/************* CSS GENERAL REPRIS *******************/

/* Reset de base */
html, body {
  /*  height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;*/
}

/* Conteneur principal */
.main-layout {
 /*   display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;*/
}

/* Section annonces avec défilement */
.annonces-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 2px dashed red; /* Bordure pour débogage */
}

/* Conteneur de contenu avec défilement */
.annonces-content > .max-w-5xl {
    flex: 1;
    /*overflow-y: auto;
    -webkit-overflow-scrolling: touch;*/
    padding: 1.5rem;
    max-height: 100vh; /* Limite la hauteur pour forcer le défilement */
    border: 2px dotted blue; /* Bordure pour débogage */
}

/* Colonne de filtres */
.filters-sidebar {
    height: auto;
   /* overflow: visible;*/
}

/* Personnalisation de la scrollbar */
.annonces-content > .max-w-5xl::-webkit-scrollbar {
    width: 12px;
}

.annonces-content > .max-w-5xl::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.annonces-content > .max-w-5xl::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
    border: 2px solid #f1f1f1;
}

.annonces-content > .max-w-5xl::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Indicateur de débogage */
.debug-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10000;
}

/* Pour forcer le défilement si nécessaire */
.force-scroll {
    min-height: 150vh; /* Force le défilement pour tester */
}

/* Conteneur principal */
.max-w-5xl.mx-auto {
    display: flex;
    gap: 1.5rem; /* Espacement entre les colonnes */
    align-items: flex-start;
}

/* Colonne principale des annonces */
.liste-annonces {
    flex: 1; /* Prend l'espace disponible */
    min-width: 0; /* Empêche le débordement */
}

/* Sidebar des filtres */
.filters-sidebar {
    /*width: 20rem; /* Largeur fixe pour la sidebar */
    flex-shrink: 0; /* Empêche le rétrécissement */
}

/* Responsive - cacher la sidebar sur mobile */
@media (max-width: 1023px) {
    .filters-sidebar {

    }
}

/* Ajustements pour les écrans plus petits */
@media (max-width: 1280px) {
    .filters-sidebar {
        /*width: 18rem;*/
    }
}


/************** PADDING CATEGORIES *****************/

.space-y-2>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: 0px;
    margin-bottom: 0px;
}

.category-group {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0px; 
    margin-bottom: 0px; 
    position: relative;
}


/****************** PIED DE PAGE *************************/

/* Correction de la structure principale */
body {
    
}

.main-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* margin-top: 80px; Compensation pour le header fixe */
}

/* Conteneur principal flex */
.main-layout > div {
    display: grid;
    flex: 1;
    /*overflow: hidden;*/
}

/* Correction de la hauteur des annonces */
.annonces-content {
    flex: 1;
    /*overflow-y: auto;*/
    height: calc(100vh - 80px); /* Hauteur moins le header */
}

/* Ajustement du conteneur des annonces */
.max-w-5xl.mx-auto {
    padding: 1.5rem;
    width: 100%;
    padding-left: 0px;
    padding-top: 0.5rem;
    padding-bottom: 0.7rem;
}

/* Ajustement responsive */
@media (max-width: 1024px) {
    .annonces-content {
        height: calc(100vh - 80px);
    }
    
    .max-w-5xl.mx-auto {
        padding: 0rem;
        padding-top: 10px;        
    }
}

/* Ajustement du contenu des annonces pour éviter le chevauchement */
.liste-annonces {
    padding-bottom: 2rem; /* Espace avant le footer */
}

/* Correction de l'affichage en mode mobile */
@media (max-width: 768px) {
    .main-layout {
        margin-top: 33px; /* Ajustement si header plus grand sur mobile */
        padding: 0px;
        padding-left: 6px;    
    }
    
    .annonces-content {
        height: calc(100vh - 120px);
    }
}

body {
   /* display: flex;
    flex-direction: column;*/
    min-height: auto;
}

main {
    flex: 1;
    padding-bottom: 400px; /* Hauteur approximative du footer */
}

/* Correction pour le footer */

/* Styles pour le footer - Adapté à votre structure */
footer {
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Animation pour le bouton de retour en haut */
#back-to-top {
    transition: all 0.3s ease;
    z-index: 1000;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Responsive pour le footer */
@media (max-width: 768px) {
    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    footer .max-w-7xl {
        padding: 1.5rem;
    }
    
    #back-to-top {
        bottom: 4rem;
        right: 1rem;
        padding: 0.75rem;
    }
}

/* Amélioration de l'affichage des catégories */
footer ul li {
    transition: transform 0.2s ease;
    margin-bottom: 0.5rem;
}

footer ul li:hover {
    transform: translateX(5px);
}

footer a {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
    text-decoration: none;
}

/* Ajustements pour l'intégration avec votre layout */
.main-layout {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.annonces-content {
    flex: 1;
}

/* Correction des espacements dans le footer */
footer .space-y-2 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

/* Ajustement des icônes */
footer .text-xs {
    font-size: 0.75rem;
}

footer .text-sm {
    font-size: 0.875rem;
}

/* Styles pour les écrans très petits */
@media (max-width: 480px) {
    footer .grid {
        gap: 1.5rem;
    }
    
    footer .max-w-7xl {
        padding: 1rem;
    }
    
    footer .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    footer .text-lg {
        font-size: 1.125rem;
    }
}

body {
    padding-bottom: 0; /* Enlève le padding bottom si il existe */
}

/* Masque l'ancien copyright sur cette page */
.copyright {
    display: none; /* ou visibility: hidden; */
}

/********************** BOUTONS **********************/

/* Styles pour le bouton favori - COULEUR UNIQUEMENT */
.favorite-btn.active {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

.favorite-btn.active i {
    color: #dc2626 !important;
}

.favorite-btn:not(.active) i {
    color: #9ca3af !important; /* gray-400 */
}

/* Hover states */
.favorite-btn:hover {
    background-color: rgba(255, 255, 255, 1) !important;
}

.favorite-btn.active:hover {
    background-color: rgba(239, 68, 68, 0.3) !important;
}


/************************************************************/

/* CSS personnalisé */
@media (max-width: 1023px) {
    .sticky-header-mobile {
        position: -webkit-sticky; /* Pour Safari */
        position: sticky;
        top: 0;
    }
    
    /* Assurez-vous que le conteneur parent a une hauteur pour le scroll */
    #filters-panel {
       /* height: 100vh;
        display: flex;*/
        flex-direction: column;
        padding-top: 0px;
        overflow-x: hidden !important;
        scrollbar-width: none !important;
        overflow-y: hidden !important;        
    }
    
    #filters-panel .overflow-y-auto {
        flex: 1;
        overflow-y: auto;
    }
    .text-2xl {
    font-size: 1.0rem !important;
    line-height: 1.3rem !important;
    text-align: left !important;
}
}

@media (max-width: 640px) {
    h1, h2, h3, h4, h5, h6 {
        font-size: 14px !important;
        font-weight: inherit;
        }
        
    .voir-plus {
        font-size: 0.85rem;
    }
    .mb-6 {
    margin-bottom: 1.0rem !important;
    }
    .flex-col
     {
        flex-direction: row !important;
    }    
    
}

.mb-6 {
    margin-bottom: 0.7rem;
}

@media (min-width: 641px) and (max-width: 1024px) { 
     .main-layout {
            margin-left: 10px;
     }
    .pb-3 {
        padding-bottom: .35rem !important;
    }     
}

@media (min-width: 768px) and (max-width: 1024px) { 
     .main-layout {
    /*margin-top: 5px !important; */
     }
}
@media (min-width: 640px) {
    .sm\:hidden {
       /**/ display: block !important; /**/
    }
}
@media (max-width: 640px) {
    .main-layout {
    margin-top: 0px !important;
    margin-left: 3px !important;
     }
    .max-w-5xl.mx-auto {
        padding: 0rem;
        padding-top: 10px;
    }     
    
    .annonce-card {
        margin-top: 10px !important;
    }
        
}

/************************SPONSORISEES**********************/

/* === BADGES SPONSOR AMÉLIORÉS === */

/* Badge SPONSORISÉ (mise en avant) */
.sponsor-badge {
    position: absolute;
    top: 12px;
    right: 55px;
    padding: 0px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 20;
    /*box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);*/
    /*animation: float 3s ease-in-out infinite;*/
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 0px;
    transition: all 0.3s ease;
}

.sponsor-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Badge SPONSORISÉ (mise en avant) - Version premium */
.sponsor-badge[data-type="mise_en_avant"] {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.95) 0%, 
        rgba(255, 165, 0, 0.95) 50%, 
        rgba(255, 140, 0, 0.95) 100%);
    color: #7a2c0c;
    border-color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.sponsor-badge[data-type="mise_en_avant"]::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        #ffd700, #ffa500, #ff8c00,
        #ffd700, #ffa500, #ff8c00);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.5;
    animation: borderGlow 2s linear infinite;
}

/* Badge URGENT - Version premium */
.sponsor-badge[data-type="urgent"] {
    background: linear-gradient(135deg, 
        rgba(220, 38, 38, 0.95) 0%, 
        rgba(185, 28, 28, 0.95) 50%, 
        rgba(153, 27, 27, 0.95) 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: pulseUrgent 1.5s ease-in-out infinite;
}

.sponsor-badge[data-type="urgent"]::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, 
        #dc2626, #b91c1c, #991b1b,
        #dc2626, #b91c1c, #991b1b);
    border-radius: 23px;
    z-index: -1;
    opacity: 0.6;
    animation: borderPulse 1s ease-in-out infinite;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes pulseUrgent {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(220, 38, 38, 0.7);
    }
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes borderPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Icônes dans les badges */
.sponsor-badge i {
    font-size: 12px;
    animation: iconFloat 2s ease-in-out infinite;
}

.sponsor-badge[data-type="mise_en_avant"] i {
    color: #7a2c0c;
}

.sponsor-badge[data-type="urgent"] i {
    color: #fecaca;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0);
    }
    50% {
        transform: translateY(-2px) rotate(5deg);
    }
}

/* Effet sur l'image de l'annonce sponsorisée */
.annonce-card.sponsored-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 390px !important;
}

.annonce-card.sponsored-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 10;
}

.annonce-card[data-sponsor-type="mise_en_avant"]::before {
 /*   background: linear-gradient(90deg, 
        #ffd700, #ffa500, #ff8c00,
        #ffd700, #ffa500, #ff8c00);
    background-size: 300% 100%;
    animation: gradientMove 3s linear infinite;*/
}

.annonce-card[data-sponsor-type="urgent"]::before {
  /*  background: linear-gradient(90deg, 
        #dc2626, #b91c1c, #991b1b,
        #dc2626, #b91c1c, #991b1b);
    background-size: 300% 100%;
    animation: gradientMove 2s linear infinite;*/
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

/* Effet de lueur sur les cartes sponsorisées */
.annonce-card.sponsored-card {
    /*box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);*/
    transition: all 0.3s ease;
}

.annonce-card.sponsored-card:hover {
   /* box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);*/
    transform: translateY(-2px);
}

/* Style pour les icônes dans le contenu des annonces sponsorisées */
.annonce-card.sponsored-card .fas.fa-map-marker-alt,
.annonce-card.sponsored-card .fas.fa-calendar {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Badge supplémentaire en haut à gauche */
.sponsor-corner {        display: none
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    clip-path: polygon(0 0, 0 100%, 100% 0);
    z-index: 15;
}

.sponsor-corner[data-type="urgent"] {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.sponsor-corner i {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 12px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/******************CLIGNOTEMENT****************/

@keyframes blink {
  0%, 100% { opacity: 1 !important; }
  50% { opacity: 0.3 !important; }
}

.sponsor-badge[data-type="urgent"] span:last-child {
  animation: blink 1s infinite !important;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes blink {
  0%, 100% { opacity: 1 !important; }
  50% { opacity: 0.3 !important; }
}

.sponsor-badge[data-type="urgent"] span:last-child {
  animation: blink 1s infinite !important;
}

.sponsor-badge[data-type="urgent"] > span:not(:first-child) {
  animation: blink 1s infinite;
}

/* Styles pour les miniatures vidéo */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.video-thumbnail-container img {
    transition: transform 0.3s ease;
}

.video-thumbnail-container:hover img {
    transform: scale(1.05);
}

.video-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail-container:hover .video-overlay {
    opacity: 1;
}

.play-button {
    transform: scale(1);
    transition: all 0.2s ease;
}

.video-thumbnail-container:hover .play-button {
    transform: scale(1.1);
}

.video-badge {
    background: linear-gradient(135deg, #ea580c, #FF8C00);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
    z-index: 5;
}

.video-placeholder-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.video-placeholder {
    animation: pulsePlaceholder 2s infinite ease-in-out;
}

@keyframes pulsePlaceholder {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

.bg-orange-500 {
    background: #ea580c;
    color: #fff !important;
}

/* Badge vidéo pour les cartes
.card-video-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 107, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
} */

/* Override pour les cartes avec vidéo 
.annonce-card[data-has-video="true"] {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #ea580c, #FF8C00) border-box;
}*/

.skeleton-card {
    min-width: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-background-secondary);
}
.skeleton-img {
    height: 140px;
    background: linear-gradient(90deg, 
        var(--color-background-secondary) 25%, 
        var(--color-background-tertiary) 50%, 
        var(--color-background-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}
.skeleton-line {
    border-radius: 4px;
    background: var(--color-background-tertiary);
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/************************************/

/* ============================================================
   STYLE CARTES ANNONCES — Aligné sur boutique.php
   ============================================================ */

.annonce-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgb(0 0 0 / 41%);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    text-decoration: none;
    color: inherit;
}

.annonce-card:hover {
    transform: translateY(-4px);
}

.annonce-card .annonce-image-container {
    height: 12rem; /* équivalent .h-48 */
    width: 100%;
    position: relative;
    background: #e5e7eb;
    overflow: hidden;
    flex-shrink: 0;
}

.annonce-card .annonce-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.annonce-card .annonce-content {
    padding: 1rem;
    height: auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.annonce-card .titre-annonce,
.annonce-card h2.text-lg {
    font-weight: 400 !important;
    font-size: 1.15rem;
    line-height: 1.65rem;
    height: 3.50rem;
    overflow: hidden;
    color: #1f2937;
    margin-bottom: 0.25rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}

.annonce-card .price,
.annonce-card h2 .fa-tag {
    color: #FF6B00;
    font-weight: bold;
}

.annonce-card .price {
    font-size: 1.15rem;
    margin-top: 0.25rem;
}

/* Bouton Découvrir */
.annonce-card .btn-decouvrir {
    display: block;
    text-align: center;
    background: #f3f4f6;
    color: #1f2937;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    margin-top: 0.75rem;
    font-weight: 500;
}

.annonce-card .btn-decouvrir:hover {
    background: #ffedd5;
    color: #ea580c;
}

/* Badge état */
.annonce-card .etat-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 5;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    white-space: nowrap;
}

/* Badge vues */
.annonce-card .view-badge-mini {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    z-index: 4;
}

/* Badge sponsor */
.annonce-card .sponsor-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700; 
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}


.annonce-card .sponsor-badge[data-type="urgent"] {
    background: #dc2626;
    max-width: 90px !important;
}
.annonce-card .sponsor-badge[data-type="mise_en_avant"] {
    /*background: linear-gradient(135deg, #8b5cf6, #7c3aed);*/
    max-width: 120px !important;
    color: #7a2c0c !important;
}

.annonce-card .sponsor-badge[data-type="mise_en_avant"] i {
    color: #7a2c0c !important;
}

.annonces-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

@media (min-width: 752px) {
    .annonces-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .annonces-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}