@import url('unified-close-icons.css');

/* Filtres Immobilier - Modern UI */

/* Google Font Icons Material Symbols Outlined */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

.immobilier-filters-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.immobilier-filters-form {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Bouton Recherche détaillée */
.filter-button-advanced {
    background: #007bff;
    color: white;
    border-color: #007bff;
    position: relative;
}

/* Etat visuel quand des filtres avancés sont actifs */
.filter-button-advanced.has-advanced-selection {
    background: #ffffff;
    color: #007bff;
    border-color: #007bff;
}

.filter-button-advanced:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.filter-button-advanced .filter-label {
    color: inherit;
}

.filter-button-advanced .filter-icon {
    color: inherit;
}


/* Dropdown filtres avancés */
.filter-dropdown-advanced {
    position: fixed;
    width: 100vw; /* pleine largeur viewport */
    max-width: 64rem; /* limite max */
    min-width: 0;
    left: auto;
    right: 0;
    top: 0;
    padding-top: 60px; /* espace pour header sticky */
    padding-bottom: 70px; /* espace pour footer sticky */
    max-height: 75vh; /* scroll vertical si contenu long */
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .filter-dropdown-advanced {
        width: 100vw;
        max-width: none;
        left: 0 !important;
        right: auto !important;
        padding-top: 50px;
        padding-bottom: 60px;
        max-height: 80vh;
    }
}

.advanced-filters-grid {
    display: flex;
    flex-direction: column; /* aligner les filtres secondaires en colonne */
    gap: 16px;
}

.advanced-filter-item {
    position: relative;
}

.advanced-filter-item .custom-filter-dropdown {
    margin-bottom: 0;
}

.advanced-filter-item .custom-filter-dropdown .filter-button {
    height: 56px;
}

/* Inline controls inside advanced search */
.inline-filter {
    padding: 0px;
}
.inline-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Header et footer sticky pour Recherche détaillée */
.advanced-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.advanced-title {
    font-weight: 700;
    color: #4b5fd2;
}
/* Styles pour .advanced-close maintenant dans unified-close-icons.css */

.advanced-actions {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-top: 1px solid #f0f0f5;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}
.btn-advanced-clear,
.btn-advanced-apply {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.btn-advanced-clear {
    background: #f1f3f5;
    color: #495057;
}
.btn-advanced-clear:hover {
    background: #e9ecef;
}
.btn-advanced-apply {
    background: #28a745;
    color: white;
}
.btn-advanced-apply:hover {
    background: #218838;
}

/* Bouton de filtre personnalisé */
.custom-filter-dropdown {
    position: relative;
    margin-bottom: 0px;
}

.filter-button {
    width: 100%;
    height: 56px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    font-size: 15px;
    color: #495057;
    position: relative;
    text-decoration: none !important;
    flex-shrink: 0;
}

.filter-button * {
    text-decoration: none !important;
}

.filter-button:hover {
    background: #fff;
    border-color: #495057;
}

.filter-button.active {
    background: #fff;
    border-color: #495057;
}

.filter-label {
    font-weight: 600;
    color: #495057;
    margin-right: 10px;
    text-decoration: none !important;
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}

.filter-label.has-selection {
    color: #000;
    font-weight: 600;
}

.filter-value {
    flex: 1;
    text-align: left;
    color: #6c757d;
    font-size: 12px;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-value.has-value {
    color: #007bff;
    font-weight: 500;
}

.filter-icon {
    margin-left: 10px;
    transition: transform 0.2s ease;
    color: #6c757d;
    flex-shrink: 0;
}

.filter-button.active .filter-icon {
    transform: rotate(180deg);
}

/* Tooltip content avec Floating UI */
.filter-dropdown-content {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 1495057;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    min-width: 350px;
    max-width: 500px;
    width: max-content;
    top: 0;
    left: 0;
}

/* Sur mobile, le tooltip prend la largeur du bouton parent */
@media (max-width: 768px) {
    .filter-dropdown-content {
        min-width: 0;
        max-width: none;
        width: auto;
        padding: 16px;
        border-radius: 12px;
    }
}

.btn-filter-reset,
.btn-inline-reset {
    margin-top: 12px;
    padding: 8px 12px;
    color: #495057;
    background-color:transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-filter-reset .material-symbols-outlined,
.btn-inline-reset .material-symbols-outlined {
    font-size: 12px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 18;
}

.btn-filter-reset:hover,
.btn-inline-reset:hover {
    color: #000;
}

/* Flèche du tooltip */
.filter-dropdown-content[data-popper-placement^='top'] > .tooltip-arrow {
    bottom: -6px;
}

.filter-dropdown-content[data-popper-placement^='bottom'] > .tooltip-arrow {
    top: -6px;
}

.filter-dropdown-content[data-popper-placement^='left'] > .tooltip-arrow {
    right: -6px;
}

.filter-dropdown-content[data-popper-placement^='right'] > .tooltip-arrow {
    left: -6px;
}

.tooltip-arrow {
    visibility: hidden;
}

.custom-filter-dropdown.open .filter-dropdown-content {
    opacity: 1;
    visibility: visible;
}

/* Toggle buttons */
.filter-toggle-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toggle-option {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 14px 24px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    font-weight: 300;
    color: #495057;
    text-align: center;
    font-size: 12px;
}

/* Sur mobile, les toggles prennent toute la largeur */
@media (max-width: 768px) {
    .filter-toggle-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .toggle-option {
        min-width: 100%;
    }
}

.toggle-option:hover {
    background: #fff;
    border-color: #F8B500;
}

.toggle-option.active {
    background: #F8B500;
    border-color: #F8B500;
    color: #fff;
}

/* Checkboxes */
.filter-checkbox-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 10px;
    padding: 0px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    min-width: 140px;
    flex: 1 1 auto;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display:none;
}

.alert-editor-group{
    margin-bottom:20px;
}
.alert-editor-label{
    padding-bottom:5px;
}
/* Sur mobile, les checkboxes prennent toute la largeur */
@media (max-width: 768px) {
    .filter-checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .checkbox-label {
        min-width: 100%;
        justify-content: flex-start;
    }
}

.checkbox-label:hover {
    background: #fff;
    border-color: #F8B500;
}

.filter-checkbox {
    position: absolute!important;
    opacity: 0;
    width:0!important;
    height:0!important;
    pointer-events: none;
}

.checkbox-custom { display: none; }

.checkbox-label:hover .checkbox-custom {
    border-color: #667eea;
}

.checkbox-label.active {
    background: #F8B500;
    border-color: #F8B500;
    color: #fff;
}

.filter-checkbox:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.checkbox-label.active span:last-child { color: #fff; font-weight: 600; }

.checkbox-label span:last-child {
    color: #495057;
    font-size: 12px;
    transition: all 0.2s ease;
}

/* Range inputs */
.filter-range-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}

@media (max-width: 768px) {
    .filter-range-group {
        flex-direction: column;
        gap: 8px;
        padding: 0;
    }
    
    .filter-range-group .filter-input-range {
        width: 100%;
    }
    
    .range-separator {
        display: none;
    }
}

.filter-input-range {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    background: #f8f9fa;
}

.filter-input-range:focus {
    outline: none;
    border-color: #495057;
    background: white;
}

.range-separator {
    color: #6c757d;
    font-weight: 600;
    font-size: 18px;
}

/* Text input */
.filter-text-group {
    width: 100%;
    padding: 10px;
}

.filter-input-text {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    background: #f8f9fa;
}

.filter-input-text:focus {
    outline: none;
    border-color: #495057;
    background: white;
}

.filter-input-text::placeholder {
    color: #adb5bd;
}

/* Scrollbar personnalisée */
.filter-checkbox-group::-webkit-scrollbar {
    width: 8px;
}

.filter-checkbox-group::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
    margin: 5px 0;
}

.filter-checkbox-group::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid #f1f3f5;
}

.filter-checkbox-group::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

/* Actions */
.filter-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-create-alert {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #F8B500;
    color: #fff;
}

.btn-create-alert:hover {

}

/* Results count */
.results-count {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    color: #495057;
    font-weight: 600;
}

#results-counter {
    color: #e7b22c;
    font-weight: 700;
    display: inline-block;
}

/* Media query pour tablettes */
@media (max-width: 1024px) and (min-width: 769px) {
    .annonces-grid,
    .annonces-grid-3,
    .annonces-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Annonces grid */
.annonces-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

/* Variantes avec nombre de colonnes fixe */
.annonces-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.annonces-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.annonces-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Titre de section pour les shortcodes */
.section-title {
    text-align: center;
}

.no-results {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-size: 16px;
}

/* Toggle Vente/Location */
.coup-de-coeur-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 40px;
}

.toggle-cdc {
    padding: 12px 32px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #495057;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-cdc:hover {
    background: #F8B500;
    color: #fff;
}

.toggle-cdc.active {
    background: #F8B500;
    color: #fff;
    border-color: transparent;
}

/* Swiper container */
.coup-de-coeur-wrapper {
    position: relative;
    padding: 0 50px;
    margin-bottom: 40px;
}

.coup-de-coeur-wrapper .swiper {
    width: 100%;
}

.coup-de-coeur-wrapper .swiper-slide {
    height: auto;
    display: flex;
}

.coup-de-coeur-wrapper .swiper-slide .annonce-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.coup-de-coeur-wrapper .swiper-slide .annonce-content {
    flex: 1;
}

/* Navigation buttons */
.coup-de-coeur-wrapper .swiper-button-prev,
.coup-de-coeur-wrapper .swiper-button-next {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    color: #e7b22c;
    position: static;
    transform: none;
    margin: 0;
}

.coup-de-coeur-wrapper .swiper-button-prev:after,
.coup-de-coeur-wrapper .swiper-button-next:after {
    font-size: 20px;
    font-weight: bold;
}

.coup-de-coeur-wrapper .swiper-button-prev:hover,
.coup-de-coeur-wrapper .swiper-button-next:hover {
    background: #F8B500;
    color: white;
}

.coup-de-coeur-wrapper .swiper-button-disabled {
    opacity: 0.3;
}

/* Pagination */
.coup-de-coeur-wrapper .swiper-pagination {
    position: static;
    bottom: auto;
    margin: 0 12px;
}

.coup-de-coeur-wrapper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ddd;
    opacity: 1;
}

