/* Provia — feuille de style unique.
   Conçue pour un artisan qui consulte depuis son téléphone, souvent dehors :
   contrastes élevés, cibles tactiles larges, pas d'effet superflu. */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --border: #e2e8f2;
  --border-strong: #cbd5e6;
  --text: #131a26;
  --text-soft: #5b6980;
  --text-faint: #8b97ab;
  --brand: #1f5fd0;
  --brand-dark: #1748a8;
  --brand-soft: #eaf1fd;
  --hot: #c2410c;
  --hot-bg: #fff1e8;
  --warm: #a16207;
  --warm-bg: #fdf5e3;
  --cold: #475569;
  --cold-bg: #eef1f6;
  --ok: #0f7a4f;
  --ok-bg: #e7f6ee;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 4px 16px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--brand); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }

.muted { color: var(--text-soft); }
.faint { color: var(--text-faint); font-size: 13px; }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; } .mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; }
.mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }

/* ---------------------------------------------------------------- Layout */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: #101828;
  color: #fff;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px; min-height: 56px;
  min-width: 0;
}
.brand {
  font-weight: 700; font-size: 17px; color: #fff; text-decoration: none;
  letter-spacing: -.02em; margin-right: 8px; display: flex; align-items: center; gap: 8px;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--brand);
  display: grid; place-items: center; font-size: 14px;
}
/* min-width:0 est INDISPENSABLE : sans lui, un enfant flex garde
   min-width:auto et refuse de rétrécir sous la largeur de son contenu.
   L'overflow-x ne s'active alors jamais, et la barre de menu élargit toute
   la page sur un téléphone — les cartes suivent et débordent à leur tour. */
.nav { display: flex; gap: 2px; flex: 1; min-width: 0;
       overflow-x: auto; -webkit-overflow-scrolling: touch;
       scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: #c5cede; text-decoration: none; padding: 8px 12px; border-radius: 7px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .14); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-right .who { font-size: 13px; color: #97a3b8; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bandeau de configuration : volontairement voyant. Une mauvaise adresse
   publique casse tous les liens des emails sans aucun autre signe visible. */
.config-banner {
  background: #7a2016; color: #fff; padding: 11px 16px; font-size: 14px;
  line-height: 1.45; text-align: center;
}
.config-banner strong { font-weight: 700; }

.container { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; width: 100%; }
.container-narrow { max-width: 620px; }

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

/* ----------------------------------------------------------------- Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-head h2, .card-head h3 { margin: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; align-items: start; }
/* Même piège que pour la barre de menu : un enfant de grille garde
   min-width:auto et refuse de descendre sous la largeur de son contenu.
   Un seul texte insécable suffit alors à élargir la colonne, puis la page
   entière sur un téléphone. On l'autorise explicitement à rétrécir. */
.split > *, .grid > * { min-width: 0; }

/* ----------------------------------------------------------------- Stats */
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow);
}
.stat .label { font-size: 12.5px; color: var(--text-soft); font-weight: 500;
  text-transform: uppercase; letter-spacing: .03em; }
