/**
 * CSS pour le Catalogue Mobile de Villas - 2 MODES UNIQUEMENT
 * Structure : 100vh strict avec scroll indépendant
 * Modes : Catalogue Full | Map Full
 *
 * @author Expert Frontend Laravel/Blade
 * @version 1.0 Mobile-First
 */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Bloquer tout scroll sur le body - CRUCIAL pour 100vh strict */
body {
    overflow: hidden;
    height: 100vh;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #111827;
}

/* === CONTAINER PRINCIPAL === */
/* Hauteur FIXE : 100vh moins le header existant */
#mobile-catalog-app {
    height: calc(100vh - 80px);
    /* Ajuster selon hauteur réelle du header */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* PAS de scroll ici - le scroll est dans les sections */
    position: relative;
    background: #f9fafb;
}

/* === BARRE DE CONTROLE : Mode + Filtre === */
.control-bar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    width: fit-content;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 40px;
    z-index: 950;
    /* Au-dessus de la carte et du carrousel */
    gap: 6px;
    transition: top 0.3s ease, bottom 0.3s ease;
}

/* Position en HAUT pour le mode Catalogue */
.mode-catalog .control-bar {
    top: 8px;
    bottom: auto;
}

/* Position en BAS pour le mode Map */
.mode-map .control-bar {
    top: auto;
    bottom: calc(220px + 35px);
}

/* === MODE SWITCHER (Mobile : 1 seul bouton visible - toggle) === */
.mode-switcher {
    display: flex;
    gap: 6px;
    flex: 1;
}

.mode-btn {
    flex: 1;
    display: none;
    /* Caché par défaut sur mobile */
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    background: #ffffff;
    border: #ffffff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Style pour les boutons actifs (mobile) */
.mode-btn.active {
    background: #a3a676;
    color: #ffffff;
    border-color: #a3a676;
}

/* SVG logos en blanc quand le bouton est actif */
.mode-btn.active svg path,
.mode-btn.active svg g {
    fill: #ffffff;
}

/* Mode Catalogue : afficher SEULEMENT le bouton Carte */
.mode-catalog #map-mode-btn {
    display: flex;
}

/* Mode Map : afficher SEULEMENT le bouton Catalogue */
.mode-map #catalog-mode-btn {
    display: flex;
}

.mode-btn:active {
    transform: scale(0.98);
    background: #f3f4f6;
}

.mode-btn .btn-icon {
    font-size: 16px;
}

.mode-btn .btn-label {
    font-size: 13px;
}

/* Bouton Split caché sur mobile */
.split-only {
    display: none !important;
}

.control-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    border: 2px solid #ffffff;
    background: #ffffff;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.control-btn:active {
    transform: scale(0.98);
    background: #f3f4f6;
}

.control-btn .btn-icon {
    font-size: 16px;
}

.control-btn .btn-label {
    font-size: 13px;
}

/* === CONTAINER DES VUES === */
.views-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* === VUE CATALOGUE === */
.catalog-view {
    display: none;
    /* Caché par défaut */
    flex: 1;
    /* Prend tout l'espace disponible */
    overflow: hidden;
    /* Le scroll est dans catalog-scroll-area */
    position: relative;
}

/* Active en mode Catalogue */
.mode-catalog .catalog-view {
    display: flex;
    flex-direction: column;
}

/* Zone scrollable du catalogue */
.catalog-scroll-area {
    flex: 1;
    overflow-y: auto;
    /* SCROLL INDÉPENDANT - CRUCIAL */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll iOS */
    padding: 16px;
    padding-top: 50px;
    /* Espace pour la control-bar réduite */
}

/* Grille de cartes de villas */
.villa-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* 1 colonne en mobile */
    gap: 16px;
    max-width: 100%;
}

/* === VUE MAP === */
.map-view {
    display: none;
    /* Caché par défaut */
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Active en mode Map */
.mode-map .map-view {
    display: flex;
    flex-direction: column;
}

.map-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#leaflet-map {
    width: 100%;
    height: 100%;
}

/* Masquer le contrôle de zoom Leaflet */
.leaflet-control-zoom {
    display: none !important;
}

