body.admin { background: #eef2f7; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; text-align: center; }
.login .card img { margin: 0 auto 12px; }
.login .field { text-align: left; }

.a-top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.a-top-in { max-width: 1400px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.a-top .brand { color: #fff; }
.a-top .brand small { color: #9fb8d3; display: inline; margin-left: 4px; font-weight: 500; }
.a-top .brand-mark { background: transparent; }
.a-tabs { display: flex; gap: 4px; flex: 1; }
.a-tabs button { background: transparent; border: 0; color: #b9cde3; font: inherit; font-weight: 700; padding: 10px 14px; border-radius: 8px; cursor: pointer; }
.a-tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.a-actions { display: flex; gap: 8px; }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .3); }
.badge { background: var(--hot); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; margin-left: 4px; }
@media (max-width: 760px) {
  .a-top .brand small { display: none; }
  .a-tabs { order: 3; flex-basis: 100%; overflow-x: auto; }
  .a-actions { margin-left: auto; }
}

.a-main { max-width: 1400px; margin: 0 auto; padding: 16px; }
.integration-warn { background: #fff4e0; color: #7a4a00; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: .9rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .n { font-size: 1.7rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .85rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { flex: 1 1 260px; width: auto; }
.filters select { width: auto; flex: 0 1 220px; }

.lead-layout { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.lead-list { display: grid; gap: 8px; max-height: calc(100vh - 260px); overflow-y: auto; padding-right: 2px; }
.lead-detail { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 400px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.lead-detail .empty { padding: 60px 20px; text-align: center; color: var(--muted); }
@media (max-width: 960px) {
  .lead-layout { grid-template-columns: 1fr; }
  .lead-list { max-height: none; }
  .lead-detail { position: fixed; inset: 0; z-index: 40; border-radius: 0; max-height: none; top: 0; }
  .lead-detail.closed { display: none; }
}

.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; }
.lead-card:hover { border-color: #9fb8d3; }
.lead-card.active { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue) inset; }
.lead-card.fresh { animation: pulse 1.2s ease-in-out 3; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(214, 69, 27, .35); } }
.score { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; line-height: 1; }
.score small { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; margin-top: 2px; }
.score.chaud { background: #fde6dd; color: #a8320f; }
.score.tiede { background: #fff1d1; color: #8a5a00; }
.score.froid { background: #e2ecf7; color: #2b5582; }
.lead-card .name { font-weight: 700; color: var(--navy); }
.lead-card .meta { font-size: .84rem; color: var(--muted); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--ice); color: var(--navy); margin-right: 4px; }
.pill.nouveau { background: #fde6dd; color: #a8320f; }

.d-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.d-head h2 { margin: 0; font-size: 1.35rem; }
.d-back { display: none; }
@media (max-width: 960px) { .d-back { display: inline-flex; } }
.d-body { padding: 18px 20px; display: grid; gap: 20px; }
.d-contact { display: flex; gap: 8px; flex-wrap: wrap; }
.d-section h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; }
.kv div { font-size: .92rem; }
.kv span { display: block; color: var(--muted); font-size: .78rem; }
.reasons { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.reasons li { background: var(--ice); border-radius: 999px; padding: 3px 10px; font-size: .82rem; }
.reasons li b { color: var(--blue); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; }
.gallery img { width: 100%; height: 140px; object-fit: cover; background: var(--ice); }
.gallery figcaption { padding: 8px 10px; font-size: .82rem; }
.gallery figcaption b { display: block; color: var(--navy); }
.d-manage { background: var(--bg); border-radius: 12px; padding: 16px; }
.events { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.events li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.events time { color: var(--muted); margin-right: 8px; }

.viewer { position: fixed; inset: 0; background: rgba(5, 15, 28, .92); z-index: 60; display: grid; place-items: center; padding: 50px 16px; }
.viewer img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; }
.viewer-close { position: absolute; top: 12px; right: 12px; background: #fff; border: 0; border-radius: 50%; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; }
.viewer-cap { color: #fff; text-align: center; max-width: 700px; margin-top: 10px; }

.toast-zone { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 10px; z-index: 70; max-width: calc(100vw - 32px); width: 380px; }
.toast { background: var(--navy); color: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); cursor: pointer; animation: slidein .25s ease-out; }
.toast.chaud { background: #a8320f; }
.toast b { display: block; font-size: 1.02rem; }
@keyframes slidein { from { transform: translateY(20px); opacity: 0; } }

.p-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.p-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px; }
.p-table td { padding: 6px; border-top: 1px solid var(--line); vertical-align: top; }
.p-table input, .p-table textarea { font-size: 14px; padding: 8px; }
.p-table textarea { min-height: 40px; }
@media (max-width: 860px) {
  .p-table thead { display: none; }
  .p-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
  .p-table td { border: 0; padding: 0; }
  .p-table td.wide { grid-column: 1 / -1; }
}

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-grid h2 { font-size: 1.15rem; }
.settings-save { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
@media (max-width: 860px) { .settings-grid { grid-template-columns: 1fr; } }
section.tab-panel { padding: 0; }
