:root {
  /* Charte Diffuz (reprise de la landing) : surfaces sombres vert-noir,
     vert émeraude en accent, néon réservé aux fonds sombres. */
  --ink:        #041713;
  --ink-2:      #0C1F1B;
  --ink-3:      #1B2D29;
  --paper:      #F3F7F5;
  --surface:    #FFFFFF;
  --line:       #DDE6E1;
  --slate:      #56645D;
  --slate-2:    #879488;

  --signal:     #1FA55F;
  --signal-deep:#006D3A;
  --signal-soft:#E2F6EA;
  --neon:       #64DE90;
  --neon-2:     #29E284;
  --on-neon:    #00391C;
  --tick:       #29E284;
  --amber:      #E0913A;
  --amber-soft: #FBEEDC;
  --rose:       #CF4B45;
  --rose-soft:  #FAE6E5;

  --display: "Space Grotesk", "Trebuchet MS", sans-serif;
  --body:    "Hanken Grotesk", -apple-system, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(4, 23, 19, .05), 0 12px 32px -18px rgba(4, 23, 19, .35);
  --glow: 0 0 16px rgba(20, 160, 90, .25);
  /* Fond sombre signature : halo émeraude sur vert-noir */
  --dark-bg:
    radial-gradient(55% 45% at 88% 12%, rgba(100, 222, 144, .13) 0%, transparent 70%),
    radial-gradient(120% 90% at 8% 0%, var(--ink-3) 0%, transparent 55%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0;
}

a { color: var(--signal-deep); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Marque ------------------------------------------------------ */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }

.brand__mark {
  height: 30px; width: auto; flex: none;
  object-fit: contain;
}

.brand__name {
  font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em;
}
.brand__name em { font-style: normal; color: var(--signal); }

/* Pastille à côté du nom (« MESSAGERIE IA », « ADMIN ») */
.brand__tag {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
  background: var(--signal-soft); color: var(--signal-deep);
}

/* =========================================================================
   PAGE INSCRIPTION
   ========================================================================= */
.signup {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}

.signup__aside {
  background: var(--dark-bg);
  color: #EAF2ED;
  padding: 44px 52px;
  display: flex; flex-direction: column; gap: 34px;
}

.signup__aside .brand__name { color: #fff; }
.signup__aside .brand__name em { color: var(--neon); }
.signup__aside .brand__tag { background: var(--ink-3); color: var(--neon); }

.pitch__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--neon);
  background: var(--ink-3);
  border: 1px solid transparent;
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 16px; width: fit-content;
}

.pitch h1 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.06;
  color: #fff;
  max-width: 15ch;
}
.pitch h1 span {
  color: var(--neon);
  background: linear-gradient(90deg, var(--neon), var(--neon-2), #81FBAA);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pitch p {
  color: #BDCABC;
  max-width: 42ch;
  margin: 16px 0 0;
}

.pitch__facts {
  list-style: none; padding: 0; margin: 26px 0 0;
  display: grid; gap: 12px;
}
.pitch__facts li {
  display: flex; gap: 11px; align-items: flex-start;
  color: #D2E7E0; font-size: 14px;
}
.pitch__facts svg { flex: none; margin-top: 3px; color: var(--neon); }

.phone {
  margin-top: auto;
  width: 100%; max-width: 320px;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .6);
  padding: 14px;
}

