/* fiche-bien-custom.css - Styles spécifiques pour fiche-bien.php */

/* Importation des variables CSS de styles.css pour la cohérence */
:root {
    --card-radius: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --primary: #ff9e15;
    --primary-hover: #e68a00;
    --text-dark: #00263f;
    --text-light: #6b7280;
    --background-light: #f5f7fa;
}

/* Zone confidentielle */
.property-detail .confidential-zone {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid rgba(255, 158, 21, 0.8);
    background: rgba(255, 158, 21, 0.2);
    animation: pulse-confidential 3s infinite;
    box-shadow: 
        0 0 0 8px rgba(255, 158, 21, 0.1),
        0 0 0 16px rgba(255, 158, 21, 0.05);
}

@keyframes pulse-confidential {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
}

.property-detail .map-with-confidential-area:hover .confidential-zone {
    animation-duration: 2s;
    border-width: 4px;
}

/* Carrousel */
.carousel-main {
    position: relative;
    width: 100%;
    height: 60vh;
    max-height: 500px;
    min-height: 300px;
    overflow: hidden;
    border-radius: var(--card-radius);
    border: 1px solid #e5e7eb;
    background: #f0f0f0;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-image.active {
    opacity: 1;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--primary);
    transform: scale(1.05);
}

.thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.carousel-main:hover {
    transform: scale(1.002);
}

.image-counter {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    backdrop-filter: blur(4px);
}

.fullscreen-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.625rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Property Detail Page */
.property-detail {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 0;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.main-content {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    min-width: 0;
    box-shadow: var(--shadow);
}

.property-sidebar > div {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.property-title {
    font-size: 1.875rem;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    font-weight: 700;
}

.property-details {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    display: block;
    font-weight: 400;
}

.property-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
}

.price-period {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.secondary {
    background: var(--text-light);
}

.property-characteristics table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    box-shadow: var(--shadow);
    border-radius: var(--card-radius);
    overflow: hidden;
}

.property-characteristics td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.property-characteristics td:first-child {
    font-weight: 600;
    color: var(--text-dark);
    width: 45%;
    background: var(--background-light);
}

.property-characteristics tr:last-child td {
    border-bottom: none;
}

.map-disclaimer {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
}

.confidentiality-indicator,
.confidentiality-notice {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
    border: 1px solid #e5e7eb;
    font-weight: 500;
}

.confidentiality-notice {
    max-width: 200px;
}

.similar-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.similar-card-link:hover .similar-card {
    border-color: var(--primary);
}

.similar-card-image {
    position: relative;
    height: 200px;
}

@media (min-width: 768px) {
    .similar-card {
        flex-direction: row;
        height: auto;
    }
    .similar-card-image {
        width: 120px;
        height: 120px;
    }
}

.similar-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.similar-card-content {
    padding: 1rem;
}

.similar-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.similar-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.similar-card-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.agency-details p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.agency-details i {
    width: 16px;
    color: var(--primary);
}

.agency-phone a {
    color: var(--primary);
    text-decoration: none;
}

.agency-phone a:hover {
    text-decoration: underline;
}

.social-buttons a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.3s ease;
}

.social-buttons a:hover {
    background: var(--primary-hover);
}

.interest-form,
.dpe-images-sidebar,
.client-reviews {
    background: #f9f9f9;
    border: 1px solid #e5e7eb;
}

/* Responsive design */
@media (max-width: 1024px) {
    .property-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .property-sidebar {
        order: -1;
    }
    
    .carousel-main {
        height: 50vh;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .property-detail {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .main-content {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .property-sidebar {
        order: 2;
        margin-top: 1rem;
    }
    
    .mobile-priority {
        order: -2;
        position: sticky;
        top: 1rem;
        z-index: 10;
    }
    
    .carousel-main {
        height: 50vh;
        max-height: 350px;
        min-height: 250px;
    }
    
    .desktop-title {
        display: none !important;
    }
    
    .mobile-title {
        display: block !important;
    }
    
    .property-details {
        font-size: 0.9rem !important;
    }
    
    .property-title {
        font-size: 1.5rem;
    }
    
    .property-price {
        font-size: 1.75rem;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .property-characteristics td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .property-characteristics td:first-child {
        width: 50%;
    }
    
    .similar-card {
        height: auto;
        flex-direction: row;
        min-height: 120px;
    }
    
    .similar-card-image {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }
    
    .similar-card-content {
        padding: 1rem;
        flex: 1;
    }
    
    .similar-card-title {
        font-size: 0.85rem;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }
    
    .confidential-zone {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }
    
    .property-sidebar > div {
        padding: 1rem;
    }
    
    .carousel-main {
        height: 40vh;
        max-height: 280px;
        min-height: 200px;
    }
    
    .property-title {
        font-size: 1.25rem;
    }
    
    .property-price {
        font-size: 1.5rem;
    }
    
    .thumbnail {
        width: 50px;
        height: 38px;
    }
    
    .property-characteristics td {
        font-size: 0.75rem;
        padding: 0.4rem 0;
    }
    
    .property-characteristics td:first-child {
        width: 50%;
    }
    
    .similar-card-image {
        width: 100px;
        height: 100px;
    }
    
    .similar-card-content {
        padding: 0.75rem;
    }
    
    .similar-card-title {
        font-size: 0.8rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .confidential-zone {
        width: 110px;
        height: 110px;
    }
    
    .confidentiality-notice {
        max-width: 150px;
    }
}

@media (max-width: 360px) {
    .main-content,
    .property-sidebar > div {
        padding: 0.75rem;
    }
    
    .carousel-main {
        height: 35vh;
        max-height: 250px;
        min-height: 180px;
    }
    
    .property-title {
        font-size: 1.2rem;
    }
    
    .property-price {
        font-size: 1.1rem;
    }
    
    .similar-card {
        flex-direction: column;
        height: auto;
    }
    
    .similar-card-image {
        width: 100%;
        height: 120px;
    }
}

/* Optimisations pour écrans haute résolution */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .carousel-image,
    .thumbnail,
    .similar-card-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}