/* Je commente : ============================================ STYLE PROFESSIONNEL - AMÉLIORATIONS GLOBALES ============================================ */

:root {
    --primary-color: #0066cc;
    --secondary-color: #0052a3;
    --danger-color: #DC3545;
    --light-bg: #f8f9fa;
    --border-light: #e9ecef;
    --text-muted: #6c757d;
    --icon-color: #6c757d;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Je commente : ============================================ INSCRIPTION / CONNEXION CLIENT ============================================ */

.card[style*="border-top"] {
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
}

.card[style*="border-top"]:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    border-color: #b1dfbb !important;
    color: #155724 !important;
}

.alert-success i {
    color: #155724 !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
    border-color: #f1b0b7 !important;
}

.alert-danger i {
    color: #721c24 !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Je commente : ============================================ FORMULAIRES ============================================ */

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 1px solid var(--border-light);
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.form-control:hover {
    border-color: var(--primary-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.4);
}

/* Je commente : Icons - Bleu primaire */
i.fa, i.fas, i.far, i.fab {
    color: #0066cc !important;
}

/* Je commente : Icônes dans les boutons colorés - blanc */
.btn-primary i, .btn-secondary i, .btn-success i,
.btn-danger i, .btn-warning i, .btn-info i {
    color: rgba(245, 244, 242, 0.95) !important;
}

/* Je commente : Icônes dans les boutons normaux - bleu */
.btn i, a i {
    color: #0066cc !important;
}

/* Je commente : Icônes dans le contenu - bleu primaire */
.card-body i.fa, .card-body i.fas {
    color: #0066cc !important;
}

/* Je commente : Icônes avec classes contextuelles */
.text-primary i.fa, .text-primary i.fas {
    color: #0066cc !important;
}

.text-success i.fa, .text-success i.fas {
    color: #28a745 !important;
}

.text-danger i.fa, .text-danger i.fas {
    color: #DC3545 !important;
}

.text-warning i.fa, .text-warning i.fas {
    color: #ffc107 !important;
}

.text-info i.fa, .text-info i.fas {
    color: #17a2b8 !important;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Je commente : ============================================ MODAL DE VÉRIFICATION ============================================ */

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 30px;
    background-color: var(--light-bg);
}

.input-group {
    margin: 20px 0;
}

.input-group .form-control {
    font-size: 18px;
    letter-spacing: 15px;
    font-weight: bold;
    text-align: center;
    font-family: monospace;
}

/* Je commente : ============================================ BOUTONS FAVORIS ============================================ */

.favorites-btn,
.btn-favori {
    transition: all 0.3s ease !important;
    cursor: pointer;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid transparent;
    padding: 0 !important;
    position: relative;
    z-index: 5;
}

/* Je commente : Icône favori visible mais discrète par défaut */
.favorites-btn i,
.btn-favori i {
    color: #c0c0c0 !important;
    transition: all 0.3s ease;
    font-size: 20px;
}

.favorites-btn:hover i,
.btn-favori:hover i {
    transform: scale(1.15);
}

/* Je commente : État actif - Bleu primaire */
.favorites-btn.active,
.btn-favori.active {
    background-color: transparent;
    color: #0066cc !important;
}

.favorites-btn.active i,
.btn-favori.active i {
    color: #0066cc !important;
    transform: scale(1.2);
}

.favorites-btn.active i,
.btn-favori.active i {
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.2);
    }
    28% {
        transform: scale(1.4);
    }
    42% {
        transform: scale(1.6);
    }
}

/* Je commente : ============================================ CARTES DE PROPRIÉTÉS ============================================ */

.card-property-badge,
.property-tags {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    font-weight: 700;
}

/* Je commente : Icônes dans les cartes - blanc */
.card i.fa, .card i.fas {
    color: rgba(245, 244, 242, 0.9);
}

.card-body i.fa-bed,
.card-body i.fa-bath,
.card-body i.fa-ruler,
.card-body i.fa-vector-square {
    color: rgba(245, 244, 242, 0.85) !important;
}

.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-5px);
}

.card-image-hover {
    position: relative;
    overflow: hidden;
}

/* Je commente : Ensure card columns stretch to same height so images cover full card area */
.card .g-0.row {
    align-items: stretch !important;
}
/* Je commente : Make each column a flex column so children can stretch to full height */
.card .g-0.row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    padding: 0; /* Je commente : column padding is controlled on inner elements */
}
.card .card-image-hover {
    flex: 1 1 auto;
    display: block;
}
/* Je commente : keep the right column content padding as defined in markup (p-3 etc.) */
.card .card-body.p-0 { padding: 0 !important; }

/* Je commente : Uniform image height for consistent card layout */
.card .card-image-hover {
    height: 260px; /* Je commente : desktop default */
    flex: none; /* Je commente : override flex so height is fixed */
}
@media (max-width: 768px) {
    .card .card-image-hover { height: 160px; }
}

/* Je commente : Ensure images fill their container */
.card .card-image-hover img { width:100%; height:100%; object-fit:cover; display:block; }