.phone__bar {
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 11px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.phone__avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--signal); color: var(--on-neon);
  display: grid; place-items: center;
  font-size: 11px; font-family: var(--display); font-weight: 700;
}
.phone__title { font-size: 13px; font-weight: 600; color: #EAF2ED; }
.phone__state { font-size: 11px; color: var(--neon); font-family: var(--mono); }

.phone__thread { display: grid; gap: 8px; }

.bubble {
  max-width: 84%;
  padding: 8px 11px 6px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
}
.bubble--in  { background: #10231F; color: #D2E7E0; justify-self: start; border-bottom-left-radius: 3px; }
.bubble--out { background: #006538; color: #F2FBF6; justify-self: end; border-bottom-right-radius: 3px; }

.bubble__meta {
  display: flex; align-items: center; gap: 4px; justify-content: flex-end;
  font-family: var(--mono); font-size: 10px; opacity: .72; margin-top: 3px;
}
.bubble__ticks { color: var(--tick); letter-spacing: -3px; }

.phone__stat {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--mono); font-size: 10.5px; color: #A9C0B7;
}

.signup__main {
  background: var(--surface);
  padding: 44px clamp(24px, 5vw, 72px) 56px;
  overflow-y: auto;
}

.form-head { max-width: 46ch; margin-bottom: 28px; }
.form-head h2 { font-size: 26px; }
.form-head p { color: var(--slate); margin: 8px 0 0; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--slate-2);
  display: block; margin-bottom: 10px;
}

fieldset { border: 0; padding: 0; margin: 0 0 26px; }

legend {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--slate-2);
  padding: 0 0 12px; width: 100%;
  border-bottom: 1px solid var(--line); margin-bottom: 18px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { grid-column: 1 / -1; }

.field label { font-size: 13px; font-weight: 600; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field select {
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

.field input:hover, .field select:hover { border-color: #C6D2CB; }

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}

.field__hint { font-size: 12px; color: var(--slate-2); }
.field__error { font-size: 12.5px; color: var(--rose); font-weight: 500; }
.field--invalid input, .field--invalid select { border-color: var(--rose); }

.phone-input { display: flex; }
.phone-input__cc {
  display: grid; place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line); border-right: 0;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  background: var(--paper);
  font-family: var(--mono); font-size: 13px; color: var(--slate);
}
.phone-input input { border-radius: 0 var(--r-sm) var(--r-sm) 0; flex: 1; min-width: 0; }

.check {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.check:hover { border-color: #C6D2CB; background: #FAFCFA; }
.check input { margin-top: 2px; accent-color: var(--signal); width: 16px; height: 16px; flex: none; }
.check__text strong { display: block; font-size: 13.5px; }
.check__text span { font-size: 12.5px; color: var(--slate); }
.check + .check { margin-top: 10px; }

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

.btn {
  font: inherit; font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  transition: transform .12s ease, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--neon); color: var(--on-neon); box-shadow: var(--glow); }
.btn--primary:hover { background: #4FCF7E; }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--paper); }

.btn--block { width: 100%; }

.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions p { font-size: 12.5px; color: var(--slate-2); margin: 0; flex: 1; min-width: 220px; }

.alert {
  padding: 12px 15px; border-radius: var(--r-sm);
  font-size: 13.5px; margin-bottom: 20px;
  border: 1px solid;
}
.alert--error { background: var(--rose-soft); border-color: #F1C6C4; color: #8E2A26; }
.alert--info  { background: var(--signal-soft); border-color: #C2E8D2; color: var(--signal-deep); }

@media (max-width: 900px) {
  .signup { grid-template-columns: 1fr; }
  .signup__aside { padding: 30px 24px; }
  .phone { display: none; }
}

@media (max-width: 620px) {
  .grid-2 { grid-template-columns: 1fr; }
  .signup__main { padding: 28px 20px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Confirmation / Pairing ---------------------------------------------- */
.done { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.done__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  max-width: 480px; width: 100%; padding: 40px;
  text-align: center;
}
.done__card h1 { font-size: 24px; margin: 18px 0 10px; }
.done__card > p { color: var(--slate); margin: 0 0 26px; }

.pair-code {
  font-family: var(--mono); font-size: 30px; letter-spacing: .16em;
  background: var(--ink); color: var(--neon);
  padding: 18px; border-radius: var(--r-md);
  text-align: center; margin-bottom: 8px;
}
.done__logo { display: block; width: 96px; height: auto; margin: 0 auto 18px; }

.pair-expiry { font-family: var(--mono); font-size: 12px; color: var(--slate-2); text-align: center; margin-bottom: 18px; }

.pairing-qr {
  display: block;
  width: 220px; height: 220px;
  margin: 0 auto 14px;
  background: #fff;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}

.steps { list-style: none; counter-reset: s; padding: 0; margin: 22px 0; display: grid; gap: 14px; text-align: left; }
.steps li {
  counter-increment: s;
  display: grid; grid-template-columns: 26px 1fr; gap: 12px;
  font-size: 14px; color: var(--slate);
}
.steps li::before {
  content: counter(s);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--signal-soft); color: var(--signal-deep);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
}
.steps li strong { color: var(--ink); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; font-weight: 500;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; }
.dot--live { box-shadow: 0 0 0 0 rgba(20, 160, 90, .5); animation: pulse 2.4s infinite; }
@keyframes pulse {
  70%  { box-shadow: 0 0 0 8px rgba(20, 160, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 160, 90, 0); }
}

/* --- Connexion ------------------------------------------------------------ */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: var(--dark-bg);
}

.login__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  max-width: 380px;
  width: 100%;
  padding: 40px;
  text-align: center;
}

.login__logo {
  width: 84px;
  height: auto;
  margin: 0 auto 18px;
  display: block;
}

.login__card h1 { font-size: 22px; margin-bottom: 8px; }
.login__card > p { color: var(--slate); margin: 0 0 24px; }

.login__card form { display: grid; gap: 16px; text-align: left; }
.login__card .btn--block { margin-top: 4px; }

/* =========================================================================
   DASHBOARD ADMIN
   ========================================================================= */
.admin {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 40px) 60px;
}

/* Tableaux à beaucoup de colonnes (campagnes) : on laisse respirer pour
   éviter le défilement horizontal. */
.admin--wide { max-width: 1600px; }

.topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 26px;
}
.topbar .brand { margin-bottom: 18px; }
.topbar h1 { font-size: 24px; }
.topbar p { margin: 4px 0 0; color: var(--slate); font-size: 13.5px; }
.topbar__right { display: flex; align-items: center; gap: 12px; }

/* --- Cartes KPI --------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
}

.card__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.card__head h3 { font-size: 15px; }
.card__head span { font-family: var(--mono); font-size: 11px; color: var(--slate-2); }

.kpis {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 18px;
}
.kpi { display: flex; flex-direction: column; }
.kpi__label { font-size: 12.5px; color: var(--slate); }
.kpi__value {
  font-family: var(--display); font-size: 30px; font-weight: 600;
  letter-spacing: -.03em; margin: 6px 0 4px; line-height: 1;
}
.kpi__hint { font-size: 11.5px; color: var(--slate-2); }
.kpi__delta { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.kpi__delta--up   { color: var(--signal-deep); }
.kpi__delta--down { color: var(--rose); }

/* --- Graphique + top secteurs -------------------------------------------- */
.admin-grid {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 14px; margin-bottom: 18px; align-items: stretch;
}
.admin-grid .card { display: flex; flex-direction: column; }

.chart-wrap { position: relative; height: 220px; }

.sector-list { list-style: none; counter-reset: rank; padding: 0; margin: 0; display: grid; gap: 12px; }
.sector-list li {
  counter-increment: rank;
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px;
  font-size: 13.5px;
}
.sector-list li::before {
  content: counter(rank);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--signal-soft); color: var(--signal-deep);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
}
.sector-list strong { font-family: var(--display); font-weight: 600; }

@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
}

/* --- Tableau ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; margin: 0 -20px -18px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-family: var(--mono); font-weight: 400;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate-2); padding: 0 12px 10px; white-space: nowrap;
}
thead th:first-child, tbody td:first-child { padding-left: 20px; }
thead th:last-child,  tbody td:last-child  { padding-right: 20px; }
tbody td { padding: 13px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #FAFCFA; }
td .muted { color: var(--slate-2); font-size: 12px; display: block; margin-top: 2px; }
td.mono, .mono { font-family: var(--mono); font-size: 12.5px; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions form { display: inline; }
.row-actions [data-role="open-drawer"] { margin-right: 8px; }

/* --- Barre de filtres (campagnes) ---------------------------------------- */
/* Chaque critère est une « pastille-champ » : icône + libellé mono au-dessus
   de la valeur. Un critère actif passe en vert pour qu'on voie d'un coup
   d'œil ce qui filtre la liste. */
.filterbar {
  display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px;
  margin: 0 -20px 18px; padding: 14px 20px;
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.filterbar__field,
.filterbar__range {
  display: flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s, background .15s;
  cursor: text;
}
.filterbar__field:hover,
.filterbar__range:hover { border-color: #C3D0C9; }
.filterbar__field:focus-within,
.filterbar__range:focus-within {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}
.filterbar__field.is-set,
.filterbar__range.is-set { border-color: rgba(31, 165, 95, .55); background: #FBFEFC; }

.filterbar__field--search { flex: 1 1 260px; }

.filterbar__icon { width: 18px; height: 18px; flex: none; color: var(--slate-2); }
.is-set > .filterbar__icon,
:focus-within > .filterbar__icon { color: var(--signal); }

.filterbar__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; cursor: inherit; }

.filterbar__label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--slate-2);
}
.is-set .filterbar__label { color: var(--signal-deep); }

.filterbar input {
  font: inherit; font-size: 14px; font-weight: 500;
  width: 100%; padding: 0; margin: 0;
  border: 0; background: transparent; color: var(--ink);
  outline: none;
}
.filterbar input::placeholder { color: var(--slate-2); font-weight: 400; }
.filterbar input[type="search"]::-webkit-search-cancel-button { cursor: pointer; opacity: .55; }

/* Dates : pas de bordure propre, l'icône calendrier native reste cliquable
   mais discrète, recolorée dans la charte. */
.filterbar input[type="date"] {
  width: 132px; color-scheme: light;
  font-family: var(--mono); font-size: 13px; letter-spacing: -.01em;
  cursor: pointer;
}
.filterbar input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .45; margin-left: 2px;
  transition: opacity .15s;
}
.filterbar input[type="date"]:hover::-webkit-calendar-picker-indicator { opacity: .9; }

.filterbar__arrow { width: 16px; height: 16px; flex: none; color: var(--slate-2); }

/* Périodes rapides */
.filterbar__presets {
  display: flex; align-items: center; gap: 4px;
  padding: 4px; min-height: 50px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.chip {
  font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 8px 12px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--slate);
  cursor: pointer; white-space: nowrap;
  transition: background .14s, color .14s;
}
.chip:hover { background: var(--paper); color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--neon); }
.chip:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }

.filterbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.filterbar__actions .btn { min-height: 40px; padding-inline: 18px; }

@media (max-width: 1100px) {
  .filterbar__actions { margin-left: 0; }
}
@media (max-width: 640px) {
  .filterbar__range { flex-wrap: wrap; flex: 1 1 100%; }
  .filterbar__range input[type="date"] { width: 100%; }
  .filterbar__presets { flex: 1 1 100%; overflow-x: auto; }
  .filterbar__actions { flex: 1 1 100%; }
  .filterbar__actions .btn { flex: 1; }
}

/* --- En-têtes de tableau triables ---------------------------------------- */
.th-sort { padding: 0 !important; }
.th-sort a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 12px 10px;
  color: inherit; text-decoration: none;
  transition: color .14s;
}
thead .th-sort:first-child a { padding-left: 20px; }
.th-sort a:hover { color: var(--ink); }
.th-sort__arrow { font-size: 10px; opacity: .45; }
.th-sort.is-active a { color: var(--signal-deep); }
.th-sort.is-active .th-sort__arrow { opacity: 1; }

/* --- Actions compactes en icônes ---------------------------------------- */
.actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.actions form { display: flex; }

.icon-btn {
  display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: var(--r-sm);
  background: transparent;
  color: var(--slate-2);
  cursor: pointer;
  transition: background .14s, color .14s;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--paper); color: var(--ink); }
