/* =============================================
   CLICS IMMO — GLOBAL STYLESHEET
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --navy: #092d5f;
    --navy-mid: #1a4a8a;
    --gold: #e38917;
    --gold-dark: #c4760f;
    --gold-light: #fdf2e0;
    --light: #f5f7fc;
    --white: #ffffff;
    --text: #081e40;
    --muted: #6b7280;
    --border: #e2e6ed;
    --green: #10b981;
    --shadow-sm: 0 2px 8px rgba(9,45,95,0.06);
    --shadow-md: 0 8px 30px rgba(9,45,95,0.10);
    --shadow-lg: 0 20px 60px rgba(9,45,95,0.14);
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-xl: 32px;
    --offcanvas-w: 300px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ======= HEADER ======= */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* LOGO */
.logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* NAV desktop */
.site-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

.site-nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--r-sm);
    transition: color 0.2s, background 0.2s;
}

.site-nav a:hover, .site-nav a.active {
    color: var(--navy);
    background: var(--light);
}

.site-nav a.active {
    font-weight: 600;
    color: var(--navy);
}

/* HEADER ACTIONS */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ======= BUTTONS ======= */
.btn-ghost {
    background: none;
    border: 1.5px solid var(--border);
    color: var(--text);
    padding: 9px 20px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.btn-primary {
    background: var(--navy-mid);
    color: var(--white);
    border: none;
    padding: 10px 22px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--navy); transform: translateY(-1px); }

.btn-navy {
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 10px 22px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s, transform 0.15s;
}
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-1px); }

/* ======= HAMBURGER ======= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: border-color 0.2s;
}
.hamburger:hover { border-color: var(--navy); }
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s, width 0.3s;
    transform-origin: center;
}
/* Croix animée quand actif */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ======= OFFCANVAS OVERLAY ======= */
.offcanvas-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,20,50,0.55);
    z-index: 300;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}
.offcanvas-overlay.show {
    display: block;
    opacity: 1;
}

/* ======= OFFCANVAS NAV ======= */
.offcanvas-nav {
    position: fixed;
    top: 0; left: 0;
    width: var(--offcanvas-w);
    height: 100%;
    background: var(--white);
    z-index: 400;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 30px rgba(15,31,61,0.18);
}
.offcanvas-nav.open { transform: translateX(0); }

.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.offcanvas-close {
    width: 34px; height: 34px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--muted);
    font-size: 15px;
    transition: background 0.2s, color 0.2s;
}
.offcanvas-close:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.offcanvas-links {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}
.offcanvas-links li { margin-bottom: 4px; }
.offcanvas-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    text-decoration: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.offcanvas-links a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    transition: color 0.2s;
}
.offcanvas-links a:hover,
.offcanvas-links a.active {
    background: var(--light);
    color: var(--navy);
}
.offcanvas-links a.active { font-weight: 700; }
.offcanvas-links a:hover i,
.offcanvas-links a.active i { color: var(--gold-dark); }

