/* ===============================================
   CSS VARIABLES + RESET
=============================================== */
:root {
    --black: #050505;
    --black-elevated: #0A0A0A;
    --surface: #141414;
    --surface-hover: #1A1A1A;
    --white: #FAFAFA;
    --grey-light: #A1A1AA;
    --grey-mid: #71717A;
    --grey-dark: #27272A;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --gold: #C9A96E;
    --gold-dim: rgba(201, 169, 110, 0.15);
    --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
    --ease-ui: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
/* La barre de scroll verticale est TOUJOURS affichée : aucune différence de
   largeur entre une page qui scrolle et une page courte → l'interface ne se
   décale jamais d'un pixel entre deux pages. (overflow-y:scroll seul — ne pas
   combiner avec scrollbar-gutter:stable, Chromium doublerait la réservation.) */
html { scroll-behavior: smooth; overflow-y: scroll; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--black);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* Sticky footer: keep <footer> pinned to the bottom even on short pages */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* The page's <main> grows to fill the space above the footer */
body > main { flex: 1 0 auto; }

/* ===============================================
   NAVIGATION
=============================================== */
nav {
    position: fixed; top: 0; width: 100%; padding: 0;
    height: 64px; display: flex; justify-content: center; align-items: center;
    background: rgba(5, 5, 5, 0.75); backdrop-filter: blur(30px) saturate(1.5);
    -webkit-backdrop-filter: blur(30px) saturate(1.5);
    border-bottom: 1px solid var(--border-color); z-index: 9000;
    transition: transform 0.4s var(--ease-ui);
}
/* Inner container: aligns nav content with the footer (max-width 1400 + 5% gutters) */
.nav-inner {
    width: 100%; max-width: 1400px; height: 100%; margin: 0 auto; padding: 0 5%;
    display: flex; justify-content: space-between; align-items: center;
}
nav.hidden { transform: translateY(-100%); }
.nav-left { display: flex; align-items: center; gap: 3rem; }
.logo {
    font-weight: 900; font-size: 1.15rem; letter-spacing: 0.15em;
    background: linear-gradient(135deg, var(--white) 0%, var(--grey-light) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-decoration: none;
}
.nav-links { display: flex; gap: 0.3rem; }
.nav-link {
    background: none; border: none; color: var(--grey-light); font-size: 0.82rem;
    font-weight: 500; padding: 0.5rem 0.9rem; border-radius: 8px; cursor: pointer;
    transition: all 0.25s; letter-spacing: 0.02em; text-decoration: none; display: inline-block;
}
.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-right { display: flex; align-items: center; gap: 0.8rem; }
.nav-btn-outline {
    background: transparent; border: 1px solid var(--border-color); color: var(--white);
    padding: 0.5rem 1.2rem; border-radius: 10px; font-size: 0.8rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s; letter-spacing: 0.02em; text-decoration: none;
}
.nav-btn-outline:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.04); }
.nav-btn-gold {
    background: var(--gold); border: none; color: var(--black); padding: 0.5rem 1.2rem;
    border-radius: 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer;
    transition: all 0.3s; letter-spacing: 0.02em; text-decoration: none;
}
.nav-btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); }
.lang-switch { display: flex; gap: 0.15rem; background: var(--surface); padding: 0.15rem; border-radius: 8px; border: 1px solid var(--border-color); }
.lang-btn { background: transparent; color: var(--grey-mid); border: none; padding: 0.55rem 0.75rem; font-size: 0.75rem; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.25s; }
.lang-btn.active { background: var(--grey-dark); color: var(--white); }
.lang-btn:not(.active):hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-user { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--grey-light); }
.nav-user strong { color: var(--white); max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-menu-btn {
    display: none; background: none; border: none; color: var(--white);
    cursor: pointer; padding: 0.5rem; flex-direction: column; gap: 5px;
    width: 44px; height: 44px; align-items: center; justify-content: center;
}
.hamburger-line {
    display: block; width: 22px; height: 2px;
    background: var(--white); border-radius: 2px;
    transition: transform 0.3s var(--ease-ui), opacity 0.3s;
}
.mobile-menu-btn.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open .hamburger-line:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav-overlay {
    display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    /* 8990 : au-dessus de l'overlay fiche (.listing-detail, 8000) et de ses
       contrôles (8001/8500), sous le nav (9000) — le burger reste cliquable. */
    background: var(--black-elevated); z-index: 8990; flex-direction: column;
    padding: 2rem 1.5rem; gap: 0; overflow-y: auto;
    animation: fadeUp 0.25s var(--ease-ui);
}
.mobile-nav-overlay.open { display: flex; }
.mobile-nav-links { display: flex; flex-direction: column; flex: 1; }
.mobile-nav-link {
    color: var(--grey-light); text-decoration: none; font-size: 1.15rem;
    font-weight: 500; padding: 1rem 0; border-bottom: 1px solid var(--border-color);
    transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--white); }
.mobile-nav-actions {
    display: flex; flex-direction: column; gap: 0.75rem; padding-top: 2rem;
}
.mobile-nav-cta { display: block; padding: 0.9rem 1.2rem; border-radius: 10px; text-decoration: none; }
.mobile-nav-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 8985; backdrop-filter: blur(4px);
}
.mobile-nav-backdrop.open { display: block; }

/* ===============================================
   BUTTONS + CTAs
=============================================== */
.cta-primary {
    background: var(--white); color: var(--black); border: none; padding: 1rem 2.5rem;
    border-radius: 10px; font-weight: 700; font-size: 0.95rem; cursor: pointer;
    transition: all 0.3s var(--ease-ui); letter-spacing: 0.02em;
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(255,255,255,0.1); }
.cta-secondary {
    background: transparent; color: var(--white); border: 1px solid var(--border-color);
    padding: 1rem 2.5rem; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: all 0.3s; letter-spacing: 0.02em;
}
.cta-secondary:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.04); }
.btn-cta-primary {
    width: 100%; background: var(--white); color: var(--black); border: none;
    padding: 1rem; border-radius: 10px; font-weight: 700; font-size: 0.95rem;
    cursor: pointer; margin-bottom: 0.8rem; transition: all 0.2s; letter-spacing: 0.02em;
}
.btn-cta-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(255,255,255,0.1); }
.btn-cta-gold {
    width: 100%; background: var(--gold); color: var(--black); border: none;
    padding: 1rem; border-radius: 10px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.25s;
}
.btn-cta-gold:hover { filter: brightness(1.1); }

/* ===============================================
   FORMS
=============================================== */
.form-group { margin-bottom: 1.5rem; }
.form-label {
    display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.5rem;
    color: var(--grey-light); letter-spacing: 0.04em;
}
.form-input, .form-select, .form-textarea {
    width: 100%; background: var(--surface); border: 1px solid var(--border-color);
    color: var(--white); padding: 0.9rem 1.2rem; border-radius: 10px;
    font-size: 0.9rem; outline: none; font-family: inherit; transition: border-color 0.3s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--gold); }