.icon-btn--danger:hover { background: var(--rose-soft); color: #8E2A26; }
.icon-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }

/* --- Pastilles de statut ------------------------------------------------ */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.tag--active  { background: var(--signal-soft); color: var(--signal-deep); }
.tag--pairing { background: var(--amber-soft); color: #8A5312; }
.tag--pending { background: var(--paper); color: var(--slate); }
.tag--failed  { background: var(--rose-soft); color: #8E2A26; }
.tag--banned  { background: var(--ink); color: #fff; }

.btn--sm { padding: 7px 13px; font-size: 12.5px; }
.btn--danger {
  background: transparent; border-color: #F1C6C4; color: #8E2A26;
}
.btn--danger:hover { background: var(--rose-soft); border-color: var(--rose); }

.empty { padding: 34px; text-align: center; color: var(--slate-2); font-size: 13.5px; }

@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
}

/* --- Panneau détail session (drawer) ------------------------------------ */
main.admin.is-blurred {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  transition: filter .2s;
}

.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(7, 26, 22, .45);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  z-index: 55;
}
.drawer-backdrop.is-visible { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100vh;
  width: 420px; max-width: 92vw;
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 60;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }

.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--surface);
}
.drawer__head h3 { font-size: 18px; margin-top: 4px; }

.drawer__body { padding: 20px 24px 32px; display: grid; gap: 20px; }

.drawer__error {
  background: var(--rose-soft); border: 1px solid #F1C6C4; color: #8E2A26;
  padding: 10px 13px; border-radius: var(--r-sm); font-size: 13px;
}

.drawer__row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }

.drawer__toggle {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
}
.drawer__toggle strong { display: block; font-size: 13px; }
.drawer__toggle span { font-size: 12px; color: var(--slate); }

.drawer__facts { display: grid; gap: 10px; margin: 0; }
.drawer__facts > div {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; border-top: 1px solid var(--line); padding-top: 8px;
}
.drawer__facts > div:first-child { border-top: 0; padding-top: 0; }
.drawer__facts dt { color: var(--slate); }
.drawer__facts dd { margin: 0; font-weight: 500; text-align: right; }

.drawer__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.drawer__stats div { text-align: center; background: var(--paper); border-radius: var(--r-sm); padding: 12px 6px; }
.drawer__stats span { display: block; font-family: var(--display); font-size: 18px; font-weight: 600; }
.drawer__stats label { font-size: 10.5px; color: var(--slate-2); text-transform: uppercase; letter-spacing: .06em; }

/* --- Interrupteur (switch) ----------------------------------------------- */
.switch { position: relative; display: inline-block; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  display: block; width: 40px; height: 22px; border-radius: 999px;
  background: var(--line); transition: background .15s; cursor: pointer;
}
.switch__thumb {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; margin: 3px; transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.switch input:checked + .switch__track { background: var(--signal); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--signal); outline-offset: 2px; }

/* =========================================================================
   LANDING PAGE ("/") — fond sombre unique sur toute la page
   ========================================================================= */
.land {
  background: var(--ink);
  color: #D3E3DB;
}

/* Une seule couleur d'accent : les coches du mockup passent au vert. */
.land .bubble__ticks { color: var(--signal); }

