/* ===== Page détails annonce ===== */
.annonce-detail-page {
    padding-top: 1rem;
}

/* Barre de navigation sticky */
.annonce-nav-bar {
    position: fixed;
    top: 73px; /* Hauteur du navbar principal */
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    z-index: 999; /* Sous le navbar (z-index: 1030) */
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.annonce-nav-bar.visible {
    transform: translateY(0);
}

/* Ajustement responsive pour mobile */
@media (max-width: 991.98px) {
    .annonce-nav-bar {
        top: 56px; /* Hauteur navbar mobile */
    }
}

.annonce-nav-bar .btn {
    font-weight: 600;
}

.annonce-nav-bar .btn-favorite-sticky.active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.annonce-nav-bar .btn-favorite-sticky.active i {
    font-weight: 900;
}

/* Classe de conteneur avec bordure standard */
.container-bordered {
    background-color: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 10px 10px 10px 10px;
    padding: 20px 9px 10px 10px;
}

/* Colonnes avec largeurs cohérentes */
.property-detail-main {
    flex: 0 0 auto;
    width: 75%; /* Même largeur que search-results-container */
}

.property-detail-sidebar {
    flex: 0 0 auto;
    width: 25%; /* Même largeur que promoters-sidebar */
}

@media (max-width: 991.98px) {
    .property-detail-main,
    .property-detail-sidebar {
        width: 100%;
    }
}

/* Colonne principale avec bordure (ancienne classe maintenue pour compatibilité) */
.annonce-main-column {
    border: 1px solid #d4d4d4;
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: white;
    margin-bottom: 1.5rem;
}

/* Conteneur galerie + onglets */
.property-content-wrapper {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Galerie d'images */
.annonce-gallery .carousel-inner {
    height: 500px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.annonce-gallery .carousel-item img {
    height: 500px;
    object-fit: cover;
}

/* Boutons de navigation du carrousel */
.annonce-gallery .carousel-control-prev,
.annonce-gallery .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(1px);
}

.annonce-gallery .carousel-control-prev {
    left: 20px;
}

.annonce-gallery .carousel-control-next {
    right: 20px;
}

.annonce-gallery .carousel-control-prev:hover,
.annonce-gallery .carousel-control-next:hover {
    background-color: rgba(102, 126, 234, 0.95);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.annonce-gallery .carousel-control-prev-icon,
.annonce-gallery .carousel-control-next-icon {
    width: 28px;
    height: 28px;
    background-size: 100%;
    filter: invert(0.4) brightness(0.5);
}

.annonce-gallery .carousel-control-prev:hover .carousel-control-prev-icon,
.annonce-gallery .carousel-control-next:hover .carousel-control-next-icon {
    filter: invert(1) brightness(2);
}

/* Navigation galerie */
.gallery-navigation {
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 2rem;
}

.gallery-navigation .btn-link {
    color: #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gallery-navigation .btn-link:hover {
    color: #764ba2;
    transform: translateX(3px);
}

.gallery-navigation .btn-link:first-child:hover {
    transform: translateX(-3px);
}

.gallery-counter {
    font-size: 1.1rem;
    color: #2c3e50;
}

.gallery-description {
    font-size: 0.95rem;
}

/* En-tête de l'annonce */
.annonce-header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.annonce-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.btn-favorite {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0 !important;
    flex-shrink: 0;
}

.btn-favorite:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.btn-favorite:hover i {
    font-weight: 900;
}

/* Prix */
.price-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.price-amount {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.price-period {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 500;
}

/* Prix simple (sidebar) */
.annonce-price-simple {
    text-align: left;
}

.annonce-price-simple .price-amount {
    color: #2c3e50;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.annonce-price-simple .price-period {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Caractéristiques */
.annonce-features {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.annonce-features .flex-fill {
    min-width: 60px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.annonce-features i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.annonce-features .feature-text {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.annonce-features .feature-text strong,
.annonce-features .feature-text span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Masquer les unités en pi² et afficher uniquement m² */
.annonce-features .unit-imperial {
    display: none;
}

.annonce-features .unit-metric {
    display: inline;
}

.feature-box {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.feature-box i {
    font-size: 2rem;
}

.feature-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.feature-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

.description-content {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 0.75rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: #495057;
}

/* Caractéristiques détaillées */
.caracteristiques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.caracteristique-item {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.caracteristique-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Carte de contact */
.contact-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #d4d4d4;
    top: 100px;
}

.contact-card h4 {
    color: #2c3e50;
    font-weight: 700;
}

.contact-card .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.contact-card .form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.contact-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Carte annonce similaire */
.property-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #d4d4d4;
    transition: all 0.3s ease;
}

/* Section annonces similaires */
.similar-properties-section {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #d4d4d4;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.1);
}

.badge-sale {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.badge-rent {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.property-content {
    padding: 1.5rem;
}

.property-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-location {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.property-features-small {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #6c757d;
}

.property-features-small span {
    display: flex;
    align-items: center;
}

/* Map */
.map-container {
    border: 3px solid #e9ecef;
}

/* Breadcrumb */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
}

.breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .annonce-gallery .carousel-inner,
    .annonce-gallery .carousel-item img {
        height: 300px;
    }
    
    .annonce-title {
        font-size: 1.5rem;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    .contact-card {
        position: static !important;
        margin-top: 2rem;
    }
    
    .feature-box {
        margin-bottom: 1rem;
    }
    
    .caracteristiques-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .btn-favorite {
        width: 45px;
        height: 45px;
    }
    
    .feature-value {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
}

/* ===== ONGLETS DESCRIPTION / CARTE ===== */
.property-detail-tabs {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
}

.property-detail-tabs .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    background: #fff;
    padding: 0;
    gap: 0;
    margin: 0;
}

.property-detail-tabs .nav-link {
    border: none;
    border-radius: 0;
    padding: 1rem 1.5rem;
    color: #6c757d;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    border-bottom: 3px solid transparent;
}

.property-detail-tabs .nav-link:hover {
    color: #667eea;
    background: transparent;
    border-bottom-color: #667eea;
}

.property-detail-tabs .nav-link.active {
    color: #667eea;
    background: transparent;
    border-bottom-color: #667eea;
    font-weight: 700;
}

.property-detail-tabs .nav-link i {
    margin-right: 0.5rem;
}

.property-tab-content {
    background: #fff;
    min-height: 400px;
}

.property-tab-content .tab-pane {
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Description et Caractéristiques dans onglet */
.property-tab-content .annonce-description,
.property-tab-content .annonce-caracteristiques {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.property-tab-content .annonce-description .section-title,
.property-tab-content .annonce-caracteristiques .section-title {
    font-size: 1.25rem;
    color: #2c3e50;
}

.property-tab-content .annonce-localisation {
    border: none;
    padding: 0;
}

/* Carte dans onglet */
.property-tab-content .map-container {
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.property-tab-content .map-container iframe {
    display: block;
    min-height: 500px;
}
