/* ==========================================================
   Villa San Juan - Style principal (inspiration Airbnb)
   ========================================================== */

:root {
    /* Nouvelle palette (thème indigo / slate) */
    --card: #ffffff;
    --ring: #6366f1;
    --input: #d1d5db;
    --muted: #f3f4f6;
    --accent: #e0e7ff;
    --border: #d1d5db;
    --radius: 0.5rem;
    --popover: #ffffff;
    --primary: #6366f1;
    --sidebar: #f3f4f6;
    --secondary: #e5e7eb;
    --background: #f8fafc;
    --foreground: #1e293b;
    --destructive: #ef4444;
    --card-foreground: #1e293b;
    --muted-foreground: #6b7280;
    --accent-foreground: #374151;
    --popover-foreground: #1e293b;
    --primary-foreground: #ffffff;
    --secondary-foreground: #374151;
    --destructive-foreground: #ffffff;

    /* Alias rétrocompatibles (on garde les noms --rose utilisés partout,
       mais ils pointent désormais vers la nouvelle palette indigo) */
    --rose: var(--primary);
    --rose-dark: #4f46e5;
    --rose-light: var(--accent);
    --dark: var(--foreground);
    --gray-dark: #374151;
    --gray: var(--muted-foreground);
    --gray-light: var(--border);
    --bg-light: var(--background);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* ==========================================================
   Navbar
   ========================================================== */
.navbar {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark) !important;
}

.brand-text { margin-left: 0.5rem; }

.navbar .nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

.navbar .nav-link:hover { color: var(--rose) !important; }

/* ==========================================================
   Sélecteur de langue
   ========================================================== */
.lang-selector {
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--gray-light);
    border-radius: 999px;
    padding: 0.4rem 0.9rem !important;
    background: white;
    transition: all 0.2s;
}

.lang-selector:hover {
    border-color: var(--dark);
    background: var(--bg-light);
}

.lang-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.lang-code {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.lang-dropdown {
    min-width: 180px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--gray-light);
    padding: 0.5rem;
    margin-top: 0.5rem !important;
}

.lang-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.15s;
}

.lang-dropdown .dropdown-item:hover {
    background: var(--bg-light);
}

.lang-dropdown .dropdown-item.active {
    background: var(--rose-light);
    color: var(--rose-dark);
    font-weight: 600;
}

.lang-dropdown .dropdown-item .lang-flag {
    font-size: 1.3rem;
}

/* ==========================================================
   Boutons
   ========================================================== */
.text-rose { color: var(--rose) !important; }
.bg-rose { background-color: var(--rose) !important; }

.btn-rose {
    background: linear-gradient(135deg, var(--rose), var(--rose-dark));
    color: white;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    border: none;
    transition: all 0.2s;
}

.btn-rose:hover {
    background: linear-gradient(135deg, var(--rose-dark), #C00838);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.3);
}

.btn-outline-rose {
    color: var(--rose);
    border: 2px solid var(--rose);
    background: white;
    font-weight: 600;
    border-radius: 8px;
}

.btn-outline-rose:hover {
    background: var(--rose);
    color: white;
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
    position: relative;
    height: 90vh;
    min-height: 620px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-placeholder {
    background: linear-gradient(135deg, var(--primary), var(--rose-dark), #312e81);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: white;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-sub {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 1rem;
}

.hero-features span {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-features i { margin-right: 0.5rem; }

/* ==========================================================
   Galerie
   ========================================================== */
.default-gallery {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
}

.default-gallery img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s ease;
}

.default-gallery:hover img {
    transform: scale(1.02);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 8px;
    border-radius: 16px;
    overflow: hidden;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.3s;
}

.gallery-item:hover { transform: scale(1.02); }

.gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem 0.75rem 0.75rem;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-caption { opacity: 1; }

@media (max-width: 992px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-item:first-child { grid-column: span 2; }
}

@media (max-width: 576px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item:first-child { grid-column: span 1; }
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
}

.gallery-nav:hover { background: rgba(255,255,255,0.4); }
.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }

/* ==========================================================
   Price card
   ========================================================== */
.price-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--gray-light);
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 1rem 0;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
}

.price-unit {
    font-size: 1.1rem;
    color: var(--gray);
}

.price-summary {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

/* ==========================================================
   Footer
   ========================================================== */
.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--gray-light);
}

.footer a {
    color: var(--gray);
    text-decoration: none;
}

.footer a:hover { color: var(--rose); }

.footer ul li { padding: 0.25rem 0; }

/* ==========================================================
   Légende calendrier
   ========================================================== */
.legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.3rem;
    border: 1px solid var(--gray-light);
}
.legend-avail { background: white; }
.legend-unavail { background: #ccc; }
.legend-selected { background: var(--rose); }

/* ==========================================================
   Success icon
   ========================================================== */
.success-icon {
    font-size: 4rem;
    color: #28a745;
    animation: pop 0.5s;
}

@keyframes pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ==========================================================
   Login
   ========================================================== */
.login-body {
    background: linear-gradient(135deg, var(--primary), var(--rose-dark));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper { width: 100%; max-width: 420px; padding: 2rem; }

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* ==========================================================
   Forms
   ========================================================== */
.form-control, .form-select {
    border: 1px solid var(--gray-light);
    padding: 0.65rem 1rem;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.15);
}

/* Flatpickr range */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--rose) !important;
    border-color: var(--rose) !important;
}

.flatpickr-day.inRange {
    background: var(--rose-light) !important;
    border-color: var(--rose-light) !important;
    color: var(--rose-dark);
}


/* ======================= Property cards ======================= */
.property-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
}
.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
}
.property-card-img {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.property-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.property-card:hover .property-card-img img {
    transform: scale(1.05);
}
.property-card-body {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.property-features i {
    color: var(--rose);
}

/* Hero small variant (property detail) */
.hero-small {
    height: 65vh;
    min-height: 480px;
    max-height: 620px;
}
.hero-small .hero-title {
    font-size: 2.2rem;
}

/* Feature box on property detail */
.feature-box {
    background: #fff;
    transition: transform .2s ease;
}
.feature-box:hover {
    transform: translateY(-2px);
}

/* ======================= Boutique Rental brand ======================= */
.brand-boutique {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.brand-logo {
    height: 44px;
    width: auto;
}
.brand-boutique .brand-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: .02em;
    color: #b8892b;
}

/* ======================= Search bar on homepage ======================= */
.search-bar {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    padding: .9rem 1rem;
    max-width: 960px;
    margin: -50px auto 0;
    position: relative;
    z-index: 5;
}
.search-bar .search-field {
    border: none;
    border-right: 1px solid #e5e5e5;
    padding: .4rem .8rem;
    background: transparent;
    width: 100%;
    font-size: .95rem;
}
.search-bar .search-field:focus {
    outline: none;
    box-shadow: none;
}
.search-bar .search-field-last {
    border-right: none;
}
.search-bar label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #999;
    margin: 0 0 .1rem .8rem;
    display: block;
}
@media (max-width: 768px) {
    .search-bar {
        margin: 1rem 1rem 0;
    }
    .search-bar .search-field {
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }
}

/* ===== LOCATIONS PAGE ===== */
.loc-hero {
    position: relative;
    height: 220px;
    overflow: hidden;
}
.loc-hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
}
.loc-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55));
}
.loc-hero-inner {
    position: relative; z-index: 2;
    color: #fff;
    height: 100%;
    display: flex; flex-direction: column; justify-content: center;
}
.loc-hero-inner h1 {
    font-size: 2rem; font-weight: 700; margin: 0;
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.loc-hero-inner p { margin: .25rem 0 0; opacity: .95; }

.loc-page { background: #f7f7f9; min-height: 80vh; }

.loc-sidebar {
    background: #fff;
    padding: 1.5rem 1.25rem;
    border-right: 1px solid #e7e7ef;
    min-height: calc(100vh - 220px);
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
}
.filter-group { margin-bottom: 1.25rem; }
.filter-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: .4rem;
    letter-spacing: .03em;
}
.filter-search-icon {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: .8rem;
    pointer-events: none;
}

.loc-main { padding: 1.5rem 2rem; }

.loc-list { display: flex; flex-direction: column; gap: 1rem; }

.loc-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: transform .15s, box-shadow .15s;
}
.loc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.loc-card-img {
    position: relative;
    flex: 0 0 320px;
    max-width: 320px;
    min-height: 220px;
    overflow: hidden;
}
.loc-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.loc-card-badges {
    position: absolute;
    top: 10px; right: 10px;
    display: flex; gap: .35rem;
}
.loc-badge {
    background: rgba(0,0,0,.65);
    color: #fff;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 500;
}
.loc-badge i { margin-right: 3px; }

.loc-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
}
.loc-card-top { flex: 1; }
.loc-card-top h5 a:hover { color: var(--rose, #c74764) !important; }

.loc-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .75rem;
    margin-top: .75rem;
    border-top: 1px solid #f0f0f5;
    flex-wrap: wrap;
}
.loc-card-icons {
    display: flex; gap: .7rem;
    color: #8a8a96;
    font-size: 1rem;
}
.loc-card-price .price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    line-height: 1;
}
.loc-card-price .price-value small {
    font-weight: 400;
    font-size: .75rem;
    color: #8a8a96;
    margin-left: 2px;
}
.loc-card-cta {
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: .03em;
}

@media (max-width: 767.98px) {
    .loc-sidebar { min-height: auto; position: static; border-right: none; border-bottom: 1px solid #e7e7ef; }
    .loc-main { padding: 1rem; }
    .loc-card { flex-direction: column; }
    .loc-card-img { flex: none; max-width: none; min-height: 200px; }
}
