:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #f97316;
    --secondary-dark: #ea580c;
    --secondary-light: #fb923c;
    --accent-color: #06b6d4;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* Header Mobile First */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
    border-bottom: 3px solid var(--primary-color);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--text-dark) !important;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin: 0.125rem 0;
    position: relative;
    text-align: center;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Hero Section Mobile */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.05"><polygon fill="white" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-section h1 {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
}

.hero-section .lead {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    text-align: center;
}

.search-form {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 1rem;
}

.search-form h4 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.25rem;
}

/* Cartes de propriétés Mobile */
.property-card {
    background: var(--white);
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    position: relative;
    margin-bottom: 1.5rem;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.property-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-img img {
    transform: scale(1.05);
}

.property-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.premium-badge {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: var(--white);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.property-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
}

.favorite-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: none;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    color: var(--text-light);
    font-size: 0.9rem;
}

.favorite-btn:hover,
.favorite-btn.active {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.card-body {
    padding: 1.25rem;
}

.property-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.property-location {
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.property-location i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.property-features {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-light);
    font-size: 0.8rem;
    background: var(--bg-light);
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    min-width: auto;
}

.property-feature i {
    font-size: 0.7rem;
}

/* Dashboard Mobile */
.dashboard-card {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.dashboard-card h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.stat-card h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.375rem;
}

.stat-card p {
    opacity: 0.9;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Sidebar Mobile */
.sidebar {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.375rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid transparent;
    font-size: 0.9rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    transform: translateX(5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.sidebar-menu a i {
    margin-right: 0.75rem;
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

/* Boutons Mobile */
.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    border-color: var(--secondary-color);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Formulaires Mobile */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1rem;
}

/* Footer Mobile */
.footer {
    background: linear-gradient(135deg, var(--text-dark) 0%, #111827 100%);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1.25rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.footer a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    margin-top: 2rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Badges pour hôtels et résidences */
.hotel-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: var(--shadow);
}

.residence-badge {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: var(--shadow);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablettes et petits écrans */
@media (min-width: 768px) {
    html {
        font-size: 17px;
    }
   
    .hero-section {
        padding: 4rem 0;
    }
   
    .hero-section h1 {
        font-size: 2.5rem;
        text-align: left;
    }
   
    .hero-section .lead {
        font-size: 1.2rem;
        text-align: left;
    }
   
    .search-form {
        padding: 2rem;
        margin-top: 0;
    }
   
    .search-form h4 {
        text-align: left;
        font-size: 1.5rem;
    }
   
    .navbar-nav .nav-link {
        text-align: left;
        margin: 0 0.25rem;
    }
   
    .property-img {
        height: 220px;
    }
   
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.25rem;
    }
   
    .stat-card {
        padding: 2rem 1rem;
    }
   
    .dashboard-card {
        padding: 2rem;
    }
}

/* Grands écrans */
@media (min-width: 992px) {
    .hero-section {
        padding: 5rem 0;
    }
   
    .hero-section h1 {
        font-size: 3rem;
    }
   
    .property-img {
        height: 250px;
    }
   
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
   
    .sidebar {
        position: sticky;
        top: 100px;
        height: fit-content;
    }
}

/* Très grands écrans */
@media (min-width: 1200px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
   
    .container {
        max-width: 1140px;
    }
}

/* Petits mobiles */
@media (max-width: 576px) {
    html {
        font-size: 15px;
    }
   
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
   
    .hero-section {
        padding: 2rem 0;
    }
   
    .hero-section h1 {
        font-size: 1.75rem;
    }
   
    .search-form {
        padding: 1.25rem;
        border-radius: 12px;
    }
   
    .property-card {
        margin-bottom: 1rem;
    }
   
    .property-img {
        height: 180px;
    }
   
    .property-features {
        gap: 0.5rem;
    }
   
    .property-feature {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
   
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
   
    .stat-card {
        padding: 1.25rem 0.75rem;
    }
   
    .stat-card h3 {
        font-size: 1.5rem;
    }
   
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
   
    .sidebar {
        padding: 1.25rem;
    }
   
    .sidebar-menu a {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }
}

/* Orientation paysage mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0;
    }
   
    .hero-section h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
   
    .search-form {
        padding: 1rem;
    }
}

/* Mode sombre support */
@media (prefers-color-scheme: dark) {
    .bg-light {
        background-color: #1f2937 !important;
    }
   
    .text-muted {
        color: #9ca3af !important;
    }
}

/* Animations optimisées pour mobile */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Améliorations de performance mobile */
.property-img img {
    will-change: transform;
}

.stat-card {
    will-change: transform;
}

/* Support tactile amélioré */
@media (hover: none) {
    .property-card:hover {
        transform: none;
    }
   
    .btn:hover {
        transform: none;
    }
   
    .sidebar-menu a:hover {
        transform: none;
    }
   
    .navbar-nav .nav-link:hover {
        transform: none;
    }
}

/* Prévention du zoom sur les inputs iOS */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px; /* Prévention du zoom iOS */
    }
}

/* Amélioration de la scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}