/* === MARKER CLUSTERS (Groupes de villas) === */
.marker-cluster-small {
    background-color: rgba(37, 99, 235, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(37, 99, 235, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(220, 38, 38, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(220, 38, 38, 0.8);
}

.marker-cluster-large {
    background-color: rgba(147, 51, 234, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(147, 51, 234, 0.8);
}

.marker-cluster {
    background-clip: padding-box;
    border-radius: 50%;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 50%;
    font: 14px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster span {
    line-height: 30px;
}

/* === CARROUSEL FLOTTANT (Mode Map uniquement) === */
.floating-villa-card {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    z-index: 900;
    height: 220px;
    overflow: hidden;
}

/* Wrapper avec scroll horizontal et snap */
.floating-carousel-wrapper {
    display: flex;
    height: 100%;
    gap: 16px;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

/* Message quand aucune villa visible */
.carousel-empty {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

/* Cacher la scrollbar pour Chrome/Safari */
.floating-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

/* Slide du carrousel */
.carousel-slide {
    flex: 0 0 85%;
    max-width: 85%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.carousel-slide:active {
    transform: scale(0.98);
}

/* Image de la slide */
.carousel-slide-image {
    width: 100%;
    height: 120px;
    background: rgba(243, 244, 246, 0.5);
    position: relative;
    overflow: hidden;
}

.carousel-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.8) 0%, rgba(229, 231, 235, 0.8) 100%);
}

/* Info de la slide */
.carousel-slide-info {
    padding: 3px 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.carousel-slide-price {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    margin: 0;
}

.carousel-slide-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-slide-features {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* === PANNEAU DE FILTRES === */
.filter-panel {
    position: fixed;
    top: 16px;
    bottom: 16px;
    right: -120%;
    width: 85%;
    max-width: 380px;
    height: auto;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    border-radius: 24px;

    /* Layout Flexbox pour gérer le scroll interieur */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Empêche le panneau lui-même de scroller */
}

.filter-panel.open {
    right: 16px;
}

.filter-panel-header {
    flex-shrink: 0;
    /* Ne rétrécit pas */
    /* styles existants... header doit avoir son padding/height géré ailleurs ou par son contenu */
    background: white;
    z-index: 2;
}

/* Le formulaire devient la zone de scroll */
/* Le formulaire devient la zone de scroll */
.filter-form {
    flex: 1;
    /* Prend l'espace restant */
    overflow-y: auto;
    /* Scroll vertical */
    overflow-x: hidden;
    padding: 24px;
    /* Padding déplacé sur le scroll container */
    padding-bottom: 120px;
    /* Grand padding pour éviter que le contenu soit caché derrière les boutons */
}

/* Actions Fixes en bas du panneau (Flex Item) */
.filter-actions-fixed {
    flex-shrink: 0;
    /* Ne rétrécit pas */
    background: #ffffff;
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    z-index: 2;

    /* Bordures arrondies uniquement en bas pour matcher le panneau */
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;

    /* Ombre inversée pour séparer du contenu */
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    border-top: 1px solid #f3f4f6;
}

.filter-actions-fixed button {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Header du panneau de filtres */
.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

.filter-panel-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.close-filter-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-filter-btn:active {
    background: #e5e7eb;
    transform: scale(0.95);
}

/* Formulaire de filtres - Styles des groupes (padding géré par .filter-form plus haut) */

.filter-group {
    margin-bottom: 24px;
}

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

.filter-group input[type="range"],
.filter-group input[type="number"],
.filter-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    color: #111827;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.filter-value {
    display: inline-block;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #2563eb;
}



.btn-reset {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-reset:active {
    background: #e5e7eb;
}

.btn-apply {
    background: #a3a676;
    /* Couleur Sage du thème */
    color: #ffffff;
}

.btn-apply:active {
    background: #8a8d62;
}

/* Overlay pour fermer le panneau */
.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    transition: opacity 0.3s ease;
}

.filter-overlay.visible {
    display: block;
}

/* =========================================
   Modern Glassmorphism Card Design
   ========================================= */
.villa-card-modern {
    position: relative !important;
    display: block !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    margin-bottom: 24px !important;
    aspect-ratio: 3/4 !important;
    /* Format portrait comme l'exemple */
    cursor: pointer !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    width: 100% !important;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.villa-card-modern:active {
    transform: scale(0.98);
}

/* Image Background Full Height */
.villa-card-image-container {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

.villa-card-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute;
    top: 0;
    left: 0;
}

/* Top Overlays */
.card-overlay-top {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
    pointer-events: none;
    /* Allow clicks to pass through except for buttons */
}

.price-badge-modern {
    background: rgba(15, 23, 42, 0.6);
    /* Dark semi-transparent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.favorite-btn-modern {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
    pointer-events: auto;
    /* Enable clicking */
}

.favorite-btn-modern:active {
    background: rgba(239, 68, 68, 0.8) !important;
    /* Red on active */
}

/* Bottom Glassmorphism Gradient Panel */
.card-glass-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* Gradient from dark at bottom to transparent at top */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%) !important;

    /* Blur effect with masking for smooth transition */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    -webkit-mask-image: linear-gradient(to top, black 60%, transparent 100%);
    mask-image: linear-gradient(to top, black 60%, transparent 100%);

    padding: 40px 16px 16px 16px;
    /* Top padding accounts for gradient fade */
    color: #fff;
    z-index: 2;
    border: none !important;
    border-radius: 0 0 20px 20px !important;
    /* Radius only at bottom match card */
    box-shadow: none !important;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Align bottom */
    margin-bottom: 8px;
}

.card-title-modern {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #f3f4f6;
}

.star-icon {
    color: #f59e0b;
    /* Amber 500 */
}

.card-location-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #cbd5e1;
    /* Slate 300 */
    font-weight: 500;
}

.card-features-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 12px;
    color: #e2e8f0;
    /* Slate 200 */
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.reserve-btn-modern {
    width: 100%;
    background: #fff !important;
    color: #0f172a !important;
    /* Slate 900 */
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.reserve-btn-modern:active {
    transform: scale(0.98);
    background: #f1f5f9 !important;
}

/* Ensure grid gap is sufficient */
.villa-cards-grid {
    gap: 16px !important;
    /* Reduced from 24px */
    padding: 16px !important;
}

/* === CARTES DE VILLAS === */

/* =========================================
   React-Ported Card Design
   ========================================= */
:root {
    --color-background: #f9fafb;
    --color-foreground: #111827;
    --color-muted-foreground: #6b7280;
    --color-sage: #a3a676;
    --color-sage-foreground: #ffffff;
    --color-charcoal: #1f2937;
    --color-gold: #fbbf24;
    --color-border: #e5e7eb;
}

.villa-card-react {
    background: #ffffff !important;
    border-radius: 0 !important;
    /* Removed border-radius */
    overflow: hidden !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    /* shadow-card */
    transition: all 0.5s ease-out !important;
    cursor: pointer !important;
    width: 100% !important;
    max-width: 576px !important;
    /* max-w-xl */
    margin: 0 auto 16px auto !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    border: 1px solid var(--color-border);
}

.villa-card-react:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    /* shadow-hover */
}

/* Image Section */
.villa-card-react-image-container {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    /* Updated from 16/10 to 4/3 */
    overflow: hidden !important;
}

@media (min-width: 640px) {
    .villa-card-react-image-container {
        aspect-ratio: 16/9 !important;
    }
}

.villa-card-react-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.7s ease-out !important;
}

.villa-card-react:hover .villa-card-react-image-container img {
    transform: scale(1.05) !important;
}

.image-gradient-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(to top, rgba(31, 41, 55, 0.4), transparent, transparent) !important;
    pointer-events: none !important;
}

/* Price Badge */
.react-price-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    padding: 6px 12px !important;
    border-radius: 9999px !important;
    background: rgba(31, 41, 55, 0.8) !important;
    /* charcoal/80 */
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    color: #ffffff !important;
    font-family: sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.025em !important;
    z-index: 10;
}

@media (min-width: 640px) {
    .react-price-badge {
        top: 16px !important;
        left: 16px !important;
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
}

/* Like Button */
.react-like-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 10;
}

.react-like-btn:hover {
    background: #ffffff !important;
    transform: scale(1.1) !important;
}

/* Content Section */
.villa-card-react-content {
    flex: 1 !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

@media (min-width: 640px) {
    .villa-card-react-content {
        padding: 24px !important;
    }
}

.react-card-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.react-card-title {
    font-family: serif !important;
    /* font-serif */
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--color-foreground) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    margin: 0 !important;
}

@media (min-width: 640px) {
    .react-card-title {
        font-size: 20px !important;
    }
}

.react-card-rating {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
}

.react-card-rating span {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--color-foreground) !important;
}

.react-card-location {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: var(--color-muted-foreground) !important;
    margin-bottom: 12px !important;
    font-size: 12px !important;
    font-weight: 300 !important;
}

@media (min-width: 640px) {
    .react-card-location {
        margin-bottom: 16px !important;
        font-size: 14px !important;
    }
}

.react-card-amenities {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    padding: 12px 0 !important;
    border-top: 1px solid var(--color-border) !important;
    border-bottom: 1px solid var(--color-border) !important;
}

.react-amenity-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: var(--color-foreground) !important;
}