/* --- Barre de navigation ------------------------------------------------- */
.land-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 26, 22, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.land-nav__inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: 15px clamp(20px, 4vw, 40px);
}
.land-nav .brand__name { color: #fff; }

.land-nav__links { display: flex; gap: clamp(18px, 2.4vw, 32px); margin: 0 auto; }
.land-nav__links a {
  position: relative;
  color: #A9C0B7; text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 6px 0;
  transition: color .15s;
}
.land-nav__links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--signal);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.land-nav__links a:hover { color: #fff; }
.land-nav__links a:hover::after { transform: scaleX(1); }

.land-nav__actions { display: flex; align-items: center; gap: 18px; }
.land-nav__phone {
  display: inline-flex; align-items: center; gap: 7px;
  color: #EAF2ED; text-decoration: none;
  font-family: var(--mono); font-size: 12.5px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.land-nav__phone svg { color: var(--signal); flex: none; }
.land-nav__phone:hover {
  color: #fff;
  border-color: rgba(20, 160, 90, .55);
  background: rgba(20, 160, 90, .1);
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(120% 70% at 12% 0%, var(--ink-3) 0%, transparent 58%),
    radial-gradient(80% 60% at 85% 20%, rgba(20, 160, 90, .16) 0%, transparent 62%);
  padding: clamp(56px, 7vw, 92px) clamp(20px, 4vw, 40px) 0;
}
.hero__inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center; gap: clamp(32px, 5vw, 64px);
}
.hero__copy { max-width: 48ch; }
.hero__copy h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.03;
  color: #fff;
  margin: 18px 0 20px;
}
.hero__copy h1 span { color: var(--signal); }
.hero__copy > p {
  color: #A9C0B7; font-size: 16.5px; line-height: 1.62;
  margin: 0 0 30px; max-width: 48ch;
}
.hero__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.hero__note { font-family: var(--mono); font-size: 12px; color: #8FA79D; display: block; }

/* Signature : la mascotte en grand, silhouette blanche dans un halo vert */
.hero__mark {
  position: relative;
  display: grid; place-items: center;
  min-height: clamp(280px, 34vw, 420px);
}
.hero__halo {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 160, 90, .42) 0%, rgba(20, 160, 90, .10) 45%, transparent 70%);
  filter: blur(18px);
}
.hero__ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(20, 160, 90, .26);
}
.hero__ring--1 { width: 66%; aspect-ratio: 1; animation: heroPulse 6s ease-in-out infinite; }
.hero__ring--2 { width: 88%; aspect-ratio: 1; border-style: dashed; border-color: rgba(255, 255, 255, .12); animation: heroSpin 46s linear infinite; }
@keyframes heroPulse {
  0%, 100% { transform: scale(1);    opacity: .85; }
  50%      { transform: scale(1.05); opacity: .45; }
}
@keyframes heroSpin { to { transform: rotate(360deg); } }

/* Le SVG du logo est monochrome : on s'en sert comme pochoir pour le peindre
   en blanc. Le drop-shadow est porté par le parent, sinon il s'appliquerait
   au carré avant le masquage. */
.hero__logo {
  position: relative;
  width: clamp(200px, 26vw, 320px);
  aspect-ratio: 1;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .55));
  animation: heroFloat 7s ease-in-out infinite;
  background: url("../img/logo-whabot-one.png") center / contain no-repeat;
}
@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .hero__logo { background: none; }
  .hero__logo::before {
    content: "";
    position: absolute; inset: 0;
    background: #fff;
    -webkit-mask: url("../img/logo-whabot-one.svg") center / contain no-repeat;
            mask: url("../img/logo-whabot-one.svg") center / contain no-repeat;
  }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.hero__chip {
  position: absolute;
  font-family: var(--mono); font-size: 11px; color: #EAF2ED;
  background: rgba(10, 35, 29, .9);
  border: 1px solid rgba(255, 255, 255, .13);
  padding: 7px 12px; border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .8);
}
.hero__chip--1 { top: 16%; right: 2%; color: var(--signal); }
.hero__chip--2 { bottom: 15%; left: 0; }