/* Les textareas ne s'agrandissent que vers le bas (jamais en diagonale) */
textarea { resize: vertical; }
.form-input::placeholder { color: var(--grey-mid); }
.form-select { cursor: pointer; -webkit-appearance: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.form-type-btn {
    background: var(--surface); border: 1px solid var(--border-color);
    color: var(--grey-light); padding: 1rem; border-radius: 10px;
    font-size: 0.85rem; font-weight: 500; cursor: pointer; text-align: center; transition: all 0.3s;
}
.form-type-btn:hover { border-color: var(--border-hover); color: var(--white); }
.form-type-btn.selected { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.form-type-icon { font-size: 1.5rem; margin-bottom: 0.4rem; display: block; }

/* Inline form feedback boxes (used by estimer, agency, dashboards) */
.form-success {
    background: rgba(52, 168, 83, 0.12); border: 1px solid rgba(52, 168, 83, 0.35);
    color: #4ade80; border-radius: 12px; padding: 1rem 1.25rem; font-size: 0.9rem; line-height: 1.6;
}
.form-error {
    background: rgba(234, 67, 53, 0.10); border: 1px solid rgba(234, 67, 53, 0.35);
    color: #f87171; border-radius: 12px; padding: 0.85rem 1.1rem; font-size: 0.88rem; line-height: 1.6;
}

/* Horizontal scroll wrapper for wide data tables on small screens */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > .listing-table { min-width: 640px; }

/* ===============================================
   AUTH PAGES
=============================================== */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 5rem 1.5rem 3rem;
}
.auth-container { width: 100%; max-width: 460px; }
.auth-card {
    background: var(--black-elevated); border: 1px solid var(--border-color);
    border-radius: 24px; padding: 2.5rem;
}
.auth-logo {
    font-weight: 900; font-size: 1rem; letter-spacing: 0.2em; color: var(--gold);
    margin-bottom: 2rem; display: block;
}
.auth-title {
    font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 700;
    margin-bottom: 0.5rem; line-height: 1.2;
}
.auth-subtitle { color: var(--grey-light); font-size: 0.88rem; margin-bottom: 2rem; line-height: 1.6; }
.auth-form { margin-bottom: 1.5rem; }
.auth-errors {
    background: rgba(225, 29, 72, 0.08); border: 1px solid rgba(225, 29, 72, 0.2);
    border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.5rem;
}
.auth-error-item { color: #f87171; font-size: 0.83rem; padding: 0.2rem 0; }
.auth-success {
    background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.5rem;
    color: #4ade80; font-size: 0.85rem; line-height: 1.6;
}
.auth-divider {
    text-align: center; margin: 1.5rem 0; position: relative;
    color: var(--grey-mid); font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; position: absolute; top: 50%; width: calc(50% - 2rem);
    height: 1px; background: var(--border-color);
}
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }
.auth-oauth { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.5rem; }
.btn-oauth {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    background: var(--surface); border: 1px solid var(--border-color); color: var(--white);
    padding: 0.9rem; border-radius: 10px; font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: all 0.25s; text-decoration: none;
}
.btn-oauth:hover { border-color: var(--border-hover); background: var(--surface-hover); }
.auth-switch { text-align: center; font-size: 0.83rem; color: var(--grey-light); }
.auth-switch a { color: var(--gold); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.auth-forgot { text-align: right; margin-top: -0.8rem; margin-bottom: 1.5rem; }
.auth-forgot a { color: var(--grey-mid); font-size: 0.78rem; text-decoration: none; transition: color 0.2s; }
.auth-forgot a:hover { color: var(--gold); }

/* TOTP / OTP input */
.otp-input {
    width: 100%; background: var(--surface); border: 1px solid var(--border-color);
    color: var(--white); padding: 1rem 1.2rem; border-radius: 10px; font-size: 1.5rem;
    font-weight: 700; text-align: center; letter-spacing: 0.4em; outline: none;
    transition: border-color 0.3s; font-family: 'Inter', monospace;
}
.otp-input:focus { border-color: var(--gold); }

/* QR Code block */
.qr-block {
    background: white; border-radius: 16px; padding: 1.5rem;
    display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}
.qr-block img { max-width: 100%; height: auto; }
.totp-secret-display {
    background: var(--surface); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 0.8rem 1rem; font-family: monospace;
    font-size: 0.9rem; letter-spacing: 0.1em; color: var(--gold);
    word-break: break-all; margin-bottom: 1.5rem; text-align: center;
}

/* ===============================================
   FOOTER
=============================================== */
footer {
    border-top: 1px solid var(--border-color); padding: 4rem 5% 2rem;
    max-width: 1400px; margin: 0 auto;
    width: 100%; flex-shrink: 0;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem;
}
.footer-brand p { color: var(--grey-mid); font-size: 0.82rem; line-height: 1.7; max-width: 280px; margin-top: 0.8rem; }
.footer-col h5 {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--grey-mid); margin-bottom: 1.2rem;
}
.footer-col a {
    display: block; color: var(--grey-light); text-decoration: none; font-size: 0.85rem;
    padding: 0.35rem 0; transition: color 0.25s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid var(--border-color); padding-top: 2rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
    color: var(--grey-mid); font-size: 0.75rem;
}
.footer-credit { color: var(--grey-light); text-decoration: none; font-weight: 600; transition: color 0.2s var(--ease-ui); }
.footer-credit:hover { color: var(--gold); }

/* ===============================================
   PUBLIC PAGE LAYOUT (shared across visitor pages)
   One width + gutter + vertical-rhythm system so every
   public page aligns with the nav and footer (1400 / 5%).
=============================================== */
.page { padding: 7rem 0 5rem; }
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 5%; }
/* Left-anchored readable column inside the frame — keeps title, text and footer
   brand on the same left edge as the nav. Add margin-inline:auto to centre instead. */
.measure { max-width: 760px; }

.page-head { margin-bottom: 2.5rem; }
.page-eyebrow {
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.page-title {
    font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 0.75rem; text-wrap: balance;
}
.page-subtitle { color: var(--grey-light); font-size: 1.05rem; line-height: 1.7; max-width: 60ch; }
.page-meta { color: var(--grey-mid); font-size: 0.85rem; }

/* Long-form prose (legal, about) */
.prose { max-width: 72ch; color: var(--grey-light); line-height: 1.8; font-size: 1rem; display: flex; flex-direction: column; gap: 1.75rem; }
.prose h2 { font-size: 1.15rem; color: var(--white); font-weight: 600; margin-bottom: 0.6rem; }
.prose p { margin: 0; }
.prose a { color: var(--gold); }

/* Surface card (contact tiles, form shells) */
.surface-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: 14px; padding: 1.5rem; }

@media (max-width: 640px) {
    .page { padding: 6rem 0 3.5rem; }
    .page-head { margin-bottom: 2rem; }
}

/* ===============================================
   ANIMATIONS
=============================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===============================================
   TOAST
=============================================== */
.toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--surface); border: 1px solid var(--border-color);
    padding: 1rem 2rem; border-radius: 14px; font-size: 0.85rem; font-weight: 500;
    max-width: calc(100vw - 2rem); text-align: center;
    backdrop-filter: blur(20px); z-index: 99999;
    transition: transform 0.5s var(--ease-spring), opacity 0.5s;
    opacity: 0; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===============================================
   HOME HERO (stub)
=============================================== */
.home-hero {
    min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
    align-items: center; text-align: center; padding: 8rem 5% 4rem;
}
.home-title {
    font-family: 'Playfair Display', serif; font-size: clamp(3rem, 7vw, 6.5rem);
    font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 1.5rem;
}
.home-title em { font-style: italic; color: var(--gold); }
.home-subtitle { color: var(--grey-light); font-size: 1.15rem; max-width: 520px; line-height: 1.7; margin: 0 auto 3rem; }

