/* ImmoInterConnect — charte B2B (bleu dominant, spec Vol. 07).
 * Réutilise les tokens du panneau admin pour la cohérence de la suite.
 */
:root {
  --brand: #0B0BE2;
  --secondary: #3A5FCD;
  --success: #1BA97B;
  --accent: #00D4AA;
  --text: #0f172a;
  --muted: #797D87;
  --surface: #ffffff;
  --surface-alt: #f5f7fb;
  --border: #e5e9f2;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(15, 23, 42, .06);
  --shadow-lg: 0 18px 40px rgba(11, 11, 226, .14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: var(--surface-alt);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--secondary); }

/* ---------- Login ---------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-form-side {
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--surface);
}
.login-hero {
  background: linear-gradient(135deg, var(--brand), var(--secondary));
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-hero h2 { font-size: 2rem; margin: 12px 0; line-height: 1.2; }
.login-card { width: min(100%, 380px); }
.brand-mark { font-weight: 700; font-size: 1.1rem; }
.brand-mark b { color: var(--brand); }

/* ---------- App shell ---------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #fff; padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand-mark { color: #fff; margin-bottom: 24px; display: block; }
.sidebar .brand-mark b { color: rgba(255,255,255,.7); }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav button {
  background: transparent; border: 0; color: #fff; text-align: left;
  padding: 11px 14px; border-radius: 10px; cursor: pointer; font-weight: 500;
}
.sidebar nav button:hover { background: rgba(255,255,255,.12); }
.sidebar nav button.active { background: rgba(255,255,255,.2); }
.sidebar .foot { margin-top: 24px; font-size: .82rem; opacity: .85; }
.sidebar .logout {
  margin-top: 10px; width: 100%; background: rgba(255,255,255,.14);
  border: 0; color: #fff; padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.main { padding: 28px 32px 60px; max-width: 1200px; }

/* ---------- Composants ---------- */
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--secondary); }
h1 { font-size: 1.7rem; margin: 4px 0 6px; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
p.lead { color: var(--muted); margin: 0 0 24px; max-width: 70ch; }

.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat span { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.stat b { display: block; font-size: 1.8rem; margin-top: 4px; color: var(--brand); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }

.list-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  display: flex; justify-content: space-between; gap: 14px; margin-bottom: 10px;
  background: var(--surface); transition: transform .12s, box-shadow .12s;
}
.list-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.list-card .meta b { display: block; font-size: 1.02rem; }
.list-card .meta small { color: var(--muted); }
.list-card .price { color: var(--brand); font-weight: 700; }

.btn { background: var(--brand); color: #fff; border: 0; padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: background .15s; }
.btn:hover { background: var(--secondary); }
.btn.secondary { background: var(--surface); color: var(--brand); border: 1px solid var(--brand); }
.btn.good { background: var(--success); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border); }
.badge.ok { background: rgba(27,169,123,.12); color: var(--success); border-color: rgba(27,169,123,.3); }
.badge.warn { background: rgba(217,119,6,.12); color: var(--warning); border-color: rgba(217,119,6,.3); }
.badge.brand { background: rgba(11,11,226,.1); color: var(--brand); border-color: rgba(11,11,226,.25); }
.badge.muted { background: rgba(121,125,135,.12); color: var(--muted); }

.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.field input:focus, .field select:focus { outline: 2px solid var(--secondary); border-color: var(--secondary); }

/* Boîte "code démo" — bien visible pendant la connexion OTP en développement. */
.demo-code-box {
  margin-top: 4px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(11,11,226,.08), rgba(0,212,170,.08));
  border: 1px dashed var(--brand);
  border-radius: 10px;
  text-align: center;
}
.demo-code-box small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.demo-code-box b {
  display: block;
  font-size: 1.8rem;
  letter-spacing: .4em;
  color: var(--brand);
  font-family: "Courier New", monospace;
}
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-alt); }

.empty { color: var(--muted); font-style: italic; padding: 16px 0; text-align: center; }

.toolbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--text); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 1000; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--success); }

