/* ─── Demandes entrantes (PROSPECTS.md §4) ──────────────────────────
   Trois blocs : la boîte leads, les mails reçus, les demandes à
   traiter. Le troisième est en lavis lilas bordé --alt-fg, comme la
   spec le demande — c'est ce qui le distingue des deux autres, qui
   informent, alors que lui appelle un geste. */

.x4-dem { display: flex; flex-direction: column; gap: 12px; }

.x4-dem-tete { display: flex; align-items: center; gap: 12px; }
.x4-dem-retour {
  border: 0; background: none; padding: 0;
  color: var(--v2-accent, #7d640d);
  font-family: inherit; font-size: 12px; font-weight: 640; cursor: pointer;
}
.x4-dem-retour:hover { text-decoration: underline; }
.x4-dem-tete-t {
  font-size: 15px; font-weight: 680; letter-spacing: -.02em;
  color: var(--v2-text, #16171a);
}

.x4-dem-soustitre {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
  font-size: 11px; font-weight: 640; letter-spacing: .06em;
  text-transform: uppercase; color: var(--v2-text-3, #6b6f76);
}
.x4-dem-compte {
  padding: 1px 7px; border-radius: 99px;
  background: var(--inset, rgba(0, 0, 0, .035));
  font-size: 11px; letter-spacing: 0; text-transform: none;
  color: var(--v2-text-2, #55595f);
}

/* ── a) La boîte leads ── */
.x4-dem-boite {
  padding: 14px 16px;
  background: var(--panel, rgba(255, 255, 255, .66));
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  border-radius: var(--r-md, 18px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, .05));
}
.x4-dem-boite-tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.x4-dem-adresse {
  font-size: 14px; font-weight: 640; letter-spacing: -.02em;
  color: var(--v2-text, #16171a);
}
.x4-dem-pastille {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 99px;
  background: var(--pos-soft, rgba(19, 109, 69, .11));
  color: var(--pos-fg, #136d45);
  font-size: 11.5px; font-weight: 620;
}
.x4-dem-pastille > i {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.x4-dem-pastille-off {
  background: var(--inset, rgba(0, 0, 0, .035));
  color: var(--v2-text-3, #6b6f76);
}
.x4-dem-appel-recu {
  margin-left: auto;
  padding: 7px 14px; border: 0; border-radius: 99px;
  background: var(--accent-bright, #f5d547); color: var(--sur-accent, #1b1a12);
  font-family: inherit; font-size: 12.5px; font-weight: 640; cursor: pointer;
}
.x4-dem-appel-recu:hover { filter: brightness(.96); }
.x4-dem-boite-chiffres {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12.5px; color: var(--v2-text-2, #55595f);
}
.x4-dem-boite-chiffres b { font-size: 15px; font-weight: 680; color: var(--v2-text, #16171a); }
.x4-dem-releve { color: var(--v2-text-3, #6b6f76); font-size: 12px; }

/* ── Le formulaire de saisie manuelle ── */
.x4-dem-form {
  padding: 14px 16px;
  background: var(--panel-solid, #fff);
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  border-radius: var(--r-md, 18px);
}
.x4-dem-form-grille {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.x4-dem-form-large { grid-column: 1 / -1; }
.x4-dem-form label {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  font-size: 11.5px; font-weight: 620; color: var(--v2-text-2, #55595f);
}
.x4-dem-form input, .x4-dem-form textarea {
  padding: 7px 10px;
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  border-radius: var(--r-xs, 7px);
  background: var(--inset, rgba(0, 0, 0, .035));
  color: var(--v2-text, #16171a);
  font-family: inherit; font-size: 13px; font-weight: 550;
}
.x4-dem-form-pied { display: flex; gap: 8px; margin-top: 12px; }
.x4-dem-form-pied button {
  padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  background: var(--panel-2, rgba(255, 255, 255, .42));
  color: var(--v2-text, #16171a);
  font-family: inherit; font-size: 12.5px; font-weight: 620; cursor: pointer;
}
.x4-dem-valider { border-color: transparent !important; background: var(--accent-bright, #f5d547) !important; color: var(--sur-accent, #1b1a12) !important; }

/* ── b) Les mails reçus ── */
.x4-dem-mails, .x4-dem-atraiter {
  padding: 14px 16px;
  background: var(--panel, rgba(255, 255, 255, .66));
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  border-radius: var(--r-md, 18px);
}
.x4-dem-etape {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  border-radius: var(--r-xs, 7px);
  background: var(--panel-solid, #fff);
  color: var(--v2-text, #16171a);
  font-family: inherit; font-size: 12px; font-weight: 620;
  text-transform: none; letter-spacing: 0;
}
.x4-dem-table { width: 100%; font-size: 12.5px; }
.x4-dem-table th {
  text-align: left; padding: 6px 8px;
  font-size: 10.5px; font-weight: 640; letter-spacing: .05em;
  text-transform: uppercase; color: var(--v2-text-3, #6b6f76);
}
.x4-dem-table td { padding: 8px; border-top: 1px solid var(--stroke-2, rgba(20, 20, 25, .05)); }
.x4-dem-extrait { color: var(--v2-text-2, #55595f); font-style: italic; }
.x4-dem-quand { color: var(--v2-text-3, #6b6f76); white-space: nowrap; }
.x4-dem-acompleter { color: var(--warn-fg, #8a5510); font-weight: 620; }
.x4-dem-attend { color: var(--v2-text-3, #6b6f76); font-size: 12px; }
.x4-dem-creer {
  padding: 5px 11px; border-radius: 99px;
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  background: var(--panel-solid, #fff);
  color: var(--v2-text, #16171a);
  font-family: inherit; font-size: 12px; font-weight: 640; cursor: pointer;
}
.x4-dem-creer:hover { border-color: var(--v2-text-3, #6b6f76); }

/* ── c) Les demandes à traiter — lavis lilas, le bloc qui appelle un geste ── */
/* 15/09/2026 : plus de lavis lilas — une carte blanche par demande, les gestes en bas. */
.x4-dem-atraiter { background: transparent; border: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.x4-dem-atraiter > .x4-dem-soustitre { margin-bottom: 0; }
.x4-dem-carte {
  border-radius: var(--r-md, 18px); border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  background: var(--panel, rgba(255, 255, 255, .66)); box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, .05));
  overflow: hidden;
}
.x4-dem-carte.est-retard { border-color: color-mix(in srgb, var(--neg-fg, #a74137) 45%, var(--stroke, rgba(20, 20, 25, .075))); }
.x4-dem-c-corps {
  display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(190px, .9fr) minmax(0, 1.8fr) auto;
  column-gap: 20px; row-gap: 6px; align-items: start; padding: 14px 18px 12px;
}
.x4-dem-c-qui { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.x4-dem-c-qui .x4-dem-ini { margin-top: 1px; }
.x4-dem-c-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.x4-dem-c-id b { font-size: 16px; font-weight: 680; letter-spacing: -.015em; line-height: 1.2; color: var(--v2-text, #16171a); }
.x4-dem-c-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.x4-dem-c-chips .x4-dem-type, .x4-dem-c-chips .x4-dem-connu, .x4-dem-c-chips .x4-dem-bob { margin-top: 0; align-self: auto; }
.x4-dem-c-coord { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.x4-dem-c-coord .x4-dem-tel { font-size: 20px; font-weight: 680; letter-spacing: -.01em; }
.x4-dem-c-msg { min-width: 0; }
.x4-dem-c-msg p { margin: 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent-bright, #f5d547); font-size: 13.5px; line-height: 1.45; color: var(--v2-text, #16171a); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.x4-dem-c-msg p.est-vide { border-left-color: var(--stroke-2, rgba(20, 20, 25, .1)); color: var(--v2-text-3, #6b6f76); font-style: italic; }
.x4-dem-c-msg .x4-dem-mail { margin-top: 6px; }
.x4-dem-c-quand { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; white-space: nowrap; }
.x4-dem-c-quand > b { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--inset, rgba(0, 0, 0, .035)); font-size: 12px; font-weight: 640; color: var(--v2-text-2, #55595f); }
.x4-dem-c-quand > b.x4-dem-retard { background: var(--neg-soft, rgba(193, 75, 64, .11)); color: var(--neg-fg, #a74137); }
.x4-dem-c-quand > i { font-style: normal; font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-c-actes {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 18px 12px; border-top: 1px solid var(--stroke-2, rgba(20, 20, 25, .05));
  background: var(--panel-2, rgba(255, 255, 255, .42));
}
.x4-dem-c-actes.est-choix { background: var(--inset, rgba(0, 0, 0, .035)); }
.x4-dem-btn {
  height: 36px; padding: 0 16px; border-radius: 99px;
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075)); background: var(--panel-solid, #fff);
  color: var(--v2-text, #16171a); font-family: inherit; font-size: 13px; font-weight: 640; cursor: pointer; white-space: nowrap;
}
.x4-dem-btn:hover { border-color: var(--v2-text-3, #6b6f76); }
.x4-dem-btn.est-plein { border-color: transparent; background: var(--accent-bright, #f5d547); color: var(--sur-accent, #1b1a12); }
.x4-dem-btn.est-plein:hover { filter: brightness(.97); }
.x4-dem-btn.est-non { color: var(--neg-fg, #a74137); }
.x4-dem-btn.est-non:hover { border-color: var(--neg-fg, #a74137); background: var(--neg-soft, rgba(193, 75, 64, .08)); }
.x4-dem-c-q { font-size: 12.5px; font-weight: 640; color: var(--v2-text, #16171a); margin-right: 2px; }
.x4-dem-c-q i { font-style: normal; font-weight: 550; color: var(--v2-text-3, #6b6f76); margin-left: 4px; }
.x4-dem-chip {
  display: inline-flex; align-items: baseline; gap: 6px; height: 32px; padding: 0 13px; border-radius: 99px;
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075)); background: var(--panel-solid, #fff);
  color: var(--v2-text, #16171a); font-family: inherit; font-size: 12.5px; font-weight: 620; cursor: pointer; white-space: nowrap;
}
.x4-dem-chip i { font-style: normal; font-size: 11px; font-weight: 550; color: var(--v2-text-3, #6b6f76); }
.x4-dem-chip:hover { border-color: var(--v2-text, #16171a); background: var(--accent-soft, rgba(245, 213, 71, .26)); }
.x4-dem-chip.est-non:hover { border-color: var(--neg-fg, #a74137); background: var(--neg-soft, rgba(193, 75, 64, .1)); color: var(--neg-fg, #a74137); }
.x4-dem-chip.est-retour { border-color: transparent; background: transparent; color: var(--v2-text-3, #6b6f76); margin-left: auto; }
.x4-dem-chip.est-retour:hover { background: var(--inset, rgba(0, 0, 0, .035)); color: var(--v2-text, #16171a); }
.x4-dem-chip.est-ok { height: 30px; padding: 0 11px; }
.x4-dem-c-autre { display: inline-flex; align-items: center; gap: 6px; }
.x4-dem-c-autre .x4-dem-motif { height: 32px; width: 200px; }
@media (max-width: 1100px) { .x4-dem-c-corps { grid-template-columns: 1fr 1fr; } .x4-dem-c-msg { grid-column: 1 / -1; } .x4-dem-c-quand { align-items: flex-start; text-align: left; } }
.x4-dem-ligne {
  display: grid; grid-template-columns: 34px minmax(170px, 1fr) minmax(220px, .9fr) minmax(0, 1.6fr) 118px; grid-template-areas: 'ini qui coord besoin quand' 'mail mail mail mail mail' 'issues issues issues issues issues';
  column-gap: 16px; row-gap: 8px; align-items: start;
  padding: 12px 0 12px;
  border-top: 1px solid var(--stroke-2, rgba(20, 20, 25, .05));
}
.x4-dem-ligne > .x4-dem-ini { grid-area: ini; }
.x4-dem-ligne > .x4-dem-qui { grid-area: qui; }
.x4-dem-ligne > .x4-dem-coord { grid-area: coord; }
.x4-dem-ligne > .x4-dem-besoin { grid-area: besoin; }
.x4-dem-ligne > .x4-dem-quand { grid-area: quand; justify-self: end; text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.x4-dem-ligne > .x4-dem-quand i { font-style: normal; font-size: 11px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-ligne > .x4-dem-issues { grid-area: issues; padding-left: 50px; }
.x4-dem-ligne > .x4-dem-mail { grid-area: mail; padding-left: 50px; }
.x4-dem-ligne > .x4-dem-mail pre { max-height: 520px; }
.x4-dem-type { display: inline-block; align-self: flex-start; margin-top: 3px; padding: 2px 8px; border-radius: 99px; background: var(--alt-soft, rgba(106, 79, 201, .12)); color: var(--alt-fg, #664cc2); font-size: 11px; font-weight: 620; }
.x4-dem-coord { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.x4-dem-contact { font-size: 12.5px; font-weight: 620; color: var(--v2-text, #16171a); }
.x4-dem-tel { font-size: 17px; font-weight: 680; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--v2-text, #16171a); text-decoration: none; white-space: nowrap; }
.x4-dem-tel:hover { color: var(--v2-accent, #7d640d); }
.x4-dem-tel.est-vide { font-size: 12px; font-weight: 550; color: var(--v2-text-3, #6b6f76); }
.x4-dem-mailto { font-size: 12.5px; color: var(--info-fg, #3160b4); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x4-dem-mailto:hover { text-decoration: underline; }
.x4-dem-ligne:first-of-type { border-top: 0; }
.x4-dem-ini {
  flex: none;
  width: 34px; height: 34px; border-radius: var(--r-xs, 7px);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-solid, #fff);
  color: var(--alt-fg, #6b53a8);
  font-size: 12px; font-weight: 680;
}
.x4-dem-qui { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.x4-dem-qui b { font-size: 14px; font-weight: 680; letter-spacing: -.01em; color: var(--v2-text, #16171a); line-height: 1.2; }
.x4-dem-qui span { font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-besoin {
  min-width: 0;
  font-size: 12.5px; font-style: italic; color: var(--v2-text-2, #55595f); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.x4-dem-issues { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.x4-dem-issues button, .x4-dem-rappeler {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 5px 10px; border-radius: var(--r-xs, 7px);
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  background: var(--panel-solid, #fff);
  color: var(--v2-text, #16171a);
  font-family: inherit; font-size: 11.5px; font-weight: 620;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.x4-dem-issues button > b { font-weight: 620; }
.x4-dem-issues button > i {
  font-style: normal; font-size: 10px; font-weight: 550;
  color: var(--v2-text-3, #6b6f76);
}
.x4-dem-non > i { color: var(--neg-fg, #a74137); opacity: .82; }
.x4-dem-issues button:hover, .x4-dem-rappeler:hover { border-color: var(--v2-text-3, #6b6f76); }
/* L'encre du bouton ambre doit battre la règle de lien du thème :
   en sombre, « Rappeler » s'affichait vide (encre de lien claire sur
   aplat ambre). Le sélecteur est monté d'un cran, pas mis en !important. */
.x4-dem-issues a.x4-dem-rappeler {
  align-items: center; border-radius: 99px;
  background: var(--accent-bright, #f5d547);
  border-color: transparent;
  color: var(--sur-accent, #1b1a12);
}
.x4-dem-non { color: var(--neg-fg, #a74137) !important; }
.x4-dem-date, .x4-dem-motif {
  padding: 5px 9px;
  border: 1px solid var(--stroke, rgba(20, 20, 25, .075));
  border-radius: var(--r-xs, 7px);
  background: var(--panel-solid, #fff);
  color: var(--v2-text, #16171a);
  font-family: inherit; font-size: 12px;
}

.x4-dem-vide {
  padding: 14px 2px;
  color: var(--v2-text-3, #6b6f76);
  font-size: 12.5px; line-height: 1.45;
}

/* Un besoin non noté se dit, il ne s'écrit pas « — ». */
.x4-dem-besoin-vide { font-style: normal; color: var(--v2-text-3, #6b6f76); }

/* « Arrivée par » : appel reçu, formulaire du site, apport (par qui ?). */
.x4-dem-form-source { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 12.5px; color: var(--v2-text-2, #55595f); }
.x4-dem-form-source > span { font-size: 11px; font-weight: 640; text-transform: uppercase; letter-spacing: .06em; color: var(--v2-text-3, #6b6f76); }
.x4-dem-form-source label { display: inline-flex; align-items: center; gap: 6px; color: var(--v2-text, #16171a); cursor: pointer; }
.x4-dem-form-source input[type="text"] { flex: 1 1 180px; height: 30px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--stroke, rgba(20,20,25,.075)); background: var(--panel-solid, #fff); font: inherit; font-size: 12.5px; }
.x4-dem-form-grille .x4-dem-form-source { grid-column: 1 / -1; flex-direction: row; }
.x4-dem-form-grille .x4-dem-form-source label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; }
.x4-dem-form-grille .x4-dem-form-source input[type="radio"] { margin: 0; accent-color: var(--v2-accent, #7d640d); }
.x4-dem-form-grille .x4-dem-form-source input[type="radio"] { width: auto; flex: none; }

/* Le mail relevé : objet en gras, extrait, et le corps dépliable. */
.x4-dem-mail { font-size: 12.5px; }
.x4-dem-mail summary { cursor: pointer; color: var(--v2-accent, #7d640d); font-weight: 620; }
.x4-dem-mail pre { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r-xs, 9px); background: var(--inset, rgba(0,0,0,.035)); white-space: pre-wrap; font: inherit; font-size: 12.5px; line-height: 1.5; color: var(--v2-text, #16171a); max-height: 320px; overflow: auto; }
.x4-dem-issues button.x4-dem-pos { border-color: var(--pos-fg, #136d45); }
.x4-dem-issues button.x4-dem-pos b { color: var(--pos-fg, #136d45); }
.x4-dem-relever { height: 28px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--stroke, rgba(20,20,25,.075)); background: var(--panel-solid, #fff); color: var(--v2-text-2, #55595f); font-family: inherit; font-size: 12px; font-weight: 550; cursor: pointer; }
.x4-dem-connecter { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 99px; background: var(--accent-bright, #f5d547); color: var(--sur-accent, #1b1a12); font-size: 12.5px; font-weight: 640; text-decoration: none; }
.x4-dem-connecter:hover { filter: brightness(.96); }

/* Le verdict de Bob sur la ligne, et les écartés repêchables (10/09/2026). */
.x4-dem-bob { display: inline-block; margin-top: 2px; padding: 1px 7px; border-radius: 99px; background: var(--pos, rgba(23, 128, 81, .15)); color: var(--pos-fg, #136d45); font-style: normal; font-size: 10.5px; font-weight: 620; }
/* ── Écartés : deux groupes lisibles (les tiens, ceux de Bob), une ligne
   par demande, le repêchage discret. Les tests du formulaire n'y sont
   pas (Joris, 10/09/2026 : « ne même pas les compter »). ── */
.x4-dem-ecartes { margin-top: 18px; }
.x4-dem-ecartes-barre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.x4-dem-ecartes-t { display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 640; color: var(--v2-text-2, #55595f); cursor: pointer; text-align: left; }
.x4-dem-ecartes-t.est-vide { cursor: default; color: var(--v2-text-3, #6b6f76); font-weight: 550; }
.x4-dem-ecartes-t i { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-ecartes-tests { font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-rapport-b { margin-left: auto; height: 28px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--stroke, rgba(20, 20, 25, .075)); background: var(--panel-solid, #fff); font: inherit; font-size: 12px; font-weight: 620; color: var(--v2-text, #16171a); cursor: pointer; white-space: nowrap; }
.x4-dem-rapport-b:hover { border-color: var(--v2-text-3, #6b6f76); }
.x4-dem-ecartes-l { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.x4-dem-ecartes-g { padding: 10px 14px 4px; border-radius: 4px; background: var(--panel-solid, #fff); border: 1px solid var(--stroke-2, rgba(20, 20, 25, .05)); }
.x4-dem-ecartes-st { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 11px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; color: var(--v2-text-3, #6b6f76); }
.x4-dem-ecarte { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(120px, 1.1fr) minmax(130px, 1.4fr) 52px auto; gap: 14px; align-items: center; min-height: 40px; padding: 7px 0; border-top: 1px solid var(--stroke-2, rgba(20, 20, 25, .05)); font-size: 12.5px; color: var(--v2-text-2, #55595f); }
.x4-dem-ecarte-qui { display: flex; flex-direction: column; min-width: 0; }
.x4-dem-ecarte-qui b { font-weight: 640; color: var(--v2-text, #16171a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x4-dem-ecarte-qui span { font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-ecarte-coord { display: flex; flex-direction: column; min-width: 0; font-size: 12px; }
.x4-dem-ecarte-coord a { color: var(--v2-text-2, #55595f); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x4-dem-ecarte-coord a:hover { text-decoration: underline; }
.x4-dem-ecarte-motif { display: flex; flex-direction: column; min-width: 0; font-size: 12px; color: var(--v2-text-2, #55595f); }
.x4-dem-ecarte-motif i { font-style: normal; font-size: 11px; font-weight: 620; color: var(--neg-fg, #b3261e); }
.x4-dem-ecarte-quand { font-size: 11.5px; color: var(--v2-text-3, #6b6f76); white-space: nowrap; }
.x4-dem-repecher { height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--stroke, rgba(20, 20, 25, .075)); background: var(--panel-solid, #fff); font: inherit; font-size: 11.5px; font-weight: 620; color: var(--v2-text-2, #55595f); cursor: pointer; white-space: nowrap; }
.x4-dem-repecher:hover { border-color: var(--pos-fg, #136d45); color: var(--pos-fg, #136d45); }
.x4-dem-repecher:disabled { opacity: .5; cursor: default; }

/* ── Le rapport mensuel pour l'agence SEO / SEA ── */
.x4-dem-rapport { margin-top: 14px; padding: 14px 16px 10px; border-radius: 4px; background: var(--panel-solid, #fff); border: 1px solid var(--stroke, rgba(20, 20, 25, .075)); }
.x4-dem-rap-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.x4-dem-rap-tete .x4-dem-soustitre { margin-bottom: 0; }
.x4-dem-rap-mois { display: flex; gap: 4px; flex-wrap: wrap; }
.x4-dem-rap-m { height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid transparent; background: none; font: inherit; font-size: 12px; font-weight: 550; color: var(--v2-text-2, #55595f); cursor: pointer; text-transform: capitalize; }
.x4-dem-rap-m:hover { background: var(--inset, rgba(0, 0, 0, .035)); }
.x4-dem-rap-m.est-actif { background: var(--accent-bright, #f5d547); color: var(--sur-accent, #1b1a12); font-weight: 640; }
.x4-dem-rap-copier { margin-left: auto; height: 28px; padding: 0 12px; border-radius: 99px; border: 0; background: var(--v2-text, #16171a); color: var(--panel-solid, #fff); font: inherit; font-size: 12px; font-weight: 620; cursor: pointer; white-space: nowrap; }
.x4-dem-rap-copier:hover { filter: brightness(1.15); }
.x4-dem-rap-note { margin-top: 8px; font-size: 12px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-rap-chiffres { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 12px 0 6px; font-size: 12.5px; color: var(--v2-text-2, #55595f); }
.x4-dem-rap-chiffres b { margin-right: 5px; font-size: 18px; font-weight: 680; color: var(--v2-text, #16171a); }
.x4-dem-rap-chiffres .est-oui b { color: var(--pos-fg, #136d45); }
.x4-dem-rap-chiffres .est-non b { color: var(--neg-fg, #b3261e); }
.x4-dem-rap-chiffres .est-motif { font-size: 12px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-rap-chiffres .est-motif b { font-size: 13px; color: var(--v2-text-2, #55595f); }
.x4-dem-rap-chiffres i { font-style: normal; font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-rap-g { margin-top: 12px; }
.x4-dem-rap-st { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; font-size: 11px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; color: var(--v2-text-3, #6b6f76); }
.x4-dem-rap-g.est-oui .x4-dem-rap-st { color: var(--pos-fg, #136d45); }
.x4-dem-rap-g.est-non .x4-dem-rap-st { color: var(--neg-fg, #b3261e); }
.x4-dem-rap-vide { padding: 6px 0; font-size: 12px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-rap-l { display: grid; grid-template-columns: 48px minmax(130px, 1fr) minmax(0, 2.2fr) minmax(130px, .9fr); gap: 14px; align-items: start; padding: 8px 0; border-top: 1px solid var(--stroke-2, rgba(20, 20, 25, .05)); font-size: 12.5px; color: var(--v2-text-2, #55595f); }
.x4-dem-rap-quand { padding-top: 1px; font-size: 11.5px; color: var(--v2-text-3, #6b6f76); white-space: nowrap; }
.x4-dem-rap-qui { display: flex; flex-direction: column; min-width: 0; }
.x4-dem-rap-qui b { font-weight: 640; color: var(--v2-text, #16171a); }
.x4-dem-rap-qui span { font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-rap-quoi { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.45; }
.x4-dem-rap-quoi i { font-style: normal; font-size: 11.5px; font-weight: 620; color: var(--alt-fg, #664cc2); }
.x4-dem-rap-issue { display: flex; flex-direction: column; font-size: 12px; font-weight: 620; color: var(--v2-text, #16171a); }
.x4-dem-rap-issue em { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }

/* ── Déjà connu (11/09/2026) : la société ou l'e-mail existe en prospect
   ou client — un clic ouvre la fiche. ── */
.x4-dem-connu { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 4px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--info-fg, #3160b4); background: var(--info-soft, rgba(49, 96, 180, .1)); color: var(--info-fg, #3160b4); font: inherit; font-size: 11px; font-weight: 640; cursor: pointer; text-align: left; line-height: 1.25; max-width: 100%; }
.x4-dem-connu i { font-style: normal; font-weight: 400; opacity: .85; }
.x4-dem-connu.est-client { border-color: var(--pos-fg, #136d45); background: var(--pos-soft, rgba(21, 115, 71, .12)); color: var(--pos-fg, #136d45); }
.x4-dem-connu:hover { filter: brightness(.92); }
/* Un lead sans réponse depuis 24 h : en tête, en rouge. */
.x4-dem-ligne.est-retard { box-shadow: inset 3px 0 0 var(--neg-fg, #b3261e); }
.x4-dem-retard { display: block; font-size: 12px; font-weight: 640; color: var(--neg-fg, #b3261e); }

/* La réponse par mail à une demande écartée (16/09/2026). */
.x4-dem-c-mail { display: flex; align-items: flex-start; gap: 8px; width: 100%; margin: 4px 0 6px; font-size: 12.5px; line-height: 1.35; cursor: pointer; }
.x4-dem-c-mail input { margin-top: 2px; accent-color: var(--v2-text, #16171a); }
.x4-dem-c-mail span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.x4-dem-c-mail i { font-style: normal; font-size: 11px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-ecarte-mail { font-style: normal; font-size: 11px; color: var(--pos-fg, #136d45); margin-left: 6px; }
/* Le PDF du rapport pour l'agence (16/09/2026), à côté de « Copier ». */
.x4-dem-rap-copier.est-pdf { text-decoration: none; display: inline-flex; align-items: center; }

/* ─── Refonte du 17/09/2026 : « Leads entrants » ─────────────────────
   Un en-tête compact (la boîte mail est une pastille), les chiffres du
   mois, quatre onglets, et le paramétrage de l'envoi du rapport. */
.x4-dem-tete .x4-dem-appel-recu { margin-left: 0; }
.x4-dem-puce { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; height: 28px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--stroke, rgba(20, 20, 25, .075)); background: var(--panel-solid, #fff); font: inherit; font-size: 12px; color: var(--v2-text-2, #55595f); cursor: pointer; white-space: nowrap; }
.x4-dem-puce > i { width: 7px; height: 7px; border-radius: 50%; background: var(--pos-fg, #136d45); }
.x4-dem-puce.est-off > i { background: var(--neg-fg, #b3261e); }
.x4-dem-puce b { font-weight: 620; color: var(--v2-text, #16171a); }
.x4-dem-puce span { color: var(--v2-text-3, #6b6f76); }
.x4-dem-puce:hover, .x4-dem-puce[aria-expanded="true"] { border-color: var(--v2-text-3, #6b6f76); }

.x4-dem-kpis { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--r-md, 18px); background: var(--panel, rgba(255, 255, 255, .66)); border: 1px solid var(--stroke, rgba(20, 20, 25, .075)); font-size: 12.5px; color: var(--v2-text-2, #55595f); }
.x4-dem-kpi-mois { font-size: 11px; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; color: var(--v2-text-3, #6b6f76); }
.x4-dem-kpi-note { font-size: 12px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-kpi b { margin-right: 6px; font-size: 20px; font-weight: 680; letter-spacing: -.02em; color: var(--v2-text, #16171a); }
.x4-dem-kpi.est-oui b { color: var(--pos-fg, #136d45); }
.x4-dem-kpi.est-non b { color: var(--v2-text-2, #55595f); }
.x4-dem-kpi i { font-style: normal; font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }

.x4-dem-onglets { display: flex; gap: 4px; padding: 4px; align-self: flex-start; border-radius: 99px; background: var(--inset, rgba(0, 0, 0, .035)); }
.x4-dem-onglet { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; border-radius: 99px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 550; color: var(--v2-text-2, #55595f); cursor: pointer; white-space: nowrap; }
.x4-dem-onglet:hover { color: var(--v2-text, #16171a); }
.x4-dem-onglet.est-actif { background: var(--panel-solid, #fff); color: var(--v2-text, #16171a); font-weight: 640; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, .05)); }
.x4-dem-compte.est-vif { background: var(--accent-bright, #f5d547); color: var(--sur-accent, #1b1a12); font-weight: 640; }
.x4-dem-onglet-tete { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.x4-dem-onglet-tete .x4-dem-soustitre { margin-bottom: 0; }

/* Suivi : ce que chaque vrai besoin est devenu. */
.x4-dem-entonnoir { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12.5px; color: var(--v2-text-2, #55595f); }
.x4-dem-ent b { margin-right: 5px; font-size: 16px; font-weight: 680; color: var(--v2-text, #16171a); }
.x4-dem-ent-f { font-style: normal; color: var(--v2-text-3, #6b6f76); }
.x4-dem-suivi-l { display: grid; grid-template-columns: 48px minmax(150px, 1fr) minmax(0, 2fr) minmax(170px, .9fr) auto; gap: 14px; align-items: start; padding: 9px 0; border-top: 1px solid var(--stroke-2, rgba(20, 20, 25, .05)); font-size: 12.5px; color: var(--v2-text-2, #55595f); }
.x4-dem-suivi-l:first-child { border-top: 0; }
.x4-dem-suivi-dv { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.x4-dem-suivi-dv b { padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 640; background: var(--inset, rgba(0, 0, 0, .035)); color: var(--v2-text-2, #55595f); }
.x4-dem-suivi-dv b[data-ton="pos"] { background: var(--pos-soft, rgba(19, 109, 69, .11)); color: var(--pos-fg, #136d45); }
.x4-dem-suivi-dv b[data-ton="accent"] { background: var(--accent-soft, rgba(245, 213, 71, .26)); color: var(--v2-accent, #7d640d); }
.x4-dem-suivi-dv b[data-ton="neg"] { background: var(--neg-soft, rgba(193, 75, 64, .08)); color: var(--neg-fg, #b3261e); }
.x4-dem-suivi-dv em { font-style: normal; font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }

/* Rapport agence : le PDF, l'envoi, et son paramétrage. */
.x4-dem-rapport { margin-top: 0; border-radius: var(--r-md, 18px); }
.x4-dem-rap-actes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.x4-dem-rap-actes a.x4-dem-btn { display: inline-flex; align-items: center; text-decoration: none; }
.x4-dem-rap-fait { font-size: 12px; color: var(--pos-fg, #136d45); }
.x4-dem-reg { padding: 14px 16px; border-radius: var(--r-md, 18px); background: var(--panel-solid, #fff); border: 1px solid var(--stroke, rgba(20, 20, 25, .075)); }
.x4-dem-reg-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.x4-dem-reg-tete .x4-dem-soustitre { margin-bottom: 0; }
.x4-dem-reg-prochain { margin: 8px 0 12px; font-size: 13px; font-weight: 550; color: var(--v2-text, #16171a); }
.x4-dem-reg-prochain.est-alerte { color: var(--neg-fg, #b3261e); }
.x4-dem-reg-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.x4-dem-reg-grille label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 620; color: var(--v2-text-3, #6b6f76); }
.x4-dem-reg-grille input, .x4-dem-reg-grille select { height: 34px; padding: 0 10px; border-radius: var(--r-xs, 9px); border: 1px solid var(--stroke, rgba(20, 20, 25, .16)); background: var(--panel-solid, #fff); color: var(--v2-text, #16171a); font: inherit; font-size: 13px; font-weight: 400; }
.x4-dem-reg-grille input:focus, .x4-dem-reg-grille select:focus { outline: 2px solid var(--accent-bright, #f5d547); outline-offset: -1px; }
.x4-dem-reg-grille input:disabled, .x4-dem-reg-grille select:disabled { opacity: .6; }
.x4-dem-reg-cases { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.x4-dem-reg-cases label { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--v2-text, #16171a); cursor: pointer; }
.x4-dem-reg-cases input { margin-top: 2px; accent-color: var(--v2-text, #16171a); }
.x4-dem-reg-cases span { display: flex; flex-direction: column; gap: 1px; }
.x4-dem-reg-cases i { font-style: normal; font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
.x4-dem-reg-pied { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.x4-dem-reg-note { font-size: 11.5px; color: var(--v2-text-3, #6b6f76); }
/* L'interrupteur de l'envoi automatique. */
.x4-dem-inter { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 620; color: var(--v2-text, #16171a); cursor: pointer; }
.x4-dem-inter input { position: absolute; opacity: 0; pointer-events: none; }
.x4-dem-inter > i { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--stroke, rgba(20, 20, 25, .16)); transition: background .15s; }
.x4-dem-inter > i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--panel-solid, #fff); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.x4-dem-inter input:checked + i { background: var(--pos-fg, #136d45); }
.x4-dem-inter input:checked + i::after { transform: translateX(14px); }
.x4-dem-inter input:focus-visible + i { outline: 2px solid var(--accent-bright, #f5d547); outline-offset: 2px; }
.x4-dem-hist { display: grid; grid-template-columns: 60px minmax(120px, .8fr) minmax(150px, 1fr) minmax(0, 2fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--stroke-2, rgba(20, 20, 25, .05)); font-size: 12px; color: var(--v2-text-2, #55595f); }
.x4-dem-hist b { font-weight: 620; color: var(--v2-text, #16171a); }
.x4-dem-ecartes { margin-top: 0; }
.x4-dem-ecartes-g { border-radius: var(--r-sm, 12px); }
@media (max-width: 1100px) { .x4-dem-reg-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } .x4-dem-suivi-l { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.4fr); } }

/* Les adresses de l'agence : une pastille par adresse (17/09/2026). */
.x4-dem-reg-large { grid-column: span 2; }
.x4-dem-reg-l { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x4-dem-reg-l i { font-style: normal; font-weight: 400; color: var(--v2-text-3, #6b6f76); margin-left: 4px; }
.x4-dem-adresses { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-height: 34px; padding: 3px 6px; border-radius: var(--r-xs, 9px); border: 1px solid var(--stroke, rgba(20, 20, 25, .16)); background: var(--panel-solid, #fff); cursor: text; }
.x4-dem-adresses:focus-within { outline: 2px solid var(--accent-bright, #f5d547); outline-offset: -1px; }
.x4-dem-adr { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 9px; border-radius: 99px; background: var(--inset, rgba(0, 0, 0, .05)); font-size: 12.5px; font-weight: 550; color: var(--v2-text, #16171a); white-space: nowrap; }
.x4-dem-adr button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; font: inherit; font-size: 14px; line-height: 1; color: var(--v2-text-3, #6b6f76); cursor: pointer; }
.x4-dem-adr button:hover { background: var(--neg-soft, rgba(193, 75, 64, .12)); color: var(--neg-fg, #b3261e); }
.x4-dem-reg-grille .x4-dem-adresses input { flex: 1; min-width: 150px; height: 26px; padding: 0 4px; border: 0; outline: 0; background: transparent; font-size: 13px; }
.x4-dem-reg-grille .x4-dem-adresses input:focus { outline: 0; }
.x4-dem-adresses input.est-refusee { color: var(--neg-fg, #b3261e); }
@media (max-width: 1100px) { .x4-dem-reg-large { grid-column: span 2; } }