/* Je commente : Increase the image column width by ~15% on large screens Default Bootstrap col-xl-5 is ~41.666%; adding 15% -> ~56.666% */
@media (min-width: 992px) {
    .card .col-image {
        flex: 0 0 56.666666% !important;
        max-width: 56.666666% !important;
    }
    .card .col-content {
        flex: 0 0 43.333333% !important;
        max-width: 43.333333% !important;
    }
}

.card-image-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card:hover .card-image-hover::after {
    opacity: 1;
}

.card-property-price {
    font-weight: 700;
}

.card-property-price h2 {
    font-size: 28px;
}

.card-property-facilities {
    background-color: #f5f4f2;
    border: 1px solid var(--border-light) !important;
}

/* Je commente : ============================================ PAGINATION & NAVIGATION ============================================ */

.pagination .page-link {
    border: 1px solid var(--border-light);
    color: var(--primary-color);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Je commente : ============================================ SECTION HEADER ============================================ */

.section-header__title {
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.underline {
    position: relative;
}

.underline::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Je commente : ============================================ BREADCRUMB ============================================ */

.breadcrumb {
    background-color: transparent;
    padding: 0;
    font-size: 14px;
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
}

/* Je commente : ============================================ TEXTE & TYPO ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: #333 !important;
    font-weight: 700 !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

a {
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Je commente : ============================================ BARRE DE RECHERCHE ============================================ */

.search-form__wrap {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 82, 163, 0.1) 100%);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(0, 102, 204, 0.2);
}

.search-input {
    position: relative;
}

.search-input input {
    border: 1px solid var(--border-light);
    padding: 15px 20px 15px 45px;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #0066cc;
}

/* Je commente : Icônes de recherche et formulaire */
.search-input i,
.search-select i {
    color: #0066cc !important;
}

/* Je commente : Icônes de navigation */
.breadcrumb-item i {
    color: #0066cc;
}

/* Je commente : Icônes dans header coloré - blanc */
header i, nav i {
    color: rgba(245, 244, 242, 0.95) !important;
}

.search-select select {
    border: 1px solid var(--border-light);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-select select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Je commente : ============================================ FOOTER ============================================ */

footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

/* Je commente : ============================================ RESPONSIVE DESIGN ============================================ */

@media (max-width: 768px) {
    .card-body p {
        font-size: 14px;
    }

    .card-property-price h2 {
        font-size: 22px;
    }

    .btn-primary {
        padding: 8px 20px;
        font-size: 14px;
    }

    .favorites-btn,
    .btn-favori {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .input-group .form-control {
        font-size: 14px;
        letter-spacing: 8px;
    }
}

/* Je commente : ============================================ ANIMATIONS FLUIDES ============================================ */

* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

button {
    cursor: pointer;
}

/* Je commente : Désactiver les animations lors du chargement initial */
body.preload * {
    animation-duration: 0s !important;
    -webkit-animation-duration: 0s !important;
}

/* Je commente : ============================================ ICÔNES INTELLIGENTES - CONTEXT-AWARE ============================================ */

/* Je commente : Icônes par défaut - bleu primaire pour visibilité */
.fa, .fas, .far, .fab, .fal, .fad,
i[class*="fa-"] {
    color: #3D3D3D !important;
}

/* Je commente : Icônes sur fond blanc ou clair */
.bg-white i,
.card-body i,
.card i {
    color: #0066cc !important;
}

/* Je commente : Icônes dans boutons colorés - blanc pur */
.bg-dark i, .bg-primary i, .bg-secondary i,
.btn-primary i, .btn-secondary i, .btn-success i,
.btn-danger i, .btn-warning i, .btn-info i {
    color: rgba(245, 244, 242, 1) !important;
}

/* Je commente : Icônes dans sections colorées */
.text-white i {
    color: rgba(245, 244, 242, 1) !important;
}

/* Je commente : Icônes avec dégradé bleu (hover) */
.btn:hover i, a:hover i {
    color: #0066cc !important;
    filter: drop-shadow(0 0 5px rgba(0, 102, 204, 0.3));
}

/* Je commente : Icônes favoris - rouge quand actif */
.favorites-btn.active i,
.btn-favori.active i {
    color: #DC3545 !important;
}

/* Je commente : Icônes favoris - gris par défaut (doit gagner sur les règles d'icônes globales) */
.favorites-btn i,
.btn-favori i {
    color: #c0c0c0 !important;
    background-color: transparent !important;
}

/* Je commente : Favoris overlay sur image: toujours blanc (même quand actif) */
.favorites-btn--media i,
.favorites-btn--media.active i {
    color: #ffffff !important;
}

/* Je commente : Icônes social media */
.social-icons i {
    color: rgba(245, 244, 242, 0.9) !important;
}

/* Je commente : Icônes location et contact - bleu primaire */
.fa-location-dot, .fa-map-marker, .fa-map-marker-alt,
.fa-phone, .fa-envelope, .fa-whatsapp {
    color: #0066cc !important;
}