/* "autrement" — writing animation: left-to-right reveal + drawn ink underline + trailing dot */
.hw-em { display: inline-block; position: relative; white-space: nowrap; }
.hw-word {
    display: inline-block;
    clip-path: inset(0 100% -0.15em 0);
    animation: hw-write 1.3s var(--ease-out) 0.5s forwards;
}
.hw-em::after {
    content: ""; position: absolute; left: 0; bottom: -0.04em;
    width: 100%; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dim));
    transform: scaleX(0); transform-origin: left center;
    animation: hw-underline 1.3s var(--ease-out) 0.5s forwards,
               hw-underline-lift 0.6s var(--ease-ui) 1.95s forwards;
}
.hw-dot {
    display: inline-block; color: var(--gold);
    opacity: 0; transform: translateY(-0.18em) scale(0.4);
    transform-origin: center 85%;
    animation: hw-dot 0.5s var(--ease-spring) 1.8s forwards;
}
@keyframes hw-write { to { clip-path: inset(0 -0.12em -0.15em 0); } }
@keyframes hw-underline { to { transform: scaleX(1); } }
@keyframes hw-underline-lift { to { opacity: 0; transform: scaleX(1) translateY(4px); } }
@keyframes hw-dot {
    60%  { opacity: 1; transform: translateY(0.02em) scale(1.3); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* Écriture « à la plume » lettre par lettre (activée par JS : .hw-live + --n = nb de lettres).
   Chaque lettre apparaît comme de l'encre (flou -> net), une plume dorée avance
   en oscillant le long du mot puis se lève ; soulignement et point suivent. */
.hw-em.hw-live { --hw-start: 0.5s; --hw-step: 0.085s; --hw-total: calc(var(--hw-step) * var(--n, 9)); }
.hw-em.hw-live .hw-word { clip-path: none; animation: none; }
.hw-l {
    display: inline-block; opacity: 0;
    filter: blur(4px);
    transform: translateY(0.14em) rotate(5deg) scale(0.92);
    transform-origin: bottom left;
    animation: hw-ink 0.34s var(--ease-out) forwards;
    animation-delay: calc(var(--hw-start) + var(--i, 0) * var(--hw-step));
}
@keyframes hw-ink { to { opacity: 1; filter: blur(0); transform: none; } }
.hw-pen {
    position: absolute; left: -2%; bottom: -0.14em;
    width: 0.85em; height: 0.85em; color: var(--gold);
    filter: drop-shadow(0 0 6px rgba(201, 169, 110, 0.55));
    pointer-events: none; z-index: 3; opacity: 0;
    animation:
        hw-pen-in 0.25s var(--ease-ui) calc(var(--hw-start) - 0.2s) forwards,
        hw-pen-x var(--hw-total) linear var(--hw-start) forwards,
        hw-pen-wiggle 0.13s ease-in-out var(--hw-start) infinite alternate,
        hw-pen-lift 0.5s var(--ease-ui) calc(var(--hw-start) + var(--hw-total)) forwards;
}
.hw-pen svg { display: block; width: 100%; height: 100%; }
@keyframes hw-pen-in { to { opacity: 1; } }
@keyframes hw-pen-x { from { left: -2%; } to { left: 100%; } }
@keyframes hw-pen-wiggle {
    from { transform: rotate(-36deg) translateY(0); }
    to   { transform: rotate(-30deg) translateY(-0.07em); }
}
@keyframes hw-pen-lift { to { opacity: 0; transform: rotate(-42deg) translate(0.35em, -0.7em); } }
/* Soulignement + point calés sur la fin de l'écriture quand la plume est active */
.hw-em.hw-live::after {
    animation: hw-underline var(--hw-total) var(--ease-out) var(--hw-start) forwards,
               hw-underline-lift 0.6s var(--ease-ui) calc(var(--hw-start) + var(--hw-total) + 0.25s) forwards;
}
.hw-em.hw-live .hw-dot {
    animation: hw-dot 0.5s var(--ease-spring) calc(var(--hw-start) + var(--hw-total) + 0.05s) forwards;
}

@media (prefers-reduced-motion: reduce) {
    .hw-word { clip-path: none; animation: none; }
    .hw-em::after { display: none; }
    .hw-dot { opacity: 1; transform: none; animation: none; }
    .hw-l { opacity: 1; filter: none; transform: none; animation: none; }
    .hw-pen { display: none; }
}

/* ===============================================
   HOME HERO — cinematic 3D background
   Aurora dorée + sol en perspective + nuage de
   particules 3D (canvas) + vignette de lisibilité.
=============================================== */
.home-hero { position: relative; overflow: hidden; isolation: isolate; }

.hero-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; width: 100%;
    animation: hero-rise 1.1s var(--ease-out) both;
}
@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* Aurora — nappes de lumière or qui respirent en profondeur */
.hero-aurora { position: absolute; inset: -25%; filter: blur(64px); opacity: 0.6; }
.hero-aurora::before, .hero-aurora::after { content: ""; position: absolute; border-radius: 50%; }
.hero-aurora::before {
    width: 56vw; height: 56vw; top: -12%; left: 8%;
    background: radial-gradient(circle, rgba(201,169,110,0.30), transparent 62%);
    animation: aurora-a 22s ease-in-out infinite alternate;
}
.hero-aurora::after {
    width: 50vw; height: 50vw; bottom: -14%; right: 4%;
    background: radial-gradient(circle, rgba(201,169,110,0.16), transparent 60%);
    animation: aurora-b 28s ease-in-out infinite alternate;
}
@keyframes aurora-a { from { transform: translate3d(-7%,-5%,0) scale(1); } to { transform: translate3d(9%,7%,0) scale(1.2); } }
@keyframes aurora-b { from { transform: translate3d(7%,5%,0) scale(1.1); } to { transform: translate3d(-9%,-7%,0) scale(0.9); } }

/* Sol en perspective — trame architecturale qui fuit vers l'horizon */
.hero-grid {
    position: absolute; left: 50%; bottom: -8%;
    width: 220%; height: 64%;
    transform: translateX(-50%) perspective(520px) rotateX(74deg);
    transform-origin: 50% 100%;
    background-image:
        linear-gradient(to right, rgba(201,169,110,0.13) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(201,169,110,0.13) 1px, transparent 1px);
    background-size: 58px 58px;
    -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 80%);
            mask-image: linear-gradient(to top, #000 0%, transparent 80%);
    animation: grid-flow 9s linear infinite;
    opacity: 0.5;
}
@keyframes grid-flow { to { background-position: 0 58px; } }

/* Nuage de particules 3D projeté au canvas */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }

/* Vignette — assombrit les bords, garde le titre lisible (sous le texte) */
.hero-vignette {
    position: absolute; inset: 0; z-index: 2;
    background: radial-gradient(ellipse 62% 52% at 50% 46%, transparent 0%, transparent 46%, rgba(5,5,5,0.6) 100%);
}

@media (max-width: 640px) { .hero-grid { opacity: 0.32; } .hero-aurora { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) {
    .hero-content { animation: none; }
    .hero-aurora::before, .hero-aurora::after, .hero-grid { animation: none; }
}

/* ===============================================
   DASHBOARD LAYOUT
=============================================== */
.dash-layout {
    padding: 6rem 5% 4rem;
    /* Même cadre que la nav, le footer et les pages publiques (1400/5%) :
       toutes les pages du site ont exactement la même largeur.
       width:100% OBLIGATOIRE : body est un flex column et margin:auto
       désactive le stretch — sans lui, la largeur dépendrait du CONTENU
       de chaque page (= décalages de quelques pixels entre les pages). */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.dash-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
}
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.dash-kpi {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}
.dash-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
}
.dash-kpi-label {
    font-size: 0.78rem;
    color: var(--grey-light);
    margin-top: 0.3rem;
    display: block;
}

