:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --primary: #2f6feb;
  --primary-dark: #1e4fb8;
  --danger: #d23a3a;
  --ok: #2f9e44;
  --warn: #e08e0b;
  --neutral: #9ca3af;
  --border: #e3e6ec;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

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

.hidden { display: none !important; }

button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
}
button:hover { background: var(--primary-dark); }
button:disabled { opacity: 0.6; cursor: wait; }

button.link {
  background: none;
  color: var(--primary);
  padding: 0;
  font-weight: 400;
}
button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
button.ghost:hover { background: var(--bg); }
button.small { padding: 4px 10px; font-size: 12px; }
button.danger { background: var(--danger); }
button.danger:hover { background: #a82828; }

input, select, textarea {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* ── Header / nav ────────────────────────────────────────────── */
header.app-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
nav.main-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
nav.main-nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 5px;
  font-weight: 500;
}
nav.main-nav a:hover { background: var(--bg); text-decoration: none; color: var(--text); }
nav.main-nav a.active { background: var(--bg); color: var(--text); }
#user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  font-weight: 500;
}

/* ── Login ────────────────────────────────────────────────────── */
#login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.card {
  background: var(--card);
  border-radius: 8px;
  padding: 32px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 360px;
}
.card h1 { margin: 0 0 4px; font-size: 24px; }
.subtitle { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
form.stack label { display: block; margin-bottom: 14px; font-weight: 500; }
form.stack input { display: block; width: 100%; margin-top: 4px; }
form.stack button[type="submit"] { width: 100%; margin-top: 8px; padding: 10px; }
.error {
  color: var(--danger);
  margin-top: 12px;
  font-size: 13px;
}

/* ── Page wrapper ─────────────────────────────────────────────── */
main.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 20px;
}
h2.page-title { margin: 0 0 14px; font-size: 18px; font-weight: 600; }

/* ── KPIs ─────────────────────────────────────────────────────── */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.kpi-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.kpi-value { display: block; font-size: 24px; font-weight: 700; margin-top: 4px; }
.kpi.high .kpi-value { color: var(--ok); }
.kpi.mid  .kpi-value { color: var(--warn); }