.coup-de-coeur-wrapper .swiper-pagination-bullet-active {
    background: #F8B500;
    width: 30px;
    border-radius: 6px;
}

.coup-de-coeur-wrapper .similar-swiper-controls,
.coup-de-coeur-wrapper .coup-de-coeur-swiper-controls {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.coup-de-coeur-wrapper .similar-swiper-controls .swiper-nav-buttons,
.coup-de-coeur-wrapper .coup-de-coeur-swiper-controls .swiper-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* Loading state */
.loading-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: white;
    border-radius: 12px;
}

.loading-slide p {
    color: #999;
    font-size: 16px;
}

/* Barre de progression minimaliste */
.load-more-progress {
    margin: 20px 0;
    text-align: center;
}

.progress-count {
    display: block;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 3px;
    background-color: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #495057;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

/* État de chargement */
.load-more-progress.loading .progress-fill {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Bouton désactivé */
.btn-load-more.disabled {
    background-color: #e0e0e0 !important;
    color: #999 !important;
    border-color: #ccc !important;
    cursor: default !important;
    opacity: 0.7;
}

.btn-load-more.disabled:hover {
    background-color: #e0e0e0 !important;
    color: #999 !important;
    border-color: #ccc !important;
    transform: none !important;
    cursor: default !important;
}

.annonce-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.annonce-card:hover {
    text-decoration: none;
}

.annonce-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.annonce-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge Exclusivité */
.annonce-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.exclusivite-badge {
    display: inline-block;
    background: #F8B500;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.statut-badge {
    background: #203A6B;
}

.swiper-slide-media {
    position: relative;
    width: 100%;
    height: 100%;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 220px;
}

/* Styles pour l'image par défaut dans les cartes d'annonces */
.no-image .no-image-content {
    text-align: center;
    color: #6c757d;
}

.no-image .no-image-content svg {
    color: #adb5bd;
    margin-bottom: 12px;
}

.no-image .no-image-text {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: #6c757d;
}

/* Styles pour l'image par défaut de la galerie */
.gallery-no-image {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.no-image-content {
    text-align: center;
    color: #6c757d;
}

.no-image-content svg {
    color: #adb5bd;
    margin-bottom: 16px;
}

.no-image-text {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: #6c757d;
}


/* Styles pour la galerie - Navigation et pagination conditionnels */
.gallery-swiper-main .swiper-button-next,
.gallery-swiper-main .swiper-button-prev {
    display: none;
}

.gallery-swiper-main .swiper-pagination {
    display: none;
}

/* Afficher la navigation et pagination seulement si plusieurs images */
.gallery-swiper-main.swiper-initialized .swiper-button-next,
.gallery-swiper-main.swiper-initialized .swiper-button-prev {
    display: flex;
}

.gallery-swiper-main.swiper-initialized .swiper-pagination {
    display: block;
}





.annonce-content {
    padding: 20px;
}

.annonce-content h3 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    color: #495057;
    font-weight: 600;
}

.annonce-card:hover .annonce-title {
    color: #000;
}
.annonce-content .annonce-price {
    font-size: 2rem;
    font-weight:300;
}
.annonce-ref {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.annonce-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.detail-item {
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}

.info-small {
    font-size: 10px;
    font-style: italic;
}
.no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666;
    grid-column: 1 / -1;
}

/* Loading spinner */
#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(255,255,255,0.9);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
/* Tags de villes (multi-sélection) */
.city-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 0;
    transition: min-height 0.3s ease;
}

.city-tags-container:not(:empty) {
    min-height: 38px;
}

.city-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F8B500;
    color: #fff;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    animation: tagSlideIn 0.2s ease;
}