/* ===============================================
   LISTING TABLE
=============================================== */
.listing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.listing-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--grey-mid);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}
.listing-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.listing-table tr:hover td {
    background: var(--surface-hover);
}
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.status-draft      { background: var(--grey-dark); color: var(--grey-light); }
.status-published  { background: rgba(52,168,83,0.15); color: #34A853; }
.status-archived   { background: rgba(161,161,170,0.15); color: var(--grey-light); }
.status-suspended  { background: rgba(234,67,53,0.15); color: #EA4335; }
.status-scheduled  { background: rgba(212,175,55,0.15); color: var(--gold); }
.status-done       { background: rgba(52,168,83,0.15); color: #34A853; }
.status-cancelled  { background: rgba(161,161,170,0.15); color: var(--grey-light); }
.status-no_show    { background: rgba(234,67,53,0.15); color: #EA4335; }

/* ===============================================
   AGENT DASHBOARD SUB-NAV
=============================================== */
.agent-subnav {
    /* Reset the global `nav {}` rule (fixed, full-width, space-between, 64px bar)
       which would otherwise leak into this in-page sub-nav. */
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
}
.agent-subnav a {
    padding: 0.6rem 1rem;
    color: var(--grey-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}
.agent-subnav a:hover { color: var(--white); }
.agent-subnav a.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ===============================================
   APPOINTMENTS CALENDAR
=============================================== */
.cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.cal-toolbar .cal-title { font-size: 1.05rem; font-weight: 600; text-transform: capitalize; }
.cal-views { display: flex; gap: 0.25rem; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.cal-grid .cal-dow {
    background: var(--grey-dark);
    color: var(--grey-light);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem;
    text-align: center;
}
.cal-cell {
    background: var(--bg-color, #111);
    min-height: 96px;
    padding: 0.35rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.cal-cell.cal-out { opacity: 0.4; }
.cal-cell.cal-today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-cell .cal-daynum { font-size: 0.78rem; font-weight: 600; color: var(--grey-light); }
.cal-cell.cal-today .cal-daynum { color: var(--gold); }
.cal-event {
    display: block;
    font-size: 0.72rem;
    line-height: 1.25;
    padding: 0.12rem 0.3rem;
    border-radius: 4px;
    background: var(--gold-dim);
    color: var(--gold);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-event.ev-done      { background: rgba(52,168,83,0.15);  color: #34A853; }
.cal-event.ev-cancelled { background: rgba(161,161,170,0.15); color: var(--grey-light); text-decoration: line-through; }
.cal-event.ev-no_show   { background: rgba(234,67,53,0.15);  color: #EA4335; }
.cal-cols { display: grid; gap: 1px; background: var(--border-color); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.cal-col { background: var(--bg-color, #111); padding: 0.6rem; min-height: 220px; }
.cal-col-head { font-size: 0.82rem; font-weight: 600; color: var(--grey-light); margin-bottom: 0.6rem; text-transform: capitalize; }
.cal-col.cal-today .cal-col-head { color: var(--gold); }
.cal-slot {
    display: flex;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    margin-bottom: 0.4rem;
    text-decoration: none;
    color: var(--white);
}
.cal-slot:hover { background: rgba(255,255,255,0.06); }
.cal-slot .cal-slot-time { color: var(--gold); font-weight: 600; font-size: 0.8rem; white-space: nowrap; }
.cal-slot .cal-slot-body { font-size: 0.82rem; }

/* ===============================================
   WIZARD STEPS
=============================================== */
.wizard-steps {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}
.wizard-step {
    flex: 1;
    padding: 1rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--grey-mid);
    position: relative;
}
.wizard-step.active {
    color: var(--gold);
    border-bottom: 2px solid var(--gold);
    margin-bottom: -1px;
}
.wizard-step.done {
    color: var(--grey-light);
}
a.wizard-step {
    text-decoration: none;
    transition: color .15s;
}
a.wizard-step.active {
    cursor: default;
    pointer-events: none;
}
a.wizard-step:not(.active):hover {
    color: var(--gold);
}
a.wizard-step:not(.active):hover .wizard-step-num {
    background: var(--gold);
    color: var(--black);
}
.wizard-step-num {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    background: var(--grey-dark);
    color: var(--grey-light);
    font-size: 0.7rem;
    margin-right: 0.4rem;
}
.wizard-step.active .wizard-step-num {
    background: var(--gold);
    color: var(--black);
}
.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

/* ===============================================
   PHOTO GRID
=============================================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    aspect-ratio: 4/3;
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-item-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.3rem;
}
.photo-item-actions button {
    background: rgba(0,0,0,0.7);
    border: none;
    color: var(--white);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
}
.photo-item-actions button:hover {
    background: rgba(0,0,0,0.9);
}
.photo-cover-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: var(--gold);
    color: var(--black);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.photo-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}
.photo-upload-zone:hover {
    border-color: var(--gold);
}
.photo-upload-zone p {
    color: var(--grey-light);
    font-size: 0.85rem;
}

/* ===============================================
   LEADS TABLE
=============================================== */
.lead-status { font-weight: 600; }
.lead-new       { color: var(--gold); }
.lead-contacted { color: #4285F4; }
.lead-qualified { color: #34A853; }
.lead-closed    { color: var(--grey-mid); }

/* Cellule Nom (liste leads) : nom + e-mail empilés proprement */
.lead-name-stack { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.lead-name { color: var(--gold); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.lead-name:hover { text-decoration: underline; }
.lead-sub-email {
    font-size: 0.76rem;
    color: var(--grey-mid);
    max-width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Colonne Message : aperçu sobre, 2 lignes max, rétrécissable (jamais de plancher rigide) */
.lead-msg-col { min-width: 0; }
.lead-msg-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    max-width: 340px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--grey-light);
}
.lead-empty { color: var(--grey-mid); }
/* La liste leads a deux colonnes de plus (e-mail complet + Message) : elle bascule
   en cartes empilées dès 1040px — avant le breakpoint vtable générique (820px) —
   pour que le tableau ne rogne jamais la colonne Actions dans la carte overflow:hidden. */
@media (max-width: 1040px) {
    .vtable.lead-list-table thead { display: none; }
    .vtable.lead-list-table,
    .vtable.lead-list-table tbody,
    .vtable.lead-list-table tbody tr,
    .vtable.lead-list-table td { display: block; width: 100%; }
    .vtable.lead-list-table tbody tr { border-bottom: 1px solid var(--border-color); }
    .vtable.lead-list-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        border: none;
        padding: 0.45rem 1.1rem;
    }
    .vtable.lead-list-table td[data-label]::before {
        content: attr(data-label);
        color: var(--grey-mid);
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        flex-shrink: 0;
    }
    .vtable.lead-list-table td.vt-actions { justify-content: flex-end; }
    .vtable.lead-list-table td.lead-name-cell {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.1rem;
    }
    .vtable.lead-list-table .lead-msg-text { max-width: none; }
    .vtable.lead-list-table .lead-sub-email { max-width: none; white-space: normal; overflow-wrap: anywhere; }
}

/* Bloc « coordonnées & message » en clair (fiche d'un lead) */
.lead-contact-block {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
}
.lead-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem 1.5rem;
}
.lead-contact-item { min-width: 0; }
.lcb-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--grey-mid);
    margin-bottom: 0.2rem;
}
.lcb-value { font-size: 0.92rem; color: var(--white); overflow-wrap: anywhere; }
.lcb-value a { color: var(--gold); text-decoration: none; }
.lcb-value a:hover { text-decoration: underline; }
.lead-contact-message {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.lead-contact-message p {
    font-size: 0.92rem;
    color: var(--grey-light);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6;
    margin: 0.3rem 0 0;
}

/* ===============================================
   UTILITY: BUTTONS
=============================================== */
.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-sm:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.04); }
.btn-sm-gold {
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 10px;
    border: none;
    background: var(--gold);
    color: var(--black);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-sm-gold:hover { filter: brightness(1.1); }
.btn-sm-danger {
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(234,67,53,0.3);
    background: transparent;
    color: #EA4335;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-sm-danger:hover { background: rgba(234,67,53,0.1); }
.btn-outline-full {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--white);
    padding: 0.85rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}
.btn-outline-full:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.04); }
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--grey-mid);
}

/* ===============================================
   DASHBOARD LAYOUT
=============================================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 64px);
    padding-top: 64px;
    /* Même cadre 1400 que le reste du site (cohérence de taille d'interface) */
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    /* Fond + trait de la colonne latérale peints ICI, sur toute la hauteur de
       la page : la sidebar sticky ne fait qu'un écran de haut, son propre fond
       s'arrêtait donc en cours de page sur les pages longues (profil). */
    background: linear-gradient(90deg,
        var(--black-elevated) 0, var(--black-elevated) 260px,
        var(--border-color) 260px, var(--border-color) calc(260px + 1px),
        transparent calc(260px + 1px));
}
.dashboard-sidebar {
    padding: 2rem 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}
.dashboard-sidebar-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--grey-mid);
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}
.dashboard-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--grey-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.dashboard-nav a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.03);
}
.dashboard-nav a.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: var(--gold-dim);
}
.dashboard-content {
    padding: 2.5rem 3rem;
    min-width: 0;
}
.dashboard-header {
    margin-bottom: 2rem;
}
.dashboard-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.dashboard-header p {
    color: var(--grey-light);
    font-size: 0.88rem;
}

/* ===============================================
   STAT CARDS
=============================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}
.stat-card-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--grey-mid);
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}
.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
}

/* ===============================================
   DASHBOARD SECTIONS
=============================================== */
.dashboard-section {
    margin-bottom: 2.5rem;
}
.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}
.dashboard-section-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
}
.dashboard-section-header a {
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}
.dashboard-section-header a:hover {
    text-decoration: underline;
}
.dashboard-empty {
    color: var(--grey-mid);
    font-size: 0.88rem;
    padding: 2rem 0;
}