.stat .value { font-size: 27px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.stat .hint { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.stat.alert { border-color: #f5c0b6; background: var(--danger-bg); }
.stat.alert .value { color: var(--danger); }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 14.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; line-height: 1.2; min-height: 40px;
  font-family: inherit; transition: background .12s, border-color .12s;
}
.btn:hover { background: #f7f9fc; border-color: #b6c2d8; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { color: var(--danger); border-color: #f0bab4; background: #fff; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 6px 11px; min-height: 32px; font-size: 13.5px; }
.btn-lg { padding: 14px 24px; min-height: 50px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #eef2f8; border-color: transparent; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 20px; font-size: 12.5px; font-weight: 650; white-space: nowrap;
  border: 1px solid transparent;
}
.badge-chaud { background: var(--hot-bg); color: var(--hot); border-color: #f7cdb5; }
.badge-tiede { background: var(--warm-bg); color: var(--warm); border-color: #efdcae; }
.badge-froid { background: var(--cold-bg); color: var(--cold); border-color: #d6dde8; }
.badge-a_traiter { background: var(--cold-bg); color: var(--cold); }

.status {
  display: inline-flex; padding: 3px 9px; border-radius: 6px; font-size: 12.5px;
  font-weight: 600; border: 1px solid var(--border-strong); background: #f4f6fa;
  color: var(--text-soft); white-space: nowrap;
}
.status-nouveau { background: var(--brand-soft); color: var(--brand-dark); border-color: #bed4f8; }
.status-qualifie { background: #eef6ff; color: #1a63b8; border-color: #c3ddfa; }
.status-rdv { background: #f2eefe; color: #6633cc; border-color: #d9ccf7; }
.status-devis_envoye { background: var(--warm-bg); color: var(--warm); border-color: #efdcae; }
.status-gagne { background: var(--ok-bg); color: var(--ok); border-color: #b3e0c8; }
.status-perdu { background: #f3f4f6; color: #6b7280; border-color: #dfe3e9; }

/* ----------------------------------------------------------------- Lists */
.lead-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border-bottom: 1px solid var(--border); text-decoration: none; color: inherit;
}
.lead-row:last-child { border-bottom: 0; }
.lead-row:hover { background: #f8fafd; }
.lead-main { flex: 1; min-width: 0; }
.lead-name { font-weight: 650; font-size: 15px; }
.lead-sub {
  font-size: 13px; color: var(--text-soft); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lead-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.score-dot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; flex-shrink: 0; border: 2px solid;
}
.score-dot.chaud { background: var(--hot-bg); color: var(--hot); border-color: #f0b493; }
.score-dot.tiede { background: var(--warm-bg); color: var(--warm); border-color: #e6cf95; }
.score-dot.froid { background: var(--cold-bg); color: var(--cold); border-color: #ccd5e2; }

/* Ligne signalée : une décision est attendue de l'artisan. */
.lead-row.flagged { background: #fffaf6; border-left: 3px solid var(--hot); }
.lead-row.flagged:hover { background: #fff5ee; }
.flag-tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--hot); background: var(--hot-bg);
  border: 1px solid #f0c4a8; border-radius: 3px; padding: 1px 6px;
  margin-left: 6px; vertical-align: middle;
}

/* Bloc « ce que le logiciel a fait » : c'est ce qui justifie l'abonnement,
   l'artisan doit voir le travail qu'il n'a pas eu à faire. */
.card.worked { background: linear-gradient(180deg, #f4f9f6, #fff); border-color: #cfe6db; }
.worked-list { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.worked-list li {
  padding: 7px 0 7px 22px; position: relative; border-bottom: 1px solid var(--border);
  line-height: 1.4;
}
.worked-list li:last-child { border-bottom: none; }
.worked-list li::before {
  content: "✓"; position: absolute; left: 0; top: 7px; color: var(--ok); font-weight: 700;
}
.worked-list b { font-size: 16px; }

.empty { padding: 40px 20px; text-align: center; color: var(--text-soft); }
.empty-icon { font-size: 30px; opacity: .35; margin-bottom: 8px; }

/* ---------------------------------------------------------------- Kanban */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr));
  gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: #eef1f6; border-radius: var(--radius); padding: 10px; min-height: 120px; }
.kanban-col h3 {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-soft); margin: 2px 4px 10px; display: flex;
  justify-content: space-between; align-items: center;
}
.kanban-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 11px; margin-bottom: 8px; text-decoration: none; color: inherit;
  display: block; box-shadow: var(--shadow);
}
.kanban-card:hover { border-color: var(--border-strong); }
.kanban-card .n { font-weight: 650; font-size: 14px; }
.kanban-card .s { font-size: 12.5px; color: var(--text-soft); margin-top: 3px; }

/* ----------------------------------------------------------------- Forms */
.field { margin-bottom: 16px; }
.field label, .label {
  display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text);
}
.field .help { font-size: 13px; color: var(--text-soft); margin: -2px 0 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 11px 12px; font-size: 16px; /* 16px : évite le zoom auto iOS */
  border: 1px solid var(--border-strong); border-radius: 8px; background: #fff;
  color: var(--text); font-family: inherit; line-height: 1.4;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 95, 208, .13);
}
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image:
  url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%235b6980' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px;
  line-height: 1.45; cursor: pointer; }
.check input { width: 19px; height: 19px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--brand); }

.radio-cards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.radio-card {
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 11px 13px;
  cursor: pointer; background: #fff; font-size: 14.5px; display: flex; gap: 9px;
  align-items: center; line-height: 1.35;
}
.radio-card input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); flex-shrink: 0; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.alert-box {
  padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px;
  border: 1px solid; line-height: 1.5;
}
.alert-error { background: var(--danger-bg); border-color: #f2c0ba; color: #8f1d15; }
.alert-ok { background: var(--ok-bg); border-color: #b0dcc6; color: #0b5c3b; }
.alert-info { background: var(--brand-soft); border-color: #c3d9fa; color: #14448f; }
.alert-warn { background: var(--warm-bg); border-color: #ecd9a5; color: #7a4c05; }
.alert-box ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------------------------------------------------------------- Detail */
.dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 16px;
  font-size: 14.5px; }
.dl dt { color: var(--text-soft); font-size: 13.5px; }
.dl dd { margin: 0; }

.summary-box {
  background: linear-gradient(180deg, #f7faff, #fff);
  border: 1px solid #d5e3fa; border-radius: var(--radius); padding: 16px;
}
.summary-box h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--brand-dark); margin-bottom: 8px; }
.summary-box p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.ask-list { margin: 8px 0 0; padding-left: 20px; font-size: 14.5px; }
.ask-list li { margin-bottom: 5px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--border-strong); border: 2px solid #fff;
}
.timeline li.k-created::before { background: var(--brand); }
.timeline li.k-status::before { background: #6633cc; }
.timeline li.k-note::before { background: var(--ok); }
.timeline li.k-reminder::before { background: var(--warm); }
.timeline li.k-ai::before { background: var(--hot); }
.timeline .t { font-weight: 600; font-size: 14px; }
.timeline .b { font-size: 14px; color: var(--text-soft); margin-top: 3px; white-space: pre-wrap; }
.timeline .d { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photos a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border);
  background: #f1f4f9; aspect-ratio: 4/3; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px;
  border: 1px solid var(--border-strong); border-radius: 8px; text-decoration: none;
  color: var(--text); font-size: 14px; background: #fff;
}

/* --------------------------------------------------------------- Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.chip {
  padding: 7px 13px; border-radius: 20px; border: 1px solid var(--border-strong);
  background: #fff; font-size: 13.5px; text-decoration: none; color: var(--text-soft);
  font-weight: 550; white-space: nowrap;
}
.chip:hover { border-color: #b6c2d8; }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.search-box { flex: 1; min-width: 180px; max-width: 320px; }
.search-box input { padding: 8px 12px; font-size: 14px; }

/* ---------------------------------------------------------- Public pages */
.public-wrap { max-width: 680px; margin: 0 auto; padding: 24px 16px 60px; }
.public-head { text-align: center; margin-bottom: 24px; }
.public-head .company { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.public-head .sub { color: var(--text-soft); font-size: 15px; margin-top: 4px; }
.trust {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  font-size: 13px; color: var(--text-soft); margin-top: 14px;
}
.trust span { display: inline-flex; align-items: center; gap: 5px; }
.form-section { margin-bottom: 26px; }
.form-section > h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); border-bottom: 1px solid var(--border);
  padding-bottom: 7px; margin-bottom: 15px;
}
.dropzone {
  /* display:block est indispensable : un <label> est inline par défaut, et le
     cadre en pointillés se retrouve alors fragmenté et décalé. */
  display: block; width: 100%;
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 26px 16px; text-align: center; background: #fbfcfe; cursor: pointer;
}
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { display: none; }
.dz-title { font-weight: 600; font-size: 15px; }
.dz-hint { font-size: 13px; color: var(--text-soft); margin-top: 3px; }
#preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
#preview .thumb { position: relative; width: 78px; height: 78px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--border); background: #eef1f6; }
#preview .thumb img { width: 100%; height: 100%; object-fit: cover; }
#preview .thumb .doc { display: grid; place-items: center; height: 100%; font-size: 11px;
  color: var(--text-soft); padding: 4px; text-align: center; word-break: break-all; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.success-card { text-align: center; padding: 42px 24px; }
.success-icon {
  width: 60px; height: 60px; border-radius: 50%; background: var(--ok-bg);
  color: var(--ok); display: grid; place-items: center; font-size: 30px;
  margin: 0 auto 18px; border: 2px solid #b0dcc6;
}

/* --------------------------------------------------------------- Landing */
.hero { text-align: center; padding: 54px 16px 34px; }
.hero h1 { font-size: 34px; max-width: 640px; margin: 0 auto 14px; letter-spacing: -.03em; }
.hero p { font-size: 17px; color: var(--text-soft); max-width: 540px; margin: 0 auto 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.feature .ico { font-size: 22px; margin-bottom: 8px; }
.feature h3 { margin-bottom: 5px; }
.feature p { margin: 0; font-size: 14px; color: var(--text-soft); }

/* ------------------------------------------------------------------ Misc */
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
}
pre.snippet {
  background: #101828; color: #e6edf7; padding: 14px; border-radius: 8px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all; line-height: 1.5;
}
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row input { font-family: ui-monospace, monospace; font-size: 13.5px; }

.footer { padding: 22px 16px; text-align: center; font-size: 13px; color: var(--text-faint); }
.footer a { color: var(--text-soft); }

.progress-bar { height: 6px; background: #e6ebf3; border-radius: 4px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--brand); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-soft); font-weight: 600; }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  h1 { font-size: 21px; }
  .hero h1 { font-size: 27px; }
  .container { padding: 16px 12px 50px; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .topbar-right .who { display: none; }
  .stat .value { font-size: 24px; }
  .card-pad { padding: 15px; }
  .lead-row { padding: 12px 13px; }
}

/* ------------------------------------------------ Fiche express (mobile)
   Écran ouvert depuis un email, sur un chantier, souvent d'une seule main.
   Tout est dimensionné pour le pouce : cibles d'au moins 56 px, contrastes
   élevés, aucune information secondaire au-dessus de la ligne de flottaison. */
.express-body { background: var(--bg); }
.express { max-width: 560px; margin: 0 auto; padding: 14px 13px 44px; }

.express-done {
  background: var(--ok-bg); border: 1px solid #a9dcc1; color: #0b5c3b;
  border-radius: var(--radius); padding: 13px 15px; font-size: 15px;
  margin-bottom: 14px; text-align: center; font-weight: 550;
}

.express-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 14px; }
.express-score {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  font-size: 17px; font-weight: 700; flex-shrink: 0; border: 2px solid;
}
.express-score.chaud { background: var(--hot-bg); color: var(--hot); border-color: #f0b493; }
.express-score.tiede { background: var(--warm-bg); color: var(--warm); border-color: #e6cf95; }
.express-score.froid { background: var(--cold-bg); color: var(--cold); border-color: #ccd5e2; }
.express-id { min-width: 0; flex: 1; }
.express-id h1 { font-size: 22px; margin: 0 0 3px; letter-spacing: -.02em; }
.express-id p { margin: 0; font-size: 14.5px; color: var(--text-soft); }
.express-status { margin-top: 6px !important; display: flex; gap: 8px;
  align-items: center; flex-wrap: wrap; }

/* Le bouton d'appel : l'élément le plus important de l'écran. */
.express-call {
  display: block; background: var(--ok); color: #fff; text-decoration: none;
  border-radius: var(--radius); padding: 15px 18px; margin-bottom: 14px;
  text-align: center; box-shadow: 0 2px 10px rgba(15, 122, 79, .28);
}
.express-call .lab { display: block; font-size: 13px; opacity: .9;
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.express-call .num { display: block; font-size: 26px; font-weight: 700;
  letter-spacing: .01em; margin-top: 3px; }
.express-call:active { background: #0c633f; }

.express-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px; margin-bottom: 13px;
  box-shadow: var(--shadow);
}
.express-card h2 {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); margin: 0 0 9px; font-weight: 600;
}
.express-card h3 { font-size: 13px; margin: 14px 0 6px; color: var(--brand-dark);
  text-transform: uppercase; letter-spacing: .04em; }
.express-summary { font-size: 16px; line-height: 1.55; margin: 0; }
.express-verbatim {
  white-space: pre-wrap; background: #f8fafd; padding: 12px; border-radius: 8px;
  border: 1px solid var(--border); margin: 0; font-size: 14.5px;
}

.express-actions { display: grid; gap: 9px; }
.express-actions form { margin: 0; }
.express-btn {
  width: 100%; min-height: 58px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: 9px; padding: 11px 15px; font-family: inherit;
  display: flex; flex-direction: column; gap: 2px;
}
.express-btn .t { font-size: 16px; font-weight: 650; color: var(--text); }
.express-btn .h { font-size: 12.5px; color: var(--text-soft); line-height: 1.35; }
.express-btn:active { background: #eef3fb; }
.express-btn.current { border-color: var(--brand); background: var(--brand-soft); }
.express-btn.current .t::after { content: " ✓"; color: var(--brand); }
.express-btn.muted-btn .t { color: var(--text-soft); font-weight: 600; }
.express-btn.muted-btn { border-style: dashed; }

.express-details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px; margin-bottom: 13px;
}
.express-details summary {
  cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--brand);
  list-style: none; padding: 3px 0;
}
.express-details summary::-webkit-details-marker { display: none; }
.express-details summary::before { content: "▸ "; }
.express-details[open] summary::before { content: "▾ "; }

.express-foot { text-align: center; font-size: 13px; color: var(--text-soft);
  margin: 20px 0 0; line-height: 1.6; }

/* Zone dangereuse : visuellement distincte, jamais confondue avec le reste. */
.danger-zone { border-color: #f0bab4; background: linear-gradient(180deg, #fef8f7, #fff); }
.danger-zone h2 { color: var(--danger); }

/* Documents légaux : lecture longue, colonne étroite. */
.legal-doc { max-width: 72ch; margin: 0 auto; }
.legal-doc h1 { font-size: 25px; margin-bottom: 6px; }
.legal-doc h2 { font-size: 17px; margin: 28px 0 8px; padding-top: 14px;
  border-top: 1px solid var(--border); }
.legal-doc h2:first-of-type { border-top: none; padding-top: 0; }
.legal-doc p, .legal-doc li { font-size: 15px; line-height: 1.65; }
.legal-doc ul { padding-left: 20px; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc .dl { margin-bottom: 14px; }
.legal-links { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 14px; text-align: center; }
.scroll-x { overflow-x: auto; margin-bottom: 16px; }

/* Comparaison des offres : deux colonnes lisibles, une seule mise en avant. */
.offres { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.offre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px; position: relative;
  display: flex; flex-direction: column;
}
.offre-reco { border-color: var(--brand); border-width: 2px; box-shadow: var(--shadow-lg); }
.offre-tag {
  position: absolute; top: -11px; left: 20px; background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}
.offre-nom { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.offre-prix { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 2px; }
.offre-prix span { font-size: 14px; font-weight: 500; color: var(--text-soft);
  letter-spacing: 0; }
.offre-resume { font-size: 14px; color: var(--text-soft); margin: 4px 0 16px; }
.offre-liste { list-style: none; margin: 0 0 20px; padding: 0; font-size: 14.5px; flex: 1; }
.offre-liste li { padding: 6px 0 6px 22px; position: relative; line-height: 1.45; }
.offre-liste li::before { content: "✓"; position: absolute; left: 0; color: var(--ok);
  font-weight: 700; }

/* --------------------------------------------------------------------------
   Agenda et prise de rendez-vous
   Les créneaux sont des cibles tactiles : un artisan sur un chantier et un
   client sur son téléphone cliquent avec le pouce, pas avec une souris.
   -------------------------------------------------------------------------- */
.rdv-liste { list-style: none; margin: 0; padding: 0; }
.rdv-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.rdv-item:last-child { border-bottom: 0; padding-bottom: 0; }
.rdv-quand {
  font-weight: 700; font-size: 14px; color: var(--brand-dark);
  min-width: 200px; flex: 0 0 auto;
}
.rdv-qui { flex: 1 1 200px; font-size: 14.5px; }
.rdv-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.jours-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.jour-case {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 13px;
  background: var(--surface); font-size: 14px; user-select: none;
}
.jour-case input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.jour-case:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft); font-weight: 600;
}

.rdv-jour { margin-bottom: 18px; }
.rdv-jour-titre {
  font-weight: 700; font-size: 14px; text-transform: capitalize;
  margin-bottom: 9px; color: var(--text);
}
.rdv-creneaux { display: flex; flex-wrap: wrap; gap: 9px; }
.rdv-creneau { position: relative; cursor: pointer; }
.rdv-creneau input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.rdv-creneau span {
  display: block; border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 17px; font-size: 15.5px; font-weight: 600; background: var(--surface);
  min-width: 78px; text-align: center; transition: all .12s;
}
.rdv-creneau input:checked + span {
  border-color: var(--brand); background: var(--brand); color: #fff;
}
.rdv-creneau input:focus-visible + span {
  outline: 3px solid rgba(31, 95, 208, .35); outline-offset: 2px;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; }

@media (max-width: 640px) {
  .rdv-quand { min-width: 100%; }
  .rdv-creneau span { min-width: 70px; padding: 14px 14px; }
}

/* Trois compteurs courts : ils restent côte à côte même sur un téléphone —
   empilés, ils occupaient un écran entier pour trois chiffres. */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi-row .stat { padding: 14px 10px; text-align: center; }
.kpi-row .value { font-size: 24px; }
.kpi-row .label { font-size: 11.5px; line-height: 1.3; }

.offre-exclus { margin-top: 14px; opacity: .72; }
.offre-exclus li::before { content: "—"; color: var(--text-faint); font-weight: 600; }

@media print {
  .topbar, .btn, .filters, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}
