/* =====================================================================
   Immojjo CRM — design system
   Repris de l'identité visuelle d'immojjo.fr : navy #033342, orange
   #FF6634, titres en serif, boutons/onglets en pilule.
   ===================================================================== */

:root {
    --navy: #033342;
    --navy-dark: #022733;
    --navy-light: #0c4a5f;
    --orange: #ff6634;
    --orange-dark: #e6551f;
    --bg: #f4f7f8;
    --white: #ffffff;
    --text: #1f2b30;
    --text-muted: #6b7c82;
    --border: #e3e9eb;
    --success: #2fb380;
    --warning: #e8a23d;
    --danger: #e14b4b;
    --radius-pill: 50px;
    --radius-card: 16px;
    --radius-sm: 10px;
    --shadow-card: 0 4px 24px rgba(3, 51, 66, 0.07);
    --shadow-hover: 0 8px 28px rgba(3, 51, 66, 0.12);
    --sidebar-width: 260px;
    --font-heading: 'Source Serif 4', Georgia, serif;
    --font-nav: 'Montserrat', sans-serif;
    --font-body: 'Roboto', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--navy);
    margin: 0 0 8px;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }

p { margin: 0 0 12px; }

a {
    color: var(--orange);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; }

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* --------------------------------------------------------------- */
/* Layout                                                          */
/* --------------------------------------------------------------- */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--navy);
    color: var(--white);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    transition: transform 0.25s ease;
}

.sidebar__logo {
    padding: 26px 24px 22px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__logo-img { height: 28px; width: auto; display: block; }

.sidebar__nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar__link svg { flex-shrink: 0; width: 18px; height: 18px; }

.sidebar__badge {
    background: var(--orange);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar__lock { width: 14px !important; height: 14px !important; opacity: 0.5; flex-shrink: 0; }

.sidebar__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    text-decoration: none;
}

.sidebar__link.active {
    background: var(--orange);
    color: var(--white);
}

.sidebar__footer {
    padding: 16px 20px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar__title { margin: 0; }
.topbar__title h1 { font-size: 24px; margin: 0; }
.topbar__subtitle { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

.topbar__user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-nav);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-nav);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--navy);
}

.content {
    padding: 28px 32px 60px;
}

/* --------------------------------------------------------------- */
/* Boutons                                                         */
/* --------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius-pill);
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: 14px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
    line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--orange);
    color: var(--white);
}
.btn-primary:hover { background: var(--orange-dark); }

.btn-outline {
    background: transparent;
    border-color: var(--navy);
    color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger {
    background: var(--white);
    color: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: var(--white); }

.btn-sm { padding: 7px 16px; font-size: 13px; }

/* --------------------------------------------------------------- */
/* Cartes / conteneurs                                             */
/* --------------------------------------------------------------- */

.card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 24px;
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.card__header h2, .card__header h3 { margin: 0; }

/* Tuiles de statistiques (dashboard) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Grille de cartes (hub Paramètres) */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.settings-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 22px;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.settings-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
    text-decoration: none;
}

.settings-card__icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: rgba(255, 102, 52, 0.12);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-card__icon svg { width: 20px; height: 20px; }