.proof {
  list-style: none; margin: clamp(48px, 6vw, 72px) auto 0; padding: 0;
  max-width: 1180px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.proof li {
  padding: 22px 16px; text-align: center;
  border-right: 1px solid rgba(255, 255, 255, .1);
}
.proof li:last-child { border-right: 0; }
.proof strong {
  display: block; font-family: var(--display); font-weight: 600;
  font-size: 21px; color: #fff; letter-spacing: -.02em;
}
.proof span { font-size: 12.5px; color: #8FA79D; }

/* --- Titres de section (communs, sur fond sombre) ------------------------- */
.land .eyebrow { color: var(--slate-2); }
.eyebrow--dark { color: var(--signal); }
.land h2 { color: #fff; }

/* --- Comment ça marche (panneau vitré) ----------------------------------- */
.how { padding: clamp(56px, 7vw, 88px) clamp(20px, 4vw, 40px); }
.how__head { max-width: 1180px; margin: 0 auto clamp(32px, 4vw, 48px); }
.how__head h2 { font-size: clamp(24px, 2.7vw, 34px); margin-top: 10px; }
.how__head p { color: #A9C0B7; margin: 12px 0 0; max-width: 52ch; }

.how__panel {
  max-width: 1180px; margin: 0 auto;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-lg);
  padding: clamp(32px, 4vw, 52px) clamp(20px, 4vw, 48px);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
}

.flow {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 34px; position: relative;
}
.flow::before {
  content: "";
  position: absolute; top: 62px; left: 16.6%; right: 16.6%; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(20, 160, 90, .55) 0 6px, transparent 6px 12px);
}
.flow__step {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; position: relative; z-index: 1;
}
.flow__num {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  color: var(--signal); opacity: .9;
}
.flow__icon {
  width: 58px; height: 58px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--signal); color: #fff;
  box-shadow: 0 0 0 7px rgba(20, 160, 90, .15);
}
.flow__label { font-family: var(--display); font-weight: 600; font-size: 15.5px; color: #fff; }
.flow__text { font-size: 13px; color: #A9C0B7; max-width: 26ch; line-height: 1.5; }

/* --- Démo (conversation) -------------------------------------------------- */
.demo {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .78fr);
  align-items: center; gap: clamp(32px, 5vw, 64px);
  padding: clamp(56px, 7vw, 88px) clamp(20px, 4vw, 40px);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.demo__copy h2 { font-size: clamp(23px, 2.5vw, 32px); margin-top: 10px; }
.demo__copy > p { color: #A9C0B7; margin: 14px 0 0; max-width: 46ch; line-height: 1.6; }
.demo__copy strong { color: #fff; }
.demo__list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 11px; }
.demo__list li {
  position: relative; padding-left: 26px;
  font-size: 14px; color: #D3E3DB;
}
.demo__list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--signal); border-bottom: 2px solid var(--signal);
  transform: rotate(-45deg);
}
.phone--demo { margin: 0; justify-self: end; max-width: 330px; }

/* --- Cartes sur fond sombre (secteurs + pourquoi) ------------------------- */
.sectors, .why {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(56px, 7vw, 88px) clamp(20px, 4vw, 40px);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.sectors__head, .why__head { max-width: 56ch; margin-bottom: clamp(28px, 3vw, 44px); }
.sectors__head h2, .why__head h2 { font-size: clamp(23px, 2.5vw, 32px); margin-top: 10px; }
.sectors__head h2 { max-width: 22ch; }

.sectors__grid, .why__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}

.sector-card, .why__card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-md);
  padding: 24px 22px;
}
.sector-card h3, .why__card h3 { font-size: 15.5px; color: #fff; margin-bottom: 9px; }
.sector-card p, .why__card p { font-size: 13.5px; color: #A9C0B7; line-height: 1.55; margin: 0; }

.sector-card { transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.sector-card:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 160, 90, .45);
  background: rgba(20, 160, 90, .08);
}
.why__card { border-top: 3px solid var(--signal); }

/* --- Contact ---------------------------------------------------------------- */
.contact {
  background: radial-gradient(90% 80% at 12% 0%, rgba(23, 64, 54, .55) 0%, transparent 60%);
  padding: clamp(56px, 7vw, 88px) clamp(20px, 4vw, 40px);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.contact__inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px); align-items: start;
}
.contact__copy h2 { font-size: clamp(23px, 2.5vw, 32px); margin-top: 10px; max-width: 18ch; }
.contact__copy > p { color: #A9C0B7; margin: 14px 0 0; max-width: 42ch; line-height: 1.6; }

.contact__phone {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 24px; padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(20, 160, 90, .4);
  background: rgba(20, 160, 90, .1);
  color: #fff; text-decoration: none;
  font-family: var(--mono); font-size: 15px;
  transition: background .15s, border-color .15s;
}
.contact__phone svg { color: var(--signal); flex: none; }
.contact__phone:hover { background: rgba(20, 160, 90, .2); border-color: var(--signal); }

.contact__facts { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.contact__facts li {
  position: relative; padding-left: 18px;
  font-size: 13.5px; color: #D3E3DB;
}
.contact__facts li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--signal);
}