/* ===============================================
   LISTING CARDS (small)
=============================================== */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.listing-card-sm {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
}
.listing-card-sm:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.listing-card-sm a {
    text-decoration: none;
    color: inherit;
}
.listing-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: var(--grey-dark);
}
.listing-card-body {
    padding: 1rem;
}
.listing-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.listing-card-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 0.3rem;
}
.listing-card-meta {
    font-size: 0.78rem;
    color: var(--grey-light);
}
.listing-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(225, 29, 72, 0.85);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.03em;
}
.btn-favorite-remove {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(5, 5, 5, 0.7);
    border: none;
    color: #f87171;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.btn-favorite-remove:hover {
    background: rgba(225, 29, 72, 0.3);
}

/* ===============================================
   LEAD / CONTACT CARDS
=============================================== */
.lead-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}
.lead-card:hover {
    border-color: var(--border-hover);
}
.lead-card-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--grey-dark);
}
.lead-card-body {
    flex: 1;
    min-width: 0;
}
.lead-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.lead-card-title a {
    color: var(--white);
    text-decoration: none;
}
.lead-card-title a:hover {
    color: var(--gold);
}
.lead-card-message {
    font-size: 0.82rem;
    color: var(--grey-light);
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lead-card-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--grey-mid);
}

/* ===============================================
   STATUS BADGES
=============================================== */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.status-new {
    background: var(--grey-dark);
    color: var(--grey-light);
}
.status-contacted {
    background: var(--gold-dim);
    color: var(--gold);
}
.status-qualified {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}
.status-closed {
    background: rgba(225, 29, 72, 0.1);
    color: #f87171;
}

/* ===============================================
   PROFILE SECTIONS
=============================================== */
.profile-section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.profile-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.danger-zone {
    border-color: rgba(225, 29, 72, 0.3);
}
.danger-zone h2 {
    color: #f87171;
}
.btn-danger {
    width: 100%;
    background: rgba(225, 29, 72, 0.15);
    color: #f87171;
    border: 1px solid rgba(225, 29, 72, 0.3);
    padding: 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-danger:hover {
    background: rgba(225, 29, 72, 0.25);
    border-color: rgba(225, 29, 72, 0.5);
}

/* ===============================================
   PAGINATION
=============================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.pagination a {
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--grey-light);
}
.pagination a:hover {
    border-color: var(--border-hover);
    color: var(--white);
}
.pagination .active {
    background: var(--gold);
    color: var(--black);
    border: none;
}

/* ===============================================
   DASHBOARD POLISH
   Additive refinement layer — more breathing room,
   consistent card/button hover, tasteful motion.
   Placed BEFORE the responsive section so mobile
   overrides still win. Does not touch base rules.
=============================================== */
/* Fondu PUR (aucun translateY) : le contenu ne doit jamais « bouger »
   au chargement — l'interface reste au même emplacement d'une page à l'autre. */
@keyframes dashUp { from { opacity: 0; } to { opacity: 1; } }

.dash-layout { padding: 6.5rem 5% 5rem; animation: dashUp 0.5s var(--ease-out) both; }
.dashboard-content { animation: dashUp 0.5s var(--ease-out) both; }
/* Hauteur d'en-tête FIGÉE : avec ou sans sous-titre, la bande titre occupe
   exactement le même espace → aucun décalage vertical entre les pages. */
.dash-header { margin-bottom: 2.25rem; min-height: 3.5rem; }
.dash-kpi-grid { gap: 1.25rem; margin-bottom: 3rem; }

/* Shared section header + helpers (replace ad-hoc inline section rows) */
.dash-section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 2.75rem 0 1.25rem; }
.dash-section-head h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.dash-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
/* Consistent "back to dashboard" link — always the first element inside .dash-layout */
.dash-back { display: flex; width: fit-content; margin: 0 0 1.5rem auto; align-items: center; gap: 0.4rem; padding: 0.45rem 1rem; border: 1px solid var(--gold-dim); border-radius: 10px; color: var(--gold); background: rgba(201, 169, 110, 0.06); text-decoration: none; font-size: 0.78rem; font-weight: 600; transition: all 0.25s var(--ease-ui); }
.dash-back::before { content: "\2190"; font-size: 0.95rem; }
.dash-back:hover { border-color: var(--gold); background: var(--gold-dim); transform: translateY(-1px); }
/* Variante « aller vers » (ex. Mes annonces depuis l'agence) : flèche → après le libellé */
.dash-back.dash-fwd::before { content: none; }
.dash-back.dash-fwd::after { content: "\2192"; font-size: 0.95rem; }
.dash-callout { border: 1px solid var(--gold); background: var(--gold-dim); border-radius: 14px; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.dash-kpi-sub { display: block; font-size: 0.75rem; color: var(--grey-mid); margin-top: 0.2rem; }

/* Cards — consistent radius + gentle hover lift */
.dash-kpi { border-radius: 16px; padding: 1.6rem 1.5rem; transition: border-color 0.3s var(--ease-ui), transform 0.3s var(--ease-ui); }
.dash-kpi:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.stat-card { transition: border-color 0.3s var(--ease-ui), transform 0.3s var(--ease-ui); }
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.lead-card { transition: border-color 0.2s var(--ease-ui), transform 0.2s var(--ease-ui); }
.lead-card:hover { transform: translateY(-2px); }

/* Wide data tables read as a framed card */
.table-scroll { border: 1px solid var(--border-color); border-radius: 14px; }
.table-scroll > .listing-table tbody tr:last-child td { border-bottom: none; }

/* Buttons — one consistent tactile hover across the family */
.nav-btn-outline, .btn-sm, .btn-sm-gold, .btn-sm-danger, .cta-secondary, .btn-outline-full {
    transition: all 0.25s var(--ease-ui);
}
.nav-btn-outline:hover, .btn-sm:hover, .btn-sm-gold:hover, .btn-sm-danger:hover,
.cta-secondary:hover, .btn-outline-full:hover { transform: translateY(-1px); }
.nav-btn-gold:hover, .btn-sm-gold:hover, .btn-cta-gold:hover { box-shadow: 0 6px 20px rgba(201, 169, 110, 0.25); }
.nav-btn-gold:focus-visible, .nav-btn-outline:focus-visible, .btn-cta-primary:focus-visible,
.btn-sm:focus-visible, .btn-sm-gold:focus-visible, .btn-sm-danger:focus-visible,
.cta-primary:focus-visible, .cta-secondary:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .dash-layout, .dashboard-content { animation: none; }
    .dash-kpi, .stat-card, .lead-card, .nav-btn-outline, .btn-sm, .btn-sm-gold,
    .btn-sm-danger, .cta-secondary, .btn-outline-full { transition: none; }
    .dash-kpi:hover, .stat-card:hover, .lead-card:hover, .nav-btn-outline:hover,
    .btn-sm:hover, .btn-sm-gold:hover, .btn-sm-danger:hover, .cta-secondary:hover,
    .btn-outline-full:hover { transform: none; }
}

