/* ===== FONTS & ROOT ===== */
:root {
    --primary: #1a2e4a;
    --primary-light: #243450;
    --accent: #c9943c;
    --accent-dark: #b08133;
    --accent-light: rgba(201,148,60,.12);
    --bg: #ffffff;
    --bg-subtle: #f4f6f9;
    --text: #1e2a3a;
    --text-muted: #64748b;
    --card-bg: #f8fafc;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(26,46,74,0.07);
    --shadow: 0 6px 24px rgba(26,46,74,0.11);
    --shadow-lg: 0 16px 48px rgba(26,46,74,0.16);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-pill: 50px;
    --navbar-height: 72px;
    --transition: all .28s cubic-bezier(.4,0,.2,1);
  }
  [data-bs-theme="dark"] {
    --primary: #1e3355;
    --primary-light: #243c60;
    --bg: #0f1520;
    --bg-subtle: #141c28;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --card-bg: #182030;
    --border: #253044;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
    --shadow: 0 6px 24px rgba(0,0,0,0.32);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.45);
  }
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    transition: background-color .3s, color .3s;
    -webkit-font-smoothing: antialiased;
    line-height: 1.65;
  }
  h1,h2,h3,h4,h5,h6,.navbar-brand { font-family: 'Montserrat', sans-serif; font-weight: 700; line-height: 1.25; }
  a { text-decoration: none; }

  /* ===== UTILITY ===== */
  .text-accent { color: var(--accent) !important; }
  .bg-primary-custom { background-color: var(--primary) !important; }
  .bg-accent { background-color: var(--accent) !important; }
  .border-accent { border-color: var(--accent) !important; }
  .section-title { font-size: clamp(1.65rem,4vw,2.3rem); font-weight: 800; letter-spacing: -.02em; }
  .section-subtitle { color: var(--text-muted); font-size: 1.05rem; }
  .letter-spacing { letter-spacing: .12em; }

  /* ===== BUTTONS ===== */
  .btn-accent {
    background-color: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: .75rem 2rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: .01em;
  }
  .btn-accent:hover {
    background-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201,148,60,.38);
  }
  .btn-accent:active { transform: translateY(0); }
  .btn-outline-accent {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: .68rem 1.8rem;
    transition: var(--transition);
  }
  .btn-outline-accent:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
  .btn-primary-custom {
    background-color: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: .75rem 2rem;
    transition: var(--transition);
  }
  .btn-primary-custom:hover { background-color: var(--primary-light); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,46,74,.28); }
  .btn-primary-custom:active { transform: translateY(0); }

  /* ===== NAVBAR ===== */
  .navbar-immohub {
    background: var(--primary);          /* fond sombre par défaut sur toutes les pages */
    padding: .9rem 0;
    transition: var(--transition);
  }
  /* Sur la page d'accueil uniquement : transparent au départ */
  .navbar-immohub.hero-top {
    background: transparent;
  }
  .navbar-immohub.scrolled {
    background: rgba(255,255,255,.97) !important;
    box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 4px 24px rgba(0,0,0,.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: .65rem 0;
  }
  [data-bs-theme="dark"] .navbar-immohub.scrolled { background: rgba(15,21,32,.98) !important; }

  /* Marque (logo) */
  .navbar-immohub .navbar-brand { color: #fff; font-size: 1.45rem; letter-spacing: -.02em; }
  .navbar-immohub.scrolled .navbar-brand { color: var(--primary); }
  [data-bs-theme="dark"] .navbar-immohub.scrolled .navbar-brand { color: #fff; }

  /* Liens — toujours visibles (fond sombre ou hero) */
  .navbar-immohub .nav-link {
    color: rgba(255,255,255,.88);
    font-weight: 500;
    font-size: .92rem;
    transition: color .25s;
    padding: .4rem .85rem;
    border-radius: 6px;
    position: relative;
  }
  .navbar-immohub .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: .85rem;
    right: .85rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform .25s;
  }
  .navbar-immohub .nav-link:hover::after,
  .navbar-immohub .nav-link.active::after { transform: scaleX(1); }

  /* Après scroll : liens sombres */
  .navbar-immohub.scrolled .nav-link { color: var(--text); }
  .navbar-immohub .nav-link:hover,
  .navbar-immohub .nav-link.active { color: var(--accent) !important; }

  /* Bouton thème */
  .theme-toggle-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.25);
    transition: var(--transition);
  }
  .navbar-immohub.scrolled .theme-toggle-btn { border-color: var(--border); }
  .theme-toggle-btn:hover { border-color: var(--accent); color: var(--accent) !important; background: var(--accent-light) !important; }
  .theme-icon-light { display: none; }
  [data-bs-theme="dark"] .theme-icon-light { display: inline-block; }
  [data-bs-theme="dark"] .theme-icon-dark { display: none; }

  /* ===== HERO ===== */
  .hero-section {
    position: relative;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding-top: var(--navbar-height);
  }
  .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(15,21,40,.80) 0%, rgba(26,46,74,.45) 60%, rgba(26,46,74,.2) 100%);
  }
  .hero-section .hero-content { position: relative; z-index: 2; }
  .hero-section h1 {
    font-size: clamp(2.2rem,6vw,4.2rem);
    line-height: 1.1;
    text-shadow: 0 2px 16px rgba(0,0,0,.25);
    letter-spacing: -.03em;
  }

  /* ===== SEARCH PANEL ===== */
  .search-panel {
    background: rgba(255,255,255,.97);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,.2);
    overflow: hidden;
    backdrop-filter: blur(6px);
  }
  [data-bs-theme="dark"] .search-panel {
    background: rgba(24,32,48,.97);
    border: 1px solid var(--border);
  }
  .search-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: .92rem;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    padding: 1rem 1.6rem;
    transition: color .2s, border-color .2s;
  }
  .search-tabs .nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: transparent;
  }
  .search-tabs .nav-link:hover:not(.active) { color: var(--text); }
  .search-body { padding: 1.6rem 2rem 2rem; }

  /* ===== CARDS ===== */
  .property-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .32s cubic-bezier(.4,0,.2,1), box-shadow .32s cubic-bezier(.4,0,.2,1), border-color .32s;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .property-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201,148,60,.25);
  }
  .property-card .card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 230px;
  }
  .property-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.4,0,.2,1);
  }
  .property-card:hover .card-img-wrap img { transform: scale(1.08); }
  .type-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 13px;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .price-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 2;
    background: rgba(15,21,40,.88);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: .95rem;
    border: 1px solid rgba(255,255,255,.1);
  }
  .fav-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: #aab4c0;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
  }
  .fav-btn:hover { color: #e53e3e; background: #fff; transform: scale(1.12); box-shadow: 0 4px 12px rgba(229,62,62,.25); }
  .fav-btn.active { color: #e53e3e; background: #fff; }
  .property-card .card-body { padding: 1.3rem; flex: 1; display: flex; flex-direction: column; }
  .property-card .card-body h5 { font-size: .97rem; line-height: 1.4; margin-bottom: .4rem; }
  .card-city { color: var(--text-muted); font-size: .82rem; display: flex; align-items: center; gap: 4px; }
  .card-specs {
    display: flex;
    gap: .9rem;
    flex-wrap: wrap;
    font-size: .82rem;
    color: var(--text-muted);
    padding: .75rem 0;
    border-top: 1px solid var(--border);
    margin-top: auto;
  }
  .card-spec { display: flex; align-items: center; gap: 4px; }

  /* ===== CATEGORY CARDS ===== */
  .category-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    text-align: center;
    padding: 1.75rem 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-light), transparent);
    opacity: 0;
    transition: opacity .28s;
  }
  .category-card:hover { border-color: var(--accent); box-shadow: 0 10px 32px rgba(201,148,60,.18); transform: translateY(-5px); }
  .category-card:hover::before { opacity: 1; }
  .category-icon {
    font-size: 2.4rem;
    margin-bottom: .85rem;
    transition: transform .28s;
  }
  .category-card:hover .category-icon { transform: scale(1.12); }

  /* ===== SECTIONS ===== */
  .section-padding { padding: 5.5rem 0; }
  .section-light { background-color: var(--bg-subtle); }
  .divider-accent {
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    border-radius: 4px;
    margin: 0 auto 1rem;
  }
  .divider-accent.left { margin-left: 0; }

  /* ===== STATS ===== */
  .stat-card { text-align: center; padding: 2.5rem 1rem; }
  .stat-number {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(201,148,60,.3);
  }
  .stat-label { color: rgba(255,255,255,.75); font-size: .92rem; margin-top: .6rem; letter-spacing: .01em; }

  /* ===== TESTIMONIALS ===== */
  .testimonial-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
    position: relative;
  }
  .testimonial-card:hover { box-shadow: var(--shadow); border-color: rgba(201,148,60,.25); transform: translateY(-3px); }
  .testimonial-card .quote-icon { color: var(--accent); font-size: 2.2rem; opacity: .3; line-height: 1; margin-bottom: 1rem; }
  .testimonial-stars { color: #f59e0b; font-size: .85rem; }

  /* ===== BLOG CARDS ===== */
  .blog-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(201,148,60,.2); }
  .blog-card .blog-img { height: 210px; overflow: hidden; }
  .blog-card .blog-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.4,0,.2,1); }
  .blog-card:hover .blog-img img { transform: scale(1.06); }
  .blog-card .blog-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }

  /* ===== SERVICES ===== */
  .service-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
  }
  .service-card:hover { border-color: var(--accent); box-shadow: 0 10px 36px rgba(201,148,60,.14); transform: translateY(-5px); }
  .service-icon {
    width: 72px;
    height: 72px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.35rem;
    font-size: 1.7rem;
    color: var(--accent);
    transition: var(--transition);
    border: 2px solid transparent;
  }
  .service-card:hover .service-icon { background: var(--accent); color: #fff; border-color: var(--accent-dark); transform: rotate(-6deg) scale(1.08); }

  /* ===== NEWSLETTER ===== */
  .newsletter-section {
    background: linear-gradient(135deg, var(--primary) 0%, #1f3d6b 100%);
    position: relative;
    overflow: hidden;
  }
  .newsletter-section::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(201,148,60,.08);
    pointer-events: none;
  }
  .newsletter-input {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    border: none;
    padding: .9rem 1.3rem;
    font-size: .95rem;
  }
  .newsletter-btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    background: var(--accent);
    border: none;
    padding: .9rem 2rem;
    font-weight: 600;
    color: #fff;
    transition: background .25s, box-shadow .25s;
    white-space: nowrap;
  }
  .newsletter-btn:hover { background: var(--accent-dark); box-shadow: 0 4px 16px rgba(201,148,60,.35); }

  /* ===== FOOTER ===== */
  .footer-custom {
    background: linear-gradient(180deg, var(--primary) 0%, #0f1e33 100%);
    color: rgba(255,255,255,.78);
    padding-top: 5rem;
  }
  .footer-heading { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; opacity: .55; margin-bottom: 1.35rem; font-weight: 600; }
  .footer-links li { margin-bottom: .55rem; }
  .footer-links a { color: rgba(255,255,255,.65); transition: color .22s, padding-left .22s; font-size: .88rem; }
  .footer-links a:hover { color: var(--accent); padding-left: 5px; }
  .footer-contact li { margin-bottom: .8rem; font-size: .88rem; display: flex; align-items: flex-start; gap: .6rem; }
  .social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.75);
    transition: var(--transition);
    font-size: .88rem;
  }
  .social-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 6px 18px rgba(201,148,60,.3); }

  /* ===== PROPERTY DETAIL ===== */
  .gallery-main { border-radius: var(--radius); overflow: hidden; height: 440px; box-shadow: var(--shadow); }
  .gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
  .gallery-main:hover img { transform: scale(1.02); }
  .gallery-thumbs { display: flex; gap: .75rem; margin-top: .85rem; flex-wrap: wrap; }
  .gallery-thumbs img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: .6;
    transition: var(--transition);
    border: 2.5px solid transparent;
  }
  .gallery-thumbs img.active, .gallery-thumbs img:hover { opacity: 1; border-color: var(--accent); box-shadow: 0 2px 10px rgba(201,148,60,.3); }
  .detail-spec { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; background: var(--card-bg); border-radius: var(--radius-sm); border: 1px solid var(--border); transition: var(--transition); }
  .detail-spec:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
  .detail-spec-icon {
    width: 46px;
    height: 46px;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
  }
  .contact-card { background: var(--card-bg); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 2rem; }
  .share-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; color: #fff; transition: transform .25s, box-shadow .25s; }
  .share-btn:hover { transform: scale(1.12); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
  .share-fb { background: #1877f2; }
  .share-wa { background: #25d366; }
  .share-x { background: #000; }
  .share-li { background: #0a66c2; }

  /* ===== SIDEBAR ===== */
  .sidebar-widget { background: var(--card-bg); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1.6rem; margin-bottom: 1.5rem; }
  .sidebar-widget h5 { font-size: 1rem; font-weight: 700; border-bottom: 2px solid var(--accent); padding-bottom: .6rem; margin-bottom: 1.1rem; }
  .filter-form .form-label { font-size: .84rem; font-weight: 600; color: var(--text); }
  .filter-form .form-control, .filter-form .form-select { font-size: .9rem; background: var(--bg); border-color: var(--border); color: var(--text); transition: border-color .2s, box-shadow .2s; }
  .filter-form .form-control:focus, .filter-form .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(201,148,60,.18); }

  /* ===== MAP ===== */
  #map, #map-contact, #map-detail { border-radius: var(--radius); z-index: 1; box-shadow: var(--shadow-sm); }

  /* ===== PAGE HERO ===== */
  .page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3a6a 100%);
    padding: 5rem 0 3rem;
    margin-top: var(--navbar-height);   /* pousse sous la navbar fixe */
    position: relative;
    overflow: hidden;
  }
  .page-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg);
    clip-path: ellipse(55% 100% at 50% 100%);
  }
  .page-hero h1 { font-size: clamp(1.8rem,4vw,2.8rem); }

  /* ===== PAGE HERO BG ===== */
  .page-hero-bg { background-image: url('https://images.unsplash.com/photo-1560520653-9e0e4c89eb11?w=1920'); background-size: cover; background-position: center; }

  /* ===== FAQ ===== */
  .accordion-button:not(.collapsed) { background: rgba(201,148,60,.07); color: var(--accent); font-weight: 600; box-shadow: none; }
  .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(201,148,60,.22); }
  .accordion-item { border: 1.5px solid var(--border); border-radius: var(--radius-sm) !important; margin-bottom: .6rem; overflow: hidden; transition: border-color .2s; }
  .accordion-item:has(.accordion-button:not(.collapsed)) { border-color: rgba(201,148,60,.35); }
  .accordion-button { font-size: .95rem; font-weight: 500; }

  /* ===== 404 ===== */
  .error-code { font-size: 10rem; font-weight: 900; color: var(--accent); line-height: 1; opacity: .12; }
  .error-page { min-height: 70vh; display: flex; align-items: center; }

  /* ===== LEAFLET CUSTOM MARKER ===== */
  .custom-marker {
    background: var(--primary, #1a2e4a);
    color: #fff;
    font-weight: 700;
    font-size: .75rem;
    padding: 5px 12px;
    border-radius: var(--radius-pill, 50px);
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
    border: 2px solid rgba(255,255,255,.2);
    transition: transform .2s;
  }
  .custom-marker:hover { transform: scale(1.06); }

  /* ===== FORM CONTROLS GLOBAL ===== */
  .form-control, .form-select {
    border-color: var(--border);
    color: var(--text);
    background-color: var(--bg);
    transition: border-color .2s, box-shadow .2s;
  }
  .form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(201,148,60,.18);
    background-color: var(--bg);
    color: var(--text);
  }

  /* ===== BADGE ===== */
  .badge { font-weight: 600; letter-spacing: .03em; }

  /* ===== BREADCRUMB ===== */
  .breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
  .breadcrumb-item.active { color: var(--text-muted); }

  /* ===== RESPONSIVE ===== */
  @media (max-width: 991px) {
    .hero-section { min-height: 88vh; }
    /* Sur mobile le menu déroulant a un fond clair → liens sombres */
    .navbar-immohub .nav-link { color: rgba(255,255,255,.88); }
    .navbar-immohub.scrolled .nav-link { color: var(--text); }
    .navbar-immohub .nav-link::after { display: none; }
    .navbar-collapse {
      background: var(--primary);
      padding: 1rem 1.25rem 1.5rem;
      border-radius: 0 0 var(--radius) var(--radius);
      box-shadow: 0 12px 32px rgba(0,0,0,.18);
      border-top: 1px solid rgba(255,255,255,.1);
    }
    .navbar-immohub.scrolled .navbar-collapse {
      background: var(--bg);
      border-top: 1px solid var(--border);
    }
    .navbar-immohub.scrolled .navbar-collapse .nav-link { color: var(--text); }
    .section-padding { padding: 4rem 0; }
    .page-hero::after { display: none; }
  }
  @media (max-width: 576px) {
    .search-body { padding: 1rem; }
    .gallery-main { height: 240px; }
    .hero-section h1 { font-size: clamp(1.8rem,8vw,2.8rem); }
    .stat-number { font-size: 2.4rem; }
  }
  

  /* ===== BACK TO TOP ===== */
  .back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 6px 24px rgba(26,46,74,.35);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .3s, transform .3s, background .25s;
    z-index: 999;
    pointer-events: none;
  }
  .back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .back-to-top:hover { background: var(--accent); box-shadow: 0 8px 28px rgba(201,148,60,.4); }

  /* ===== STATS SECTION ENHANCED ===== */
  .stats-section {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3a6a 100%);
    position: relative;
    overflow: hidden;
  }
  .stats-section::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(201,148,60,.06);
    pointer-events: none;
  }

  /* ===== LOADING SKELETON (future use) ===== */
  .skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--card-bg) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
  }
  @keyframes skeleton-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

  /* ===== MISC POLISH ===== */
  ::selection { background: rgba(201,148,60,.25); color: var(--text); }
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent); }

  img { max-width: 100%; height: auto; }

  .text-muted { color: var(--text-muted) !important; }

  /* ===== AMÉLIORATIONS DESIGN ===== */

  /* Navbar — badge notifications */
  .nav-badge {
    position: absolute;
    top: 2px; right: 2px;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg);
  }

  /* Pill tabs */
  .pills-filter { display: flex; gap: .5rem; flex-wrap: wrap; }
  .pills-filter .btn { border-radius: var(--radius-pill); font-size: .82rem; padding: .35rem 1rem; }

  /* Sort bar */
  .sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .85rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
  }

  /* Compare button on card */
  .compare-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 2;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(4px);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: #aab4c0;
    font-size: .8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
  }
  .compare-btn:hover  { color: var(--primary); background: #fff; transform: scale(1.12); }
  .compare-btn.active { color: var(--accent); background: #fff; }

  /* Compare bar (fixed bottom) */
  .compare-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--primary);
    color: #fff;
    padding: 1rem 1.5rem;
    z-index: 1040;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -6px 32px rgba(0,0,0,.22);
  }
  .compare-bar.visible { transform: translateY(0); }
  .compare-item {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.1);
    border-radius: var(--radius-sm);
    padding: .35rem .9rem;
    font-size: .88rem;
    margin: .25rem;
  }
  .compare-item .remove { cursor: pointer; opacity: .7; }
  .compare-item .remove:hover { opacity: 1; color: var(--accent); }

  /* Comparateur page */
  .compare-table { width: 100%; }
  .compare-table th {
    background: var(--primary);
    color: #fff;
    padding: 1rem;
    font-weight: 600;
    font-size: .9rem;
    text-align: center;
    width: 25%;
  }
  .compare-table th:first-child { width: 20%; text-align: left; }
  .compare-table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
    font-size: .9rem;
    vertical-align: middle;
  }
  .compare-table td:first-child { font-weight: 600; text-align: left; color: var(--text-muted); }
  .compare-table tr:hover td { background: var(--bg-subtle); }
  .compare-img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm); }

  /* Simulateur crédit */
  .simulator-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
  }
  .simulator-result {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3a6a 100%);
    border-radius: var(--radius);
    padding: 2rem;
    color: #fff;
    text-align: center;
  }
  .simulator-result .monthly { font-size: 2.8rem; font-weight: 800; color: var(--accent); line-height: 1; }
  .simulator-result .monthly-label { opacity: .75; font-size: .9rem; margin-top: .3rem; }
  .simulator-breakdown { display: flex; justify-content: space-around; margin-top: 1.5rem; }
  .simulator-breakdown .item { text-align: center; }
  .simulator-breakdown .item .val { font-weight: 700; font-size: 1.1rem; }
  .simulator-breakdown .item .lbl { opacity: .6; font-size: .78rem; margin-top: .2rem; }

  /* Range input accent */
  input[type="range"] { accent-color: var(--accent); cursor: pointer; }

  /* Toast notification */
  .toast-container-custom {
    position: fixed;
    top: 5rem; right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    pointer-events: none;
  }
  .toast-custom {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .85rem 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
    min-width: 240px;
    pointer-events: auto;
    animation: toast-in .3s ease;
  }
  .toast-custom.success { border-left: 4px solid #22c55e; }
  .toast-custom.error   { border-left: 4px solid #ef4444; }
  .toast-custom.info    { border-left: 4px solid var(--accent); }
  @keyframes toast-in { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

  /* Bouton whatsapp flottant */
  .whatsapp-float {
    position: fixed;
    bottom: 5.5rem; right: 2rem;
    width: 50px; height: 50px;
    background: #25d366;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 6px 20px rgba(37,211,102,.4);
    z-index: 998;
    transition: var(--transition);
    animation: pulse-wa 2.5s infinite;
  }
  .whatsapp-float:hover { transform: scale(1.12); color: #fff; box-shadow: 0 8px 28px rgba(37,211,102,.55); }
  @keyframes pulse-wa {
    0%,100% { box-shadow: 0 6px 20px rgba(37,211,102,.4); }
    50%      { box-shadow: 0 6px 30px rgba(37,211,102,.65); }
  }

  /* City cards */
  .city-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
  }
  .city-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
  }
  .city-card:hover img { transform: scale(1.08); }
  .city-card .city-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,21,40,.75) 0%, transparent 60%);
    display: flex; align-items: flex-end;
    padding: 1.25rem;
    transition: background .3s;
  }
  .city-card:hover .city-overlay { background: linear-gradient(to top, rgba(15,21,40,.88) 0%, rgba(26,46,74,.15) 100%); }
  .city-card .city-name { color: #fff; font-weight: 700; font-size: 1.1rem; }
  .city-card .city-count { color: var(--accent); font-size: .82rem; }

  /* Tag featured / new */
  .tag-featured {
    display: inline-flex; align-items: center; gap: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    letter-spacing: .04em;
  }
  .tag-new {
    display: inline-flex; align-items: center; gap: 4px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    letter-spacing: .04em;
  }

  /* Admin panel */
  .admin-sidebar {
    width: 260px;
    background: var(--primary);
    min-height: 100vh;
    position: fixed;
    left: 0; top: 0;
    z-index: 1030;
    transition: transform .3s;
    overflow-y: auto;
  }
  .admin-sidebar.collapsed { transform: translateX(-100%); }
  .admin-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left .3s;
  }
  .admin-content.expanded { margin-left: 0; }
  .admin-nav-link {
    display: flex; align-items: center; gap: .85rem;
    color: rgba(255,255,255,.7);
    padding: .85rem 1.5rem;
    font-size: .9rem;
    font-weight: 500;
    transition: background .2s, color .2s;
    border-left: 3px solid transparent;
  }
  .admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(255,255,255,.07);
    color: #fff;
    border-left-color: var(--accent);
  }
  .admin-nav-link i { width: 18px; text-align: center; opacity: .8; }
  .stat-mini {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    transition: var(--transition);
  }
  .stat-mini:hover { box-shadow: var(--shadow); border-color: rgba(201,148,60,.2); transform: translateY(-2px); }
  .stat-mini-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
  }
  .stat-mini-val { font-size: 1.8rem; font-weight: 800; line-height: 1; }
  .stat-mini-lbl { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; }

  /* Table admin */
  .admin-table th { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 2px solid var(--border); padding: .85rem 1rem; white-space: nowrap; }
  .admin-table td { font-size: .88rem; padding: .85rem 1rem; vertical-align: middle; border-bottom: 1px solid var(--border); }
  .admin-table tr:hover td { background: var(--bg-subtle); }

  /* Connexion page */
  .auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
  }
  .auth-logo { font-size: 2rem; font-weight: 800; }

  /* Responsive admin */
  @media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-left: 0; }
  }