@keyframes tagSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Styles pour .city-tag-remove maintenant dans unified-close-icons.css */

/* Ajustement du champ ville quand il y a des tags */
.filter-text-group:has(.city-tags-container:not(:empty)) .filter-input-text {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .immobilier-filters-form {
        padding: 20px;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .annonces-grid,
    .annonces-grid-2,
    .annonces-grid-3,
    .annonces-grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Coup de coeur responsive */
    .coup-de-coeur-section {
        padding: 20px 10px;
    }
    
    .coup-de-coeur-wrapper {
        padding: 0 35px;
    }
    
    .coup-de-coeur-toggle {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }
    
    .toggle-cdc {
        width: 100%;
        padding: 12px 20px;
    }
    
    .coup-de-coeur-wrapper .swiper-button-prev,
    .coup-de-coeur-wrapper .swiper-button-next {
        width: 35px;
        height: 35px;
    }
    
    .coup-de-coeur-wrapper .swiper-button-prev:after,
    .coup-de-coeur-wrapper .swiper-button-next:after {
        font-size: 16px;
    }

    .filter-dropdown-advanced {
        min-width: 100%;
        max-width: 95vw;
    }
}

/* Notifications: déplacé dans modules/filters/assets/notifications.css (chargé globalement) */

@media (max-width: 768px) {
    #alert-notification {
        left: 20px;
        right: 20px;
        transform: none;
        max-width: none;
        white-space: normal;
        text-align: left;
    }
}

/* jQuery UI Autocomplete custom style */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 14950570;
    display: none;
}

.gallery-modal.open {
    display: block;
}

.gallery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.gallery-modal-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Styles pour .gallery-modal-close maintenant dans unified-close-icons.css */

.gallery-swiper-modal {
    width: 100%;
    height: 100%;
}

.gallery-swiper-modal .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 14950570 !important;
}

.ui-autocomplete .ui-menu-item {
    padding: 0;
    margin: 0;
    border: none;
}

.ui-autocomplete .ui-menu-item-wrapper {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.ui-autocomplete .ui-menu-item-wrapper:hover,
.ui-autocomplete .ui-state-active {
    background: #F8B500 !important;
    color: #fff !important;
    border: none !important;
    margin: 0 !important;
}

/* Validation ville invalide */
input.invalid-city {
    border-color: #d63638 !important;
    background-color: #fcf0f1 !important;
    box-shadow: 0 0 0 1px #d63638 !important;
}

input.invalid-city:focus {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.3) !important;
}

.city-error-message {
    animation: slideDown 0.3s ease-out;
}

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

/* Bouton créer une alerte dans la ligne de filtres */
.btn-create-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F8B500;
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 50px;
}

.btn-create-alert:hover {
}

.btn-create-alert:active {
    transform: translateY(0);
}

.btn-create-alert svg {
    fill: none;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Header des résultats (compteur + tri) */
.results-header {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 20px;
    flex-wrap: wrap;
}

/* Compteur de résultats */
.results-count {
    margin: 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
}

/* Sélecteur de tri */
.results-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 14px;
    color: #555;
    font-weight: 500;
    margin: 0;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    min-width: 180px;
}

