/* Agent commercial — le systeme clair de Marchés à gagner : fond tres clair, surfaces
   blanches, bleu nuit pour agir, vert seulement pour ce qui va bien, orange
   pour l'attention, rouge pour l'arret. */
:root {
  --fond: #F6F7F9; --surface: #FFFFFF; --texte: #101828; --texte-2: #475467; --texte-3: #5B6679;
  --bord: #E4E7EC; --nuit: #13294B; --bleu: #1D4ED8; --bleu-clair: #EEF4FF;
  --vert: #067647; --vert-clair: #ECFDF3; --orange: #B54708; --orange-clair: #FFFAEB;
  --rouge: #B42318; --rouge-clair: #FEF3F2; --rayon: 12px;
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 15px/1.55 var(--police); }
a { color: var(--bleu); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--bleu); outline-offset: 2px; }
.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
h1 { font: 600 28px/1.2 var(--serif); margin: 8px 0 20px; color: var(--nuit); }
h2 { font-size: 16px; margin: 0 0 12px; color: var(--nuit); }
h3 { font-size: 15px; margin: 0 0 6px; }
.entete { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--surface);
  border-bottom: 1px solid var(--bord); flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 10px; }
.marque small { display: block; color: var(--texte-3); font-size: 12px; }
.sigle { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--nuit), var(--bleu)); }
.sortie { margin-left: auto; display: flex; gap: 10px; align-items: center; color: var(--texte-3); font-size: 13px; }
.menu { display: flex; gap: 4px; padding: 8px 24px; background: var(--surface); border-bottom: 1px solid var(--bord);
  overflow-x: auto; }
.menu a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--texte-2); white-space: nowrap; }
.menu a[aria-current="page"] { background: var(--bleu-clair); color: var(--nuit); font-weight: 600; }
.pastille { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange);
  color: #fff; font-size: 12px; text-align: center; }
.bandeau { background: var(--orange-clair); color: var(--orange); padding: 8px 14px; font-size: 14px;
  border: 1px solid #FEDF89; border-radius: 10px; margin-top: 8px; }
main { max-width: 1180px; margin: 0 auto; padding: 16px 24px 48px; }
main.etroit { max-width: 520px; padding-top: 48px; }
.pied { text-align: center; color: var(--texte-3); font-size: 12px; padding: 24px; }
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px;
  margin-bottom: 16px; }