.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: grid; place-items: center; z-index: 999; padding: 24px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 24px; width: min(100%, 520px); box-shadow: var(--shadow-lg); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; }

/* Messagerie */
.messaging { display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: 480px; }
.conv-list { display: flex; flex-direction: column; gap: 6px; }
.conv-btn { text-align: left; background: var(--surface); border: 1px solid var(--border); padding: 12px; border-radius: 10px; cursor: pointer; }
.conv-btn.selected { border-color: var(--brand); background: rgba(11,11,226,.04); }
.thread { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.thread-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.thread-body { flex: 1; padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: var(--surface-alt); }
.bubble { padding: 10px 14px; border-radius: 12px; max-width: 75%; background: #fff; border: 1px solid var(--border); }
.bubble.mine { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); }
.thread-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.thread-form input { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }

@media (max-width: 720px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .messaging { grid-template-columns: 1fr; }
  .fav-layout, .dr-layout { grid-template-columns: 1fr !important; }
  .form-grid { grid-template-columns: 1fr !important; }
}

/* =====================================================================
 * Styles enrichis B2B (Vol. 02)
 * ===================================================================== */

/* ---------- Bannière hors-ligne ---------- */
.offline-banner {
  position: sticky; top: 0; z-index: 50;
  padding: 10px 24px; font-size: .9rem; font-weight: 500;
  text-align: center; color: #fff;
}
.offline-banner.offline { background: var(--danger); }
.offline-banner.syncing { background: var(--warning); }

/* ---------- Badges spécifiques B2B ---------- */
.badge.accent { background: rgba(0,212,170,.14); color: #00a386; border-color: rgba(0,212,170,.3); }
.badge.commission { background: rgba(27,169,123,.12); color: var(--success); border-color: rgba(27,169,123,.35); font-weight: 700; }
.badge.intl { background: linear-gradient(135deg, rgba(11,11,226,.1), rgba(58,95,205,.1)); color: var(--secondary); border-color: rgba(58,95,205,.3); }

/* ---------- Toolbar du fil ---------- */
.feed-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.seg { display: inline-flex; background: var(--surface-alt); border-radius: 10px; padding: 3px; }
.seg button { background: transparent; border: 0; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--brand); color: #fff; }
.country-input { width: 100px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; text-transform: uppercase; }
.src { margin-left: auto; color: var(--muted); font-size: .8rem; }

/* ---------- Carte publication fil ---------- */
.feed-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.feed-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feed-card-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.feed-card h3 { margin: 6px 0; font-size: 1.15rem; color: var(--text); }
.feed-desc { color: var(--muted); margin: 6px 0 10px; font-size: .92rem; }
.feed-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--text); margin-bottom: 12px; }
.feed-meta .agency-tag { margin-left: auto; color: var(--secondary); font-weight: 600; }
.feed-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.fav-btn.active { color: var(--warning); border-color: var(--warning); background: rgba(217,119,6,.08); }

/* ---------- Formulaire en grille ---------- */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.form-grid .field.full { grid-column: 1 / -1; }
.form-grid .field.actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; padding: 4px 0; }
.chk input { width: auto; }
.chk-row { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Favoris ---------- */
.fav-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
.fav-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: fit-content; }
.fav-side h3 { margin: 0 0 12px; font-size: 1rem; }
.folder-btn {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  background: transparent; border: 1px solid transparent; text-align: left;
  padding: 9px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; font-weight: 500;
}
.folder-btn:hover { background: var(--surface-alt); }
.folder-btn.active { background: rgba(11,11,226,.08); border-color: rgba(11,11,226,.2); color: var(--brand); }
.folder-btn .count { background: var(--surface-alt); padding: 1px 8px; border-radius: 999px; font-size: .78rem; color: var(--muted); }