.stat-tile {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-tile__label {
    font-family: var(--font-nav);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-tile__value {
    font-family: var(--font-heading);
    font-size: 34px;
    color: var(--navy);
}

.stat-tile__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 102, 52, 0.12);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

/* --------------------------------------------------------------- */
/* Formulaires                                                     */
/* --------------------------------------------------------------- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.field-full { grid-column: 1 / -1; }

label {
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: 13px;
    color: var(--navy);
}

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="date"], input[type="search"], select, textarea {
    font-family: var(--font-body);
    font-size: 14px;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    width: 100%;
    transition: border-color 0.15s ease;
}

textarea { resize: vertical; min-height: 90px; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.field-hint { font-size: 12px; color: var(--text-muted); }
.field-error { font-size: 12px; color: var(--danger); }

/* Champ de recherche avec autocomplétion (ex : sélection d'un vendeur) */
.autocomplete-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    margin-top: 4px;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.autocomplete-item:hover, .autocomplete-item.active { background: var(--bg); }
.autocomplete-item strong { font-weight: 600; font-size: 14px; color: var(--navy); }
.autocomplete-item span { font-size: 12px; color: var(--text-muted); }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------- */
/* Tableaux                                                        */
/* --------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    text-align: left;
    font-family: var(--font-nav);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--border);
    padding: 10px 14px;
    white-space: nowrap;
}

tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:hover { background: rgba(3, 51, 66, 0.03); }
tbody tr:last-child td { border-bottom: none; }

.table-actions { display: flex; gap: 8px; justify-content: flex-end; }

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------- */
/* Badges de statut                                                */
/* --------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-family: var(--font-nav);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-gray { background: #eef1f2; color: #667479; }
.badge-blue { background: #e5f0fb; color: #2170c9; }
.badge-green { background: rgba(47, 179, 128, 0.12); color: var(--success); }
.badge-orange { background: rgba(255, 102, 52, 0.12); color: var(--orange-dark); }
.badge-yellow { background: rgba(232, 162, 61, 0.15); color: #b9791f; }
.badge-red { background: rgba(225, 75, 75, 0.12); color: var(--danger); }

button.badge {
    font: inherit;
    font-family: var(--font-nav);
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}
button.badge:hover { filter: brightness(0.92); }

/* --------------------------------------------------------------- */
/* Référence de bien — mise en évidence                             */
/* --------------------------------------------------------------- */

.ref-highlight {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 102, 52, 0.12);
    color: var(--orange-dark);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* --------------------------------------------------------------- */
/* Kanban tâches                                                   */
/* --------------------------------------------------------------- */

.kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.kanban__col {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 16px;
    min-height: 120px;
}

.kanban__col-title {
    font-family: var(--font-nav);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 12px;
}

.task-card__title { font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.task-card__meta { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.task-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------------- */
/* Alertes / messages flash                                        */
/* --------------------------------------------------------------- */

.alert {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(47, 179, 128, 0.1); color: #1c7a55; }
.alert-error { background: rgba(225, 75, 75, 0.1); color: #b73333; }
.alert-info { background: rgba(3, 51, 66, 0.06); color: var(--navy); }

/* --------------------------------------------------------------- */
/* Onglets pilule (fiche vendeur, etc.)                             */
/* --------------------------------------------------------------- */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.tab.active {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
}
.tab:hover { text-decoration: none; }

/* --------------------------------------------------------------- */
/* Page de connexion                                                */
/* --------------------------------------------------------------- */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 24px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 44px 40px;
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 10px;
}
.auth-logo-img { height: 40px; width: auto; }

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-card .btn { width: 100%; margin-top: 8px; padding: 13px; }

/* --------------------------------------------------------------- */
/* Utilitaires                                                     */
/* --------------------------------------------------------------- */

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }

/* --------------------------------------------------------------- */
/* Responsive                                                      */
/* --------------------------------------------------------------- */

/* Grille de photos (fiche bien) */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.photo-grid__item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.photo-grid__item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.photo-grid__item form {
    padding: 8px;
}

.photo-grid__item .btn {
    width: 100%;
}

/* --------------------------------------------------------------- */
/* Biens — vue d'ensemble (barre d'outils, cartes, liste)          */
/* --------------------------------------------------------------- */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.toolbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 260px;
    position: relative;
}

.toolbar__right { display: flex; align-items: center; gap: 12px; }

.search-box { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-muted); pointer-events: none; }
.search-box input { padding-left: 38px; border-radius: var(--radius-pill); }

.filter-disclosure { position: relative; }

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.filter-btn::-webkit-details-marker { display: none; }
.filter-btn svg { width: 15px; height: 15px; }
.filter-btn__count {
    background: var(--orange);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.filter-disclosure[open] .filter-btn { border-color: var(--navy); }

.filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-hover);
    padding: 20px;
    width: 480px;
    max-width: 90vw;
}
.filter-panel__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.filter-panel .field { margin-bottom: 0; }
.filter-panel__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }

.active-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(3, 51, 66, 0.06);
    color: var(--navy);
    padding: 6px 8px 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-nav);
    text-decoration: none;
}
.chip:hover { text-decoration: none; background: rgba(3, 51, 66, 0.1); }
.chip__x { background: rgba(3, 51, 66, 0.12); width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; }

.view-toggle { display: flex; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-pill); padding: 3px; flex-shrink: 0; }
.view-toggle button { border: none; background: transparent; color: var(--text-muted); width: 34px; height: 30px; border-radius: var(--radius-pill); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.view-toggle button.active { background: var(--navy); color: var(--white); }
.view-toggle svg { width: 16px; height: 16px; }

.badge-draft {
    background: repeating-linear-gradient(135deg, #eef1f2, #eef1f2 4px, #e4e8e9 4px, #e4e8e9 8px);
    color: #566267;
    border: 1px dashed #b8c1c4;
}
.badge-draft::before { display: none; }

.biens-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.biens-grid.hidden { display: none; }

.bien-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.12s ease;
}
.bien-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); text-decoration: none; }
.bien-card__photo { height: 140px; position: relative; background-size: cover; background-position: center; }
.bien-card__photo-badge { position: absolute; top: 10px; left: 10px; }
.bien-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bien-card__title { font-family: var(--font-heading); font-size: 17px; color: var(--navy); margin: 0; }
.bien-card__meta { color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.bien-card__meta svg { width: 13px; height: 13px; flex-shrink: 0; }
.bien-card__price { font-family: var(--font-heading); font-size: 19px; color: var(--navy); margin-top: 2px; font-variant-numeric: tabular-nums; }
.bien-card__footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bien-card__vendeur { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bien-card--draft { border: 1.5px dashed #c9d2d5; }
.bien-card--draft .bien-card__photo { display: flex; align-items: center; justify-content: center; color: #9aa5a9; background: repeating-linear-gradient(135deg, #eef1f2, #eef1f2 8px, #e4e8e9 8px, #e4e8e9 16px); }
.bien-card--draft .bien-card__photo svg { width: 26px; height: 26px; }

.bien-photo-fallback-1 { background-image: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); }
.bien-photo-fallback-2 { background-image: linear-gradient(135deg, var(--orange) 0%, #ffab8a 100%); }
.bien-photo-fallback-3 { background-image: linear-gradient(135deg, var(--navy-light) 0%, #1f6d85 100%); }
.bien-photo-fallback-0 { background-image: linear-gradient(135deg, #0c4a5f 0%, var(--orange) 130%); }

.biens-list { display: none; }
.biens-list.active { display: block; }

.table-biens tbody tr .row-actions { display: flex; gap: 6px; justify-content: flex-end; opacity: 0; transition: opacity 0.12s ease; }
.table-biens tbody tr:hover .row-actions,
.table-biens tbody tr .row-actions:focus-within { opacity: 1; }
.table-biens__thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0; background-size: cover; background-position: center; }

.stats-row-compact { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-tile__delta { font-size: 12px; color: var(--success); font-weight: 600; margin-top: 4px; }
.stat-tile--accent { background: var(--navy); }
.stat-tile--accent .stat-tile__label { color: rgba(255, 255, 255, 0.6); }
.stat-tile--accent .stat-tile__value { color: var(--white); }

.fab {
    position: fixed;
    right: 34px;
    bottom: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    border: none;
    box-shadow: 0 10px 26px rgba(255, 102, 52, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    transition: background 0.15s ease, transform 0.1s ease;
}
.fab:hover { background: var(--orange-dark); }
.fab:active { transform: scale(0.96); }
.fab svg { width: 24px; height: 24px; }

/* --------------------------------------------------------------- */
/* Assistant de création (stepper, accordéon, dropzone, récap)     */
/* --------------------------------------------------------------- */

.wizard-wrap { max-width: 880px; margin: 0 auto; }
.wizard-head { text-align: center; margin-bottom: 26px; }
.wizard-head p { color: var(--text-muted); font-size: 14px; margin: 0; }

.stepper { display: flex; align-items: flex-start; margin-bottom: 30px; }
.stepper__item {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-nav);
    padding: 0;
}
.stepper__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.stepper__item.done::after { background: var(--orange); }
.stepper__circle {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 700;
    font-size: 13px;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.stepper__circle svg { width: 15px; height: 15px; }
.stepper__item.active .stepper__circle { border-color: var(--orange); color: var(--orange); background: rgba(255, 102, 52, 0.08); }
.stepper__item.done .stepper__circle { border-color: var(--orange); background: var(--orange); color: var(--white); }
.stepper__label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.stepper__item.active .stepper__label { color: var(--navy); }
.stepper__item.invalid .stepper__circle { border-color: var(--danger); color: var(--danger); }

.wizard-step { display: none; }
.wizard-step.active { display: block; animation: wizard-fade-in 0.2s ease; }
@media (prefers-reduced-motion: reduce) {
    .wizard-step.active { animation: none; }
}
@keyframes wizard-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-card { background: var(--white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 30px 32px; }
.wizard-card h3 { font-size: 20px; margin-bottom: 4px; }
.wizard-card__hint { color: var(--text-muted); font-size: 13.5px; margin-bottom: 22px; }

.accordion { border: 1.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.accordion__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--white);
    border: none;
    cursor: pointer;
    font-family: var(--font-nav);
    font-weight: 700;
    font-size: 13.5px;
    color: var(--navy);
}
.accordion__head svg { width: 16px; height: 16px; transition: transform 0.15s ease; color: var(--text-muted); }
.accordion.open .accordion__head svg { transform: rotate(180deg); }
.accordion__body { display: none; padding: 4px 18px 18px; }
.accordion.open .accordion__body { display: block; }

.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 26px;
    text-align: center;
    color: var(--text-muted);
    margin: 8px 0 16px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    position: relative;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--orange); background: rgba(255, 102, 52, 0.03); }
.dropzone svg { width: 24px; height: 24px; margin: 0 auto 8px; color: var(--orange); }
.dropzone strong { color: var(--navy); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.upload-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-bottom: 16px; }
.upload-preview__item { aspect-ratio: 1; border-radius: var(--radius-sm); background-size: cover; background-position: center; position: relative; overflow: hidden; }
.upload-preview__doc { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 600; margin-bottom: 8px; }
.upload-preview__doc svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }

.recap-section { margin-bottom: 20px; }
.recap-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.recap-section__head h4 { font-family: var(--font-nav); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0; }
.recap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px; background: var(--bg); border-radius: var(--radius-sm); padding: 16px 18px; }
.recap-grid div span { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 2px; }
.recap-grid div strong { font-size: 14px; color: var(--text); font-weight: 600; }

.wizard-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; gap: 12px; flex-wrap: wrap; }
.wizard-actions__right { display: flex; gap: 10px; }

@media (max-width: 900px) {
    .kanban { grid-template-columns: 1fr; }
    .stats-row-compact { grid-template-columns: repeat(2, 1fr); }
    .stepper__label { display: none; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 14px 18px; }
    .content { padding: 20px 18px 48px; }
    .form-grid { grid-template-columns: 1fr; }
    /* Le bouton « Ajouter un bien » du en-tête est déjà bien visible sur
       mobile sans avoir à faire défiler — le bouton flottant deviendrait
       redondant et risquerait de recouvrir le contenu en scrollant. */
    .fab { display: none; }
}

/* =====================================================================
   Espace Vendeur — composants additionnels, absents du CRM interne.
   Réutilise exactement les mêmes tokens (--navy, --orange, --card...).
   ===================================================================== */

.progress-parcours { margin-bottom: 28px; }
.progress-parcours__track {
    background: var(--border);
    border-radius: var(--radius-pill);
    height: 8px;
    overflow: hidden;
}
.progress-parcours__fill {
    background: var(--orange);
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}
.progress-parcours__label {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 8px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.action-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 20px 22px;
    border-left: 4px solid var(--orange);
}
.action-card__label {
    font-family: var(--font-nav);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--orange-dark);
    margin-bottom: 8px;
}
.action-card__title { font-weight: 600; font-size: 15.5px; margin-bottom: 4px; }
.action-card__subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.action-card__go { font-size: 13px; font-weight: 700; color: var(--orange-dark); text-decoration: none; }

.empty-reassurance {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 24px 26px;
    margin-bottom: 24px;
    border-left: 4px solid var(--navy-light);
}
.empty-reassurance__title { font-weight: 600; font-size: 15.5px; margin-bottom: 6px; }
.empty-reassurance__text { font-size: 13.5px; color: var(--text-muted); }

/* --------------------------------------------------------------- */
/* Écran verrouillé (modèle Freemium)                               */
/* --------------------------------------------------------------- */

.locked-screen {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 48px 32px;
    margin-bottom: 24px;
    text-align: center;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.locked-screen__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 102, 52, 0.1);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.locked-screen__title { font-size: 19px; margin-bottom: 10px; }
.locked-screen__text { font-size: 13.5px; color: var(--text-muted); margin-bottom: 22px; }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 900px) { .summary-grid { grid-template-columns: 1fr; } }

.mini-card {
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 18px 20px;
}
.mini-card__label {
    font-family: var(--font-nav);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.mini-card .row { display: flex; align-items: center; gap: 12px; }
.mini-card .row b { display: block; font-size: 14px; }
.mini-card .row span { font-size: 12px; color: var(--text-muted); }
.mini-card__actions { display: flex; gap: 8px; margin-top: 12px; }
.mini-card__img { background: var(--bg); border-radius: var(--radius-sm); height: 90px; margin-bottom: 12px; background-size: cover; background-position: center; }

.thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.bubble { max-width: 70%; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.bubble--vendeur { align-self: flex-end; background: var(--orange); color: var(--white); border-bottom-right-radius: 4px; }
.bubble--equipe { align-self: flex-start; background: var(--bg); color: var(--text); border-bottom-left-radius: 4px; }
.bubble__meta { font-size: 10.5px; opacity: 0.7; margin-top: 6px; }

.notif-list { display: flex; flex-direction: column; }
.notif-item { display: flex; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-item__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); flex: 0 0 auto; margin-top: 6px; }
.notif-item.lu .notif-item__dot { background: var(--border); }
.notif-item__title { font-weight: 600; font-size: 14px; }
.notif-item__body { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.notif-item__time { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

.doc-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius-card); overflow: hidden; margin-bottom: 24px; }
@media (max-width: 900px) { .doc-categories { grid-template-columns: 1fr 1fr; } }
.doc-cat { background: var(--white); padding: 18px 18px 20px; }
.doc-cat__title { font-family: var(--font-nav); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--orange-dark); margin-bottom: 12px; }
.doc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.doc-row:last-child { border-bottom: none; }
.doc-row__name { flex: 1; }

.offer-card { background: var(--white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 20px 22px; margin-bottom: 16px; }
.offer-card__amount { font-family: var(--font-heading); font-size: 26px; color: var(--navy); margin-bottom: 4px; }
.offer-card__meta { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.offer-card__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.offer-echanges { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 13px; color: var(--text-muted); }

.dispo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.dispo-pill { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 7px 14px; font-size: 12.5px; }

.kit-visite { background: var(--white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 22px 24px; margin-bottom: 24px; }
.kit-visite__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 700px) { .kit-visite__grid { grid-template-columns: 1fr; } }
.kit-visite__item span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; }

.simulateur { background: var(--bg); border-radius: var(--radius-card); padding: 20px 22px; margin-bottom: 16px; }
.simulateur__result { font-family: var(--font-heading); font-size: 22px; color: var(--navy); margin-top: 8px; }