.etat-general { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.grand { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.ok-texte { color: var(--vert); }
.etat { font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; }
.etat.marche { background: var(--vert-clair); color: var(--vert); }
.etat.attente { background: var(--orange-clair); color: var(--orange); }
.etat.arrete { background: var(--rouge-clair); color: var(--rouge); }
.chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.chiffre { border: 1px solid var(--bord); border-radius: 10px; padding: 12px; }
.chiffre .valeur { display: block; font: 600 24px/1.2 var(--police); color: var(--nuit); overflow-wrap: anywhere; }
.chiffre .libelle { display: block; color: var(--texte-2); font-size: 13px; }
.chiffre .detail { display: block; color: var(--texte-3); font-size: 12px; overflow-wrap: anywhere; }
.bouton { display: inline-block; border: 1px solid var(--nuit); border-radius: 10px; padding: 8px 14px; font: inherit;
  font-weight: 600; cursor: pointer; text-decoration: none; background: var(--surface); color: var(--nuit); }
.bouton.principal { background: var(--nuit); color: #fff; }
.bouton.secondaire { background: var(--surface); color: var(--nuit); }
.bouton.danger { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.bouton.enorme { font-size: 18px; padding: 16px 28px; letter-spacing: .03em; }
.lien { background: none; border: 0; color: var(--bleu); cursor: pointer; font: inherit; text-decoration: underline; }
.en-ligne { display: inline; }
.boutons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.formulaire { display: grid; gap: 12px; max-width: 640px; }
.formulaire label, .filtres label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #D0D5DD; border-radius: 8px;
  background: #fff; color: var(--texte); max-width: 100%; }
textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.case { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }
.cases { display: flex; flex-wrap: wrap; gap: 6px 16px; }
fieldset { border: 1px solid var(--bord); border-radius: 10px; }
.filtres { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.note { color: var(--texte-3); font-size: 13px; }
.vide { color: var(--texte-3); }
.defile { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { color: var(--texte-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #F2F4F7;
  color: var(--texte-2); white-space: nowrap; }
.badge.hot, .badge.customer, .badge.valid, .badge.sent, .badge.active, .badge.interested { background: var(--vert-clair); color: var(--vert); }
.badge.high, .badge.qualified, .badge.contactable, .badge.approved, .badge.scheduled { background: var(--bleu-clair); color: var(--nuit); }
.badge.review, .badge.nurture, .badge.risky, .badge.unknown, .badge.paused, .badge.engaged { background: var(--orange-clair); color: var(--orange); }
.badge.blocked, .badge.optout, .badge.bounced, .badge.suppressed, .badge.invalid, .badge.killed, .badge.failed { background: var(--rouge-clair); color: var(--rouge); }
.flash { padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; }
.flash.ok { background: var(--vert-clair); color: var(--vert); }
.flash.erreur { background: var(--rouge-clair); color: var(--rouge); }
.flash.attention { background: var(--orange-clair); color: var(--orange); }
.fil { list-style: none; padding: 0; margin: 0; }
.fil li { display: grid; grid-template-columns: 52px 1fr; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.fil time { color: var(--texte-3); font-variant-numeric: tabular-nums; grid-row: span 2; }
.fil small { grid-column: 2; color: var(--texte-3); }
.fil strong { margin-right: 6px; }
.actions { margin: 0 0 12px; }
.element { border-top: 1px solid var(--bord); padding: 12px 0; }
.element:first-of-type { border-top: 0; padding-top: 0; }
.element.critique { border-left: 4px solid var(--rouge); padding-left: 12px; }
blockquote { margin: 8px 0; padding: 8px 12px; background: var(--fond); border-radius: 8px; white-space: pre-wrap; }
.fiche { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 16px; margin: 0; }
.fiche dt { color: var(--texte-2); font-weight: 600; }
.fiche dd { margin: 0; overflow-wrap: anywhere; }
.fiche ul, .element ul { margin: 4px 0; padding-left: 18px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, Menlo, monospace; margin: 0; }
.raisons { background: var(--fond); padding: 12px; border-radius: 8px; margin-top: 12px; }
.apercu { border: 1px solid var(--bord); border-radius: 10px; padding: 16px; }
.apercu .objet { font-weight: 700; margin: 0 0 12px; }
.apercu pre { font-family: var(--police); font-size: 14px; }
.rapport { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px; }
.onglets { display: flex; gap: 12px; flex-wrap: wrap; }
.onglets a[aria-current="page"] { font-weight: 700; color: var(--nuit); }
.pagination { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.etapes { list-style: none; padding: 0; display: grid; gap: 10px; }
.etape { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; background: var(--surface);
  border: 1px solid var(--bord); border-radius: 10px; padding: 12px; }
.etape p { margin: 2px 0 0; color: var(--texte-2); font-size: 13px; overflow-wrap: anywhere; }
.etape .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: #F2F4F7; }
.etape.faite .num { background: var(--vert-clair); color: var(--vert); }
.etape.a-faire .num { background: var(--orange-clair); color: var(--orange); }
.cle { font: 600 20px/1.4 ui-monospace, Menlo, monospace; letter-spacing: .06em; background: var(--fond); padding: 12px;
  border-radius: 8px; overflow-wrap: anywhere; cursor: copy; }
body.nue main h1 { margin-top: 0; }
@media (max-width: 720px) {
  .entete, .menu, main { padding-left: 16px; padding-right: 16px; }
  .fiche { grid-template-columns: 1fr; }
  .fiche dt { margin-top: 8px; }
  .etape { grid-template-columns: 36px 1fr; }
  .etape form, .etape > a { grid-column: 2; }
  .bouton.enorme { width: 100%; }
  h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