.sort-select:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.sort-select:focus {
    border-color: #495057;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* DPE et GES sur les cartes d'annonces */
.annonce-energy {
    display: flex;
    gap: 12px;
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.energy-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.energy-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dpe-badge,
.ges-badge {
    font-size: 14px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Section commercial sur page de détail */
.annonce-detail-commercial {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.annonce-detail-commercial h3 {
    margin: 0 0 20px 0;
    font-size: 22px;
    color: #495057;
}

.commercial-contact-card {
    display: flex;
    gap: 25px;
    align-items: center;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.commercial-contact-photo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.commercial-contact-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.commercial-contact-avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
}

.commercial-contact-info {
    flex: 1;
}

.commercial-contact-info h4 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #495057;
}

.commercial-contact-role {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.commercial-contact-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.contact-detail-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #0073aa;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.contact-detail-link:hover {
    color: #005a87;
}

.contact-detail-link .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.btn-contact-commercial {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-contact-commercial:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .btn-create-alert {
        width: 100%;
        justify-content: center;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .results-sort {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .annonce-energy {
        flex-direction: column;
        gap: 8px;
    }
    
    .commercial-contact-card {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-contact-commercial {
        width: 100%;
    }
}

/* ==================================
   STYLES HOMEPAGE SEARCH
   ================================== */

.homepage-search-wrapper {
    width: 100%;
    margin: 0 auto;
}

/* Compteur de résultats */
.homepage-results-count {
    text-align: center;
    margin-bottom: 12px;
    color: #495057;
    font-size: 20px;
    font-weight: 900;
    transition: all 0.3s ease;
}

.homepage-results-count.loading {
    opacity: 0.7;
}

.homepage-results-count.updated {
    transform: scale(1.05);
}

.homepage-results-count .count-number {
    font-size: 20px;
    font-weight: 900;
    display: inline-block;
    margin-right: 4px;
}

.homepage-results-count .count-text {
    font-size: 20px;
    font-weight: 300;
    display: inline-block;
}

.homepage-search-form {
    background: #ffffff;
    padding: 30px 30px 50px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.homepage-filters-container {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.homepage-filter-item {
    position: relative;
    flex: 1;
    min-width: 200px;
}

/* Bouton recherche avancée dans la ligne des filtres */
.homepage-advanced-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    max-width: 56px;
    flex: 0 0 56px;
}

/* Ajustements pour les filtres */
.homepage-filter-item .custom-filter-dropdown {
    margin-bottom: 0;
    width: 100%;
}

.homepage-filter-item .filter-button {
    height: 56px;
    width: 100%;
}

/* Style du label quand une sélection est active */
.homepage-filter-item .filter-label.has-selection {
    color: #000;
    font-weight: 600;
}

.homepage-filter-item .inline-filter {
    margin-bottom: 0;
}

.homepage-filters-container .filter-text-group {
    padding: 0;
    position: relative;
}

/* Cacher le label du filtre ville en mode inline pour l'alignement dans le formulaire principal */
.homepage-filter-item .inline-filter-label {
    display: none;
}

.homepage-advanced-filter-item{
    margin-bottom: 20px;
}
/* Afficher les labels des filtres dans le modal */
.homepage-advanced-filter-item .inline-filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Aligner l'input ville avec les dropdowns dans le formulaire principal */
.homepage-filter-item .inline-filter .filter-input-text {
    height: 56px;
    width: 100%;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.homepage-filter-item .inline-filter .filter-input-text:focus {
    outline: none;
    border-color: #495057;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Champs texte dans le modal */
.homepage-advanced-filter-item .inline-filter .filter-input-text {
    height: 44px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 12px;
    background: white;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.homepage-advanced-filter-item .inline-filter .filter-input-text:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Positionner les tags de ville en dessous de l'input sans affecter l'alignement dans le formulaire principal */
.homepage-filter-item .city-tags-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    min-height: 0;
    z-index: 10;
}

/* Tags de ville dans le modal en position normale */
.homepage-advanced-filter-item .city-tags-container {
    position: relative;
    margin-top: 8px;
    min-height: 0;
}

.homepage-advanced-filter-item .custom-filter-dropdown {
    margin-bottom: 0;
    width: 100%;
}

.homepage-advanced-filter-item .custom-filter-dropdown .filter-button {
    height: 56px;
}

.homepage-advanced-filter-item .inline-filter {
    margin-bottom: 0;
}

/* Styles des filtres inline dans le modal */
.homepage-advanced-filter-item .filter-toggle-group,
.homepage-advanced-filter-item .filter-checkbox-group,
.homepage-advanced-filter-item .filter-range-group,
.homepage-advanced-filter-item .filter-text-group {
    width: 100%;
}

.homepage-advanced-filter-item .filter-text-group {
    padding: 0;
    position: static;
}

/* Ajuster les toggles dans le modal */
.homepage-advanced-filter-item .filter-toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.homepage-advanced-filter-item .filter-toggle-group .toggle-option {
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 300;
    transition: all 0.2s ease;
    text-transform: none;
}

.homepage-advanced-filter-item .filter-toggle-group .toggle-option:hover {
    border-color: #F8B500;
    background: #fff;
}

.homepage-advanced-filter-item .filter-toggle-group .toggle-option.active {
    background: #F8B500;
    color: #fff;
    border-color: #F8B500;
}

/* Ajuster les checkboxes dans le modal */
.homepage-advanced-filter-item .filter-checkbox-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.homepage-advanced-filter-item .filter-checkbox-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.homepage-advanced-filter-item .filter-checkbox-group .checkbox-label:hover {
    background: #fff;
}

.homepage-advanced-filter-item .filter-checkbox-group .checkbox-label.active {
    background: #F8B500;
}

/* Ajuster les champs number dans le modal */
.homepage-advanced-filter-item .filter-range-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.homepage-advanced-filter-item .filter-range-group .filter-input-range {
    flex: 1;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 12px;
}

.homepage-advanced-filter-item .filter-range-group .filter-input-range:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.homepage-advanced-filter-item .filter-range-group .range-separator {
    color: #999;
    font-weight: 600;
}

.advanced-filter-item button.toggle-option{
    text-transform: none;
}
/* Bouton de recherche */
.homepage-search-button {
    display: flex;
    align-items: flex-end;
}

.btn-homepage-search svg {
    stroke: currentColor;
    flex-shrink: 0;
    margin-right: 10px;
}

/* Lien Recherche Avancée */
.homepage-advanced-link-container {
    text-align: center;
    margin-top: 20px;
}

.btn-homepage-advanced {
    background: transparent;
    color: #495057;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Styles spécifiques pour le bouton dans la ligne des filtres */
.homepage-advanced-button .btn-homepage-advanced {
    padding: 0;
    width: 100%;
    height: 56px;
    min-width: 56px;
    max-width: 56px;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
}

.homepage-advanced-button .btn-homepage-advanced .material-icons {
    margin: 0;
    font-size: 24px;
}

.btn-homepage-advanced svg {
    stroke: currentColor;
}

/* Modal Recherche Avancée */
.homepage-advanced-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 14950570;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.homepage-advanced-modal.open {
    display: flex;
}

.homepage-advanced-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.homepage-advanced-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.homepage-advanced-header {
    padding: 24px 30px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.homepage-advanced-header h3 {
    margin: 0;
    font-size: 22px;
    color: #495057;
    font-weight: 700;
}

/* Styles pour .homepage-advanced-close maintenant dans unified-close-icons.css */

.homepage-advanced-body {
    padding: 30px;
    overflow-y: auto;
    display: block;
}

.homepage-advanced-footer {
    padding: 24px 30px;
    border-top: 1px solid #f0f0f5;
    display: flex;
    gap: 12px;
    background: #fff;
    justify-content: flex-start;
}

.btn-homepage-advanced-clear,
.btn-homepage-advanced-apply {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-homepage-advanced-clear {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #e9ecef;
}

.btn-homepage-advanced-clear:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.btn-homepage-advanced-clear .material-symbols-outlined {
    font-size: 20px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.btn-homepage-advanced-apply {
    background: #F8B500;
    color: #fff;
    flex: 1;
    max-width: 100%;
}

.btn-homepage-advanced-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 181, 0, 0.3);
}

/* Responsive Homepage */
@media (max-width: 768px) {
    .homepage-results-count {
        min-width: auto;
        width: 90%;
        font-size: 20px;
        padding: 15px;
    }
    
    .homepage-results-count .count-number {
        font-size: 28px;
    }
    
    .homepage-results-count .count-text {
        font-size: 16px;
    }
    
    .homepage-filters-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .homepage-search-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .homepage-search-wrapper {
        padding: 20px 10px;
    }
    
    .homepage-results-count {
        font-size: 18px;
        padding: 12px 20px;
    }
    
    .homepage-results-count .count-number {
        font-size: 24px;
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .homepage-results-count .count-text {
        font-size: 14px;
        display: block;
    }
    
    .btn-homepage-search {
        font-size: 14px;
    }
    
    .homepage-advanced-body {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .homepage-advanced-header,
    .homepage-advanced-footer {
        padding: 16px 20px;
    }
    
    .homepage-advanced-footer {
        flex-direction: column;
    }
    
    .btn-homepage-advanced-clear,
    .btn-homepage-advanced-apply {
        width: 100%;
        flex: none;
    }
    
    .homepage-advanced-header h3 {
        font-size: 18px;
    }
    
    .homepage-advanced-content {
        max-height: 95vh;
    }
    
    .btn-homepage-advanced-clear,
    .btn-homepage-advanced-apply {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* ==================================
   STYLES PAGE DETAIL ANNONCE
   ================================== */

/* Breadcrumb pour le SEO */
.annonce-breadcrumb {
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin-left: 8px;
    color: #6c757d;
    font-weight: 400;
}

.breadcrumb-link {
    color: #808B92;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #495057;
    text-decoration: underline;
}

.breadcrumb-current {
    color: #495057;
    font-weight: 500;
}

/* Responsive breadcrumb */
@media (max-width: 768px) {
    .annonce-breadcrumb {
        margin-bottom: 20px;
        padding: 12px 0;
    }
    
    .breadcrumb-list {
        font-size: 0.85rem;
    }
    
    .breadcrumb-item {
        margin-right: 6px;
    }
    
    .breadcrumb-item:not(:last-child)::after {
        margin-left: 6px;
    }
}

.annonce-detail-gallery {
    position: relative;
    margin-bottom: 30px;
    width: 100%;
    min-width: 0; /* Important pour flexbox */
}

/* Styles pour Swiper dans la galerie d'annonce */
.annonce-detail-gallery .swiper {
    width: 100%;
    height: auto;
}

/* Mobile First - Galerie */
.annonce-detail-gallery .gallery-swiper-main {
    width: 100%;
    height: 300px;
    border-radius: 12px;
}

.annonce-detail-gallery .gallery-main-image {
    display: block;
}

.annonce-detail-gallery .gallery-swiper-thumbs {
    margin-top: 10px;
    height: 60px;
}

.annonce-detail-gallery .gallery-thumbnail {
    border-radius: 4px;
    cursor: pointer;
}

.annonce-detail-gallery .swiper-slide {
    height: 100%;
    display: flex;
    align-items: center;
}

.annonce-detail-gallery .gallery-main-image,
.annonce-detail-gallery .gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Pagination pour la galerie d'annonce - style coup de cœur */
.annonce-detail-gallery .swiper-pagination {
    bottom: 10px;
}

.annonce-detail-gallery .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ddd;
    opacity: 1;
}

.annonce-detail-gallery .swiper-pagination-bullet-active {
    background: #F8B500;
    width: 30px;
    border-radius: 6px;
}
.swiper-button-next, .swiper-button-prev{
    color:#fff;
}
/* En-tête avec flexbox - Mobile First */
.annonce-detail-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

.annonce-detail-header-left {
    width: 100%;
    min-width: 0;
}

.annonce-detail-header-right {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Desktop - Layout en ligne pour l'en-tête */
@media (min-width: 769px) {
    .annonce-detail-header {
        flex-direction: row;
        gap: 30px;
    }
    
    .annonce-detail-header-left {
        flex: 1;
        min-width: 0;
    }
    
    .annonce-detail-header-right {
        flex: 0 0 400px;
        min-width: 0;
        justify-content: flex-end;
    }
}

/* Container pour les actions (favori + partager) */
.annonce-detail-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.annonce-detail-actions .favorite-btn {
    position: inherit;
}
.annonce-detail-actions .favorite-btn:hover {
    transform: none;
    box-shadow: none;
}
/* S'assurer que le tooltip dans l'en-tête est visible */
.annonce-detail-header .share-container {
    position: relative;
    z-index: 10000;
}

/* Section title avec flexbox - Mobile First */
.annonce-detail-title-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.annonce-detail-title-left {
    width: 100%;
    min-width: 0;
}

.annonce-detail-title-right {
    width: 100%;
    min-width: 0;
    display: flex;
    text-align: left;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Desktop - Layout en ligne pour la section title */
@media (min-width: 769px) {
    .annonce-detail-title-section {
        flex-direction: row;
        gap: 30px;
        align-items: flex-start;
    }
    
    .annonce-detail-title-left {
        flex: 2; /* Plus d'espace pour la colonne de gauche */
        min-width: 0;
        margin-right: 20px; /* Espacement supplémentaire */
    }
    
    .annonce-detail-title-right {
        flex: 1;
        min-width: 50%; /* Largeur minimum pour le prix */
        display: flex;
        justify-content: flex-end; /* Aligne le prix à droite */
        align-items: flex-start;
    }
    
    /* Desktop - Galerie plus grande */
    .annonce-detail-gallery .gallery-swiper-main {
        height: 400px;
    }
    
    .annonce-detail-gallery .gallery-swiper-thumbs {
        height: 80px;
        margin-top: 15px;
    }
    .annonce-detail-title-right {
        text-align: right;
    }
}

.annonce-detail-title {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: #2c3e50;
}

.annonce-detail-ville {
    margin: 5px 0;
    font-size: 1.6rem;
    color: #6c757d;
}

.annonce-detail-ref {
    margin: 5px 0;
    font-size: 1.6rem;
    color: #6c757d;
}

.price-value {
    font-size: inherit;
    font-weight: inherit;
}
.annonce-detail-price .price-currency{
    font-size:2.5rem;
}
.price-currency {
    font-size:2rem;
    font-weight: 300;
}
.annonce-detail-price{
    flex-direction: column;
    align-items: flex-end;
    margin: 5px 0;
    font-size: 13px;
    color: #6c757d;
    font-weight:normal;
}
.annonce-detail-price .loyer-base, .annonce-detail-price span.price-value {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}
.annonce-detail-title-section .annonce-detail-price .price-currency{
    font-weight: 700;
}
.annonce-detail-taxe-fonciere .taxe-currency{
    margin-left: 2px;
}

.annonce-detail-main-info.last{
    margin-bottom:20px;
}
/* Style pour les honoraires dans la vente */
.honoraire-info {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    display: block;
    margin-top: 4px;
}

/* Layout flexbox pour la page de détail - Mobile First */
.annonce-detail-main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.annonce-detail-left-content {
    width: 100%;
    min-width: 0;
    order: -1; /* Contenu de gauche en premier sur mobile */
}

.annonce-detail-contact-section {
    width: 100%;
    min-width: 0;
    position: static;
    order: 1; /* Formulaire de contact en second sur mobile */
}

/* Desktop - Layout en ligne */
@media (min-width: 769px) {
    .annonce-detail-main-content {
        flex-direction: row;
        gap: 30px;
    }
    
    .annonce-detail-left-content {
        flex: 1;
        min-width: 0;
        order: 0; /* Ordre normal sur desktop */
    }
    
    .annonce-detail-contact-section {
        flex: 0 0 400px;
        min-width: 0;
        position: sticky;
        top: 20px;
        order: 0; /* Ordre normal sur desktop */
    }
}

/* Bouton partager et tooltip */
.annonce-detail-actions {
    display: flex;
    justify-content: center;
}

.share-container {
    position: relative;
    display: inline-block;
    width: auto;
}

.btn-share {
    display: flex;
    align-items: center;
    gap: 10px;
    height:50px;
    padding: 14px 20px;
    background: #fffae5;
    color: #e7b22c;
    border-radius: 8px;
    font-size: 24px!important;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-share:hover {

}

.btn-share svg {
    stroke: currentColor;
    flex-shrink: 0;
}

/* Tooltip de partage */
.share-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 10001;
    display: none;
    opacity: 0;
    transition: all 0.2s ease;
    min-width: 280px;
    width: auto;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
    visibility: hidden;
    white-space: normal;
}

.share-tooltip.show {
    opacity: 1;
    visibility: visible;
    z-index: 10001;
    display: block;
    transform: translateX(-50%);
}

.share-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: white;
    margin-bottom: -1px;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.share-option:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
    text-decoration: none;
    color: #495057;
}

.share-option svg {
    flex-shrink: 0;
}

.share-option span {
    font-size: 12px;
    font-weight: 500;
}

/* Couleurs spécifiques pour chaque option */
.share-email:hover svg,
.share-email:hover {
    color: #db4437;
}

.share-facebook:hover svg,
.share-facebook:hover {
    color: #1877f2;
}

.share-whatsapp:hover svg,
.share-whatsapp:hover {
    color: #25d366;
}

.share-message:hover svg,
.share-message:hover {
    color: #667eea;
}

/* Responsive - styles spécifiques au mobile */
@media (max-width: 768px) {
    
    .annonce-detail-title {
        font-size: 1.6rem;
    }
    
    .annonce-detail-price {
        font-size: 1.5rem;
    }
    
    
    .share-tooltip {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        min-width: calc(50vw - 40px);
        width: calc(50vw - 40px);
        max-width: calc(50vw - 40px);
        box-sizing: border-box;
        z-index: 10001 !important;
    }
    
    .share-tooltip.show {
        z-index: 10001 !important;
        transform: translateX(-50%) !important;
    }
    
    .annonce-detail-header .share-container {
        z-index: 10000 !important;
    }
    
    
    .share-option {
        padding: 10px 6px;
        min-width: 0;
    }
    
    .share-option span {
        font-size: 11px;
    }
    
    /* Styles responsive pour la galerie - déjà définis avec mobile-first */
}

.info-value{
    color:#6c757d;
}
.equipment-item{
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-block;
}
/* ==================================
   NOUVEAUX STYLES DPE ET GES
   ================================== */

/* Conteneur pour les éléments énergétiques (DPE et GES) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Styles pour les éléments d'information énergétique */
.info-item-energy {
    margin-bottom: 20px;
    flex: 1;
    min-width: 200px;
}

/* Conteneur pour regrouper DPE et GES côte à côte */
.info-energy-container {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-energy-container .info-item-energy {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .info-energy-container {
        flex-direction: column;
        gap: 20px;
    }
}

/* Affichage DPE avec toutes les lettres */
.dpe-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dpe-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.dpe-letters {
    display: flex;
    gap: 4px;
    align-items: center;
}

.dpe-letter {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.dpe-letter.active {
    width: 42px;
    height: 52px;
    font-size: 18px;
}

.dpe-value {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Affichage GES avec toutes les lettres */
.ges-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ges-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.ges-letters {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ges-letter {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ges-letter.active {
    width: 42px;
    height: 52px;
    font-size: 18px;
}

.ges-value {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}





/* ========================================================================
   SYSTÈME DE MODALS UNIFIÉ (Micromodal compatible)
   ======================================================================== */

/* Boutons d'ouverture de modal */
.btn-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

/* Styles communs pour tous les modals */

/* === Styles déplacés depuis annonce-detail.php (modal alerte) === */
.modal__container--alert {
    max-width: 800px !important;
    width: 90% !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
}

.modal__header--alert {
    background: none;
    color: #000;
    padding: 24px 30px !important;
    border-bottom: none !important;
}

.modal__title {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #000;
}

/* Styles pour .modal__close--alert maintenant dans unified-close-icons.css */

.modal__content--alert {
    padding: 0 !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
}

.alert-modal-description {
    color: #666;
    margin: 0;
    padding: 20px 30px;
    font-size: 15px;
    line-height: 1.5;
}

.alert-form { padding: 0; }

.alert-form-section {
    padding: 20px 30px;
}

.alert-form-section:last-of-type { border-bottom: none; }

.alert-section-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.alert-form-fields { display: grid; grid-template-columns: 1fr; gap: 20px; }
.alert-filters-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.alert-filter-item { position: relative; }
.alert-filter-item--full { grid-column: 1 / -1 !important; width: 100% !important; }

.alert-fixed-value {
    padding: 14px 18px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-fixed-text { font-size: 15px; color: #495057; font-weight: 500; }

.alert-filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.form-group { margin-bottom: 0; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.alert-input,
.alert-select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    background: #f8f9fa;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.alert-input:focus,
.alert-select:focus {
    outline: none;
    border-color: #495057;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.frequency-help { font-size: 12px; color: #666; margin-top: 8px; margin-bottom: 0; line-height: 1.4; }

.alert-dropdown { position: relative; margin-bottom: 0; }

.alert-filter-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    font-size: 15px;
    color: #495057;
    position: relative;
    text-decoration: none !important;
}

.alert-filter-button:hover { background: #fff; border-color: #007bff; }
.alert-filter-button.active { background: #fff; border-color: #007bff; }

.alert-filter-button .filter-label { font-weight: 600; color: #495057; margin-right: 10px; text-decoration: none !important; }
.alert-filter-button .filter-label.has-selection { color: #000; font-weight: 600; }
.alert-filter-button .filter-value { flex: 1; text-align: left; color: #6c757d; font-size: 14px; text-decoration: none !important; }
.alert-filter-button .filter-value.has-value { color: #007bff; font-weight: 500; }
.alert-filter-button .filter-icon { margin-left: 10px; transition: transform 0.2s ease; color: #6c757d; }
.alert-filter-button.active .filter-icon { transform: rotate(180deg); }

.alert-dropdown .filter-dropdown-content {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 1495057;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    min-width: 300px;
    max-width: 500px;
    width: max-content;
    top: 0;
    left: 0;
}

.alert-dropdown.open .filter-dropdown-content { opacity: 1; visibility: visible; }

.alert-dropdown .filter-toggle-group { display: flex; gap: 12px; flex-wrap: wrap; }
.alert-dropdown .toggle-option {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 14px 24px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    font-weight: 300;
    color: #495057;
    text-align: center;
}
.alert-dropdown .toggle-option:hover { background: #fff; border-color: #F8B500; }
.alert-dropdown .toggle-option.active { background: #F8B500; color: #fff; border-color: #F8B500; }

.alert-city-container { position: relative; }
.alert-city-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    background: #f8f9fa;
    transition: all 0.15s ease;
    box-sizing: border-box;
}
.alert-city-input:focus { outline: none; border-color: #495057; background: #fff; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); }

.alert-city-tags-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; min-height: 0; transition: min-height 0.3s ease; }
.alert-city-tags-container:not(:empty) { min-height: 38px; }
.alert-city-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F8B500;
    color: #fff;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    animation: tagSlideIn 0.2s ease;
}
.city-tag button.close-icon, .alert-city-tag button.alert-city-tag-remove{
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
    padding:6px 6px 6px 6px;
    line-height: 1;
    border-radius:50%;
}
.city-tag button .material-symbols-outlined, .alert-city-tag button .material-symbols-outlined{
    font-size: 18px!important;
}
@keyframes tagSlideIn { from { opacity: 0; transform: translateY(-10px) scale(0.9);} to { opacity: 1; transform: translateY(0) scale(1);} }
/* Styles pour .alert-city-tag-remove maintenant dans unified-close-icons.css */

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 24px 30px;
    background: #fff;
}
.immobilier-alert-form-wrapper .form-actions {
    padding: 0;
}
.btn-submit-alert {
    background: #F8B500;
    color: #fff;
    border: none;
    padding: 12px 24px;
    height: 56px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1; /* occuper l'espace disponible */
}
.btn-submit-alert:hover { box-shadow: none; transform: none; }
.btn-cancel-alert { background: #f0f0f0; color: #495057; border: none; padding: 12px 24px; border-radius: 4px; cursor: pointer; font-size: 14px; flex: 0 0 auto; }
.btn-cancel-alert:hover { background: #e0e0e0; }

/* Bouton favori - même style que les cartes d'annonces */
.favorite-btn-detail {
    position: relative;
    top: auto;
    right: auto;
    width: 50px;
    height: 50px;
    background: #fffae5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: auto;
}
.favorite-btn-detail .material-icons,
.favorite-btn-detail .material-symbols-outlined {
    font-size: 24px !important;
    color: #e7b22c !important;
    transition: all 0.3s ease;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}
.favorite-btn-detail:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.favorite-btn-detail:hover .material-icons,
.favorite-btn-detail:hover .material-symbols-outlined { color: #e74c3c !important; }
.favorite-btn-detail.is-favorite .material-icons,
.favorite-btn-detail.is-favorite .material-symbols-outlined { color: #e74c3c !important; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important; }
.favorite-btn-detail.is-favorite:hover { transform: none; }
@keyframes heartBeat { 0%,100%{transform:scale(1);} 25%{transform:scale(1.3);} 50%{transform:scale(1.1);} }
.favorite-btn-detail.animating { animation: heartBeat 0.5s ease; }

@media (max-width: 768px) {
    .modal__container--alert { width: 95% !important; max-width: none !important; }
    .modal__header--alert,
    .alert-modal-description,
    .alert-form-section,
    .alert-form-actions { padding-left: 20px; padding-right: 20px; }
    .alert-form-fields,
    .alert-filters-grid { grid-template-columns: 1fr; }
    .alert-filter-item--full { grid-column: 1 / -1 !important; width: 100% !important; }
    .form-actions { flex-direction: column; }
    .btn-submit-alert,
    .btn-cancel-alert { width: 100%; flex: none; }
}
.modal,
.bareme-modal,
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.modal[aria-hidden="false"],
.bareme-modal[aria-hidden="false"],
.gallery-modal[aria-hidden="false"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Backdrop commun */
.modal-backdrop,
.bareme-modal-backdrop,
.gallery-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* Contenu modal commun */
.modal-content,
.bareme-modal-content,
.gallery-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

/* Animation d'ouverture */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header modal commun */
.modal-header,
.bareme-modal-header,
.gallery-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.modal-title,
.bareme-modal-title,
.gallery-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #495057;
}

/* Bouton fermer commun */
.modal-close,
.bareme-modal-close,
.gallery-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover,
.bareme-modal-close:hover,
.gallery-modal-close:hover {
    background: #f3f4f6;
    color: #495057;
}

/* Body modal commun */
.modal-body,
.bareme-modal-body,
.gallery-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Loading commun */
.modal-loading,
.bareme-modal-loading,
.gallery-modal-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contenu de page dans modal */
.modal-page-title,
.bareme-page-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.modal-page-content,
.bareme-page-content {
    line-height: 1.6;
    color: #555;
}

.modal-page-content h1,
.modal-page-content h2,
.modal-page-content h3,
.modal-page-content h4,
.modal-page-content h5,
.modal-page-content h6,
.bareme-page-content h1,
.bareme-page-content h2,
.bareme-page-content h3,
.bareme-page-content h4,
.bareme-page-content h5,
.bareme-page-content h6 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: #495057;
}

.modal-page-content h1:first-child,
.modal-page-content h2:first-child,
.modal-page-content h3:first-child,
.bareme-page-content h1:first-child,
.bareme-page-content h2:first-child,
.bareme-page-content h3:first-child {
    margin-top: 0;
}

.modal-page-content p,
.bareme-page-content p {
    margin-bottom: 16px;
}

.modal-page-content ul,
.modal-page-content ol,
.bareme-page-content ul,
.bareme-page-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.modal-page-content li,
.bareme-page-content li {
    margin-bottom: 8px;
}

.modal-page-content table,
.bareme-page-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.modal-page-content th,
.modal-page-content td,
.bareme-page-content th,
.bareme-page-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.modal-page-content th,
.bareme-page-content th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Styles spécifiques pour la galerie */
.gallery-modal-content {
    max-width: 95vw;
    max-height: 95vh;
    width: 95vw;
    height: 95vh;
    padding: 0;
    background: black;
}

.gallery-modal-close.close-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    color: white!important;
}

.gallery-swiper-modal {
    width: 100%;
    height: 100%;
}

.gallery-swiper-modal .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-swiper-modal .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-swiper-modal .swiper-button-next,
.gallery-swiper-modal .swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.gallery-swiper-modal .swiper-button-next:hover,
.gallery-swiper-modal .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-swiper-modal .swiper-pagination {
    bottom: 20px;
}

.gallery-swiper-modal .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

.gallery-swiper-modal .swiper-pagination-bullet-active {
    background: white;
}

/* Responsive commun */
@media (max-width: 768px) {
    .modal-content,
    .bareme-modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 20px;
    }
    
    .gallery-modal-content {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
    }
    
    .modal-header,
    .bareme-modal-header {
        padding: 16px 20px;
    }
    
    .modal-body,
    .bareme-modal-body {
        padding: 20px;
    }
    
    .modal-title,
    .bareme-modal-title {
        font-size: 18px;
    }
    
    .gallery-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* ========================================================================
   PAGINATION AJAX - Load More
   ======================================================================== */

.load-more-container {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
}

.btn-load-more {
    background: #F8B500;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-load-more:hover {

}

.btn-load-more:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-load-more .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toggle switch pour infinite scroll */
.infinite-scroll-toggle {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ddd;
    border-radius: 24px;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: #667eea;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: 500;
    user-select: none;
}

/* Styles pour le loader et l'indicateur de progression */
.load-more-progress {
    width:50%;
    margin:0 auto;
    margin-top: 15px;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
}

/* Icône de validation pour l'état completed */
.load-more-progress.completed .progress-spinner {
    display: none;
}

.progress-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.load-more-progress:not(.loading) .progress-spinner {
    display: none;
}

.progress-text {
    font-weight: 500;
}

.progress-count {
    font-weight: 300;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.load-more-progress.loading .progress-count {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* Animation pour l'apparition du progress */
@keyframes progressSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.load-more-progress {
    animation: progressSlideIn 0.3s ease-out;
}

/* Responsive pour le bouton Load More */
@media (max-width: 768px) {
    .btn-load-more {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .load-more-container {
        margin-top: 30px;
        padding: 15px 0;
    }
    
    .load-more-progress {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .progress-spinner {
        width: 18px;
        height: 18px;
    }
    
    .toggle-switch {
        font-size: 13px;
    }
    
    .toggle-slider {
        width: 45px;
        height: 22px;
    }
    
    .toggle-slider::before {
        width: 18px;
        height: 18px;
    }
    
    .toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
        transform: translateX(23px);
    }
}

/* ===== MICROMODAL STYLES ===== */
/* Styles de base pour Micromodal */
.modal {
    display: none;
}

.modal.is-open {
    display: block;
}

.modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1495057;
}

.modal__container {
    background-color: #fff;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #495057;
}

/* Styles pour .modal__close maintenant dans unified-close-icons.css */

.modal__content {
    padding: 20px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Contenu scrollable pour le modal barème */
.modal__content .bareme-modal-content-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    padding: 20px;
    line-height: 1.6;
}

/* Styles pour le contenu du barème */
.bareme-modal-content-body h1,
.bareme-modal-content-body h2,
.bareme-modal-content-body h3,
.bareme-modal-content-body h4,
.bareme-modal-content-body h5,
.bareme-modal-content-body h6 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #495057;
}

.bareme-modal-content-body h1:first-child,
.bareme-modal-content-body h2:first-child,
.bareme-modal-content-body h3:first-child {
    margin-top: 0;
}

.bareme-modal-content-body p {
    margin-bottom: 16px;
    color: #555;
}

.bareme-modal-content-body ul,
.bareme-modal-content-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.bareme-modal-content-body li {
    margin-bottom: 8px;
}

.bareme-modal-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.bareme-modal-content-body th,
.bareme-modal-content-body td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.bareme-modal-content-body th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Styles spécifiques pour la galerie avec Micromodal */
.modal__container .gallery-swiper-modal {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    position: relative;
}

.modal__container .gallery-modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Navigation buttons pour le modal */
.modal__container .gallery-swiper-modal .swiper-button-next,
.modal__container .gallery-swiper-modal .swiper-button-prev {
    color: #fff !important;
    background: rgba(0, 0, 0, 0.5) !important;
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    position: absolute !important;
}

.modal__container .gallery-swiper-modal .swiper-button-next:hover,
.modal__container .gallery-swiper-modal .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.modal__container .gallery-swiper-modal .swiper-button-next:after,
.modal__container .gallery-swiper-modal .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.modal__container .gallery-swiper-modal .swiper-button-next {
    right: 20px;
}

.modal__container .gallery-swiper-modal .swiper-button-prev {
    left: 20px;
}

/* Pagination pour le modal */
.modal__container .gallery-swiper-modal .swiper-pagination {
    bottom: 20px;
}

.modal__container .gallery-swiper-modal .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.modal__container .gallery-swiper-modal .swiper-pagination-bullet-active {
    background: #fff;
}

/* Animation pour Micromodal */
.modal[aria-hidden="false"] .modal__overlay {
    animation: micromodal-fade-in 0.3s ease-out;
}

.modal[aria-hidden="false"] .modal__container {
    animation: micromodal-slide-in 0.3s ease-out;
}

@keyframes micromodal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes micromodal-slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive pour Micromodal */
@media (max-width: 768px) {
    .modal__container {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal__header {
        padding: 15px;
    }
    
    .modal__title {
        font-size: 18px;
    }
    
    .modal__content {
        max-height: calc(95vh - 60px);
    }
    
    /* Contenu scrollable responsive pour le modal barème */
    .modal__content .bareme-modal-content-body {
        max-height: calc(95vh - 100px);
        padding: 15px;
    }
    
    .modal__container .gallery-swiper-modal {
        height: 60vh;
        min-height: 300px;
    }
}