/* Formulaire en panneau vitré, champs sombres */
.contact__form {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 34px);
  display: grid; gap: 16px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .9);
}
.contact__form .field label { color: #EAF2ED; }
.contact__form .field__hint { color: #8FA79D; }

.contact__form .field input[type="text"],
.contact__form .field input[type="email"],
.contact__form .field input[type="tel"],
.contact__form textarea {
  font: inherit;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-sm);
  background: rgba(7, 26, 22, .5);
  color: #EAF2ED;
  transition: border-color .15s, box-shadow .15s;
}
.contact__form textarea { resize: vertical; }
.contact__form .field input::placeholder,
.contact__form textarea::placeholder { color: #6F847C; }

.contact__form .field input:hover,
.contact__form textarea:hover { border-color: rgba(255, 255, 255, .3); }

.contact__form .field input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(20, 160, 90, .22);
}

.contact__form .phone-input__cc {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: #A9C0B7;
}

/* Alertes lisibles sur le panneau sombre */
.contact__form .alert { margin-bottom: 0; }
.contact__form .alert--info {
  background: rgba(20, 160, 90, .16);
  border-color: rgba(20, 160, 90, .5);
  color: #B6F0CE;
}
.contact__form .alert--error {
  background: rgba(207, 75, 69, .16);
  border-color: rgba(207, 75, 69, .5);
  color: #F3C4C1;
}

/* --- Bandeau CTA final ------------------------------------------------------- */
.cta-band {
  text-align: center;
  padding: clamp(56px, 7vw, 84px) clamp(20px, 4vw, 40px);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.cta-band h2 { font-size: clamp(25px, 3vw, 36px); max-width: 20ch; }
.cta-band .hero__note { color: #8FA79D; }

/* --- Pied de page ------------------------------------------------------------ */
.land-footer { border-top: 1px solid rgba(255, 255, 255, .1); }
.land-footer__grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(40px, 5vw, 60px) clamp(20px, 4vw, 40px);
}
.land-footer .brand__name { color: #fff; }
.land-footer__brand p {
  margin: 16px 0 0; max-width: 38ch;
  font-size: 13.5px; color: #A9C0B7; line-height: 1.6;
}

.land-footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.land-footer__col h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--signal); margin-bottom: 4px;
}
.land-footer__col a,
.land-footer__col span {
  font-size: 13.5px; color: #A9C0B7; text-decoration: none;
  transition: color .15s;
}
.land-footer__col a:hover { color: #fff; }

.land-footer__bar {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 18px clamp(20px, 4vw, 40px) 30px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12.5px; color: #8FA79D;
}
.land-footer__admin { color: #8FA79D; text-decoration: none; }
.land-footer__admin:hover { color: #D3E3DB; text-decoration: underline; }

/* --- Boutons spécifiques landing ---------------------------------------------- */
.btn--lg { padding: 14px 24px; font-size: 15px; }
.btn--outline {
  background: transparent; color: #EAF2ED;
  border-color: rgba(255, 255, 255, .26);
}
.btn--outline:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .42); }

/* --- Apparition au scroll ------------------------------------------------------ */
.reveal-init { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal-init.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1080px) {
  .land-nav__phone { display: none; }
}

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__mark { order: -1; min-height: 260px; }
  .hero__copy { max-width: none; }
  .demo { grid-template-columns: 1fr; }
  .phone--demo { justify-self: center; }
  .contact__inner { grid-template-columns: 1fr; }
  .sectors__grid, .why__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .land-footer__grid { grid-template-columns: 1fr 1fr; }
  .land-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .land-nav__links { display: none; }
  .proof { grid-template-columns: repeat(2, 1fr); }
  .proof li:nth-child(2) { border-right: 0; }
  .proof li:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .flow { grid-template-columns: 1fr; gap: 30px; }
  .flow::before { display: none; }
}

@media (max-width: 560px) {
  .sectors__grid, .why__grid { grid-template-columns: 1fr; }
  .hero__chip { display: none; }
  .land-footer__grid { grid-template-columns: 1fr; }
  .land-footer__bar { flex-direction: column; text-align: center; gap: 10px; }
}

/* --- Vue campagnes (admin) ------------------------------------------------ */
.kpis--4 { grid-template-columns: repeat(4, 1fr); }

.filter-form { display: flex; align-items: center; gap: 8px; }
.filter-form select {
  font: inherit; font-size: 13px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
}
.filter-form select:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}

.cell-message {
  max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--slate);
}
td.mono .muted { display: inline; margin-left: 6px; }

@media (max-width: 1000px) {
  .kpis--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .kpis--4 { grid-template-columns: 1fr; }
}

/* --- Cloche de notifications (barre du haut admin) ------------------------ */
.notif-bell {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--slate); transition: color .15s, border-color .15s;
}
.notif-bell svg { width: 18px; height: 18px; }
.notif-bell:hover { color: var(--ink); border-color: #C3D0C9; }
.notif-bell.has-unread { color: var(--signal-deep); border-color: rgba(31, 165, 95, .55); }
.notif-bell__count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--rose); color: #fff;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  box-shadow: 0 0 0 2px var(--paper);
}

/* --- Panneau notifications (dashboard) ------------------------------------ */
.notif { margin-bottom: 18px; scroll-margin-top: 16px; overflow: hidden; }
.notif .card__head h3 { display: flex; align-items: center; gap: 10px; }
.notif__badge {
  font-style: normal; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--signal-soft); color: var(--signal-deep);
}

.notif__list { list-style: none; margin: 0 -20px -18px; padding: 0; }
.notif__item {
  display: grid; grid-template-columns: 10px 92px minmax(0, 1fr) auto;
  gap: 14px; align-items: start;
  padding: 14px 20px; border-top: 1px solid var(--line);
}
.notif__item.is-unread { background: #F6FCF8; }
.notif__item.is-cancelled { opacity: .6; }

.notif__dot { width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: transparent; }
.notif__item.is-unread .notif__dot { background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }

.notif__when { display: flex; flex-direction: column; }
.notif__when strong { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.notif__when span { font-size: 12px; color: var(--slate); }

.notif__title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 14px; }
.notif__title .mono { color: var(--signal-deep); font-size: 12px; }
.muted-inline { color: var(--slate); }
.notif__title .tag { font-size: 11px; padding: 2px 8px; }

.notif__objet {
  margin: 4px 0 6px; font-size: 13.5px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--slate-2); }