/* ===============================================
   UI SYSTEM 2026-07
   Cohérence globale : scrollbars VANTAGE, cases à
   cocher/radios animées, tables → cartes responsives
   (zéro scroll horizontal), grille de gestion des
   annonces, filtres segmentés, drag & drop photos.
   Placé AVANT la section responsive.
=============================================== */

/* --- Scrollbars VANTAGE (toutes zones scrollables) --- */
* { scrollbar-width: thin; scrollbar-color: rgba(201, 169, 110, 0.4) rgba(255, 255, 255, 0.04); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(201, 169, 110, 0.45), rgba(201, 169, 110, 0.25));
    border-radius: 100px; border: 2px solid var(--black);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
::-webkit-scrollbar-corner { background: transparent; }

/* --- Cases à cocher & radios VANTAGE (animées) --- */
input[type="checkbox"], input[type="radio"] {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; flex: 0 0 auto; margin: 0;
    background: var(--surface); border: 1.5px solid var(--border-hover);
    border-radius: 6px; cursor: pointer;
    display: inline-grid; place-content: center; vertical-align: middle;
    transition: border-color 0.25s var(--ease-ui), background 0.25s var(--ease-ui);
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--gold); }
input[type="checkbox"]::after {
    content: ""; width: 5px; height: 10px; margin-top: -3px;
    border: solid var(--black); border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0); opacity: 0;
    transition: transform 0.25s var(--ease-spring), opacity 0.15s;
}
input[type="checkbox"]:checked {
    background: var(--gold); border-color: var(--gold);
    animation: check-pop 0.4s var(--ease-ui);
}
input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); opacity: 1; }
input[type="radio"]::after {
    content: ""; width: 10px; height: 10px; border-radius: 50%;
    background: var(--gold); transform: scale(0);
    transition: transform 0.25s var(--ease-spring);
}
input[type="radio"]:checked { border-color: var(--gold); animation: check-pop 0.4s var(--ease-ui); }
input[type="radio"]:checked::after { transform: scale(1); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px;
}
@keyframes check-pop {
    0% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.45); }
    100% { box-shadow: 0 0 0 9px rgba(201, 169, 110, 0); }
}

/* --- Placeholders + hints --- */
::placeholder { color: var(--grey-mid); opacity: 1; }
.form-hint { display: block; color: var(--grey-mid); font-size: 0.78rem; font-weight: 400; margin-top: 0.15rem; }

/* --- Largeurs de contenu standard (remplacent les max-width inline) --- */
.form-narrow { max-width: 760px; }
.confirm-card { max-width: 520px; }
/* Bouton danger dans une rangée d'actions : largeur naturelle, pas 100% */
.dash-actions .btn-danger { width: auto; padding: 0.85rem 2rem; }
.wizard-actions .btn-cta-gold, .wizard-actions .btn-outline-full { width: auto; min-width: 180px; padding: 0.85rem 2rem; }

/* --- Taille d'interface UNIFORME sur toutes les pages connectées ---
   Chaque page dashboard occupe au minimum tout le viewport, même
   quasi vide : le cadre ne « rétrécit » jamais d'une page à l'autre. */
.dash-layout { min-height: 100vh; }
@supports (height: 100svh) { .dash-layout { min-height: 100svh; } }
/* Le contenu des étapes du wizard garde une hauteur stable (1↔4). */
.wizard-panel { min-height: 520px; }

/* --- Cellule prix : jamais de retour à la ligne --- */
.vt-nowrap { white-space: nowrap; }

/* --- Texte tronqué qui défile au survol, contenu complet en tooltip ---
   Largeur pilotée par --scroll-w (défaut 24ch) : style="--scroll-w:12ch"
   pour une colonne plus étroite (ex. Type). --- */
.txt-scroll {
    --scroll-w: 24ch;
    display: block; max-width: var(--scroll-w); overflow: hidden; white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent);
}
.txt-scroll > span { display: inline-block; white-space: nowrap; transition: transform 2.4s ease-in-out 0.25s; }
.txt-scroll:hover { -webkit-mask-image: none; mask-image: none; }
.txt-scroll:hover > span { transform: translateX(min(0px, calc(var(--scroll-w) - 100%))); }
@media (max-width: 820px) { .txt-scroll { --scroll-w: 52vw; } }

/* --- Bouton Voir/Aperçu : largeur fixe pour des rangées d'actions alignées --- */
.btn-view { min-width: 84px; text-align: center; }