/* ── Filter bar ───────────────────────────────────────────────── */
.filter-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-bar label {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-bar input[type="range"] { width: 100px; }
.filter-bar .spacer { flex: 1; }

/* ── Two-col layout ───────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 14px;
}
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.panel-head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-body { padding: 0; }
.panel-body.padded { padding: 12px; }

/* ── Map ──────────────────────────────────────────────────────── */
.map-container {
  height: 540px;
  width: 100%;
}
.map-container.full { height: calc(100vh - 130px); }

/* ── Tables ───────────────────────────────────────────────────── */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th, table.data td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data thead th {
  background: var(--bg);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data tbody tr:hover { background: #fafbfd; }
.row-actions { display: flex; gap: 4px; }

/* score chips */
.chip-score {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.chip-score.score-high { background: #d8f0dc; color: var(--ok); }
.chip-score.score-mid  { background: #fde9c8; color: var(--warn); }
.chip-score.score-low  { background: #e3e6ec; color: var(--muted); }
.chip-score.score-unknown { background: #e3e6ec; color: var(--muted); }

/* status chips */
.chip-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.chip-status.status-nouveau { background: #dbeafe; color: var(--primary-dark); }
.chip-status.status-envoye  { background: #fde9c8; color: var(--warn); }
.chip-status.status-archive { background: #e3e6ec; color: var(--muted); }
.chip-status.status-ok      { background: #d8f0dc; color: var(--ok); }
.chip-status.status-running { background: #dbeafe; color: var(--primary-dark); }
.chip-status.status-erreur  { background: #fbd6d6; color: var(--danger); }

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* ── Zones page sidebar ───────────────────────────────────────── */
.zones-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  height: calc(100vh - 130px);
}
@media (max-width: 800px) { .zones-layout { grid-template-columns: 1fr; height: auto; } }

.zone-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.zone-card.inactive { opacity: 0.55; }
.zone-card .zone-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.zone-card .zone-name { font-weight: 600; flex: 1; }
.zone-card .zone-meta {
  color: var(--muted);
  font-size: 12px;
}
.zone-card .zone-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* ── Status pill misc ─────────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.pill.ok { background: #d8f0dc; color: var(--ok); }
.pill.warn { background: #fde9c8; color: var(--warn); }
.pill.err { background: #fbd6d6; color: var(--danger); }
.pill.muted { background: #e3e6ec; color: var(--muted); }

/* ── Notif filter buttons ─────────────────────────────────────── */
button.ghost.notif-filter.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* type chips for notifications */
.chip-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.chip-type.type-email { background: #dbeafe; color: var(--primary-dark); }
.chip-type.type-slack { background: #f1e2fc; color: #7e22ce; }

/* ── Modal ────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.modal-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-meta {
  padding: 8px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.modal-body {
  padding: 16px;
  overflow: auto;
  flex: 1;
  font-size: 13px;
}
.modal-body iframe {
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 100%;
  min-height: 360px;
  background: #fff;
}
.modal-body pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  padding: 12px;
  border-radius: 5px;
  margin: 0;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 13px;
}

/* ── Test page ───────────────────────────────────────────────── */
main.test-page { max-width: none; padding: 18px 24px; }

.test-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.test-target {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}
.test-secteur {
  font-weight: 700;
  font-size: 18px;
}
.test-sources {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.source-btn {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  font-size: 13px;
}
.source-btn:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}
.source-btn.running {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.source-btn:disabled { cursor: wait; }

.test-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  height: calc(100vh - 230px);
  min-height: 380px;
}
@media (max-width: 980px) {
  .test-split { grid-template-columns: 1fr; height: auto; }
}
.test-split .panel { display: flex; flex-direction: column; }
.test-split .panel-body { flex: 1; padding: 0; overflow: auto; }
.test-pane {
  margin: 0;
  padding: 12px 14px;
  font-family: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  min-height: 100%;
}

/* ── Toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--text);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 5000;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.err  { background: var(--danger); }
.toast.ok   { background: var(--ok); }

/* ── Loader ───────────────────────────────────────────────────── */
#loading-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader { color: var(--muted); }

/* ── Footer ───────────────────────────────────────────────────── */
footer.app-footer {
  max-width: 1400px;
  margin: 24px auto 0;
  padding: 14px 20px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

/* ── Page détail opportunité ──────────────────────────────────── */
.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}
.back-link:hover { color: var(--primary); }

.detail-header {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.detail-header .who { flex: 1; min-width: 240px; }
.detail-header .who h1 {
  margin: 0;
  font-size: 18px;
}
.detail-header .who .sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.detail-header .big-score {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}
.detail-header .big-score.score-high { background: #d8f0dc; color: var(--ok); }
.detail-header .big-score.score-mid  { background: #fde9c8; color: var(--warn); }
.detail-header .big-score.score-low  { background: #e3e6ec; color: var(--muted); }

.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-section { margin-bottom: 14px; }
.detail-section .panel-body.padded { padding: 14px 16px; }

/* Décomposition du score */
.score-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 10px;
}
@media (max-width: 700px) { .score-cards { grid-template-columns: 1fr; } }
.score-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  background: #fafbfd;
}
.score-card .sc-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.score-card .sc-points {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}
.score-card .sc-points .sc-max {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.score-card .sc-bar {
  height: 6px;
  background: #e3e6ec;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.score-card .sc-bar > div {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}
.score-card .sc-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.score-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 13px;
}
.score-total strong { font-size: 16px; }

/* Liste clé/valeur */
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  font-size: 13px;
}
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }

/* Extrait d'avis */
.source-extract {
  border-left: 3px solid var(--border);
  padding: 8px 12px;
  margin: 10px 0 0;
  color: var(--text);
  font-size: 13px;
  background: var(--bg);
  border-radius: 0 4px 4px 0;
  white-space: pre-wrap;
}

/* Mini-map détail */
.detail-map {
  height: 280px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 10px;
}

/* RGPD card */
.rgpd-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.rgpd-note p { margin: 0 0 6px; }

/* ── Mention de fraicheur des donnees ─────────────────────────
   Affichee sans detour : le service ne s'appuie que sur le fichier
   des deces de l'INSEE, publie mensuellement. Annoncer le decalage
   vaut mieux que de laisser croire a une veille temps reel. */
.source-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 20px;
  padding: 12px 14px;
  background: #fdf6e7;
  border: 1px solid var(--warn);
  border-left-width: 4px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}
.source-note .source-note-icon { flex: 0 0 auto; font-size: 15px; line-height: 1.3; }
.source-note p { margin: 0; }
.source-note strong { font-weight: 700; }

/* ── Toggle produit ───────────────────────────────────────────── */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.produit-toggle {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  box-shadow: var(--shadow);
}
.produit-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.produit-toggle button:hover { color: var(--text); }
.produit-toggle button.active { background: var(--primary); color: #fff; }

/* ── Statuts veille immo ──────────────────────────────────────── */
.chip-status.status-vu       { background: #e0e7ff; color: #3730a3; }
.chip-status.status-contacte { background: #fde9c8; color: var(--warn); }
.chip-status.status-visite   { background: #fef3c7; color: #92400e; }
.chip-status.status-offre    { background: #ddd6fe; color: #5b21b6; }
.chip-status.status-signe    { background: #d8f0dc; color: var(--ok); }
.chip-status.status-perdu    { background: #fbd6d6; color: var(--danger); }

/* ── Lignes cliquables (annonces) ─────────────────────────────── */
tr.row-clickable { cursor: pointer; }
tr.row-clickable:hover { background: var(--bg); }

/* ── Marqueur annonce (losange) ───────────────────────────────── */
.immo-marker { background: transparent; border: 0; }
.immo-diamond {
  display: block;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}

/* Marqueur veille BODACC : carré (distinct du losange immo / cercle succession) */
.bodacc-marker { background: transparent; border: 0; }
.bodacc-square {
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}

/* Contrôle de calques (carte fiche) : opacité + ordre */
.map-layers {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,.2);
  padding: 8px 10px;
  width: 190px;
  font-size: 12px;
  color: var(--text);
}
.map-layers .ml-title {
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.map-layers .ml-min {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 4px;
  width: 20px; height: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
}
/* Iconisation : bouton icône (visible replié) + masquage du contenu */
.map-layers .ml-icon {
  display: none;
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}
.map-layers.collapsed { width: auto; padding: 3px; }
.map-layers.collapsed .ml-content { display: none; }
.map-layers.collapsed .ml-icon { display: block; }
.map-layers .ml-row { padding: 5px 0; border-top: 1px solid var(--border); }
.map-layers .ml-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.map-layers .ml-head label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.map-layers .ml-ord button {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 4px;
  width: 20px; height: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  font-size: 10px;
}
.map-layers .ml-ord button:disabled { opacity: .35; cursor: default; }
.map-layers .ml-op { width: 100%; margin-top: 5px; accent-color: var(--primary); cursor: pointer; }

/* Bouton plein écran (style aligné sur les contrôles Leaflet) */
.map-fs a { font-size: 16px; font-weight: 700; line-height: 26px; text-align: center; }
/* Carte en plein écran : occupe tout l'écran */
.leaflet-container:fullscreen,
.leaflet-container:-webkit-full-screen { width: 100% !important; height: 100% !important; }

/* Badges produit (boutons sources / lignes supervision) */
.src-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: middle;
  color: #fff;
  background: #6b7280;
}
.src-badge.src-succession   { background: #2f6feb; }
.src-badge.src-veille_immo  { background: #0ea5a4; }
.src-badge.src-veille_bodacc{ background: #7b3fe4; }
.src-badge.src-transverse   { background: #9aa3b2; }

/* Prise en charge : badge de propriété */
.owner-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #9aa3b2;          /* pris par un autre */
  vertical-align: middle;
}
.owner-badge.me { background: #2f9e44; }   /* à vous */
button.prise { white-space: nowrap; }

/* Formulaire en ligne (gestion des comptes) */
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; min-width: 150px; }
.badge.role-admin            { background: #7b3fe4; }
.badge.role-admin_entreprise { background: #2f6feb; }
.badge.role-agent            { background: #0ea5a4; }

/* Comptes de démo sur l'écran de connexion (dev) */
.demo-creds {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  text-align: left;
}
.demo-creds .demo-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px; }
.demo-creds ul { list-style: none; margin: 0; padding: 0; }
.demo-creds li {
  display: flex; flex-direction: column;
  padding: 7px 10px; margin-bottom: 6px;
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: background .12s, border-color .12s;
}
.demo-creds li:hover { background: var(--bg); border-color: var(--primary); }
.demo-creds li strong { font-size: 13px; }
.demo-creds li span { font-size: 12px; color: var(--muted); font-family: monospace; }
.demo-creds .demo-hint { font-size: 11px; color: var(--muted); margin: 4px 0 0; font-style: italic; }
.demo-video-link {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 9px 12px;
  background: var(--primary);
  color: #fff;
  border: 0; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.demo-video-link:hover { background: var(--primary-dark); }

/* Modal lecteur vidéo */
.video-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.video-modal.hidden { display: none; }
.video-box { position: relative; width: min(1100px, 96vw); }
.video-box video { width: 100%; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.5); display: block; background: #000; }
.video-close {
  position: absolute; top: -14px; right: -14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: #111; border: 0;
  font-size: 16px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* ── Fiche annonce (modal) ────────────────────────────────────── */
.fiche-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.fiche-overlay.hidden { display: none; }
.fiche-card {
  position: relative;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
}
.fiche-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.fiche-close:hover { color: var(--text); }
.fiche-title { margin: 0 28px 8px 0; font-size: 18px; }
.fiche-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.fiche-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.fiche-photos img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg);
}
.fiche-nophoto {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}
.fiche-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin: 0 0 18px;
}
.fiche-grid dt { color: var(--muted); font-size: 12px; }
.fiche-grid dd { margin: 2px 0 0; font-weight: 600; }
.fiche-link {
  display: inline-block;
  padding: 9px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.fiche-link:hover { background: var(--primary-dark); }