.offcanvas-actions {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.offcanvas-contact {
    padding: 14px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.offcanvas-contact a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}
.offcanvas-contact a i { color: var(--gold); font-size: 12px; }
.offcanvas-contact a:hover { color: var(--navy); }

/* ======= PROPERTY CARD ======= */
.property-card {
    background: var(--white);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card-img-wrap { position: relative; height: 200px; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.property-card:hover .card-img-wrap img { transform: scale(1.04); }

.card-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--green); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
    letter-spacing: 0.3px;
    display: flex; align-items: center; gap: 5px;
}
.card-type-badge {
    position: absolute; top: 12px; right: 12px;
    background: var(--navy); color: #fff;
    font-size: 11px; font-weight: 600;
    padding: 4px 10px; border-radius: 20px;
}
.card-fav {
    position: absolute; bottom: 12px; right: 12px;
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; color: var(--muted); font-size: 14px;
    transition: color 0.2s, background 0.2s;
}
.card-fav:hover { color: #ef4444; background: #fff; }

.card-body { padding: 18px 20px 20px; }
.card-city { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.card-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 6px; line-height: 1.3; }
.card-address { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-bottom: 14px; }
.card-specs { display: flex; gap: 16px; margin-bottom: 16px; }
.spec { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.spec i { font-size: 12px; color: var(--navy); }
.card-footer-row { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 14px; }
.card-price { font-size: 18px; font-weight: 800; color: var(--navy); }
.card-price small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.btn-card {
    background: var(--navy-mid); color: var(--white); border: none;
    padding: 7px 14px; border-radius: var(--r-sm);
    font-size: 12px; font-weight: 700; font-family: 'Outfit', sans-serif;
    cursor: pointer; text-decoration: none;
    transition: background 0.2s;
    display: inline-flex; align-items: center; gap: 5px;
}
.btn-card:hover { background: var(--navy); color: var(--white); }

/* ======= FOOTER ======= */
.site-footer { background: var(--navy); color: var(--white); padding: 64px 0 0; }
.footer-grid {
    max-width: 1280px; margin: 0 auto; padding: 0 32px;
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
    gap: 48px; padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand p { font-size: 13.5px; color: #94a3b8; line-height: 1.7; margin: 14px 0 24px; max-width: 260px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.07); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; text-decoration: none; font-size: 13px;
    transition: background 0.2s, color 0.2s;
}
.footer-socials a:hover { background: var(--gold); color: var(--navy); }
.footer-col h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: var(--white); margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { text-decoration: none; color: #94a3b8; font-size: 13.5px; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold); }
.footer-contact-item { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13.5px; color: #94a3b8; align-items: flex-start; }
.footer-contact-item i { color: var(--gold); margin-top: 3px; font-size: 13px; }
.footer-bottom {
    max-width: 1280px; margin: 0 auto; padding: 20px 32px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12.5px; color: #64748b;
}
.footer-bottom a { color: #64748b; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ======= UTILITIES ======= */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gold-light); color: var(--gold-dark);
    font-size: 12px; font-weight: 700; padding: 5px 14px;
    border-radius: 20px; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 14px;
}
.section-title { font-family: 'DM Serif Display', serif; font-size: 36px; line-height: 1.15; color: var(--navy); margin-bottom: 12px; }
.section-sub { color: var(--muted); font-size: 16px; max-width: 520px; }

/* Stats strip */
.stats-strip { background: var(--navy); padding: 28px 0; }
.stats-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; display: flex; justify-content: space-around; gap: 32px; }
.stat-item { text-align: center; }
.stat-num { font-family: 'DM Serif Display', serif; font-size: 32px; color: var(--gold); line-height: 1; }
.stat-label { font-size: 12px; color: #94a3b8; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.8px; }

/* Tags */
.tag {
    display: inline-block; background: var(--light); border: 1px solid var(--border);
    color: var(--muted); font-size: 12px; font-weight: 500;
    padding: 4px 10px; border-radius: 20px; cursor: pointer; transition: all 0.2s;
}
.tag:hover, .tag.active { background: var(--navy); color: white; border-color: var(--navy); }
.tag.gold { background: var(--gold-light); color: var(--gold-dark); border-color: var(--gold); }

/* ======= RESPONSIVE ======= */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Cacher nav desktop et bouton Connexion, montrer hamburger */
    .site-nav          { display: none; }
    .header-actions    { display: none; }
    .hamburger         { display: flex; }

    .header-inner { padding: 0 20px; }
    .container    { padding: 0 20px; }
    .section-title { font-size: 26px; }
    .stats-inner  { flex-wrap: wrap; gap: 24px; justify-content: center; }
    .footer-grid  { grid-template-columns: 1fr; gap: 28px; padding: 0 20px 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; padding: 16px 20px; }
}

/* ======= ADS SLIDER ======= */
.ads-slider-section {
    background: var(--light);
    padding: 0 0 0;    /* colle directement sous les stats */
}
.ads-slider-wrap {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    /* pas de padding latéral : image pleine largeur */
}
.ads-slider-track {
    display: flex;
    transition: transform .55s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.ads-slide-link {
    min-width: 100%;
    display: block;
    text-decoration: none;
}
.ads-slide {
    min-width: 100%;
    position: relative;
    overflow: hidden;
    max-height: 340px;      /* hauteur max du bandeau */
    background: #1a3a6b;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ads-slide-img-bg {
    width: 100%;
    height: 100%;
    max-height: 340px;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.ads-slide-link:hover .ads-slide-img-bg { transform: scale(1.02); }
.ads-slide-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 200px;
    color: rgba(255,255,255,.5);
    font-size: 14px;
    width: 100%;
}
.ads-slide-placeholder i { font-size: 48px; opacity: .3; }
.ads-slide-placeholder span {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    color: rgba(255,255,255,.7);
    text-align: center;
    padding: 0 24px;
}
/* Nav arrows */
.ads-prev, .ads-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.85); border: none; border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 14px; color: var(--navy);
    box-shadow: 0 2px 12px rgba(0,0,0,.22);
    transition: background .2s, transform .2s; z-index: 5;
}
.ads-prev { left: 16px; }
.ads-next { right: 16px; }
.ads-prev:hover, .ads-next:hover {
    background: #fff; transform: translateY(-50%) scale(1.08);
}
.ads-dots {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px;
}
.ads-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.5); border: none; cursor: pointer;
    padding: 0; transition: background .25s, transform .2s;
}
.ads-dot.active { background: #fff; transform: scale(1.35); }

/* ======= POPUP PUB (image seule) ======= */
@keyframes fadeInOverlay { from { opacity: 0 } to { opacity: 1 } }
@keyframes popupIn       { from { transform: scale(.86); opacity: 0 } to { transform: scale(1); opacity: 1 } }

/* ======= CARD FAV STATE ======= */
.card-fav.liked { color: #ef4444 !important; background: #fff !important; }
.card-fav.liked i { font-weight: 900; }

/* ======= ADS RESPONSIVE ======= */
@media (max-width: 768px) {
    .ads-slide { max-height: 200px; }
    .ads-slide-img-bg { max-height: 200px; }
    .ads-prev { left: 6px; }
    .ads-next { right: 6px; }
    .ads-dot { width: 6px; height: 6px; }
}