.notif__meta a { color: var(--slate); text-decoration: none; }
.notif__meta a:hover { color: var(--signal-deep); text-decoration: underline; }
.notif__wa.is-ok { color: var(--signal-deep); }
.notif__wa.is-ko { color: #8E2A26; cursor: help; }

@media (max-width: 640px) {
  .notif__item { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .notif__when { grid-column: 2; flex-direction: row; gap: 8px; align-items: baseline; }
  .notif__body { grid-column: 2 / 4; }
  .notif__item .actions { grid-column: 3; grid-row: 1; }
}

/* --- Diffusion : barre de chargement, raison de pause, reprise ------------ */
.charge { width: 150px; }
.charge__tete {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 5px; font-family: var(--mono); font-size: 12.5px;
}
.charge__compte span { color: var(--slate-2); }
.charge__pct { font-weight: 600; color: var(--ink); }

.charge__piste {
  display: flex; gap: 2px; height: 8px; overflow: hidden;
  border-radius: 999px; background: var(--line);
}
.charge__ok, .charge__ko { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.charge__ok { background: var(--signal); }
.charge__ko { background: var(--rose); }

/* en cours : rayures qui défilent, pour signaler que l'envoi avance */
.charge--en-cours .charge__ok {
  background-image: linear-gradient(135deg,
    rgba(255, 255, 255, .28) 25%, transparent 25%, transparent 50%,
    rgba(255, 255, 255, .28) 50%, rgba(255, 255, 255, .28) 75%, transparent 75%);
  background-size: 14px 14px;
  animation: charge-defile 1s linear infinite;
}
@keyframes charge-defile { to { background-position: 14px 0; } }

.charge--pause .charge__ok { background: var(--amber); }
.charge--pause .charge__pct { color: #8A5312; }
.charge--fini .charge__pct { color: var(--signal-deep); }
.charge--attente .charge__pct,
.charge--arrete .charge__pct { color: var(--slate-2); }
.charge--arrete .charge__ok { background: var(--slate-2); }

.cell-raison {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px;
}
.icon-btn--go:hover { background: var(--signal-soft); color: var(--signal-deep); }


/* --- Débit d'envoi (dashboard) : chiffre + 24 barres horaires ------------- */
.debit {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 28px; align-items: stretch;
}
.debit .kpi__value small { font-size: 15px; font-weight: 500; color: var(--slate); margin-left: 2px; }
.debit__chiffres { display: flex; flex-direction: column; }
.debit__stats { display: flex; gap: 18px; margin: 14px 0 0; }
.debit__stats div { display: flex; flex-direction: column; }
.debit__stats dt { font-size: 11px; color: var(--slate-2); }
.debit__stats dd { margin: 2px 0 0; font-family: var(--mono); font-size: 13px; color: var(--ink); }

.debit__graphe { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.debit__barres {
  flex: 1; min-height: 96px;
  display: flex; align-items: flex-end; gap: 2px;
  border-bottom: 1px solid var(--line);
}
/* zone de survol pleine hauteur : plus large que la barre elle-même */
.debit__col {
  position: relative; flex: 1; height: 100%;
  display: flex; align-items: flex-end; outline: none; cursor: default;
}
.debit__barre {
  display: block; width: 100%;
  background: var(--signal); border-radius: 4px 4px 0 0;
  transition: background .12s;
}
.debit__barre.is-vide { background: var(--line); }
.debit__col:hover .debit__barre,
.debit__col:focus-visible .debit__barre { background: var(--signal-deep); }
.debit__col:hover .debit__barre.is-vide,
.debit__col:focus-visible .debit__barre.is-vide { background: var(--slate-2); }
.debit__col:focus-visible { box-shadow: 0 0 0 2px var(--signal-soft); border-radius: 4px; }

.debit__col::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; pointer-events: none;
  padding: 5px 9px; border-radius: 6px;
  background: var(--ink); color: #fff;
  font-family: var(--mono); font-size: 11px;
  opacity: 0; transition: opacity .12s;
  z-index: 2;
}
.debit__col:first-child::after { left: 0; transform: none; }
.debit__col:last-child::after { left: auto; right: 0; transform: none; }
.debit__col:hover::after,
.debit__col:focus-visible::after { opacity: 1; }

.debit__axe {
  display: flex; justify-content: space-between;
  margin-top: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--slate-2);
}

@media (max-width: 720px) {
  .debit { grid-template-columns: 1fr; gap: 18px; }
}

/* --- Vue Rendez-vous (admin) ---------------------------------------------- */
.onglets { display: flex; gap: 4px; flex-wrap: wrap; }
.onglet {
  padding: 7px 14px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; color: var(--slate); text-decoration: none;
  transition: background .14s, color .14s;
}
.onglet:hover { background: var(--paper); color: var(--ink); }
.onglet.is-active { background: var(--ink); color: var(--neon); }

.kpi__warn { color: #8A5312; font-weight: 500; }

.rdv-date strong { font-family: var(--display); font-size: 17px; font-weight: 600; display: block; line-height: 1.2; }
.lien-contact { display: block; text-decoration: none; color: var(--ink); }
.lien-contact.muted { color: var(--slate-2); }
.lien-contact:hover { color: var(--signal-deep); text-decoration: underline; }
.rdv-alerte { font-size: 11.5px; }
.rdv-alerte.is-ok { color: var(--signal-deep); }
.rdv-alerte.is-ko { color: #8E2A26; cursor: help; }
tbody tr.is-muted td { opacity: .55; }

.lien-discret { font-size: 12.5px; color: var(--signal-deep); text-decoration: none; font-weight: 500; }
.lien-discret:hover { text-decoration: underline; }