.react-reserve-btn {
    margin-top: 16px !important;
    width: 100% !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    font-family: sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.025em !important;
    background: var(--color-sage) !important;
    color: var(--color-sage-foreground) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease-out !important;
    text-align: center !important;
    display: block !important;
    text-decoration: none !important;
}

@media (min-width: 640px) {
    .react-reserve-btn {
        margin-top: 20px !important;
        padding: 12px 24px !important;
        border-radius: 12px !important;
        font-size: 14px !important;
    }
}

.react-reserve-btn:hover {
    opacity: 0.9 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.react-reserve-btn:active {
    scale: 0.98 !important;
}

/* Icons */
.icon-svg {
    width: 14px;
    height: 14px;
}

@media (min-width: 640px) {
    .icon-svg {
        width: 16px;
        height: 16px;
    }
}


.villa-card-image {
    width: 100%;
    height: 220px;
    background: #f3f4f6;
    position: relative;
    overflow: hidden;
}

.villa-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    font-size: 48px;
}

.price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.villa-card-info {
    padding: 16px;
}

.villa-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.villa-card-features {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.villa-card-feature {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #6b7280;
}

.villa-card-link {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #a3a676;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.villa-card-link:active {
    background: #a3a676;
}

/* === MESSAGE VIDE === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
    margin: 0;
}

/* === LOADER === */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === RESPONSIVE MOBILE LANDSCAPE === */
@media (orientation: landscape) and (max-height: 500px) {
    .control-bar {
        padding: 8px 16px;
    }

    .control-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .catalog-scroll-area {
        padding: 12px;
    }

    .floating-villa-card {
        max-height: 120px;
        bottom: 12px;
    }
}

/* === RESPONSIVE TABLETTE / LAPTOP 13" === */
@media (min-width: 768px) {

    /* === CONTAINER PRINCIPAL === */
    #mobile-catalog-app {
        height: calc(100vh - 100px);
        /* Ajuster si header plus grand */
    }

    /* === BARRE DE CONTROLE === */
    .control-bar {
        padding: 8px 16px;
        max-width: 85%;
        gap: 12px;
        left: 16px;
        right: auto;
        transform: none;
    }

    /* Mode Catalog : position en haut centré */
    .mode-catalog .control-bar {
        top: 16px;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Mode Map : position en haut à gauche */
    .mode-map .control-bar {
        top: 16px;
        bottom: auto;
        left: 16px;
        right: auto;
        transform: none;
    }

    /* Mode Split : position en haut centré sur la partie gauche (catalogue) */
    .mode-split .control-bar {
        top: 16px;
        bottom: auto;
        left: 25%;
        right: auto;
        transform: translateX(-50%);
    }

    /* === MODE SWITCHER (3 boutons sur tablette+) === */
    .mode-switcher {
        gap: 6px;
    }

    .mode-btn {
        display: flex !important;
        /* Afficher tous les boutons sur tablette+ */
        padding: 8px 12px;
        font-size: 14px;
    }

    .mode-btn.active {
        background: #a3a676;
        color: #ffffff;
        border-color: #a3a676;
    }

    /* SVG logos en blanc quand le bouton est actif */
    .mode-btn.active svg path,
    .mode-btn.active svg g {
        fill: #ffffff;
    }

    .mode-btn:hover:not(.active) {
        background: #f3f4f6;
    }

    .mode-btn .btn-icon {
        font-size: 16px;
    }

    .mode-btn .btn-label {
        font-size: 14px;
    }

    /* Afficher le bouton Split en tablette+ */
    .split-only {
        display: flex !important;
    }

    /* Bouton Filtre */
    .control-btn-filter {
        flex: 0 0 auto;
        min-width: 120px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .control-btn-filter .btn-icon {
        font-size: 16px;
    }

    .control-btn-filter .btn-label {
        font-size: 14px;
    }

    /* === CONTAINER DES VUES === */
    .views-container {
        flex: 1;
        display: flex;
        overflow: hidden;
    }

    /* === MODE CATALOGUE FULL === */
    .mode-catalog .views-container {
        display: flex;
    }

    .mode-catalog .catalog-view {
        flex: 1;
        display: flex;
    }

    .mode-catalog .map-view {
        display: none;
    }

    /* Grille 2 colonnes pour le catalogue */
    .villa-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .catalog-scroll-area {
        padding: 24px;
        padding-top: 75px;
        /* Espace pour la control-bar */
    }

    /* === MODE MAP FULL === */
    .mode-map .views-container {
        display: flex;
    }

    .mode-map .catalog-view {
        display: none;
    }

    .mode-map .map-view {
        flex: 1;
        display: flex;
    }

    /* Carrousel : slides de 40% au lieu de 85% */
    .carousel-slide {
        flex: 0 0 40%;
        max-width: 40%;
    }

    .floating-villa-card {
        bottom: 45px;
        height: 220px;
    }

    /* === MODE SPLIT (50/50) === */
    .mode-split .views-container {
        display: flex;
        flex-direction: row;
        gap: 0;
    }

    .mode-split .catalog-view,
    .mode-split .map-view {
        flex: 1;
        display: flex;
        width: 50%;
    }

    /* Cacher le carrousel flottant en mode Split */
    .mode-split .floating-villa-card {
        display: none;
    }

    /* Grille 1 colonne en mode Split pour ne pas surcharger */
    .mode-split .villa-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mode-split .catalog-scroll-area {
        padding: 20px;
        padding-top: 75px;
        /* Espace pour la control-bar */
    }

    /* Bordure séparatrice entre catalogue et carte */
    .mode-split .catalog-view {
        border-right: 2px solid #e5e7eb;
    }

    /* === CARTES DE VILLAS (ajustements) === */
    .villa-card-title {
        font-size: 20px;
    }

    .villa-card-info {
        padding: 20px;
    }

    .villa-card-link {
        padding: 14px 24px;
        font-size: 17px;
    }

    /* === PANNEAU DE FILTRES === */
    .filter-panel {
        max-width: 420px;
    }

    .filter-panel-header {
        padding: 24px;
    }

    .filter-form {
        padding: 24px;
    }
}

/* === RESPONSIVE GRAND ÉCRAN (Desktop > 1200px) === */
@media (min-width: 1200px) {

    /* Grille 3 colonnes pour le catalogue en mode Full */
    .mode-catalog .villa-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    /* Grille 2 colonnes en mode Split */
    .mode-split .villa-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .catalog-scroll-area {
        padding: 32px;
        padding-top: 80px;
        /* Espace pour la control-bar */
    }

    /* Carrousel : slides encore plus petites */
    .carousel-slide {
        flex: 0 0 30%;
        max-width: 30%;
    }

    /* Control bar */
    .control-bar {
        padding: 10px 20px;
        max-width: min(80%, 800px);
    }
}

/* === PROPERTY MODAL (Replicated from Filter Panel) === */
.property-modal {
    position: fixed;
    top: 16px;
    bottom: 16px;
    right: -120%;
    width: 90%;
    max-width: 420px;
    height: auto;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    z-index: 1200;
    /* Higher than filter panel */
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.property-modal.open {
    right: 16px;
}

.modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
    background: #ffffff;
    z-index: 10;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.modal-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    z-index: 5;
}

.modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    padding-bottom: 40px;
    /* Space inside scroll area */
}

/* Modal Actions Fixed (Bottom) */
.modal-actions-fixed {
    flex-shrink: 0;
    background: #ffffff;
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    z-index: 10;
    border-top: 1px solid #f3f4f6;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.modal-actions-fixed .btn-primary {
    width: 100%;
    padding: 16px 20px;
    background: #a3a676;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(163, 166, 118, 0.3);
}

.modal-actions-fixed .btn-primary:active {
    background: #8a8d62;
    transform: scale(0.98);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1150;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: block;
}


/* === CUSTOM CALENDAR STYLES === */
.date-display-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
}