/* --- Inputs fichier (« Importer un fichier ») au design VANTAGE --- */
input[type="file"] {
    width: 100%; color: var(--grey-light); font-size: 0.82rem;
    background: var(--surface); border: 1px dashed var(--border-hover);
    border-radius: 10px; padding: 0.55rem; cursor: pointer;
    transition: border-color 0.25s var(--ease-ui);
}
input[type="file"]:hover { border-color: var(--gold); }
input[type="file"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input[type="file"]::file-selector-button {
    background: var(--gold-dim); border: 1px solid var(--gold); color: var(--gold);
    font-weight: 600; font-size: 0.8rem; font-family: inherit;
    padding: 0.5rem 1.1rem; border-radius: 8px; margin-right: 1rem;
    cursor: pointer; transition: all 0.25s var(--ease-ui);
}
input[type="file"]::file-selector-button:hover { background: var(--gold); color: var(--black); }
input[type="file"]::-webkit-file-upload-button {
    background: var(--gold-dim); border: 1px solid var(--gold); color: var(--gold);
    font-weight: 600; font-size: 0.8rem; font-family: inherit;
    padding: 0.5rem 1.1rem; border-radius: 8px; margin-right: 1rem;
    cursor: pointer; transition: all 0.25s var(--ease-ui);
}
input[type="file"]::-webkit-file-upload-button:hover { background: var(--gold); color: var(--black); }

/* --- Compteur de caractères (textarea limitée) --- */
.char-count { display: block; text-align: right; font-size: 0.75rem; color: var(--grey-mid); margin-top: 0.35rem; transition: color 0.2s; }
.char-count.warn { color: var(--gold); font-weight: 600; }

/* --- Tables responsives VANTAGE (.vtable) ---
   Bureau : vraie table encadrée en carte.
   Mobile : chaque ligne devient une fiche empilée
   label/valeur — AUCUN scroll horizontal, jamais. */
.vtable-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; }
table.vtable { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.vtable th {
    text-align: left; padding: 0.85rem 1.1rem; color: var(--grey-mid);
    font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em;
    text-transform: uppercase; border-bottom: 1px solid var(--border-color);
}
.vtable td { padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.vtable tbody tr:last-child td { border-bottom: none; }
.vtable tbody tr { transition: background 0.2s; }
.vtable tbody tr:hover { background: var(--surface-hover); }
.vtable .vt-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
@media (max-width: 820px) {
    .vtable thead { display: none; }
    table.vtable, .vtable tbody, .vtable tbody tr, .vtable td { display: block; width: 100%; }
    .vtable tbody tr { border-bottom: 1px solid var(--border-color); padding: 0.5rem 0; }
    .vtable tbody tr:last-child { border-bottom: none; }
    .vtable td {
        display: flex; justify-content: space-between; align-items: center;
        gap: 1rem; border: none; padding: 0.45rem 1.1rem;
    }
    .vtable td[data-label]::before {
        content: attr(data-label); color: var(--grey-mid); font-size: 0.7rem;
        font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; flex-shrink: 0;
    }
    .vtable td.vt-actions { justify-content: flex-end; }
}

/* --- Grille de gestion des annonces (agent) --- */
.manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.25rem; }
.manage-card {
    display: flex; flex-direction: column; gap: 0.85rem; min-width: 0;
    background: var(--surface); border: 1px solid var(--border-color);
    border-radius: 14px; padding: 1.4rem 1.5rem;
    transition: border-color 0.3s var(--ease-ui), transform 0.3s var(--ease-ui);
}
.manage-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.manage-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.manage-card-ref { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; color: var(--grey-mid); text-transform: uppercase; }
.manage-card-title {
    font-size: 1rem; font-weight: 600; color: var(--white); line-height: 1.35;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.manage-card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.meta-chip {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.75rem; color: var(--grey-light);
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color);
    border-radius: 6px; padding: 0.22rem 0.6rem;
}
.manage-card-price { font-size: 1.15rem; font-weight: 800; color: var(--gold); }
.manage-card-actions {
    display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
    margin-top: auto; padding-top: 0.85rem; border-top: 1px solid var(--border-color);
}

/* --- Filtres segmentés (statuts) --- */
.seg-filter {
    display: inline-flex; flex-wrap: wrap; gap: 0.35rem; width: fit-content;
    background: var(--surface); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 0.3rem; margin-bottom: 1.75rem;
}
.seg-filter a {
    padding: 0.45rem 1rem; border-radius: 7px; font-size: 0.8rem; font-weight: 600;
    color: var(--grey-light); text-decoration: none; transition: all 0.2s var(--ease-ui);
}
.seg-filter a:hover { color: var(--white); background: rgba(255, 255, 255, 0.05); }
.seg-filter a.active { background: var(--gold); color: var(--black); }
/* Dans un en-tête de page, le filtre s'aligne avec les actions (pas de marge basse) */
.dash-header .seg-filter { margin-bottom: 0; }

/* --- Drag & drop photos (étape 4 annonce) --- */
.photo-item { cursor: grab; transition: transform 0.25s var(--ease-ui), border-color 0.25s var(--ease-ui), box-shadow 0.25s var(--ease-ui), opacity 0.2s; }
.photo-item:active { cursor: grabbing; }
.photo-item.dragging { opacity: 0.35; transform: scale(0.96); border-color: var(--gold); border-style: dashed; }
.photo-item.drag-over { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); transform: translateY(-2px); }
.photo-drag-handle {
    position: absolute; top: 0.5rem; left: 0.5rem; width: 28px; height: 28px;
    background: rgba(0, 0, 0, 0.7); color: var(--white); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; letter-spacing: 1px; pointer-events: none;
}

/* --- Bouton « remonter en haut » (bas de page) + vent doré latéral --- */
.up-top {
    position: fixed; right: 2rem; bottom: 2rem; z-index: 7900;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--gold); color: var(--black); border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0; transform: translateY(14px); pointer-events: none;
    transition: opacity 0.3s var(--ease-ui), transform 0.3s var(--ease-ui), box-shadow 0.3s var(--ease-ui);
}
.up-top.show { opacity: 1; transform: none; pointer-events: auto; }
.up-top:hover { box-shadow: 0 8px 26px rgba(201, 169, 110, 0.35); transform: translateY(-3px); }
.up-top:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.up-top-wind { position: fixed; inset: 0; z-index: 7850; pointer-events: none; display: none; }
.up-top-wind.on { display: block; }
@media (max-width: 640px) { .up-top { right: 1.1rem; bottom: 1.1rem; width: 48px; height: 48px; } }
@media (prefers-reduced-motion: reduce) {
    .up-top { transition: none; }
    .up-top:hover { transform: none; }
    .up-top-wind { display: none !important; }
}

/* --- Calendrier : vue mois compacte sur mobile (aucun scroll horizontal) --- */
@media (max-width: 640px) {
    .cal-cell { min-height: 56px; padding: 0.2rem; }
    .cal-event { font-size: 0.7rem; padding: 0.2rem 0.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    input[type="checkbox"], input[type="radio"],
    input[type="checkbox"]::after, input[type="radio"]::after,
    .photo-item, .manage-card, .seg-filter a { transition: none; }
    input[type="checkbox"]:checked, input[type="radio"]:checked { animation: none; }
    .manage-card:hover, .photo-item.drag-over { transform: none; }
}

/* ===============================================
   RESPONSIVE
=============================================== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    /* Une seule colonne : on retire la peinture de colonne latérale */
    .dashboard-layout { grid-template-columns: 1fr; background: none; }
    .dashboard-sidebar {
        position: static;
        height: auto;
        background: var(--black-elevated);
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
    }
    .dashboard-nav { flex-direction: row; overflow-x: auto; padding: 0 1rem; }
    .dashboard-nav a { border-left: none; border-bottom: 3px solid transparent; padding: 0.6rem 1rem; white-space: nowrap; }
    .dashboard-nav a.active { border-left-color: transparent; border-bottom-color: var(--gold); }
    .dashboard-content { padding: 1.5rem; }
}
@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .listing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .auth-card { padding: 1.8rem 1.2rem; border-radius: 16px; }
    .footer-grid { grid-template-columns: 1fr; }
    .listing-grid { grid-template-columns: 1fr; }
    .lead-card { flex-direction: column; }
    .lead-card-img { width: 100%; height: 120px; }
}