/* ---------- Matching IA ---------- */
.match-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow);
  border-left: 5px solid var(--success);
}
.match-card.score-mid { border-left-color: var(--warning); }
.score-ring {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; color: #fff;
  background: conic-gradient(var(--success) var(--deg, 0deg), var(--surface-alt) 0);
}
.match-card.score-high .score-ring { background: conic-gradient(var(--success) var(--deg, 0deg), var(--surface-alt) 0); }
.match-card.score-mid .score-ring { background: conic-gradient(var(--warning) var(--deg, 0deg), var(--surface-alt) 0); }
.match-ring-inner { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--brand); }
.match-body { flex: 1; }
.match-body small { display: block; color: var(--muted); }
.match-reasons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Deal Rooms ---------- */
.dr-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: 480px; }
.dr-list { display: flex; flex-direction: column; gap: 6px; }
.dr-btn { text-align: left; background: var(--surface); border: 1px solid var(--border); padding: 12px; border-radius: 10px; cursor: pointer; }
.dr-btn.active { border-color: var(--brand); background: rgba(11,11,226,.04); }
.dr-thread { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding: 16px; }
.agreements-box { background: var(--surface-alt); border: 1px dashed var(--border); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.agreements-box h4 { margin: 0 0 8px; color: var(--secondary); }
.agreement-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.agreement-item.accepted { border-color: var(--success); background: rgba(27,169,123,.05); }
.agreement-item small { color: var(--muted); }
.agreement-item .badge { align-self: flex-start; }

/* ---------- Table détail ---------- */
.detail-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.detail-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.detail-table td:first-child { color: var(--muted); font-weight: 600; width: 40%; }

/* ---------- Sidebar dense (10 items) ---------- */
.sidebar nav button { font-size: .9rem; padding: 9px 12px; }

/* ---------- Cœur public + badge vidéo (fonctionnalité 3+4 B2B) ---------- */
.heart-btn { color: var(--muted); }
.heart-btn.active { color: var(--danger); border-color: var(--danger); background: rgba(220,38,38,.08); font-weight: 700; }
.heart-btn:hover { transform: scale(1.03); }

.badge.video { background: rgba(0,0,0,.75); color: #fff; border: 0; font-weight: 700; }
.badge.video::before { content: ""; }

/* ---------- Galerie médias B2B (détail) ---------- */
.b2b-media-gallery { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0; padding-bottom: 4px; }
.b2b-media { flex-shrink: 0; width: 240px; height: 150px; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.b2b-media iframe, .b2b-media video, .b2b-media img { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }

/* ===== Admission des agences (Vol. 02 §3) ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.hint { background: rgba(217,119,6,.08); border-left: 3px solid var(--warning); padding: 10px 12px; border-radius: 6px; font-size: .9rem; }
.admission-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 18px 0; flex-wrap: wrap; }
.admission-steps li { flex: 1; min-width: 170px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: .9rem; }
.admission-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--border); color: var(--muted); flex: none; }
.admission-steps li.current { border-color: var(--brand); color: var(--brand); }
.admission-steps li.current span { background: var(--brand); color: #fff; }
.admission-steps li.done { color: var(--success); }
.admission-steps li.done span { background: var(--success); color: #fff; }
.admission-status { border-left: 4px solid var(--muted); }
.admission-status.warn { border-left-color: var(--warning); }
.admission-status.danger { border-left-color: var(--danger); }
.admission-status.ok { border-left-color: var(--success); }
.admission-status h2 { margin-top: 0; }
.admission-status p { color: var(--muted); }
.admission-status .reason { color: var(--danger); }
.admission-status .sponsor { color: var(--text, inherit); }
.invite-message { margin-top: 16px; padding: 14px; border-radius: var(--radius); background: rgba(27,169,123,.06); border: 1px solid rgba(27,169,123,.25); }
.invite-message blockquote { margin: 10px 0 14px; padding: 10px 14px; background: var(--surface); border-left: 3px solid var(--success); border-radius: 6px; font-size: .92rem; }
.invite-message .btn { margin: 0 6px 6px 0; text-decoration: none; display: inline-block; }

/* ===== Annonces modifiées / statuts (Vol. 02 §6.2) ===== */
.badge.status-reserved { background: rgba(217,119,6,.12); color: var(--warning); border-color: rgba(217,119,6,.3); }
.badge.status-closed { background: rgba(27,169,123,.12); color: var(--success); border-color: rgba(27,169,123,.3); }
.badge.status-withdrawn { background: rgba(121,125,135,.12); color: var(--muted); }
.list-card.fav-changed { border-left: 4px solid var(--warning); }
.fav-change { display: block; margin-top: 6px; padding: 8px 10px; background: rgba(217,119,6,.07); border-radius: 6px; color: var(--text, inherit) !important; line-height: 1.5; }

/* ===== Import WhatsApp (Vol. 02 §4) ===== */
.wa-import { border-left: 4px solid #25D366; }
.wa-import textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; padding: 10px; font: inherit; resize: vertical; }
.wa-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.hint-soft { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.wa-summary { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: rgba(37,211,102,.08); border: 1px solid rgba(37,211,102,.3); font-size: .92rem; }
.wa-summary p { margin: 0; }
.wa-summary ul { margin: 8px 0 0; padding-left: 4px; list-style: none; color: var(--warning); }
.auto-filled { background: rgba(37,211,102,.10) !important; border-color: rgba(37,211,102,.6) !important; }

/* ===== Pièces jointes (Vol. 02 §8) ===== */
.composer-row { display: flex; gap: 8px; align-items: center; }
.composer-row input { flex: 1; min-width: 0; }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 1.1rem; }
.icon-btn:hover { border-color: var(--brand); }
.icon-btn.recording { width: auto; padding: 0 10px; background: var(--danger); color: #fff; border-color: var(--danger); font-size: .85rem; font-weight: 700; animation: rec-pulse 1.2s infinite; }
@keyframes rec-pulse { 50% { opacity: .75; } }
.composer-pending { display: flex; flex-wrap: wrap; gap: 6px; }
.composer-pending:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--border); font-size: .82rem; }
.chip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.attachments { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.att { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.att-pdf { cursor: pointer; padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.06); }
.bubble.mine .att-pdf { background: rgba(255,255,255,.18); }
.att-pdf small { opacity: .75; }
.att-image { cursor: zoom-in; }
.att-image img { display: block; max-width: min(260px, 100%); max-height: 220px; border-radius: 8px; }
.att-loading { display: grid; place-items: center; width: 120px; height: 80px; border-radius: 8px; background: rgba(0,0,0,.06); }
.att-audio audio { max-width: 240px; height: 36px; }
.att-error { opacity: .75; font-style: italic; }

/* ===== Choix du destinataire (messagerie) ===== */
.agency-picker { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 240px; overflow-y: auto; }
.agency-option { text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; }
.agency-option b { color: var(--brand); }
.agency-option small { color: var(--muted); margin-left: 6px; }
.agency-option.selected { border-color: var(--brand); background: rgba(11,11,226,.06); }
.conv-subject { color: var(--muted); }

/* ===== Vidéos (1 minute maximum) ===== */
.att-video video { display: block; max-width: min(300px, 100%); max-height: 260px; border-radius: 8px; background: #000; }
.video-recorder video { width: 100%; max-height: 50vh; border-radius: 10px; background: #000; object-fit: cover; }
.vr-timer { text-align: center; font-weight: 700; margin: 10px 0; color: var(--danger); font-variant-numeric: tabular-nums; }

/* ===== Envoi d'une sélection au client (Vol. 02 §6.2) ===== */
.export-panel { border-left: 4px solid var(--brand); }
.export-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.export-actions .btn:disabled { opacity: .45; cursor: not-allowed; }
.fav-pick { display: flex; align-items: center; padding-right: 10px; }
.fav-pick input { width: 20px; height: 20px; accent-color: var(--brand); }
.fav-pick input:disabled { opacity: .35; }

/* ===== Mes identifiants de connexion (e-mail + téléphone vérifiés) ===== */
.identity-panel h3 { margin: 0 0 6px; }
.identity-panel .muted, .identity-panel .id-label { color: var(--muted); }
.identity-box { margin-top: 18px; }
.id-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.id-label { min-width: 110px; font-weight: 600; }
.id-value { flex: 1; min-width: 180px; }
.id-form { margin-top: 12px; }
.id-form > label { display: block; font-weight: 600; margin-bottom: 6px; }
.id-inputs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.id-inputs input, .id-inputs select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.id-inputs input { flex: 1; min-width: 180px; }

/* ===== Mes publications ===== */
.mine-item { margin-bottom: 18px; }
.mine-item.withdrawn { opacity: .6; }
.mine-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px 4px; }

/* Publier : boutons National / International à droite du titre. */
.publish-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.publish-head .publish-scope { margin-top: 26px; flex-shrink: 0; }
@media (max-width: 640px) { .publish-head .publish-scope { margin-top: 0; } }

/* Publier : type de publication et photos / vidéo de l'annonce. */
.pub-kind { flex-wrap: wrap; }
.media-upload { display: flex; gap: 8px; flex-wrap: wrap; }
.media-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.media-thumb { position: relative; width: 96px; height: 72px; margin: 0; border-radius: 8px; overflow: hidden; background: var(--surface-alt); }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: .75rem; line-height: 22px; padding: 0; }
.media-badge { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; padding: 1px 5px; border-radius: 4px; }
.media-link { margin-top: 8px; }
.media-link summary { cursor: pointer; color: var(--muted); font-size: .86rem; margin-bottom: 6px; }

.feed-photos { display: flex; gap: 6px; margin: 8px 0; cursor: pointer; }
.feed-photo { position: relative; width: 120px; height: 86px; border-radius: 8px; overflow: hidden; background: var(--surface-alt); flex-shrink: 0; }
.feed-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-photo b { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; font-size: 1.1rem; }
@media (max-width: 640px) { .feed-photo { width: 25%; height: 64px; } }

/* Fil : Tout / Offres / Recherches. */
.feed-kind { margin: 0 0 14px; flex-wrap: wrap; }

/* Fil international : liste des pays. */
.country-select { min-width: 200px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font: inherit; }

/* Résultat de la multidiffusion. */
.diffusion-results { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.diffusion-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.diffusion-row small { color: var(--muted); }
.diffusion-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Vidéos : entières (pas rognées) et jouables directement dans le fil. */
.b2b-media video, .b2b-media iframe { object-fit: contain; }
.b2b-media:has(video), .b2b-media:has(iframe) { width: 300px; height: 300px; }
.feed-video { width: 220px; height: 220px; border-radius: 8px; overflow: hidden; background: #000; flex-shrink: 0; }
.feed-video video, .feed-video iframe { width: 100%; height: 100%; border: 0; object-fit: contain; display: block; }

/* Tableau de bord : accès à Immocilia et réservations. */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.stat.stat-link { cursor: pointer; border-color: var(--accent); }
.nav-external { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 10px; color: #fff; text-decoration: none; font-weight: 600; background: rgba(255,255,255,.14); }
.nav-external:hover { background: rgba(255,255,255,.24); }

/* Annonce en ligne sur Immocilia ; suppression. */
.badge.online { background: rgba(27,169,123,.14); color: #138a63; border-color: rgba(27,169,123,.35); font-weight: 700; }
.btn.danger-ghost { background: transparent; color: var(--danger, #e53935); border: 1px solid var(--danger, #e53935); }
.btn.danger-ghost:hover { background: rgba(229,57,53,.08); }
.delete-public { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; }

/* Mises en avant (boost). */
.badge.boost { background: rgba(0,212,170,.16); color: #078a70; border-color: rgba(0,212,170,.4); font-weight: 700; }
.btn.accent { background: #00D4AA; color: #fff; }
.boost-options { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.boost-option { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.boost-option small { display: block; color: var(--muted); }
.boost-option:has(input:disabled) { opacity: .5; }
.boost-price { color: var(--brand); white-space: nowrap; }

/* Bannière publicitaire en tête du fil. */
.ad-b2b { position: relative; height: clamp(110px, 16vw, 190px); border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: #0b0b2a; }
.ad-b2b a { display: block; height: 100%; }
.ad-b2b img, .ad-b2b video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-b2b-text { display: grid; place-items: center; height: 100%; color: #fff; font-weight: 800; font-size: 1.3rem; }
.ad-b2b-label { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; padding: 2px 8px; border-radius: 999px; }
.ad-b2b-popup .ad-b2b { height: auto; aspect-ratio: 16 / 9; margin-top: 8px; }

/* Bannières publicitaires défilantes (identiques à Immocilia) */
.banner-carousel { position: relative; height: clamp(140px, 22vw, 260px); border-radius: 14px; overflow: hidden; background: #0b0b2a; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(8,17,31,.12); }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; pointer-events: none; }
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-slide a { display: block; width: 100%; height: 100%; color: inherit; }
.banner-slide img, .banner-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-text { display: grid; place-items: center; height: 100%; color: #fff; font-size: 1.5rem; font-weight: 800; padding: 20px; text-align: center; background: linear-gradient(135deg, #0B0BE2, #1BA97B); }
.banner-label { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; padding: 3px 8px; border-radius: 999px; }
.banner-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.banner-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.banner-dots button.active { background: #fff; width: 22px; border-radius: 6px; }

/* Notification qui mène à un écran (message client, conversation, salle…) */
.list-card.notif-link { cursor: pointer; transition: background .15s; }
.list-card.notif-link:hover { background: rgba(11, 11, 226, .05); }
.notif-open { color: var(--brand, #0B0BE2); font-weight: 600; }

.nav-badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: #E53935; color: #fff; font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; }

/* Messages vocaux : niveau du micro, suppression */
.voice-level { width: 60px; height: 8px; border-radius: 4px; background: rgba(0,0,0,.1); overflow: hidden; vertical-align: middle; margin: 0 6px; }
.voice-level span { display: block; height: 100%; width: 0; background: #1BA97B; transition: width .08s; }
.att-audio-row { display: inline-flex; align-items: center; gap: 6px; }
.att-del { border: 0; background: rgba(0,0,0,.08); border-radius: 8px; cursor: pointer; padding: 4px 7px; font-size: .9rem; }
.att-del:hover { background: rgba(229,57,53,.18); }
.att-removed { display: block; font-size: .8rem; opacity: .7; font-style: italic; }

/* Annonce partagée dans une discussion client, choix du client */
.chat-listing { display: flex; gap: 10px; margin: 6px 0; background: #fff; color: #1d2433; border: 1px solid var(--border, #e5e9f2); border-radius: 10px; overflow: hidden; max-width: 340px; text-align: left; }
.chat-listing-photo { width: 90px; min-height: 76px; background: #0B0BE2 center / cover no-repeat; flex-shrink: 0; }
.chat-listing-body { display: flex; flex-direction: column; gap: 3px; padding: 8px 8px 8px 0; }
.chat-listing-body small { color: #797D87; }
.send-client-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

/* Nom de l'application dans le menu : Mandalia et sa devise. */
.sidebar .app-brand { display: block; margin-bottom: 22px; color: #fff; line-height: 1.2; }
.sidebar .app-brand b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: .01em; }
.sidebar .app-brand small { display: block; margin-top: 4px; font-size: .74rem; opacity: .8; }

/* ---------- À la une ---------- */
.badge.une { background: #FFF4D6; color: #8A5A00; border: 1px solid #F5C451; font-weight: 800; }
.feed-card.is-une { border: 2px solid #F5C451; box-shadow: 0 8px 24px rgba(245, 196, 81, .25); }
.btn.une-btn { background: #FFF4D6; color: #8A5A00; border: 1px solid #F5C451; }
.btn.une-btn:hover { background: #FBE7A8; }
.une-field { border: 1px dashed #F5C451; border-radius: 12px; padding: 12px 14px; background: #FFFBEF; }
.une-row { display: grid; gap: 6px; margin: 10px 0; }
.une-row > label { font-weight: 700; font-size: .9rem; }
.une-apps { display: flex; flex-wrap: wrap; gap: 8px 16px; }