.date-display-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.date-label-tiny {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
}

.date-value {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.date-value.text-placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.date-arrow {
    padding: 0 16px;
    color: #9ca3af;
    font-size: 18px;
}

/* Calendar Container */
.calendar-container {
    background: #fff;
    user-select: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

.calendar-container.open {
    max-height: 400px;
    /* Adjust based on content */
    overflow-y: auto;
    opacity: 1;
    margin-top: 16px;
}

.calendar-month {
    margin-bottom: 24px;
}

.calendar-month-header {
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: #111827;
    margin-bottom: 16px;
    padding-top: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px 0;
    /* Vertical gap small */
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    padding-bottom: 8px;
    font-weight: 500;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
    position: relative;
    border-radius: 50%;
    /* Default shape */
    margin: 1px 0;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Hover effect for desktop, or tap active for mobile */
.calendar-day:not(.disabled):not(.empty):active {
    background-color: #f3f4f6;
}

/* Selection States */
.calendar-day.selected {
    background-color: #111827;
    color: #ffffff;
    font-weight: 600;
    z-index: 2;
}

/* Range Background */
.calendar-day.in-range {
    background-color: #f3f4f6;
    border-radius: 0;
    /* Rectangular for range */
}

.calendar-day.range-start {
    background-color: #111827;
    color: #fff;
    border-top-left-radius: 50%;
    border-bottom-left-radius: 50%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.calendar-day.range-end {
    background-color: #111827;
    color: #fff;
    border-top-right-radius: 50%;
    border-bottom-right-radius: 50%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Corner cases */
.calendar-day.range-start.range-end {
    border-radius: 50%;
}

.filter-section {
    padding: 24px 0;
    border-bottom: 1px solid #f3f4f6;
}

.filter-section.border-top {
    border-top: 1px solid #f3f4f6;
    border-bottom: none;
    padding-top: 32px;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.filter-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 24px 0;
}

.filter-row {
    margin-bottom: 24px;
}

.filter-sublabel {
    display: block;
    font-size: 15px;
    font-weight: 400;
    color: #374151;
    margin-bottom: 12px;
}

/* Input Boxes (Search) */
.input-box {
    position: relative;
}

.filter-input-text {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

.filter-input-text:focus {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

/* Select Styled */
.select-wrapper {
    position: relative;
}

.filter-select-styled {
    width: 100%;
    appearance: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    color: #111827;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 10px;
    color: #6b7280;
}

/* Price Range Boxes */
.price-range-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-box {
    flex: 1;
    border: 1px solid #9ca3af;
    border-radius: 12px;
    padding: 8px 12px;
    position: relative;
    background: #fff;
    transition: all 0.2s;
}

.price-box:focus-within {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827;
}

.price-label-small {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
}

.price-input-wrapper {
    display: flex;
    align-items: center;
}

.currency-prefix {
    font-size: 15px;
    color: #111827;
    margin-right: 2px;
}

.price-input-field {
    width: 100%;
    border: none;
    padding: 0;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    outline: none;
    background: transparent;
}

.price-separator-line {
    width: 12px;
    height: 1px;
    background: #9ca3af;
    flex-shrink: 0;
}

/* Chips / Pills */
.chips-scroll-container {
    overflow-x: auto;
    margin: 0 -20px;
    /* Bleed out to mobile edges */
    padding: 4px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.chips-scroll-container::-webkit-scrollbar {
    display: none;
}

.chips-group {
    display: flex;
    gap: 10px;
}

.chip-item {
    flex-shrink: 0;
}

.chip-item input {
    display: none;
}

.chip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 400;
    color: #111827;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chip-item input:checked+.chip-btn {
    background: #111827;
    /* Black selected */
    color: #ffffff;
    border-color: #111827;
}

.chip-btn:hover {
    border-color: #111827;
}

/* === MODAL AESTHETICS (Existing) === */
.modal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.modal-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.modal-price .price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.modal-price .price-period {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.modal-features {
    display: flex;
    gap: 12px;
}

.modal-feature-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.modal-details h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 24px 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-details h3:first-child {
    margin-top: 0;
}

/* Tags Container */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    color: #4b5563;
    transition: all 0.2s ease;
}

.tag-item:hover {
    border-color: #a3a676;
    color: #a3a676;
    background: #fcfcfc;
}

.empty-tags {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

.placeholder-image-large {
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 20px;
}