/* ===============================================
   RESPONSIVE 2026-07-11 — audit tactile/mobile
   Nav qui déborde, cibles tactiles, vtable empilée,
   wizard mobile, zoom iOS. (Après les blocs ci-dessus :
   ces règles mobiles doivent gagner.)
=============================================== */
/* Le hamburger prend le relais dès que la nav complète ne tient plus (connecté). */
@media (max-width: 1080px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; flex-shrink: 0; }
}
@media (min-width: 1081px) {
    /* Rotation tablette : le drawer ne doit jamais rester ouvert en desktop
       (1081px = seuil où la nav complète remplace le hamburger) */
    .mobile-nav-overlay, .mobile-nav-backdrop { display: none !important; }
}
@media (max-width: 900px) {
    /* Les actions de .nav-right existent déjà dans le drawer mobile */
    .nav-right { display: none; }
    /* Cibles tactiles >= 40px sur les zones d'action */
    .btn-sm, .btn-sm-gold, .btn-sm-danger { padding: 0.6rem 1rem; }
    .dash-back { padding: 0.65rem 1.1rem; }
    .lang-btn { padding: 0.75rem 1rem; }
    .pagination a, .pagination span { min-width: 40px; height: 40px; }
    .photo-item-actions button { width: 40px; height: 40px; }
    .btn-favorite-remove { width: 40px; height: 40px; }
    /* Message de lead : 2 lignes lisibles plutôt qu'une ligne tronquée */
    .lead-card-message {
        white-space: normal; display: -webkit-box;
        -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
}
@media (max-width: 820px) {
    /* vtable empilée : les valeurs insécables (emails, URLs) passent à la ligne */
    .vtable td { min-width: 0; overflow-wrap: anywhere; }
    /* Titres tronqués : sur tactile (pas de hover) on laisse le titre s'écrire en entier */
    .vtable td .txt-scroll { max-width: none; white-space: normal; -webkit-mask-image: none; mask-image: none; }
    .vtable td .txt-scroll > span { white-space: normal; transition: none; }
}
@media (max-width: 640px) {
    /* 16px = pas d'auto-zoom iOS au focus des champs */
    .form-input, .form-select, .form-textarea, .otp-input, select, textarea { font-size: 16px; }
    /* Wizard : numéros seuls, hauteur libre, boutons pleine largeur */
    .wizard-panel { min-height: 0; }
    .wizard-step { padding: 1rem 0.4rem; font-size: 0; }
    .wizard-step .wizard-step-num { font-size: 0.72rem; margin-right: 0; }
    .wizard-actions { flex-wrap: wrap; }
    .wizard-actions .btn-cta-gold, .wizard-actions .btn-outline-full { min-width: 0; flex: 1 1 auto; }
}

/* Rangée de formulaire à 3 colonnes (ville / CP / surface) */
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .form-row-3 { grid-template-columns: 1fr; } }

/* ===============================================
   TRANSITION DE MARQUE (clic sur le logo VANTAGE du header)
   Voile noir plein écran : lettres or Playfair révélées une à une,
   hairline dorée qui se déploie, particules d'or ascendantes — puis
   navigation vers l'accueil (le voile couvre le chargement de la page).
=============================================== */
.brand-veil {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 42%, #0C0B09 0%, var(--black) 68%);
    opacity: 0; pointer-events: none;
    transition: opacity 0.28s ease;
}
.brand-veil.on { opacity: 1; pointer-events: auto; }
.bv-word {
    display: flex; color: var(--gold);
    font-family: 'Playfair Display', serif; font-weight: 700;
    font-size: clamp(2.4rem, 8vw, 5rem); letter-spacing: 0.22em;
    /* le letter-spacing s'ajoute APRÈS le dernier caractère : on le compense
       à gauche pour que le mot soit optiquement centré */
    padding-left: 0.22em;
    text-shadow: 0 0 60px rgba(201, 169, 110, 0.35);
}
.bv-word span { opacity: 0; animation: bvLetter 0.55s var(--ease-out) forwards; }
@keyframes bvLetter {
    from { opacity: 0; transform: translateY(26px); filter: blur(10px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}
.bv-line {
    width: min(340px, 46vw); height: 1px; margin-top: 1.5rem;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform: scaleX(0); animation: bvLine 0.6s var(--ease-out) 0.35s forwards;
}
@keyframes bvLine { to { transform: scaleX(1); } }
.bv-dot {
    position: absolute; width: 3px; height: 3px; border-radius: 50%;
    background: var(--gold); opacity: 0; animation: bvFloat 1.05s ease-out forwards;
}
@keyframes bvFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0.5); }
    30%  { opacity: var(--o, 0.6); }
    100% { opacity: 0; transform: translateY(-110px) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .brand-veil { display: none !important; } }

/* ===============================================
   CONFIRMATION PUBLICATION / BROUILLON
   Overlay affiché au retour du wizard (?pub=1 / ?draft=1) : cercle doré qui se
   trace, coche qui se dessine, puis fondu de sortie — le JS retire l'élément.
=============================================== */
.pub-confirm {
    position: fixed; inset: 0; z-index: 99990;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5, 5, 5, 0.72);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    animation: pubFadeOut 0.4s ease 2s forwards;
}
.pub-confirm-box { text-align: center; padding: 1rem; animation: pubPop 0.5s var(--ease-out); }
.pub-confirm-ico { width: 84px; height: 84px; display: block; margin: 0 auto 1.1rem; fill: none; }
.pc-circle {
    stroke: var(--gold); stroke-width: 2.5;
    stroke-dasharray: 195; stroke-dashoffset: 195;
    animation: pcDraw 0.55s var(--ease-out) 0.1s forwards;
}
.pc-check {
    stroke: var(--gold); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 42; stroke-dashoffset: 42;
    animation: pcDraw 0.35s var(--ease-out) 0.6s forwards;
}
.pub-confirm-title { font-family: 'Playfair Display', serif; font-size: 1.55rem; color: var(--white); }
.pub-confirm-sub { color: var(--grey-light); font-size: 0.88rem; margin-top: 0.35rem; }
@keyframes pcDraw { to { stroke-dashoffset: 0; } }
@keyframes pubPop { from { opacity: 0; transform: scale(0.9) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pubFadeOut { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
    .pub-confirm-box { animation: none; }
    .pc-circle, .pc-check { animation: none; stroke-dashoffset: 0; }
    .pub-confirm { animation: pubFadeOut 0.2s ease 1.4s forwards; }
}

/* ===============================================
   CAPTCHA VANTAGE (SVG serveur — inscription + contact fiche)
=============================================== */
.captcha-row { display: flex; gap: 0.6rem; align-items: stretch; flex-wrap: wrap; }
.captcha-img {
    width: 190px; max-width: 100%; height: 56px; flex-shrink: 0;
    border: 1px solid var(--border-color); border-radius: 10px;
    overflow: hidden; background: var(--black-elevated);
}
.captcha-img svg { display: block; width: 100%; height: 100%; }
.captcha-refresh {
    width: 46px; min-height: 46px; flex-shrink: 0; cursor: pointer;
    background: transparent; border: 1px solid var(--border-color); border-radius: 10px;
    color: var(--grey-light); font-size: 1.1rem;
    transition: color 0.25s, border-color 0.25s;
}
/* Seule la flèche tourne au survol — pas le bouton ni sa bordure */
.captcha-refresh-ico { display: inline-block; transition: transform 0.4s var(--ease-spring); }
.captcha-refresh:hover { border-color: var(--gold); color: var(--gold); }
.captcha-refresh:hover .captcha-refresh-ico { transform: rotate(180deg); }
.captcha-input { flex: 1; min-width: 130px; text-transform: uppercase; letter-spacing: 0.25em; }
@media (max-width: 640px) {
    .captcha-img { width: 100%; }
    .captcha-input { min-width: 0; }
}

/* Modale de confirmation « repasser en brouillon » (bien publié) */
.draft-modal {
    position: fixed; inset: 0; z-index: 99980;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    padding: 1.5rem;
}
.draft-modal[hidden] { display: none; }
.draft-modal-card {
    background: var(--surface); border: 1px solid var(--border-color);
    border-radius: 14px; padding: 2rem; max-width: 460px; width: 100%;
    animation: pubPop 0.35s var(--ease-out);
}
.draft-modal-card h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin: 0 0 0.6rem; }
.draft-modal-card p { color: var(--grey-light); font-size: 0.9rem; line-height: 1.6; margin: 0 0 1.5rem; }
.draft-modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .draft-modal-card { animation: none; } }
