/* ================================================================
   REBOUNDLY — style.css (pages de l'app uniquement ; la landing et
   les pages d'auth ont leurs propres styles)

   Charte Huemint (08/2026) : sable / surface / brique / lagune.
   Brique = action. Lagune = « a répondu ». Pas de dégradé, pas de verre.
   ================================================================ */

:root{
  /* fonds */
  --sable:#EDDCD0;
  --surface:#FFFFFF;
  --surface-2:#F7EFE8;
  --bordure:#DCC9BB;
  --bordure-forte:#C9B3A2;
  /* textes */
  --encre:#33313F;
  --encre-2:#48465A;
  --sourdine:#5E5A69;
  /* accent unique — brique = action ; brique-text = titres sur sable (AA) */
  --brique:#C52F3E;
  --brique-hover:#A32330;
  --brique-text:#9B2330;
  --brique-voile:#F9E7E6;
  /* statuts : lagune = « a répondu », le rebound */
  --lagune:#2892A9;
  --repondu:#2892A9;
  --repondu-voile:#D7EEF3;
  --attente:#7A4F14;
  --attente-voile:#F5EADA;
  --stoppe:#5E5A69;
  --stoppe-voile:#EFEBE9;
  /* typo — SF Pro Display (titres) + SF Pro Text (corps/UI). Polices système.
     Gothic Neo n’est pas en tête : sa coupe Heavy n’a pas le latin étendu (é, ç, è…). */
  --display:"SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --serif:var(--display);
  --sans:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",system-ui,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  /* formes */
  --r-card:10px;
  --r-btn:8px;
  --r-ctl:8px;
  --r-badge:6px;
  --ombre:0 1px 2px rgba(51,49,63,.05);
  --sidebar-w:216px;

  /* alias — anciens noms, plus aucune hex hors palette */
  --ink:var(--encre);
  --ink-deep:var(--encre);
  --ink-light:var(--encre-2);
  --paper:var(--sable);
  --paper-dim:var(--surface-2);
  --card:var(--surface);
  --field:var(--surface);
  --gold:var(--brique);
  --gold-dim:var(--brique-hover);
  --gold-text:var(--brique);
  --rust:var(--brique-hover);
  --moss:var(--repondu);
  --text-muted:var(--sourdine);
  --text-on-ink:var(--surface);
  --text-on-ink-dim:var(--sourdine);
  --line:var(--bordure);
  --line-soft:var(--bordure);
  --hover-wash:var(--surface-2);

  --ease:cubic-bezier(.22,.9,.24,1);
}
*{margin:0;padding:0;box-sizing:border-box;}
body{
  font-family:var(--sans);
  font-size:16px;
  background:var(--sable);
  color:var(--encre);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}
::selection{background:var(--brique-voile);color:var(--encre);}
em{font-family:var(--display);font-style:italic;font-weight:900;color:var(--brique-text);}
h1{
  font-family:var(--display);font-weight:900;font-size:40px;line-height:1.05;
  letter-spacing:-0.01em;color:var(--encre);
}
h2{
  font-family:var(--display);font-weight:700;font-size:28px;line-height:1.15;
  letter-spacing:-0.005em;color:var(--encre);
}
h3{
  font-family:var(--display);font-weight:600;font-size:19px;line-height:1.25;
  letter-spacing:0;color:var(--encre);
}
a{color:inherit;text-decoration:none;}
button{font-family:inherit;}
.hidden{display:none!important;}
:focus-visible{outline:2px solid var(--brique);outline-offset:2px;}

/* ============================================
   ICÔNES (sprite injecté par icons.js)
   ============================================ */
.ic{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px;}
.ic-lg{width:19px;height:19px;}
.ic-sm{width:13px;height:13px;vertical-align:-2px;}
/* étoile de favori pleine quand active */
.fav-on .ic, .icon-btn.active .ic{fill:currentColor;}

/* ============================================
   COQUILLE DE L'APP — sidebar (desktop),
   topbar + tabbar (mobile)
   ============================================ */
.sidebar{
  position:fixed;top:0;left:0;bottom:0;width:var(--sidebar-w);z-index:100;
  background:var(--surface);
  border-right:1px solid var(--bordure);
  display:flex;flex-direction:column;
  padding:18px 12px 14px;
}
.side-logo{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:900;font-size:20px;letter-spacing:-.02em;color:var(--encre);padding:10px 10px 20px;}
.side-logo .logo-mark{width:28px;height:10px;flex-shrink:0;display:block;}
.side-logo .logo-word{font-family:var(--display);font-weight:900;}
.side-nav{display:flex;flex-direction:column;gap:2px;}
.side-nav a{
  display:flex;align-items:center;gap:11px;
  padding:9px 10px;border-radius:var(--r-btn);
  font-size:13.5px;color:var(--sourdine);
  transition:background .14s ease,border-color .14s ease;
}
.side-nav a:hover{color:var(--encre);background:var(--surface-2);}
.side-nav a{min-height:44px;}
.side-nav a.active{color:var(--brique);background:var(--brique-voile);font-weight:500;}
.side-nav .ic{width:17px;height:17px;}
.side-foot{margin-top:auto;display:flex;align-items:center;gap:4px;border-top:1px solid var(--bordure);padding-top:12px;}
.side-account{
  flex:1;min-width:0;display:flex;align-items:center;gap:10px;
  padding:6px 8px;border-radius:var(--r-btn);color:var(--sourdine);
  transition:background .14s ease,border-color .14s ease;
}
.side-account:hover{background:var(--surface-2);color:var(--encre);}
.side-account.active{color:var(--brique);background:var(--brique-voile);}
.nav-avatar-circle{
  width:28px;height:28px;flex-shrink:0;border-radius:50%;
  background:var(--brique);color:var(--surface);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--sans);font-size:12.5px;font-weight:700;
}
.nav-avatar-name{font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sidebar .icon-btn{color:var(--sourdine);}
.sidebar .icon-btn:hover{color:var(--encre);background:var(--surface-2);}

/* barre du haut, mobile uniquement */
.topbar{
  display:none;position:sticky;top:0;z-index:90;
  background:var(--surface);
  border-bottom:1px solid var(--bordure);
  align-items:center;justify-content:space-between;
  padding:11px 16px;
}
.topbar .logo{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:900;font-size:20px;letter-spacing:-.02em;color:var(--encre);padding:10px 0;}
.topbar .logo .logo-mark{width:28px;height:10px;flex-shrink:0;display:block;}
.topbar .logo .logo-word{font-family:var(--display);font-weight:900;}
.topbar-right{display:flex;align-items:center;gap:8px;}
.topbar .icon-btn{color:var(--sourdine);}
.topbar .icon-btn:hover{color:var(--encre);}

/* barre d'onglets basse, mobile uniquement */
.tabbar{
  display:none;position:fixed;left:0;right:0;bottom:0;z-index:90;
  background:var(--surface);
  border-top:1px solid var(--bordure);
  padding:5px 8px calc(5px + env(safe-area-inset-bottom,0px));
}
.tabbar a{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  min-height:44px;padding:6px 2px;font-size:11px;color:var(--sourdine);border-radius:var(--r-btn);
}
.tabbar a.active{color:var(--brique);}
.tabbar .ic{width:19px;height:19px;}

/* ============================================
   SQUELETTE DE CHARGEMENT
   Affiché le temps de résoudre session + profil (retiré par le JS de
   chaque page) : la structure de la page, pas un spinner.
   ============================================ */
.page-loader{
  margin-left:var(--sidebar-w);
  max-width:960px;padding:34px 32px;
  display:flex;flex-direction:column;gap:16px;
}
.skel{
  display:block;border-radius:var(--r-btn);
  background:var(--surface-2);
}
.skel-title{height:26px;width:min(280px,60%);}
.skel-line{height:14px;width:min(420px,85%);}
.skel-card{height:130px;border-radius:var(--r-card);}

/* ============================================
   LAYOUT GÉNÉRAL
   ============================================ */
main{margin-left:var(--sidebar-w);padding:30px 0 90px;}
.wrap{max-width:960px;margin:0 auto;padding:0 32px;}

/* en-tête compact : titre + contexte à gauche, action à droite */
.page-head{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:16px;flex-wrap:wrap;margin-bottom:22px;
}
.page-head h1{font-size:25px;line-height:1.2;color:var(--encre);}
.page-head h1 em{color:var(--brique-text);}
.page-sub{font-size:14px;color:var(--sourdine);margin-top:3px;}
.page-kicker{font-family:var(--sans);font-weight:500;font-size:13px;letter-spacing:0;text-transform:uppercase;color:var(--sourdine);margin-bottom:6px;}
.page-head-top{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;width:100%;}
.page-head-main{min-width:0;}
.page-actions{display:flex;align-items:center;gap:10px;flex-shrink:0;}

/* badge de plan (dashboard) — discret, ne réclame qu'en fin de quota */
.plan-badge{
  font-family:var(--sans);font-size:12.5px;font-weight:500;letter-spacing:0;
  padding:4px 9px;border-radius:var(--r-badge);
  background:transparent;color:var(--sourdine);border:1px solid var(--bordure);
  transition:border-color .14s ease,background .14s ease;
}
.plan-badge.warn{background:var(--attente-voile);color:var(--attente);border-color:var(--bordure);}
a.plan-badge:hover{color:var(--encre);border-color:var(--bordure-forte);}

/* onglets segmentés d'une section (rédiger : message / séquence / objection) */
.page-tabs{
  display:flex;gap:3px;width:max-content;max-width:100%;overflow-x:auto;overflow-y:hidden;
  background:var(--surface-2);border-radius:var(--r-ctl);padding:3px;
  margin-bottom:22px;
}
.page-tabs a{
  padding:7px 14px;border-radius:var(--r-btn);font-size:13px;color:var(--sourdine);
  white-space:nowrap;transition:background .14s ease,border-color .14s ease;
}
.page-tabs a:hover{color:var(--encre);}
.page-tabs a.active{background:var(--surface);color:var(--encre);font-weight:600;box-shadow:var(--ombre);}

/* ============================================
   CARTES — surfaces posées sur le papier
   ============================================ */
.card{
  background:var(--surface);color:var(--encre);
  border:1px solid var(--bordure);
  border-radius:var(--r-card);padding:24px;margin-bottom:18px;
  box-shadow:var(--ombre);
}
.card-label{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  font-family:var(--sans);font-size:13px;font-weight:500;
  letter-spacing:0;text-transform:none;color:var(--sourdine);
  margin-bottom:16px;
}
.card-label>span:first-child{display:inline-flex;align-items:center;gap:10px;}
.card-label>span:first-child::before{content:'';width:18px;height:1px;background:currentColor;flex-shrink:0;}
.quota{font-family:var(--mono);font-size:12.5px;font-weight:400;letter-spacing:0;color:var(--brique);background:var(--brique-voile);padding:4px 9px;border-radius:var(--r-badge);text-transform:none;}

/* carte mise en avant — réservée au profil de style appris */
.card-highlight{border-left:3px solid var(--brique);background:var(--surface);}
/* zone de danger */
.card-danger{border-color:var(--brique);background:var(--brique-voile);}
.card-danger-soft{border-color:var(--bordure-forte);}

/* lead court sous un réglage (remplace les murs .pause-state hors pause) */
.setting-lead{font-size:13px;color:var(--text-muted);line-height:1.55;margin:0 0 14px;}
.setting-lead.paused{color:var(--rust);}

.section-label{
  display:inline-flex;align-items:center;gap:9px;
  font-family:var(--sans);font-size:13px;font-weight:500;
  letter-spacing:0;text-transform:none;color:var(--sourdine);
  margin-bottom:12px;
}
.section-label::before{content:'';width:18px;height:1px;background:currentColor;flex-shrink:0;}
.section-heading{
  font-family:var(--sans);font-size:13px;font-weight:500;
  letter-spacing:0;text-transform:none;color:var(--sourdine);
  margin:6px 0 14px;padding-left:2px;
}

/* ============================================
   FORMULAIRES
   ============================================ */
select, textarea,
input[type="text"], input[type="email"], input[type="tel"], input[type="date"]{
  width:100%;
  padding:11px 13px;
  border-radius:var(--r-btn);
  border:1px solid var(--bordure-forte);
  background:var(--surface);
  font-family:inherit;
  font-size:15px;
  color:var(--encre);
  transition:border-color .14s ease,background .14s ease;
}
select, textarea,
input[type="text"], input[type="email"], input[type="tel"], input[type="date"]::placeholder{color:var(--sourdine);}
select{
  appearance:none;-webkit-appearance:none;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235E5A69' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 13px center;
  padding-right:36px;
}
select:focus, textarea:focus,
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="date"]:focus{
  outline:none;border-color:var(--brique);box-shadow:0 0 0 3px var(--brique-voile);
}
input:disabled{opacity:.45;background:var(--surface-2);cursor:not-allowed;}
textarea{resize:vertical;min-height:64px;}
#objectionInput{min-height:88px;}
.field{margin-bottom:14px;}
.field > label{display:block;font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--sourdine);margin-bottom:6px;}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.field-hint{font-size:13px;color:var(--sourdine);margin-top:6px;}
.field-warn{
  display:flex;gap:8px;align-items:flex-start;
  font-size:13px;color:var(--brique-hover);line-height:1.5;margin-top:8px;
  padding:9px 11px;background:var(--brique-voile);border-radius:var(--r-btn);
}
.field-warn .ic{width:14px;height:14px;margin-top:2px;}
.field-inline{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap;}
.field-inline input{flex:1 1 180px;min-width:0;}

.consent-check{display:flex;align-items:flex-start;gap:10px;margin:18px 0 4px;cursor:pointer;}
.consent-check input{margin-top:3px;flex-shrink:0;width:22px;height:22px;accent-color:var(--brique);cursor:pointer;}
.consent-check span{font-size:13px;color:var(--sourdine);line-height:1.5;}
.consent-check a{color:var(--brique);text-decoration:underline;text-underline-offset:2px;}

/* sélecteurs segmentés (ton, tu/vous) */
.pills{display:inline-flex;gap:3px;background:var(--surface-2);border-radius:var(--r-ctl);padding:3px;margin-bottom:16px;max-width:100%;flex-wrap:wrap;}
.pill{
  appearance:none;border:none;background:transparent;font-family:inherit;
  font-size:13px;padding:8px 13px;min-height:36px;border-radius:var(--r-btn);color:var(--sourdine);
  cursor:pointer;transition:background .14s ease,border-color .14s ease;
  user-select:none;-webkit-user-select:none;white-space:nowrap;
}
.pill:hover{color:var(--encre);}
.pill.active{background:var(--surface);color:var(--encre);font-weight:500;border:1px solid var(--bordure-forte);}

/* ============================================
   BOUTONS
   ============================================ */
.btn-primary{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--brique);color:var(--surface);font-family:var(--sans);font-weight:600;
  padding:12px 20px;border-radius:var(--r-btn);font-size:15px;line-height:1;border:1px solid transparent;cursor:pointer;
  transition:background .14s ease,border-color .14s ease;
}
.btn-primary:hover{background:var(--brique-hover);}
.btn-primary:disabled{opacity:.45;cursor:not-allowed;}
.btn-block{width:100%;}
.btn-compact{padding:12px 16px;white-space:nowrap;flex-shrink:0;}

.btn-edit{
  display:inline-flex;align-items:center;gap:6px;
  font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;
  color:var(--encre);background:var(--surface);padding:6px 12px;border-radius:var(--r-btn);
  border:1px solid var(--bordure-forte);cursor:pointer;text-transform:none;
  transition:border-color .14s ease,background .14s ease;
}
.btn-edit:hover{border-color:var(--bordure-forte);background:var(--surface-2);}
.btn-edit .ic{width:13px;height:13px;}

.btn-text{background:none;border:none;color:var(--brique);font-family:var(--sans);font-weight:600;font-size:15px;cursor:pointer;padding:8px 0;padding-left:0;transition:background .14s ease,border-color .14s ease;}
.btn-text:hover{text-decoration:underline;}

.icon-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  background:none;border:none;cursor:pointer;color:var(--text-muted);
  min-width:44px;min-height:44px;padding:0 8px;border-radius:8px;font-size:13px;
  transition:background .14s ease,border-color .14s ease;
}
.icon-btn:hover{color:var(--encre);background:var(--surface-2);}
.icon-btn.active{color:var(--brique);}
.icon-btn.danger{color:var(--brique-hover);}
.icon-btn.danger:hover{background:var(--brique-voile);color:var(--brique-hover);}
.fav-btn.fav-on{color:var(--brique);}
.fav-btn.fav-on:hover{color:var(--brique-hover);}

.edit-actions{display:flex;align-items:center;gap:14px;margin-top:4px;}
.edit-actions .btn-primary{flex:1;}

/* boutons de feedback armés/actifs */
.icon-btn.fb-on-worked{background:var(--repondu-voile);color:var(--repondu);}
.icon-btn.fb-on-failed{background:var(--brique-voile);color:var(--brique-hover);}
/* état "armé" d'un bouton de suppression en deux taps (confirmTap) */
.icon-btn.arming{background:var(--brique-voile);color:var(--brique-hover)!important;font-family:var(--sans);font-size:13px!important;font-weight:500;}

/* pause / reprise (page compte) */
.btn-pause{
  width:100%;margin-top:16px;padding:12px 20px;border-radius:var(--r-btn);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:var(--sans);font-size:15px;font-weight:600;letter-spacing:0;line-height:1;
  border:1px solid var(--bordure-forte);background:var(--surface);color:var(--encre);
  transition:background .14s ease,border-color .14s ease;
}
.btn-pause:hover{background:var(--surface-2);border-color:var(--bordure-forte);}
.btn-pause:disabled{opacity:.45;cursor:not-allowed;background:var(--surface-2);color:var(--sourdine);border-color:var(--bordure);}
.btn-pause.arming{background:var(--brique-voile);border-color:var(--brique);color:var(--brique-hover);}
.btn-pause-resume{border-color:transparent;background:var(--brique);color:var(--surface);}
.btn-pause-resume:hover{background:var(--brique-hover);border-color:transparent;}

.btn-secondary{
  width:100%;margin-top:4px;padding:12px 20px;border-radius:var(--r-btn);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:var(--sans);font-size:15px;font-weight:600;line-height:1;
  border:1px solid var(--bordure-forte);background:var(--surface);color:var(--encre);
  transition:background .14s ease,border-color .14s ease;
}
.btn-secondary:hover{border-color:var(--bordure-forte);background:var(--surface-2);}
.btn-secondary .ic{width:14px;height:14px;}
.btn-secondary:disabled{opacity:.45;cursor:not-allowed;}

.btn-danger-outline{
  width:100%;margin-top:4px;padding:12px 20px;border-radius:var(--r-btn);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:var(--sans);font-size:15px;font-weight:600;letter-spacing:0;line-height:1;
  border:1px solid var(--bordure-forte);background:var(--surface);color:var(--encre);
  transition:background .14s ease,border-color .14s ease;
}
.btn-danger-outline:hover{background:var(--brique-voile);border-color:var(--brique);}

.btn-danger-full{width:100%;margin-top:4px;padding:12px 20px;border-radius:var(--r-btn);cursor:pointer;
  font-family:var(--sans);font-size:15px;font-weight:600;letter-spacing:0;line-height:1;
  border:1px solid var(--brique);background:var(--brique);color:var(--surface);
  transition:background .14s ease,border-color .14s ease;
}
.btn-danger-full:hover{background:var(--brique-hover);border-color:var(--brique-hover);}
.btn-danger-full:disabled{opacity:.45;cursor:not-allowed;background:var(--brique-voile);color:var(--brique-hover);border-color:var(--bordure);}

/* ============================================
   TOAST
   ============================================ */
.toast{
  position:fixed;left:50%;bottom:calc(26px + env(safe-area-inset-bottom,0px));transform:translateX(-50%) translateY(14px);
  background:var(--encre);color:var(--surface);padding:12px 20px;border-radius:var(--r-card);
  font-size:13px;font-weight:500;box-shadow:var(--ombre);
  opacity:0;pointer-events:none;
  z-index:999;border-left:3px solid var(--brique);max-width:min(90vw,420px);text-align:center;
}
.toast.visible{opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0);}
.toast.failed{border-left-color:var(--brique-hover);}
.toast.info{border-left-color:var(--repondu);}
.toast.worked{border-left-color:var(--repondu);}

/* ============================================
   BARRE D'OUTILS + FILTRES DES LISTES
   ============================================ */
.saved-toolbar{display:flex;gap:10px;margin-bottom:12px;}
.saved-toolbar input{flex:1;}
.saved-toolbar select{width:auto;}
.filters{display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap;}
.filter{
  appearance:none;background:transparent;font-family:var(--sans);font-size:13px;font-weight:500;
  padding:8px 12px;min-height:36px;border-radius:8px;
  color:var(--sourdine);cursor:pointer;border:1px solid transparent;
  transition:background .14s ease,border-color .14s ease;
  user-select:none;-webkit-user-select:none;
}
.filter:hover{border-color:var(--bordure);}
.filter.active{background:var(--brique-voile);color:var(--brique);border-color:var(--bordure);}

/* ============================================
   LISTES D'ÉLÉMENTS SAUVEGARDÉS — rangées denses
   (scripts, séquences, objections, activité récente, historique)
   ============================================ */
.saved-item{
  padding:12px 10px;margin:0;
  border-bottom:1px solid var(--line-soft);border-radius:8px;
  cursor:pointer;transition:background .15s ease;
}
.saved-item:last-child{border-bottom:none;}
.saved-item:hover{background:var(--hover-wash);}
.saved-item-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px;gap:10px;}
.saved-item-head .name{font-size:13.5px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.saved-item-actions{display:flex;gap:2px;flex-shrink:0;}
.saved-item-actions .icon-btn{min-width:28px;height:28px;font-size:13px;}
/* les actions n'apparaissent qu'au survol — sauf celles qui portent un
   état (favori, retour noté), toujours visibles */
@media(hover:hover){
  .saved-item-actions .icon-btn{opacity:0;transition:opacity .15s ease,background .15s ease,color .15s ease;}
  .saved-item:hover .saved-item-actions .icon-btn,
  .saved-item-actions:focus-within .icon-btn,
  .saved-item-actions .icon-btn.fav-on,
  .saved-item-actions .icon-btn.fb-on-worked,
  .saved-item-actions .icon-btn.fb-on-failed{opacity:1;}
}
.saved-item .tag{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--sourdine);}
.saved-item p{font-size:12.5px;color:var(--text-muted);margin-top:3px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.empty-state{font-size:13px;color:var(--text-muted);text-align:center;padding:28px 20px;border:1px dashed var(--bordure);border-radius:var(--r-ctl);}

/* ============================================
   TABLES DENSES (prospects, campagnes)
   ============================================ */
.tbl{width:100%;}
.tbl-head,.tbl-row{display:grid;gap:12px;align-items:center;}
.tbl-head{
  padding:2px 10px 8px;
  font-family:var(--mono);font-size:10.5px;font-weight:500;
  letter-spacing:0;text-transform:none;color:var(--text-muted);
  border-bottom:1px solid var(--line);
}
.tbl-row{
  padding:10px;border-bottom:1px solid var(--line-soft);border-radius:8px;
  cursor:pointer;transition:background .15s ease;
}
.tbl-row:last-child{border-bottom:none;}
.tbl-row:hover{background:var(--hover-wash);}
.tbl-main{min-width:0;}
.tbl-name{font-size:13.5px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tbl-sub{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tbl-mono{font-family:var(--mono);font-size:11.5px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tbl-mono.pos{color:var(--moss);}
/* display:block obligatoire : overflow/ellipsis sont sans effet sur un
   inline, et le nowrap ferait déborder toute la grille. */
.tbl-cell-txt{display:block;font-size:12.5px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
.tbl-row .icon-btn{justify-self:end;}
@media(hover:hover){
  .tbl-row .row-del{opacity:0;transition:opacity .15s ease,background .15s ease,color .15s ease;}
  .tbl-row:hover .row-del,.tbl-row .row-del:focus-visible{opacity:1;}
}
.cols-prospects{grid-template-columns:minmax(0,1.3fr) 118px 112px minmax(0,1.5fr) 32px;}
.cols-campagnes{grid-template-columns:minmax(0,1.5fr) 92px 96px minmax(0,1.2fr);}
@media(max-width:680px){
  .tbl-head{display:none;}
  .cols-prospects{grid-template-columns:minmax(0,1fr) auto auto;}
  .cols-campagnes{grid-template-columns:minmax(0,1fr) auto;}
  .tbl .hide-m{display:none;}
}

/* badges de statut — voile + teinte, jamais d'aplat saturé ni de pilule */
.statut-tag{
  display:inline-flex;align-items:center;gap:6px;
  font-family:var(--sans);font-size:12.5px;font-weight:500;letter-spacing:0;
  padding:4px 9px;border-radius:var(--r-badge);border:1px solid var(--bordure);
  text-transform:none;white-space:nowrap;
}
.statut-tag::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;flex:none;}
.statut-tag.nouveau{background:var(--stoppe-voile);color:var(--stoppe);}
.statut-tag.contacte{background:var(--attente-voile);color:var(--attente);}
.statut-tag.en_discussion{background:var(--attente-voile);color:var(--attente);}
.statut-tag.gagne{background:var(--repondu-voile);color:var(--repondu);}
.statut-tag.perdu{background:var(--stoppe-voile);color:var(--stoppe);}
.statut-tag.statut-active{background:var(--attente-voile);color:var(--attente);}
.statut-tag.statut-replied{background:var(--repondu-voile);color:var(--repondu);}
.statut-tag.statut-done{background:var(--stoppe-voile);color:var(--stoppe);}
.statut-tag.statut-stopped{background:var(--stoppe-voile);color:var(--stoppe);}
.statut-tag.domaine-verified{background:var(--repondu-voile);color:var(--repondu);}
.statut-tag.domaine-pending{background:var(--attente-voile);color:var(--attente);}
.statut-tag.domaine-failed{background:var(--brique-voile);color:var(--brique-hover);}

.statut-select-inline{
  font-family:var(--mono);font-size:11px;padding:4px 24px 4px 9px;border-radius:8px;
  border:1px solid var(--line);background-color:var(--field);background-position:right 8px center;
  color:var(--text-muted);cursor:pointer;width:auto;max-width:100%;
}

.outcome-tag{display:inline-flex;align-items:center;gap:6px;font-family:var(--sans);font-size:12.5px;font-weight:500;letter-spacing:0;padding:4px 9px;border-radius:var(--r-badge);border:1px solid var(--bordure);margin-left:8px;white-space:nowrap;}
.outcome-tag::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;flex:none;}
.outcome-tag.worked{background:var(--repondu-voile);color:var(--repondu);}
.outcome-tag.failed{background:var(--brique-voile);color:var(--brique-hover);}
.outcome-tag.encours{background:var(--attente-voile);color:var(--attente);}
.outcome-tag.encours::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;flex:none;}

.exemples-note{display:block;font-size:11.5px;color:var(--gold-text);margin-top:4px;font-family:var(--mono);}

/* ============================================
   SORTIE DE GÉNÉRATION — repère encre dans l'atelier
   ============================================ */
.output-card{
  background:var(--surface);border:1px solid var(--bordure);
  border-radius:var(--r-card);padding:22px;margin-bottom:18px;display:none;
  box-shadow:var(--ombre);
}
.output-card.visible{display:block;}
.output-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--bordure);}
.output-head span{font-size:12.5px;color:var(--sourdine);font-family:var(--mono);}
.output-actions{display:flex;gap:6px;}
.output-actions .icon-btn{color:var(--sourdine);}
.output-actions .icon-btn:hover{color:var(--encre);background:var(--surface-2);}
.output-actions .icon-btn.active{color:var(--brique);}
.output-text{font-family:var(--sans);font-size:14px;color:var(--encre-2);line-height:1.6;white-space:pre-wrap;}

/* réponse d'un prospect (fiche campagne) — une citation mise en valeur */
.reponse-box{background:var(--repondu-voile);border:1px solid var(--repondu-voile);border-left:3px solid var(--moss);border-radius:0 10px 10px 0;padding:13px 15px;margin:14px 0 4px;}
.reponse-box + .reponse-box{margin-top:10px;}
.reponse-stop{background:var(--brique-voile);border-color:var(--brique-voile);border-left-color:var(--rust);}
.reponse-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
.reponse-badge{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--moss);display:inline-flex;align-items:center;gap:6px;}
.reponse-stop .reponse-badge{color:var(--rust);}
.reponse-date{font-family:var(--mono);font-size:10.5px;color:var(--text-muted);white-space:nowrap;}
.reponse-from{font-size:13px;font-weight:600;color:var(--ink);margin-bottom:2px;overflow-wrap:break-word;}
.reponse-subject{font-size:12.5px;color:var(--text-muted);margin-bottom:8px;overflow-wrap:break-word;}
.reponse-texte{white-space:pre-wrap;font-size:13.5px;line-height:1.65;color:var(--ink-light);overflow-wrap:break-word;}
.reponse-vide{color:var(--text-muted);font-style:italic;}

/* ============================================
   SÉQUENCES — timeline de messages
   ============================================ */
.seq-timeline{display:flex;flex-direction:column;}
.seq-step{display:grid;grid-template-columns:32px 1fr;gap:13px;position:relative;padding-bottom:20px;}
.seq-step:not(:last-child) .seq-step-rail::after{content:'';position:absolute;top:30px;bottom:0;left:50%;width:1px;transform:translateX(-50%);background:var(--bordure-forte);}
.seq-step-rail{position:relative;display:flex;justify-content:center;}
.seq-step-dot{width:26px;height:26px;flex-shrink:0;border-radius:50%;background:var(--brique);color:var(--surface);display:flex;align-items:center;justify-content:center;font-family:var(--display);font-size:13px;font-weight:700;position:relative;z-index:1;}
.seq-step-dot.etape-inactive{background:var(--bordure-forte);color:var(--surface);}
.seq-step-body{min-width:0;padding-top:2px;}
.seq-step-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:7px;}
.seq-step-title{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--encre);}
.seq-step-delay{font-family:var(--mono);font-size:12.5px;letter-spacing:0;padding:3px 9px;border-radius:var(--r-badge);background:var(--surface-2);color:var(--sourdine);white-space:nowrap;}
/* Sur fond encre (sortie de génération fraîche), --gold-text n'a pas le
   contraste voulu : on repasse à --gold-dim, déjà lisible sur ce fond. */
.output-card .seq-step-delay{color:var(--sourdine);}
.seq-step-copy{margin-left:auto;}
.seq-step-objet{font-size:13px;color:var(--ink);margin-bottom:6px;overflow-wrap:break-word;}
.seq-step-objet span{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--sourdine);margin-right:8px;text-transform:none;}
.seq-step-message{white-space:pre-wrap;font-size:13.5px;line-height:1.7;color:var(--ink-light);overflow-wrap:break-word;}
/* timeline rendue sur la carte de sortie sombre : ré-éclaircir */
.output-card .seq-step-title,
.output-card .seq-step-objet{color:var(--encre);}
.output-card .seq-step-objet span{color:var(--sourdine);}
.output-card .seq-step-message{color:var(--encre-2);}
.output-card .seq-step:not(:last-child) .seq-step-rail::after{background:var(--bordure-forte);}
.output-card .seq-step-copy{color:var(--sourdine);}
.output-card .seq-step-copy:hover{color:var(--encre);background:var(--surface-2);}
#sequenceModalTimeline{margin:12px 0 16px;}
#campagneModalTimeline{margin:12px 0 16px;}

/* Fil d'Ariane d'une campagne lancée : statut de chaque message
   avant le détail des textes. */
.campagne-parcours{
  display:flex;flex-direction:column;gap:6px;
  margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid var(--line-soft);
}
.campagne-parcours-item{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:var(--r-ctl);background:var(--paper-dim);
}
.campagne-parcours-num{
  width:22px;height:22px;border-radius:50%;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--bordure);color:var(--text-muted);
  font-family:var(--serif);font-size:12px;font-weight:600;
}
.campagne-parcours-item.statut-sent .campagne-parcours-num{background:var(--brique);color:var(--surface);}
.campagne-parcours-item.statut-pending .campagne-parcours-num{background:var(--brique-voile);color:var(--gold-text);}
.campagne-parcours-item.statut-failed .campagne-parcours-num,
.campagne-parcours-item.statut-cancelled .campagne-parcours-num{background:var(--brique-voile);color:var(--rust);}
.campagne-parcours-body{min-width:0;display:flex;flex-direction:column;gap:1px;}
.campagne-parcours-title{font-size:13px;font-weight:600;color:var(--ink);}
.campagne-parcours-meta{font-family:var(--mono);font-size:11px;color:var(--text-muted);}

/* Bandeau d'aide en mode édition — rappelle qu'on touche le modèle,
   pas les campagnes déjà parties. */
.seq-edit-banner{
  display:flex;align-items:flex-start;gap:10px;
  margin:4px 0 14px;padding:11px 13px;
  border-radius:var(--r-ctl);background:var(--brique-voile);
  border:1px solid var(--brique-voile);
  font-size:12.5px;line-height:1.55;color:var(--ink-light);
}
.seq-edit-banner .ic{width:16px;height:16px;flex-shrink:0;color:var(--gold-dim);margin-top:1px;}
.seq-edit-banner strong{color:var(--ink);font-weight:600;}
.seq-edit-banner.hidden{display:none;}

/* Parcours compact : on voit TOUTE la séquence sans scroller. */
.seq-edit-nav{
  display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px;
  padding-bottom:14px;border-bottom:1px solid var(--line-soft);
}
.seq-edit-nav-item{
  display:inline-flex;align-items:center;gap:7px;max-width:100%;
  padding:6px 10px 6px 6px;border-radius:var(--r-btn);
  border:1px solid var(--line);background:var(--field);
  font:inherit;font-size:12px;color:var(--ink-light);cursor:pointer;
  transition:background .14s ease,border-color .14s ease,color .15s ease;
}
.seq-edit-nav-item:hover{border-color:var(--bordure);color:var(--ink);}
.seq-edit-nav-item.active{
  border-color:var(--brique-voile);background:var(--brique-voile);
  color:var(--ink);font-weight:600;
}
.seq-edit-nav-num{
  width:20px;height:20px;border-radius:50%;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--brique);color:var(--surface);
  font-family:var(--display);font-size:11px;font-weight:700;
}
.seq-edit-nav-item:not(.active) .seq-edit-nav-num{background:var(--bordure);color:var(--text-muted);}
.seq-edit-nav-label{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:140px;
}
.seq-edit-nav-delay{
  font-family:var(--mono);font-size:10.5px;
  color:var(--gold-text);letter-spacing:.02em;flex-shrink:0;
}

/* Édition d'une séquence : cartes accordéon. Une seule ouverte = on
   garde le fil du parcours. Les champs ouverts utilisent les .field
   du design system (label lisible, pas le mono microscopique). */
.seq-editor{display:flex;flex-direction:column;gap:10px;}
.seq-step-edit{
  background:var(--paper-dim);
  border:1px solid var(--line-soft);
  border-radius:var(--r-card);
  overflow:hidden;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.seq-step-edit.is-open{
  border-color:var(--brique-voile);
  box-shadow:0 1px 0 var(--brique-voile);
  background:var(--card);
}

.seq-step-edit-summary{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:12px 14px;border:none;background:transparent;
  font:inherit;text-align:left;cursor:pointer;color:var(--ink);
}
.seq-step-edit.is-open .seq-step-edit-summary{
  border-bottom:1px solid var(--line-soft);
  background:var(--brique-voile);
}
.seq-step-edit-summary .seq-step-dot{flex-shrink:0;}
.seq-step-edit-summary-main{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px;}
.seq-step-edit-summary-title{font-size:13.5px;font-weight:600;color:var(--ink);}
.seq-step-edit-summary-preview{
  font-size:12px;color:var(--text-muted);line-height:1.4;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.seq-step-edit.is-open .seq-step-edit-summary-preview{display:none;}
.seq-step-edit-summary .seq-step-delay{flex-shrink:0;}
.seq-step-edit-chevron{
  width:16px;height:16px;flex-shrink:0;color:var(--text-muted);
  transition:transform .15s ease;
}
.seq-step-edit.is-open .seq-step-edit-chevron{transform:rotate(180deg);color:var(--gold-dim);}

.seq-step-edit-body{padding:16px 16px 18px;}

/* Méta : rôle + délai alignés sur la même ligne de saisie.
   La corbeille colle au champ délai (plus de flottement à côté du hint). */
.seq-step-edit-meta{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:end;
}
.seq-step-edit-meta .field{margin-bottom:0;}
.seq-edit-titre-field{min-width:0;}
.seq-edit-delai-row{display:flex;align-items:center;gap:6px;}
.seq-edit-delai-hint{
  margin:8px 0 14px;
  font-size:11.5px;line-height:1.4;color:var(--text-muted);
}
.seq-step-remove{flex-shrink:0;width:36px;height:36px;}

/* Labels de l'éditeur : SF Pro lisible, plus le mono microscopique. */
.seq-step-edit .field > label{
  font-family:var(--sans);
  font-size:12.5px;font-weight:500;letter-spacing:0;
  color:var(--ink-light);margin-bottom:7px;
}

/* Champs : fond papier (pas le blanc cru), coins 8 px, contour net,
   sans ombre interne — ça sortait « pastille gonflée » sur la carte crème. */
.seq-step-edit input,
.seq-step-edit textarea{
  background:var(--field);
  border:1px solid var(--bordure);
  border-radius:8px;
  box-shadow:none;
  color:var(--ink);
  padding:9px 12px;
  font-size:14px;
  line-height:1.45;
}
.seq-step-edit input:hover,
.seq-step-edit textarea:hover{
  border-color:var(--bordure);
  background:var(--surface);
}
.seq-step-edit input:focus,
.seq-step-edit textarea:focus{
  border-color:var(--gold);
  background:var(--surface);
  box-shadow:0 0 0 3px var(--brique-voile);
}

.seq-edit-titre{width:100%;font-weight:500;}
.seq-edit-delai{
  width:72px;flex-shrink:0;text-align:center;padding-left:8px;padding-right:8px;
  font-family:var(--mono);font-size:13px;font-weight:500;
  letter-spacing:.03em;color:var(--gold-text);
  background:var(--brique-voile);
  border-color:var(--brique-voile);
}
.seq-edit-delai:hover{
  background:var(--brique-voile);
  border-color:var(--brique-voile);
}
.seq-edit-delai:focus{
  background:var(--surface);
}
.seq-edit-fields{display:flex;flex-direction:column;gap:4px;}
.seq-edit-fields .field{margin-bottom:12px;}
.seq-edit-fields .field:last-child{margin-bottom:0;}
.seq-edit-objet{width:100%;}
.seq-edit-message{
  width:100%;min-height:156px;line-height:1.65;resize:vertical;
  padding:12px 13px;
}

/* bouton d'ajout : zone de dépôt en pointillés, pas un lien perdu en bas */
.seq-step-add{
  display:flex;align-items:center;justify-content:center;gap:8px;
  width:100%;padding:13px;margin-top:2px;
  border:1.5px dashed var(--bordure);border-radius:var(--r-ctl);
  background:transparent;color:var(--text-muted);
  font-family:inherit;font-size:13px;font-weight:500;cursor:pointer;
  transition:background .14s ease,border-color .14s ease,background .15s ease;
}
.seq-step-add:hover{border-color:var(--gold);color:var(--gold-dim);background:var(--hover-wash);}
.seq-step-add .ic{width:15px;height:15px;}

/* Barre d'actions collée en bas du tiroir pendant l'édition — "enregistrer"
   reste visible même si on scrolle les messages. Le tiroir lui-même ne
   défile plus : seul #sequenceModalTimeline scrolle. */
#sequenceModalPanel.is-editing{
  display:flex;flex-direction:column;
  padding-bottom:0;
  overflow:hidden;
}
#sequenceModalPanel.is-editing .modal-head,
#sequenceModalPanel.is-editing > .tag,
#sequenceModalPanel.is-editing .seq-edit-banner{
  flex-shrink:0;
}
#sequenceModalPanel.is-editing #sequenceModalTimeline{
  flex:1;min-height:0;overflow-y:auto;margin-bottom:0;padding-bottom:12px;
  overscroll-behavior:contain;
}
#sequenceModalPanel.is-editing .seq-edit-bar{
  flex-shrink:0;z-index:2;
  margin:0 -30px;padding:14px 30px 22px;
  background:var(--card);
  border-top:1px solid var(--line-soft);
}
#sequenceModalPanel.is-editing .seq-edit-bar .btn-primary{flex:1;}

@media (max-width:640px){
  .seq-step-edit-meta{grid-template-columns:1fr;}
  .seq-edit-delai-row{justify-content:flex-start;}
  .seq-edit-delai{width:88px;}
  .seq-edit-nav-label{max-width:100px;}
  #sequenceModalPanel.is-editing .seq-edit-bar{margin:0 -18px;padding:14px 18px 28px;}
}
/* ============================================
   PROFIL DE STYLE APPRIS
   ============================================ */
.style-profile-text{font-family:var(--mono);font-size:12.5px;color:var(--ink);line-height:1.85;white-space:pre-wrap;}
.style-count{font-family:var(--mono);font-size:11px;color:var(--gold-text);letter-spacing:.02em;text-transform:none;}
.style-note{margin-top:12px;font-size:12px;color:var(--text-muted);line-height:1.6;}
.style-memory-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;flex-wrap:wrap;}
.style-memory-state{font-size:13.5px;color:var(--ink);line-height:1.55;font-weight:500;}
.style-memory-bar{margin-top:12px;height:5px;border-radius:100px;background:var(--bordure);overflow:hidden;}
.style-memory-bar span{display:block;height:100%;border-radius:100px;background:var(--gold);transition:width .4s var(--ease);}

/* état de la pause (page compte) */
.pause-state{font-size:13px;color:var(--text-muted);line-height:1.65;padding:13px 15px;border-radius:var(--r-ctl);background:var(--hover-wash);}
.pause-state.paused{background:var(--brique-voile);color:var(--rust);}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-section{margin-bottom:26px;}
.dashboard-section:last-child{margin-bottom:0;}
#mainDashboard .wrap{max-width:1080px;}
.dash-body{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:22px;align-items:start;}
.dash-body.first-run{display:block;}
.dash-body.first-run .dash-aside{display:none;}
.dash-main,.dash-aside{min-width:0;display:flex;flex-direction:column;gap:22px;}
.dash-main .dashboard-section,.dash-aside .dashboard-section{margin-bottom:0;}
.dash-main .metrics{grid-template-columns:repeat(2,1fr);}
@media(max-width:900px){
  .dash-body{grid-template-columns:1fr;gap:20px;}
}

/* carte de parcours (funnel) */
.parcours-wrap{margin-bottom:24px;}
.parcours{
  display:grid;grid-template-columns:repeat(4,1fr);
  background:var(--card);border:1px solid var(--line);border-radius:var(--r-card);overflow:hidden;
  box-shadow:var(--ombre);
}
.parcours-step{display:flex;flex-direction:column;gap:4px;padding:16px 20px;color:var(--ink);transition:background .15s ease;}
.parcours-step+.parcours-step{border-left:1px solid var(--line-soft);}
.parcours-step:hover{background:var(--hover-wash);}
.parcours-step .ps-count{font-family:var(--display);font-size:27px;font-weight:700;line-height:1;color:var(--ink);}
.parcours-step .ps-label{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--sourdine);}
.parcours-step .ps-go{font-family:var(--sans);font-size:13px;font-weight:500;color:var(--brique);margin-top:2px;opacity:0;transition:opacity .14s ease;}
.parcours-step:hover .ps-go{opacity:1;}
.parcours-step.focus{background:var(--brique-voile);}
.parcours-step.focus .ps-count{color:var(--encre);}
.parcours-step.focus .ps-label{color:var(--sourdine);}
.parcours-step.focus .ps-go{color:var(--brique);opacity:1;}
@media(max-width:640px){
  .parcours{grid-template-columns:repeat(2,1fr);}
  .parcours-step:nth-child(3),.parcours-step:nth-child(4){border-top:1px solid var(--line-soft);}
  .parcours-step:nth-child(3){border-left:none;}
}

/* prochaine étape — une seule action mise en avant */
.next-step{
  background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:var(--r-card);
  padding:18px 20px;display:flex;align-items:center;gap:16px;
  box-shadow:var(--ombre);
  transition:background .14s ease,border-color .14s ease;
}
.next-step:hover{border-color:var(--bordure);background:var(--surface-2);}
.next-step-icon{
  flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:11px;background:var(--brique-voile);color:var(--brique);
}
.next-step-icon .ic{width:18px;height:18px;}
.next-step-body{flex:1;min-width:0;}
.next-step-body h3{font-size:16px;margin-bottom:3px;}
.next-step-body p{font-size:13px;color:var(--text-muted);}
.next-step-go{font-family:var(--sans);font-size:13px;font-weight:500;color:var(--brique);white-space:nowrap;flex-shrink:0;}
@media(max-width:620px){
  .next-step{flex-wrap:wrap;gap:12px;}
  .next-step-go{width:100%;}
}

/* chiffres */
.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;}
.metric{background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:16px 18px;}
.metric .m-num{font-family:var(--display);font-size:27px;font-weight:700;line-height:1.15;color:var(--ink);font-variant-numeric:tabular-nums;}
.metric .m-label{font-size:12px;color:var(--text-muted);margin-top:3px;}
.metric.highlight{background:var(--surface);border-color:var(--brique);}
.metric.highlight .m-num{color:var(--encre);}
.metric.highlight .m-label{color:var(--sourdine);}
.metric .m-hint{font-family:var(--mono);font-size:12.5px;color:var(--sourdine);margin-top:7px;display:block;}
.metric.highlight .m-hint{color:var(--sourdine);}
.metric.muted{background:transparent;border-style:dashed;border-color:var(--bordure);}
.metric.muted .m-num{color:var(--text-muted);}
.dash-footnote{margin-top:10px;font-size:12px;color:var(--text-muted);line-height:1.45;}

/* piste d'activation sous la prochaine étape */
.dash-track{
  list-style:none;margin:12px 0 0;padding:0;
  display:grid;grid-template-columns:repeat(4,1fr);gap:6px;
}
.dash-track-step{
  display:flex;align-items:center;gap:6px;
  padding:8px 10px;border-radius:10px;
  background:var(--card);border:1px solid var(--line-soft);
  font-family:var(--mono);font-size:11px;color:var(--text-muted);
}
.dash-track-step .dts-mark{
  display:inline-flex;align-items:center;justify-content:center;
  width:16px;height:16px;flex-shrink:0;color:var(--text-muted);
}
.dash-track-step .dts-mark .ic{width:12px;height:12px;}
.dash-track-step.done{color:var(--moss);border-color:var(--repondu-voile);background:var(--repondu-voile);}
.dash-track-step.done .dts-mark{color:var(--moss);}
.dash-track-step.current{color:var(--gold-text);border-color:var(--brique-voile);background:var(--brique-voile);}
.dash-track-step.current .dts-mark{color:var(--gold-text);}
@media(max-width:620px){
  .dash-track{grid-template-columns:repeat(2,1fr);}
}

/* en-tête de section avec lien */
.section-label-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-bottom:10px;
}
.section-label-row .section-label{margin-bottom:0;}
.section-link{
  font-family:var(--mono);font-size:11px;color:var(--gold-text);
  white-space:nowrap;
}
.section-link:hover{color:var(--ink);}

/* états vides utiles (pas un trou, une explication + CTA) */
.dash-empty{
  background:var(--card);border:1px dashed var(--bordure);border-radius:var(--r-card);
  padding:18px 18px 16px;
}
.dash-empty-compact{padding:14px 16px;}
.dash-empty-title{font-size:13.5px;font-weight:600;color:var(--ink);margin-bottom:4px;}
.dash-empty-text{font-size:12.5px;color:var(--text-muted);line-height:1.5;}
.dash-empty-cta{
  display:inline-block;margin-top:12px;
  font-family:var(--mono);font-size:11.5px;color:var(--gold-text);
}
.dash-empty-cta:hover{color:var(--ink);}

/* agenda des prochains envois */
.agenda-item{
  display:flex;align-items:center;gap:14px;
  padding:12px 14px;margin-bottom:6px;
  background:var(--card);border:1px solid var(--line);border-radius:12px;
  color:var(--ink);transition:background .14s ease,border-color .14s ease;
}
.agenda-item:last-child{margin-bottom:0;}
.agenda-item:hover{background:var(--surface-2);border-color:var(--bordure);}
.agenda-item .ag-when{
  flex-shrink:0;min-width:72px;
  font-family:var(--mono);font-size:11px;color:var(--gold-text);
  text-transform:capitalize;
}
.agenda-item .ag-body{flex:1;min-width:0;}
.agenda-item .ag-body strong{display:block;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.agenda-item .ag-body span{display:block;font-size:12px;color:var(--text-muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.agenda-item .ag-go{flex-shrink:0;color:var(--text-muted);display:inline-flex;}
.agenda-item .ag-go .ic{width:16px;height:16px;}
.agenda-item:hover .ag-go{color:var(--ink);}

/* quelle séquence fait répondre — classement par taux de réponse */
.accroches{display:flex;flex-direction:column;gap:14px;}
.accroche-row{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px 16px;}
.accroche-row.lead{border-color:var(--repondu-voile);border-left:3px solid var(--moss);background:var(--surface-2);}
.ar-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:9px;}
.ar-nom{font-size:13.5px;font-weight:500;color:var(--ink);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ar-rate{font-family:var(--display);font-size:18px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap;display:inline-flex;align-items:baseline;gap:8px;}
.ar-badge{font-family:var(--sans);font-size:12.5px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--repondu);background:var(--repondu-voile);border:1px solid var(--bordure);border-radius:var(--r-badge);padding:2px 7px;}
.ar-bar{height:6px;border-radius:100px;background:var(--bordure);overflow:hidden;}
.ar-bar span{display:block;height:100%;border-radius:100px;background:var(--moss);transition:width .4s var(--ease);}
.ar-sub{display:block;margin-top:7px;font-family:var(--mono);font-size:10.5px;color:var(--text-muted);}

/* réponses à traiter */
.inbox-item{
  background:var(--card);color:var(--ink);border:1px solid var(--line);border-left:3px solid var(--moss);
  border-radius:0 10px 10px 0;padding:12px 16px;margin-bottom:8px;
  display:flex;align-items:flex-start;gap:14px;cursor:pointer;
  transition:background .14s ease,border-color .14s ease;
}
.inbox-item:hover{background:var(--surface-2);}
.inbox-item .ib-who{flex:1;min-width:0;}
.inbox-item .ib-who strong{display:block;font-size:13.5px;}
.inbox-item .ib-extrait{margin:6px 0 4px;font-size:13.5px;line-height:1.5;color:var(--ink-light);white-space:pre-wrap;overflow-wrap:break-word;}
.inbox-item .ib-who span{font-size:12px;color:var(--text-muted);}
.activity-extrait{margin:4px 0 0;font-size:12.5px;line-height:1.45;color:var(--ink-light);white-space:pre-wrap;overflow-wrap:break-word;}
.inbox-item .ib-when{font-family:var(--mono);font-size:11px;color:var(--moss);white-space:nowrap;}

.recent-type{font-family:var(--mono);font-size:10px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--moss);display:block;margin-bottom:2px;}
.dashboard-stats{font-family:var(--mono);font-size:12px;color:var(--text-muted);}

/* progression */
.progress-card{padding-bottom:22px;}
.progress-headline{font-family:var(--display);font-size:21px;font-weight:700;color:var(--ink);display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:4px;}
.progress-delta{font-family:var(--mono);font-size:12px;font-weight:600;}
.progress-delta.up{color:var(--gold-text);}
.progress-delta.down{color:var(--rust);}
.progress-trend{display:flex;align-items:flex-end;gap:14px;margin-top:20px;}
.progress-bar-col{display:flex;flex-direction:column;align-items:center;gap:7px;flex:1;max-width:46px;}
.progress-bar{width:100%;max-width:26px;background:var(--gold);border-radius:5px 5px 2px 2px;transition:height .3s var(--ease);}
.progress-bar-label{font-family:var(--sans);font-size:13px;font-weight:500;color:var(--sourdine);text-transform:none;}

/* ============================================
   ACCROCHES — la raison d'écrire à ce prospect
   ============================================ */
.accroche-block{margin-top:24px;padding-top:20px;border-top:1px solid var(--line);}
.card.starter{border-color:var(--brique-voile);}
.starter-lead{font-size:14px;color:var(--text-muted);margin:-2px 0 16px;max-width:60ch;}
.starter-create{margin-top:20px;padding-top:18px;border-top:1px solid var(--line);}
.starter-chosen{font-size:13.5px;color:var(--ink);background:var(--brique-voile);border-radius:var(--r-ctl);padding:13px 15px;margin-bottom:16px;}

.card-collapsible summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:10px;}
.card-collapsible summary::-webkit-details-marker{display:none;}
.card-collapsible summary::after{content:'+';margin-left:auto;font-size:17px;color:var(--text-muted);transition:transform .2s var(--ease);}
.card-collapsible[open] summary::after{transform:rotate(45deg);}
.card-collapsible[open] summary{margin-bottom:16px;}

.accroche-tag{display:inline-flex;align-items:center;gap:5px;font-family:var(--sans);font-size:12.5px;font-weight:500;letter-spacing:0;padding:3px 9px;border-radius:var(--r-badge);border:1px solid var(--bordure);background:var(--attente-voile);color:var(--attente);margin-bottom:5px;}
.accroche-tag.missing{background:var(--stoppe-voile);color:var(--text-muted);}
.accroche-tag.encours{background:var(--repondu-voile);color:var(--moss);}
.accroche-tag.encours::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--moss);flex-shrink:0;}
.accroche-tag .ic{width:11px;height:11px;}

.accroche-current{background:var(--brique-voile);border:1px solid var(--brique-voile);border-radius:var(--r-ctl);padding:14px 16px;margin-bottom:16px;}
.accroche-current p{font-size:13.5px;color:var(--ink);margin-bottom:6px;}

.accroche-card{border:1px solid var(--line);border-radius:var(--r-ctl);padding:16px 18px;margin-bottom:10px;transition:border-color .15s ease;}
.accroche-card:hover{border-color:var(--gold-dim);}
.acc-fait{font-size:14px;font-weight:600;color:var(--ink);margin-bottom:5px;}
.acc-angle{font-size:13px;color:var(--text-muted);margin-bottom:9px;}
.acc-ouverture{font-family:var(--serif);font-style:italic;font-size:14.5px;color:var(--ink);border-left:2px solid var(--gold);padding-left:12px;margin-bottom:9px;}
.acc-pourquoi{font-size:12.5px;color:var(--moss);margin-bottom:10px;}
.acc-choose{color:var(--gold-text);font-weight:600;padding-left:0;}
.acc-choose:hover{color:var(--gold);}

/* ============================================
   STATS DE CAMPAGNES
   ============================================ */
.stat-global{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--line-soft);}
.stat-global-chiffre{font-family:var(--display);font-size:34px;font-weight:900;color:var(--gold-text);line-height:1;}
.stat-global-label{font-size:13px;color:var(--text-muted);}
.stat-row{margin-bottom:14px;}
.stat-row:last-child{margin-bottom:0;}
.stat-row-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:6px;}
.stat-row-nom{font-size:13.5px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.stat-row-chiffre{font-family:var(--mono);font-size:12.5px;font-weight:500;color:var(--moss);flex-shrink:0;}
.stat-row-chiffre.incertain{color:var(--text-muted);}
.stat-bar{height:5px;border-radius:100px;background:var(--bordure);overflow:hidden;}
.stat-bar span{display:block;height:100%;border-radius:100px;background:var(--moss);transition:width .4s var(--ease);}
.stat-row-detail{display:block;font-family:var(--mono);font-size:11px;color:var(--text-muted);margin-top:4px;}

/* ============================================
   PAGE COMPTE — fenêtre avec nav latérale + panneaux
   ============================================
   Remplace l'ancienne page longue à ancres : une fenêtre centrée
   (.account-modal), une colonne de nav sombre à gauche (mêmes teintes
   que la sidebar de l'appli, pour rester dans le même monde visuel),
   un seul panneau de contenu affiché à droite à la fois. */
#mainAccount{
  display:flex;align-items:flex-start;justify-content:center;
  min-height:100vh;padding:28px 20px 40px;background:var(--paper-dim);
}
.account-modal{
  display:grid;grid-template-columns:240px minmax(0,1fr);
  /* height (via min(), pas min-height+max-height) : une hauteur fixe évite
     que le popup change de taille en changeant d'onglet (panneaux de
     hauteurs très différentes), et min() garantit qu'il ne dépasse jamais
     le viewport sur un écran bas — un min-height fixe l'aurait fait
     déborder en dessous de ~776px de haut. */
  width:100%;max-width:1180px;height:min(760px, calc(100vh - 56px));
  background:var(--card);border-radius:20px;overflow:hidden;
  box-shadow:var(--ombre);
}

/* --- colonne de gauche : profil, statut, onglets --- */
.account-modal-side{
  background:var(--surface-2);color:var(--encre);
  border-right:1px solid var(--bordure);
  display:flex;flex-direction:column;padding:24px 16px;overflow-y:auto;
  min-height:0;overscroll-behavior:contain;
}
.account-modal-profile{
  display:flex;align-items:center;gap:11px;
  padding:0 4px 18px;margin-bottom:16px;border-bottom:1px solid var(--bordure);
}
.account-modal-profile .avatar{width:40px;height:40px;font-size:16px;flex-shrink:0;}
.account-modal-profile-info{min-width:0;display:flex;flex-direction:column;}
.account-modal-profile-info strong{font-size:13.5px;font-weight:600;color:var(--encre);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.account-modal-profile-info span{font-size:11px;color:var(--sourdine);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

.account-modal-status{display:flex;flex-direction:column;gap:6px;margin-bottom:18px;}
.account-modal-status .status-pill{background:var(--surface);}
.account-modal-status .status-pill:hover{background:var(--surface);border-color:var(--bordure);}
.account-modal-status .status-pill-label{color:var(--sourdine);}
.account-modal-status .status-pill-value{color:var(--encre);}

.account-modal-tabs{display:flex;flex-direction:column;gap:2px;flex:1;}
.account-modal-tabs button{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:10px 11px;border-radius:var(--r-btn);border:none;background:none;
  font:inherit;font-size:13px;color:var(--sourdine);text-align:left;cursor:pointer;
  transition:background .14s ease,border-color .14s ease;
}
.account-modal-tabs button .ic{width:16px;height:16px;flex-shrink:0;}
.account-modal-tabs button:hover{background:var(--surface);color:var(--encre);}
.account-modal-tabs button.active{background:var(--brique-voile);color:var(--brique);font-weight:500;}

.account-modal-back{
  display:flex;align-items:center;gap:8px;margin-top:14px;padding-top:14px;
  border-top:1px solid var(--bordure);
  font-size:12px;color:var(--sourdine);text-decoration:none;
}
.account-modal-back .ic{width:13px;height:13px;}
.account-modal-back:hover{color:var(--encre);}

/* Bouton menu mobile (hamburger) : cf. media query, masqué sur desktop où
   les onglets restent une liste verticale toujours visible. */
.account-modal-menu-btn{
  display:none;align-items:center;gap:7px;flex-shrink:0;
  background:var(--surface);border:1px solid var(--bordure-forte);border-radius:var(--r-btn);
  padding:8px 12px;color:var(--encre);font:inherit;font-size:12.5px;cursor:pointer;
}
.account-modal-menu-btn .ic{width:15px;height:15px;}
.account-modal-menu-btn:hover{background:var(--surface-2);}

/* --- colonne de droite : le panneau actif ---
   min-height:0 obligatoire : sans ça, l'item grid refuse de descendre sous
   la hauteur de son contenu (min-height:auto), .account-modal-body n'est
   jamais contraint, overflow-y:auto ne s'active pas, et la molette scrolle
   la page hôte derrière l'iframe (surtout visible sur Réglages, plus long). */
.account-modal-main{display:flex;flex-direction:column;min-width:0;min-height:0;}
.account-modal-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;
  padding:18px 28px;border-bottom:1px solid var(--line-soft);
}
.account-modal-head h1{font-family:var(--display);font-size:28px;font-weight:700;letter-spacing:-.005em;color:var(--encre);}
.account-modal-body{
  flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;padding:26px 28px 40px;
}

/* bandeau d'état : plan / usage / actif-pause (partagé avec le dashboard) */
.status-pill{
  display:flex;flex-direction:column;gap:2px;
  padding:9px 14px;border-radius:var(--r-ctl);background:var(--hover-wash);
  border:1px solid transparent;font:inherit;color:inherit;text-align:left;cursor:pointer;
  transition:background .14s ease,border-color .14s ease;
}
.status-pill:hover{background:var(--bordure);border-color:var(--line);}
.status-pill-label{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--sourdine);text-transform:none;}
.status-pill-value{font-size:13.5px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;}
.status-pill-value .dot-state{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px;vertical-align:middle;background:var(--moss);}
.status-pill-value.is-paused{color:var(--rust);}
.status-pill-value.is-paused .dot-state{background:var(--rust);}
.status-pill.is-paused{border-color:var(--brique-voile);}
.status-pill.is-paused .status-pill-label{color:var(--brique-hover);}

.account-modal-back .ic-back{transform:rotate(180deg);}

/* Sections accordéon du panneau profil — une ouverte à la fois
   (géré en JS). En-tête plus lisible, méta à droite. */
.profil-section{
  margin-bottom:10px;
  border:1px solid var(--line-soft);
  border-radius:var(--r-card);
  background:var(--card);
  overflow:hidden;
}
.profil-section:last-child{margin-bottom:0;}
.profil-section-toggle{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:14px 16px;background:var(--paper-dim);border:none;cursor:pointer;text-align:left;
  color:var(--ink);
  transition:background .15s ease;
}
.profil-section-toggle:hover{background:var(--hover-wash);}
.profil-section.is-open .profil-section-toggle{
  background:transparent;border-bottom:1px solid var(--line-soft);
}
.profil-section-title{
  font-size:13.5px;font-weight:600;letter-spacing:0;
  text-transform:none;font-family:var(--sans);color:var(--ink);
}
.profil-section-meta{
  margin-left:auto;font-family:var(--sans);font-size:13px;font-weight:500;
  color:var(--brique);letter-spacing:0;background:var(--brique-voile);
  padding:3px 9px;border-radius:var(--r-badge);
}
.profil-section-chevron{width:16px;height:16px;color:var(--text-muted);transition:transform .15s ease;flex-shrink:0;}
.profil-section.is-open .profil-section-chevron{transform:rotate(180deg);color:var(--gold-dim);}
.profil-section-body{display:none;padding:16px 16px 18px;}
.profil-section.is-open .profil-section-body{display:block;}

.panel-lead{
  font-size:13.5px;line-height:1.55;color:var(--text-muted);
  margin:0 0 16px;
}
.panel-lead em{font-style:italic;color:var(--ink-light);}

.sender-card-hero{align-items:center;}
.sender-card-hero .btn-edit{flex-shrink:0;margin-left:auto;}

.profile-group-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:4px 0 10px;
}
.profile-group-title{
  font-size:12px;font-weight:600;color:var(--text-muted);
  margin:0;letter-spacing:.02em;
}

.profile-rows{display:flex;flex-direction:column;gap:2px;}
.profile-row{
  display:flex;align-items:baseline;gap:12px;
  padding:10px 12px;border-radius:var(--r-ctl);
  background:var(--paper-dim);border:1px solid transparent;
  font:inherit;text-align:left;width:100%;color:inherit;
}
button.profile-row{cursor:pointer;transition:background .14s ease,border-color .14s ease;}
button.profile-row:hover{border-color:var(--brique-voile);background:var(--brique-voile);}
.profile-row-label{
  flex:0 0 38%;max-width:200px;
  font-size:12.5px;color:var(--text-muted);line-height:1.4;
}
.profile-row-value{
  flex:1;min-width:0;font-size:13.5px;font-weight:500;color:var(--ink);
  line-height:1.45;overflow-wrap:break-word;
}
.profile-row.is-empty .profile-row-value{
  font-weight:500;color:var(--gold-text);font-style:italic;
}
.profile-row-chevron{width:14px;height:14px;flex-shrink:0;color:var(--gold-dim);align-self:center;}

.completeness-cta{margin-top:14px;}
.completeness-cta .ic{width:14px;height:14px;}

.avatar{
  width:54px;height:54px;flex-shrink:0;border-radius:50%;
  background:var(--brique);color:var(--surface);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--display);font-size:22px;font-weight:700;
}

.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px 22px;}
.info-item .info-label{display:block;font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--sourdine);margin-bottom:4px;}
.info-item .info-value{display:block;font-size:14px;color:var(--ink);font-weight:500;overflow-wrap:break-word;}
.info-item-wide{grid-column:1 / -1;}
.edit-fields .field-hint{margin:2px 0 16px;line-height:1.5;}

@media (max-width:900px){
  /* 52px de topbar + 63px de tabbar, toutes deux hors flux (sticky/fixed) :
     sans les retrancher, le bas de la fenêtre passait sous la tabbar.
     La seconde déclaration (dvh) affine sur mobile, où 100vh vaut la
     hauteur barre d'URL masquée — ignorée par les navigateurs sans dvh. */
  #mainAccount{
    padding:0;background:var(--card);
    height:calc(100vh - 115px);height:calc(100dvh - 115px);min-height:0;
  }
  .account-modal{
    /* grid-template-rows explicite : en une seule colonne, les deux rangées
       (bandeau sombre, panneau) étaient auto-dimensionnées, donc hautes de
       tout leur contenu. Le panneau débordait de la fenêtre,
       .account-modal-body n'était jamais contraint — son overflow-y:auto ne
       s'activait donc pas — et .account-modal{overflow:hidden} rognait le
       reste : plus rien ne défilait, le bouton de réinitialisation était
       inatteignable. minmax(0,1fr) autorise la rangée à passer sous la
       hauteur de son contenu, ce qui rend la main au défilement interne. */
    grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);
    max-width:none;height:100%;min-height:0;max-height:none;
    border-radius:0;box-shadow:none;
  }
  /* Un item flex/grid refuse par défaut de descendre sous la hauteur de son
     contenu (min-height:auto), ce qui annulerait le minmax(0,1fr) ci-dessus. */
  .account-modal-main{min-height:0;}
  .account-modal-side{position:relative;flex-direction:row;flex-wrap:wrap;padding:14px 16px;overflow:visible;}
  .account-modal-profile{flex:1 1 100%;min-width:0;padding:0;margin:0;border:none;}
  .account-modal-status{flex:1 1 100%;flex-direction:row;order:3;margin:10px 0 0;}

  /* Les deux rangées du bandeau sombre (profil, pastilles d'état) sont des
     lignes flex dont les enfants se dimensionnent sur leur contenu : sans
     ces deux règles elles s'arrêtaient ~60px avant le bord droit, alors que
     le panneau clair juste en dessous va, lui, jusqu'au bout — le bandeau
     paraissait rogné du côté droit. */
  .account-modal-status .status-pill{flex:1 1 auto;}

  /* Onglets : plus une rangée à faire défiler, un menu qui s'ouvre au tap
     du bouton hamburger (voir .account-modal-menu-btn) — au-dessus du
     reste de la page (z-index), en dropdown ancré sous la colonne. */
  .account-modal-menu-btn{display:flex;margin-left:auto;}
  .account-modal-tabs{
    display:none;position:absolute;left:14px;right:14px;top:100%;z-index:20;
    flex-direction:column;gap:2px;margin-top:6px;padding:8px;
    background:var(--surface);border:1px solid var(--bordure);border-radius:12px;
    box-shadow:var(--ombre);
  }
  .account-modal-tabs.open{display:flex;}

  /* Fond assombri sous le dropdown (voir .account-modal-tabs juste
     au-dessus) : sans lui, le contenu de la page reste visible et se
     superpose crûment au menu ouvert. z-index entre le contenu (auto)
     et le dropdown (20). */
  .account-modal-tabs-backdrop{
    display:none;position:fixed;inset:0;z-index:19;
    background:var(--encre);
  }
  #accountSubnav.open ~ .account-modal-tabs-backdrop{display:block;}

  .account-modal-back{display:none;}
  .account-modal-head{padding:14px 18px;}
  .account-modal-body{padding:18px;}
}

/* ============================================
   MODE EMBED — compte.html chargé dans l'iframe du popup
   ============================================
   Ouvert depuis dashboard/prospects/séquences/campagnes (voir
   openAccountOverlay dans auth.js) : compte.html tourne alors avec
   ?embed=1, ajouté par un script en tête de <body> avant tout rendu.
   La coquille (sidebar/topbar/tabbar/squelette) est déjà affichée par
   la page hôte en dessous — inutile en double dans le cadre. La taille
   et l'ombre du popup sont portées par .account-overlay-frame (page
   hôte) plutôt que par .account-modal, qui remplit alors tout le cadre. */
body.embed .sidebar, body.embed .topbar, body.embed .tabbar, body.embed .page-loader{display:none!important;}
/* Empêche le document iframe de scroller lui-même (sinon la molette
   déborde vers la page hôte). Le seul scroll autorisé est .account-modal-body. */
html:has(body.embed), body.embed{height:100%;overflow:hidden;}
/* height:100vh (définie), pas min-height : un min-height ne donne pas de
   hauteur "définie" au conteneur, donc .account-modal{height:100%}
   juste en dessous ne pouvait pas s'y accrocher — la carte retombait à
   la hauteur de son contenu, collée en haut, avec du vide sous elle. */
/* margin-left:0 : la règle générique main{margin-left:var(--sidebar-w)}
   (pensée pour la sidebar fixe, cachée juste au-dessus) s'appliquait
   quand même ici — le popup se centrait alors sur une largeur amputée
   de 216px à gauche, décalé/rogné dans le cadre de l'iframe. */
body.embed #mainAccount{padding:0;margin-left:0;background:none;height:100%;min-height:0;overflow:hidden;}
body.embed .account-modal{width:100%;height:100%;max-width:none;min-height:0;max-height:none;border-radius:0;box-shadow:none;}

/* ============================================
   POPUP "MON COMPTE" DEPUIS UNE AUTRE PAGE
   ============================================
   .account-overlay réutilise .modal-overlay (fond assombri, fermeture au
   clic dehors / Échap déjà câblées dans auth.js) ; seule la taille du
   cadre est propre à ce popup. Mêmes dimensions que .account-modal en
   mode autonome, pour un rendu identique qu'on arrive par l'iframe ou
   directement sur compte.html. */
.modal-overlay.account-overlay{overscroll-behavior:contain;}
/* Verrouille le scroll de la page hôte tant que le popup est ouvert.
   --account-overlay-sb (posé en JS) compense la largeur de la scrollbar
   qui disparaît avec overflow:hidden — sinon body + topbar/tabbar fixed
   sautent d'autant. L'overlay lui-même reste en inset:0 (plein viewport). */
html.account-overlay-open,
html.account-overlay-open body{overflow:hidden;}
html.account-overlay-open body{
  padding-right:var(--account-overlay-sb, 0px);
}
html.account-overlay-open .topbar,
html.account-overlay-open .tabbar{
  padding-right:var(--account-overlay-sb, 0px);
}
.account-overlay-frame{
  width:min(1180px, 96vw);height:min(760px, 90vh);
  border:none;border-radius:20px;background:var(--card);
  box-shadow:var(--ombre);
}
@media (max-width:900px){
  /* .modal-overlay.account-overlay (deux classes) plutôt que .account-overlay
     seule : à spécificité égale, .modal-overlay{padding:20px} déclarée plus
     bas dans la feuille l'emporterait sinon, media query ou pas — l'ordre
     de la cascade ne regarde pas si une media query s'applique. */
  .modal-overlay.account-overlay{padding:0;}
  .account-overlay-frame{width:100%;height:100%;border-radius:0;box-shadow:none;}
}

/* encart "expéditeur" — le seul réglage à conséquence externe */
.sender-card{
  display:flex;align-items:center;gap:13px;margin-bottom:20px;
  padding:14px 16px;border-radius:var(--r-ctl);
  background:var(--surface-2);
  border:1px solid var(--brique-voile);
}
.sender-card-icon{flex-shrink:0;color:var(--gold-dim);display:inline-flex;}
.sender-card-icon .ic{width:19px;height:19px;}
.sender-card-body{min-width:0;display:flex;flex-direction:column;gap:3px;}
.sender-card-value{font-size:15px;font-weight:600;color:var(--ink);overflow-wrap:break-word;}
.sender-card .statut-tag{flex-shrink:0;margin-left:auto;}

/* ============================================
   DOMAINE D'ENVOI PERSO (plan Pro)
   ============================================ */
.domaine-locked{
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  padding:14px 16px;border-radius:var(--r-ctl);background:var(--hover-wash);
}
.domaine-locked .field-hint{margin:0;}

.domaine-email-row{display:flex;align-items:center;gap:8px;}
.domaine-email-row input{flex:1;min-width:0;}
.domaine-email-at{
  font-family:var(--mono);font-size:12.5px;color:var(--text-muted);
  white-space:nowrap;flex-shrink:0;
}

.domaine-connecte .sender-card{margin-bottom:16px;}
.domaine-records{margin-bottom:16px;}

.dns-table{
  display:flex;flex-direction:column;gap:1px;
  border:1px solid var(--line);border-radius:var(--r-ctl);overflow:hidden;margin-top:10px;
}
.dns-row{
  display:grid;grid-template-columns:64px 52px 1fr 1fr 30px;gap:10px;align-items:center;
  padding:9px 12px;background:var(--field);
}
.dns-row:nth-child(even){background:var(--card);}
.dns-record{font-family:var(--mono);font-size:10.5px;letter-spacing:.03em;color:var(--gold-text);text-transform:uppercase;}
.dns-type{font-family:var(--mono);font-size:10.5px;color:var(--text-muted);}
.dns-name,.dns-value{
  font-family:var(--mono);font-size:11.5px;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;
}
.dns-value{color:var(--text-muted);}

@media (max-width:640px){
  .dns-row{grid-template-columns:1fr;gap:4px;padding:12px;}
  .dns-record{order:-1;}
}

.field-hint-with-info{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;}
.field-hint-with-info .icon-btn{flex-shrink:0;margin-top:-4px;}

.link-inline{
  background:none;border:none;padding:0;margin:0;font:inherit;font-weight:600;
  color:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer;white-space:nowrap;
}
.link-inline:hover{opacity:.75;}

/* modale d'aide DNS : étapes numérotées */
.aide-dns-etapes{display:flex;flex-direction:column;gap:14px;margin-bottom:18px;}
.aide-dns-etape{display:flex;gap:12px;align-items:flex-start;}
.aide-dns-etape p{font-size:13.5px;color:var(--ink);line-height:1.6;}
.aide-dns-num{
  flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:50%;margin-top:1px;
  font-family:var(--mono);font-size:11px;font-weight:600;
  background:var(--brique-voile);color:var(--gold-text);
}
.modal .desc code, .aide-dns-etape code{
  font-family:var(--mono);font-size:.92em;
  background:var(--bordure);padding:1px 5px;border-radius:5px;
}

/* jauge de complétude du profil métier */
.completeness{margin-bottom:22px;padding-bottom:20px;border-bottom:1px solid var(--line-soft);}
.completeness-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px;}
.completeness-title{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--sourdine);text-transform:none;}
.completeness-pct{font-size:14px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;}
.completeness-note{font-size:12px;color:var(--text-muted);margin-top:9px;line-height:1.55;}
.completeness.is-complete .completeness-pct{color:var(--moss);}

/* carte abonnement */
.sub-plan-tag{font-family:var(--sans);font-size:13px;font-weight:500;color:var(--sourdine);letter-spacing:0;text-transform:none;}
.sub-plan-tag-paid{color:var(--moss);font-weight:600;}
.sub-state{font-size:13px;color:var(--text-muted);line-height:1.65;padding:13px 15px;border-radius:var(--r-ctl);background:var(--hover-wash);}
.sub-state.sub-warn{color:var(--rust);background:var(--brique-voile);}
.sub-details{margin-top:16px;}
.sub-info-grid{gap:14px 22px;}
.sub-usage{margin-top:20px;padding-top:18px;border-top:1px solid var(--line-soft);}
.sub-usage-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px;}
.sub-usage-title{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--sourdine);text-transform:none;}
.sub-usage-count{font-size:13.5px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;}
.sub-meter{height:6px;border-radius:100px;background:var(--bordure);overflow:hidden;}
.sub-meter-fill{display:block;height:100%;width:0;border-radius:100px;background:var(--moss);transition:width .3s var(--ease);}
.sub-meter-fill-low{background:var(--rust);}
.sub-usage-note{font-size:12px;color:var(--text-muted);margin-top:8px;line-height:1.5;}
.sub-upgrade{margin-top:14px;}
.sub-cycle{display:inline-flex;gap:3px;padding:3px;border-radius:var(--r-ctl);background:var(--bordure);margin-bottom:14px;}
.sub-cycle-btn{background:none;border:none;cursor:pointer;font-size:13px;font-weight:600;color:var(--text-muted);padding:7px 15px;border-radius:8px;transition:background .14s ease,border-color .14s ease;}
.sub-cycle-btn.active{background:var(--card);color:var(--ink);box-shadow:var(--ombre);}
.sub-cycle-save{font-family:var(--mono);font-size:10px;color:var(--moss);margin-left:4px;}
.sub-plans{display:flex;gap:12px;flex-wrap:wrap;align-items:stretch;}
.sub-plans>button{flex:1;min-width:180px;}
.sub-plan-card{
  flex:1;min-width:200px;
  display:flex;flex-direction:column;gap:14px;
  padding:18px 16px;border-radius:var(--r-card);
  border:1px solid var(--line);background:var(--card);
}
.sub-plan-card-featured{border-color:var(--brique-voile);background:var(--surface-2);}
.sub-plan-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;}
.sub-plan-card-head strong{font-family:var(--display);font-size:18px;font-weight:700;color:var(--ink);}
.sub-plan-card-price{font-family:var(--mono);font-size:13px;font-weight:600;color:var(--gold-text);white-space:nowrap;}
.sub-plan-card-perks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;flex:1;}
.sub-plan-card-perks li{
  position:relative;padding-left:14px;font-size:13px;line-height:1.45;color:var(--text-muted);
}
.sub-plan-card-perks li::before{content:'';position:absolute;left:0;top:.55em;width:6px;height:6px;border-radius:50%;background:var(--gold);}
.sub-plan-card .btn-primary{width:100%;justify-content:center;margin-top:auto;}
/* rétrogradation indisponible en cours de période : état verrouillé neutre
   (pointillés, muet), distinct du simple fondu d'un bouton désactivé */
.sub-plan-locked,.sub-plan-locked:disabled{background:transparent;color:var(--text-muted);border:1px dashed var(--line);box-shadow:none;opacity:1;cursor:not-allowed;transform:none;}
#subBtnPro{background:transparent;color:var(--encre);border:1px solid var(--bordure-forte);box-shadow:none;}
#subBtnPro:hover{background:var(--surface-2);}
.sub-plan-card-featured #subBtnPro{background:var(--brique);color:var(--surface);border-color:transparent;}
.sub-plan-card-featured #subBtnPro:hover{background:var(--brique-hover);}

.memoire-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px;}
.memoire-actions .btn-primary,.memoire-actions .btn-edit{text-decoration:none;}
.field-optional{font-weight:400;color:var(--text-muted);font-size:12px;}
.account-section-gap{margin-top:28px;}
.sub-manage{margin-top:14px;}
.sub-change{margin-top:4px;}
.sub-change-head{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text-muted);margin-bottom:10px;}
/* Pied de la carte : résilier/réactiver + accès factures, séparés du reste. */
.sub-manage-foot{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;align-items:center;gap:12px;}
.sub-manage-foot .btn-edit{margin-left:auto;}
/* Résilier : geste destructif mais réversible → rust discret, pas un bloc
   plein. Passe en « sûr ? » au 1er tap (confirmTap), d'où l'état .arming. */
.btn-cancel-sub{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:var(--sans);font-size:15px;font-weight:600;letter-spacing:0;
  padding:9px 16px;border-radius:var(--r-ctl);cursor:pointer;
  border:1px solid var(--brique-voile);background:var(--brique-voile);color:var(--rust);
  transition:background .14s ease,border-color .14s ease;
}
.btn-cancel-sub:hover{background:var(--brique-voile);border-color:var(--rust);}
.btn-cancel-sub.arming{background:var(--brique-voile);border-color:var(--rust);}
.btn-cancel-sub:disabled{opacity:.55;cursor:not-allowed;}

/* --- carte abonnement sur mobile ---
   Media query placée ICI, après les styles .sub-* ci-dessus, et non dans le
   bloc mobile de la page compte (bien plus haut) : à spécificité égale, la
   règle la plus basse dans la feuille l'emporte, media query ou pas. Depuis
   là-haut, .sub-manage-foot{align-items:center} et le margin-left:auto de
   .btn-edit reprenaient le dessus — même piège que .modal-overlay
   .account-overlay, documenté plus haut. */
@media (max-width:900px){
  /* Pied de carte : les deux boutons totalisaient 412px pour 357 disponibles,
     ils repassaient donc à la ligne — et margin-left:auto plaquait le second
     à droite pendant que le premier restait à gauche, deux boutons en
     escalier collés à des bords opposés. Empilés pleine largeur à la place.
     min-height:44px : « factures et carte » ne faisait que 28px de haut,
     sous le seuil confortable au doigt. */
  .sub-manage-foot{flex-direction:column;align-items:stretch;gap:10px;}
  .sub-manage-foot>button{min-height:44px;}
  /* .btn-edit ne centre pas son contenu (aligné à gauche par défaut), ce qui
     se voit dès qu'il occupe toute la largeur. */
  .sub-manage-foot .btn-edit{margin-left:0;justify-content:center;}

  /* Sélecteur mensuel/annuel : en inline-flex il n'occupait que 256px des 357
     disponibles, désaligné du reste de la carte. Pleine largeur, les deux
     options se partageant l'espace restant. flex:1 1 auto et non flex:1 : à
     parts strictement égales, « annuel · 2 mois offerts » se replie sur deux
     lignes en dessous de ~360px de large. */
  .sub-cycle{display:flex;}
  .sub-cycle-btn{flex:1 1 auto;min-height:40px;}

  /* Formules : déjà empilées (deux min-width:180px ne tiennent pas côte à
     côte ici), on n'aligne que la hauteur tactile. */
  .sub-plans>button,.sub-plan-card .btn-primary{min-height:44px;}
}

/* Surlignage bref quand on arrive via un lien « passer à Solo/Pro » : deux
   pulsations d'anneau doré pour poser l'œil sur le bon bouton, sans bloquer. */
.sub-btn-focus{animation:subBtnFocus 1.2s ease 2;}
@keyframes subBtnFocus{
  0%,100%{box-shadow:0 0 0 0 var(--brique-voile);}
  50%{box-shadow:0 0 0 4px var(--brique-voile);}
}
@media(prefers-reduced-motion:reduce){.sub-btn-focus{animation:none;box-shadow:0 0 0 3px var(--brique-voile);}}
@media(max-width:520px){.sub-plans>button,.sub-plan-card{min-width:100%;}}

/* ============================================
   MODALES + PANNEAUX LATÉRAUX
   Une modale (.modal-overlay) reste pour les décisions bloquantes
   (onboarding, confirmation d'envoi ou de réinitialisation). Les
   FICHES (prospect, script, séquence, campagne, objection) glissent
   en panneau latéral : le contexte de la liste reste visible.
   ============================================ */
.modal-overlay{position:fixed;inset:0;background:var(--encre);display:flex;align-items:center;justify-content:center;z-index:300;padding:20px;animation:overlayIn .2s ease both;}
.modal-overlay.hidden{display:none;}
@keyframes overlayIn{from{opacity:0;}to{opacity:1;}}
.modal{
  position:relative;background:var(--card);color:var(--ink);
  border-radius:var(--r-card);padding:28px;max-width:440px;width:100%;
  animation:modalIn .25s var(--ease) both;
  max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain;
}
@keyframes modalIn{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:none;}}
.modal h2{font-size:21px;margin-bottom:6px;color:var(--ink);padding-right:24px;}
.modal p.desc{font-size:13.5px;color:var(--text-muted);margin-bottom:20px;}
.modal-wide{max-width:600px;}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
/* Le <strong> est le titre de plusieurs modales (détail campagne, réinit.
   de compte, aide DNS) : sans ça il tombait en gras système par défaut,
   alors que tous les autres titres du produit sont en Gothic Neo. */
.modal-head h3,
.modal-head > strong{
  font-family:var(--display);font-size:19px;font-weight:600;
  color:var(--ink);flex:1;min-width:0;line-height:1.3;
}
.script-name-input{font-family:var(--display);font-size:19px;font-weight:600;border:none!important;background:none!important;padding:4px 0!important;flex:1;border-radius:0!important;box-shadow:none!important;}
.script-name-input:focus{outline:none;border-bottom:1px solid var(--gold)!important;}
.modal .tag{font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;color:var(--repondu);}
/* Méta juste sous un titre de modale : lisible en corps de texte plutôt
   qu'en monospace serré (le mono reste pour les données, pas les phrases). */
.modal-head + .tag{
  display:block;font-family:var(--sans);font-size:13px;letter-spacing:normal;
  color:var(--text-muted);line-height:1.5;margin-bottom:18px;
}
.script-modal-text{white-space:pre-wrap;font-family:var(--mono);font-size:12.5px;color:var(--ink);background:var(--paper-dim);padding:16px;border-radius:var(--r-ctl);margin:12px 0 16px;line-height:1.8;}
.modal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px;}
.modal-actions .icon-btn{
  font-family:var(--mono);font-size:12px;padding:8px 13px;height:auto;
  border:1px solid var(--line);border-radius:8px;
}
.modal-actions .icon-btn:hover{border-color:var(--bordure);color:var(--ink);background:var(--hover-wash);}
.modal-actions .icon-btn.danger:hover{border-color:var(--rust);color:var(--rust);background:var(--brique-voile);}

/* variante panneau latéral */
.modal-overlay.drawer{justify-content:flex-end;align-items:stretch;padding:0;}
.drawer .modal{
  max-width:620px;width:min(620px,100%);height:100%;max-height:none;
  border-radius:0;border-left:1px solid var(--line);
  padding:28px 30px 40px;
  animation:drawerIn .28s var(--ease) both;
}
@keyframes drawerIn{from{opacity:0;transform:translateX(36px);}to{opacity:1;transform:none;}}

.launch-recap{border:1px solid var(--line);border-radius:var(--r-ctl);padding:4px 14px;background:var(--field);}
.launch-recap-row{display:flex;align-items:baseline;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-soft);}
.launch-recap-row:last-child{border-bottom:none;}
.launch-recap-date{font-family:var(--mono);font-size:11px;letter-spacing:.03em;color:var(--gold-text);white-space:nowrap;flex-shrink:0;min-width:92px;}
.launch-recap-obj{font-size:13px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.launch-note{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-direction:column;gap:5px;}
.launch-note li{
  position:relative;padding-left:14px;
  font-size:12px;color:var(--text-muted);line-height:1.55;
}
.launch-note li::before{
  content:'';position:absolute;left:0;top:7px;
  width:4px;height:4px;border-radius:50%;background:var(--moss);
}
.launch-note code{
  font-family:var(--mono);font-size:11px;
  background:var(--bordure);padding:1px 4px;border-radius:4px;color:var(--ink);
}
.launch-warning{
  display:flex;gap:9px;align-items:flex-start;
  background:var(--brique-voile);border:1px solid var(--brique-voile);
  border-radius:var(--r-ctl);padding:11px 13px;margin:2px 0 14px;
  font-size:12.5px;line-height:1.55;color:var(--rust);
}
.launch-warning .ic{width:16px;height:16px;flex-shrink:0;margin-top:1px;}

/* ---- modale de lancement ---- */
.modal-launch{max-width:520px;}
.modal-launch .field{margin-bottom:18px;}
.launch-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:22px;}
.launch-head-main{min-width:0;}
.launch-head h2{font-size:21px;margin-bottom:4px;}
.launch-seq{font-size:13px;color:var(--text-muted);line-height:1.5;}

.launch-field-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:6px;}
.launch-field-head > label{
  font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;
  color:var(--sourdine);margin-bottom:0;
}
.launch-count{font-family:var(--mono);font-size:11px;color:var(--gold-text);}

.launch-prospects{
  max-height:232px;overflow-y:auto;overscroll-behavior:contain;
  border:1px solid var(--line);border-radius:var(--r-ctl);background:var(--field);
}
.launch-prospects .empty-state{border:none;padding:20px 16px;text-align:left;}
.launch-prospects > .field-hint{
  margin:0;padding:10px 14px;border-top:1px solid var(--line-soft);
  background:var(--paper-dim);font-size:11.5px;
}

/* La ligne est un <label> : elle ne doit PAS hériter du style monospace
   des libellés de champ (voir .field > label). */
.launch-prospect-row{
  display:flex;align-items:center;gap:12px;padding:11px 14px;cursor:pointer;
  font-family:var(--sans);letter-spacing:normal;margin:0;
  border-bottom:1px solid var(--line-soft);transition:background .15s ease;
}
.launch-prospect-row:last-of-type{border-bottom:none;}
.launch-prospect-row:hover{background:var(--hover-wash);}
.launch-prospect-row input{
  appearance:none;-webkit-appearance:none;flex-shrink:0;
  width:17px;height:17px;border:1.5px solid var(--bordure);border-radius:5px;
  background:var(--card);cursor:pointer;position:relative;
  transition:background .14s ease,border-color .14s ease;
}
.launch-prospect-row input:hover{border-color:var(--gold-text);}
.launch-prospect-row input:checked{background:var(--gold);border-color:var(--gold);}
/* Coche dessinée en CSS : deux bords d'une boîte vide tournés à 45°.
   Le décalage vertical (-1px) compense le fait qu'une coche paraît
   basse quand elle est centrée géométriquement. */
.launch-prospect-row input:checked::after{
  content:'';position:absolute;top:50%;left:50%;
  width:4px;height:8px;
  border:solid var(--surface);border-width:0 2px 2px 0;
  transform:translate(-50%,-60%) rotate(45deg);
}
.launch-prospect-row:has(input:checked){background:var(--brique-voile);}
.launch-prospect-row .lp-main{display:flex;flex-direction:column;gap:1px;min-width:0;}
.launch-prospect-row .lp-main strong{font-size:13.5px;font-weight:600;color:var(--ink);}
.launch-prospect-row .lp-main span{
  font-size:12px;color:var(--text-muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.launch-prospect-row.busy{cursor:not-allowed;opacity:.5;}
.launch-prospect-row.busy:hover{background:none;}
.launch-prospect-row.busy input{cursor:not-allowed;}

.output-launch{
  display:flex;flex-direction:column;align-items:stretch;gap:10px;
  margin-top:16px;padding-top:16px;border-top:1px solid var(--bordure);
}
.output-launch-hint{font-size:13px;color:var(--sourdine);line-height:1.5;}
.output-launch-hint code{
  font-family:var(--mono);font-size:12.5px;
  background:var(--brique-voile);color:var(--brique-hover);padding:1px 5px;border-radius:4px;
}
.output-launch .btn-primary{align-self:flex-start;}

.inbox-item .ib-actions{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0;}
.inbox-item .ib-done{padding:2px 0;font-size:12px;color:var(--gold-text);}
.inbox-item .ib-done:hover{color:var(--ink);}
.activity-item .recent-type.pos{color:var(--moss);}
.activity-item .recent-type.neg{color:var(--rust);}

.stat-livraison,.livraison-resume{
  display:flex;flex-wrap:wrap;gap:10px 16px;font-family:var(--mono);
  font-size:11.5px;color:var(--text-muted);margin:0 0 14px;
}
.stat-livraison .warn,.livraison-resume .warn,.stat-livraison .danger,.livraison-resume .danger{color:var(--rust);}
.livraison-resume{padding:10px 12px;background:var(--paper-dim);border-radius:var(--r-ctl);}

.stat-group-label{
  display:block;font-family:var(--mono);font-size:11px;
  letter-spacing:0;text-transform:none;color:var(--text-muted);
  margin:18px 0 10px;
}
.stat-group-label:first-child{margin-top:4px;}

/* Agenda des envois dans la carte campagnes : fond papier pour
   se détacher de la carte, bouton pour ouvrir le détail sans recharger. */
.card .agenda-item{
  width:100%;text-align:left;font:inherit;cursor:pointer;color:inherit;
  background:var(--paper);border-color:var(--line-soft);
  -webkit-appearance:none;appearance:none;
}
.agenda-group{margin-bottom:14px;}
.agenda-group:last-child{margin-bottom:0;}
.agenda-group-label{
  font-family:var(--sans);font-size:13px;font-weight:500;letter-spacing:0;
  text-transform:none;color:var(--sourdine);margin:0 0 8px;
}
.empty-state .empty-cta{
  display:inline-block;margin-top:12px;
  font-family:var(--sans);font-size:13px;font-weight:500;color:var(--brique);
}
.empty-state .empty-cta:hover{color:var(--ink);}

/* ============================================
   DIVERS HÉRITÉS (auth par lien, bannière…)
   ============================================ */
.auth-divider{display:flex;align-items:center;gap:10px;margin:18px 0;font-size:12px;color:var(--text-muted);}
.auth-divider::before, .auth-divider::after{content:'';flex:1;height:1px;background:var(--line);}
.auth-status{font-size:12.5px;color:var(--moss);margin-top:10px;min-height:16px;}
.auth-switch{font-size:13.5px;color:var(--text-muted);text-align:center;margin-top:18px;}
.auth-switch a{color:var(--gold-text);font-weight:600;cursor:pointer;margin-left:4px;}
.auth-switch a:hover{color:var(--gold);text-decoration:underline;text-underline-offset:2px;}

/* ============================================
   RESPONSIVE + ACCESSIBILITÉ
   ============================================ */
@media(max-width:900px){
  .sidebar{display:none;}
  .topbar{display:flex;}
  .tabbar{display:flex;}
  main{margin-left:0;padding:22px 0 96px;}
  .page-loader{margin-left:0;padding:24px 20px;}
  .toast{bottom:calc(84px + env(safe-area-inset-bottom,0px));}
}
@media(max-width:600px){
  .wrap{padding:0 18px;}
  .field-row{grid-template-columns:1fr;}
  .card{padding:18px 16px;border-radius:12px;}
  .page-head{margin-bottom:18px;}

  /* 16px minimum : en dessous, iOS zoome sur le champ au focus */
  select, textarea,
  input[type="text"], input[type="email"], input[type="tel"], input[type="date"]{font-size:16px;}

  .modal{padding:22px 18px;border-radius:12px;}
  .drawer .modal{border-radius:0;padding:22px 18px 36px;}
  .modal h2{font-size:19px;}
  .saved-toolbar{flex-direction:column;}
  .saved-toolbar select{width:100%;}

  /* cibles tactiles ≥ ~40px pour les actions fréquentes */
  .saved-item-actions .icon-btn{min-width:36px;height:36px;font-size:15px;}
  .modal-actions .icon-btn{padding:10px 13px;flex:1 1 auto;justify-content:center;}
}

a:focus-visible, button:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:6px;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms!important;animation-delay:0s!important;transition-duration:.001ms!important;}
}

/* ============================================
   CONSOLE ADMIN — même charte claire que l'app
   ============================================ */
.admin-body{background:var(--sable);color:var(--encre);min-height:100vh;}

/* -- écran de garde -- */
.admin-gate{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;}
.admin-gate-card{background:var(--surface);border:1px solid var(--bordure);border-radius:var(--r-card);padding:40px 34px;width:100%;max-width:380px;text-align:center;box-shadow:var(--ombre);}
.admin-gate-kicker{font-family:var(--sans);font-weight:500;font-size:13px;letter-spacing:0;text-transform:uppercase;color:var(--sourdine);margin-bottom:8px;}
.admin-gate-title{font-family:var(--display);font-weight:900;font-size:40px;line-height:1.05;letter-spacing:-.01em;color:var(--encre);margin-bottom:22px;}
.admin-gate-hint{font-size:13.5px;color:var(--sourdine);line-height:1.6;margin-bottom:16px;}
.admin-gate-input{width:100%;padding:13px 15px;border-radius:var(--r-ctl);border:1px solid var(--bordure-forte);background:var(--surface);color:var(--encre);font-size:15px;font-family:var(--mono);letter-spacing:.08em;text-align:center;margin-bottom:12px;}
.admin-gate-input:focus{outline:2px solid var(--brique);outline-offset:2px;border-color:var(--brique);box-shadow:0 0 0 3px var(--brique-voile);}
.admin-gate-btn{width:100%;text-decoration:none;display:inline-block;text-align:center;}
.admin-gate-error{color:var(--brique-hover);font-size:13px;margin-top:12px;}

/* -- coque du panel -- */
.admin-shell{max-width:1160px;margin:0 auto;padding:0 20px 60px;}
.admin-topbar{display:flex;align-items:center;justify-content:space-between;padding:20px 4px 14px;}
.admin-topbar-left{display:flex;align-items:center;gap:14px;}
.admin-brand{display:inline-flex;align-items:center;gap:10px;font-family:var(--display);font-size:20px;font-weight:900;color:var(--encre);}
.admin-brand .logo-mark{width:28px;height:10px;flex-shrink:0;display:block;}
.admin-brand .logo-word{font-family:var(--display);font-weight:900;}
.admin-mode-badge{font-family:var(--mono);font-size:12.5px;color:var(--sourdine);}
.admin-shell .icon-btn{color:var(--sourdine);}
.admin-shell .icon-btn:hover{color:var(--encre);background:var(--surface-2);}

/* -- onglets -- */
.admin-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--bordure);padding-bottom:0;margin-bottom:24px;}
.admin-tab{background:none;border:none;color:var(--sourdine);font-family:var(--sans);font-size:13.5px;font-weight:500;padding:10px 14px;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:background .14s ease,border-color .14s ease;}
.admin-tab:hover{color:var(--encre);}
.admin-tab.active{color:var(--brique);border-bottom-color:var(--brique);}

/* Annule le décalage de la sidebar fixe des pages de l'app (règle
   générique `main{margin-left:var(--sidebar-w)}` ligne 166) : la console
   n'a pas de sidebar, `.admin-main` doit occuper toute la largeur du
   panel comme la topbar et les onglets, pas être décalée de 216px. */
.admin-main{min-height:200px;margin-left:0;padding:0;}
.admin-loading,.admin-empty{color:var(--sourdine);font-size:14px;padding:40px 0;text-align:center;}
.admin-error{color:var(--brique-hover);background:var(--brique-voile);border:1px solid var(--bordure);border-radius:var(--r-card);padding:16px;font-size:13.5px;}

/* -- cartes & grilles -- */
.admin-card{background:var(--surface);border:1px solid var(--bordure);border-radius:var(--r-card);padding:20px 22px;margin-bottom:18px;box-shadow:var(--ombre);}
.admin-card h3{font-size:15px;font-weight:700;color:var(--encre);margin-bottom:6px;}
.admin-card h4{font-size:13px;font-family:var(--sans);font-weight:500;letter-spacing:0;text-transform:none;color:var(--sourdine);margin:16px 0 8px;}
.admin-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;}
.admin-cols .admin-card{margin-bottom:0;}

.admin-grid-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-bottom:22px;}
.admin-stat{background:var(--surface);border:1px solid var(--bordure);border-radius:var(--r-card);padding:16px 18px;box-shadow:var(--ombre);}
.admin-stat-value{font-family:var(--display);font-size:26px;font-weight:700;color:var(--encre);line-height:1.1;font-variant-numeric:tabular-nums;}
.admin-stat-label{font-size:13px;font-weight:500;color:var(--sourdine);margin-top:6px;}
.admin-stat-sub{font-size:12.5px;font-family:var(--mono);color:var(--repondu);margin-top:3px;}

/* -- tables -- */
.admin-table{width:100%;border-collapse:collapse;font-size:13px;}
.admin-table td,.admin-table th{padding:7px 8px;text-align:left;border-bottom:1px solid var(--bordure);}
.admin-table th{font-family:var(--sans);font-size:13px;letter-spacing:0;text-transform:none;color:var(--sourdine);font-weight:500;background:var(--surface-2);}
.admin-table td.num,.admin-table td .num,td.num{text-align:right;font-variant-numeric:tabular-nums;font-family:var(--mono);font-size:12.5px;}
.admin-table.rows tr:hover td{background:var(--surface-2);}
.admin-table code{font-family:var(--mono);font-size:12.5px;color:var(--sourdine);}
.admin-table-scroll{overflow-x:auto;}
.num.warn{color:var(--attente);}
.num.danger{color:var(--brique-hover);}
.muted{color:var(--sourdine);}
.warn{color:var(--attente);}
.small{font-size:12px;}
.admin-user-cell{display:flex;flex-direction:column;}
.admin-user-cell strong{color:var(--encre);font-weight:600;}
.admin-user-cell span{font-size:11.5px;color:var(--sourdine);}

/* -- badges -- */
.admin-badge{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;padding:4px 9px;border-radius:var(--r-badge);border:1px solid var(--bordure);background:var(--surface-2);color:var(--encre);letter-spacing:0;}
.admin-badge::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0;}
.admin-badge.ok{background:var(--repondu-voile);color:var(--repondu);border-color:var(--bordure);}
.admin-badge.warn{background:var(--attente-voile);color:var(--attente);border-color:var(--bordure);}
.admin-badge.danger{background:var(--brique-voile);color:var(--brique-hover);border-color:var(--bordure);}
.admin-badge.gold{background:var(--attente-voile);color:var(--attente);border-color:var(--bordure);}
.admin-badge.blue{background:var(--repondu-voile);color:var(--repondu);border-color:var(--bordure);}
.admin-badge.muted{background:var(--stoppe-voile);color:var(--stoppe);border-color:var(--bordure);}

/* -- barre d'outils / recherche -- */
.admin-toolbar{display:flex;align-items:center;gap:14px;margin-bottom:16px;flex-wrap:wrap;}
.admin-search{flex:1;min-width:200px;padding:10px 14px;border-radius:var(--r-ctl);border:1px solid var(--bordure-forte);background:var(--surface);color:var(--encre);font-size:13.5px;}
.admin-search:focus{outline:2px solid var(--brique);outline-offset:2px;border-color:var(--brique);box-shadow:0 0 0 3px var(--brique-voile);}
.admin-count{font-size:12.5px;font-family:var(--mono);color:var(--sourdine);}

/* -- chips de filtre (segmentés, à côté de la recherche) -- */
.admin-filter-row{display:flex;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap;}
.admin-filter-group{display:inline-flex;gap:2px;background:var(--surface-2);border:1px solid var(--bordure);padding:3px;border-radius:var(--r-ctl);}
.admin-filter-chip{background:none;border:none;color:var(--sourdine);font-size:12px;padding:6px 11px;border-radius:var(--r-btn);cursor:pointer;font-family:inherit;transition:background .14s ease,border-color .14s ease;white-space:nowrap;}
.admin-filter-chip:hover:not(.active){color:var(--encre);}
.admin-filter-chip.active{background:var(--surface);color:var(--encre);box-shadow:var(--ombre);}

/* -- en-têtes de tableau triables -- */
.admin-th-sort{cursor:pointer;user-select:none;text-decoration:underline;text-decoration-color:var(--bordure);text-decoration-thickness:1px;text-underline-offset:3px;transition:background .14s ease,border-color .14s ease;white-space:nowrap;}
.admin-th-sort:hover{color:var(--encre);}
.admin-th-sort.sorted{color:var(--brique);text-decoration-color:var(--brique-voile);}
.admin-th-sort .ic-sm{margin-left:4px;opacity:.3;}
.admin-th-sort:hover .ic-sm{opacity:.7;}
.admin-th-sort.sorted .ic-sm{opacity:1;}

/* -- boutons du panel -- */
.admin-mini-btn{background:var(--surface);border:1px solid var(--bordure-forte);color:var(--encre);font-size:12.5px;padding:6px 12px;border-radius:var(--r-btn);cursor:pointer;transition:background .14s ease,border-color .14s ease;}
.admin-mini-btn:hover{background:var(--surface-2);border-color:var(--bordure-forte);color:var(--encre);}

/* -- fiche détail utilisateur -- */
.admin-detail{border-color:var(--bordure-forte);}
.admin-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:8px;}
.admin-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:22px;}
.admin-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;}
.admin-inline{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--encre);}
.admin-inline select,.admin-num-input,.admin-textarea{background:var(--surface);border:1px solid var(--bordure-forte);color:var(--encre);border-radius:var(--r-ctl);padding:7px 10px;font-size:13px;font-family:inherit;}
.admin-num-input{width:110px;}
.admin-textarea{width:100%;margin-top:10px;resize:vertical;}
.admin-inline select:focus,.admin-num-input:focus,.admin-textarea:focus,.admin-search:focus{outline:2px solid var(--brique);outline-offset:2px;border-color:var(--brique);}

/* -- funnel d'activation -- */
.admin-funnel{margin-top:16px;display:flex;flex-direction:column;gap:12px;}
.admin-funnel-row{display:grid;grid-template-columns:140px 1fr 110px;align-items:center;gap:14px;}
.admin-funnel-label{font-size:13px;color:var(--encre);}
.admin-funnel-bar{height:12px;background:var(--bordure);border-radius:6px;overflow:hidden;}
.admin-funnel-fill{height:100%;background:var(--brique);border-radius:6px;transition:background .14s ease,border-color .14s ease;}
.admin-funnel-val{font-size:13px;text-align:right;font-variant-numeric:tabular-nums;font-family:var(--mono);font-size:12.5px;color:var(--encre);}

/* -- barre d'enregistrement des réglages -- */
.admin-save-bar{position:sticky;bottom:0;padding:14px 0;background:var(--sable);}
.admin-save-bar .btn-primary{width:auto;padding:12px 28px;}

/* -- réputation : lignes à risque + kill-switch -- */
.admin-row-risk td{background:var(--brique-voile)!important;}
.admin-mini-btn.danger-on{background:var(--brique-voile);border-color:var(--bordure);color:var(--brique-hover);}
.admin-block-note{margin-top:12px;font-size:12.5px;color:var(--brique-hover);background:var(--brique-voile);border-radius:var(--r-btn);padding:8px 12px;}

/* -- aperçu des dernières générations (onglet qualité) -- */
.admin-gen-list{display:flex;flex-direction:column;gap:10px;margin-top:10px;}
.admin-gen-item{border:1px solid var(--bordure);border-radius:var(--r-ctl);padding:10px 12px;background:var(--surface);}
.admin-gen-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:5px;}
.admin-gen-text{font-size:12.5px;color:var(--sourdine);line-height:1.5;}

/* ===============================================================
   CONSOLE — extensions (palette, activité, croissance, broadcast…)
   =============================================================== */

/* -- topbar enrichie -- */
.admin-topbar-right{display:flex;align-items:center;gap:8px;}
.admin-cmdk-trigger{display:inline-flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--bordure-forte);color:var(--sourdine);font-size:12.5px;padding:7px 10px 7px 12px;border-radius:var(--r-btn);cursor:pointer;transition:background .14s ease,border-color .14s ease;font-family:inherit;}
.admin-cmdk-trigger:hover{border-color:var(--bordure-forte);color:var(--encre);background:var(--surface-2);}
.admin-cmdk-icon{width:14px;height:14px;opacity:.7;}
.admin-cmdk-trigger kbd,.admin-help-table kbd,.admin-cmdk-foot kbd{font-family:var(--mono);font-size:10.5px;background:var(--surface-2);border:1px solid var(--bordure);border-radius:5px;padding:1px 5px;color:var(--encre);}
.admin-live-toggle{display:inline-flex;align-items:center;gap:7px;background:var(--surface);border:1px solid var(--bordure-forte);color:var(--sourdine);font-size:12px;padding:7px 12px;border-radius:var(--r-btn);cursor:pointer;font-family:inherit;transition:background .14s ease,border-color .14s ease;}
.admin-live-toggle:hover{color:var(--encre);}
.admin-live-dot{width:7px;height:7px;border-radius:50%;background:var(--bordure-forte);}
.admin-live-toggle.on{color:var(--repondu);border-color:var(--bordure);}
.admin-live-toggle.on .admin-live-dot{background:var(--repondu);}

/* -- fraîcheur des données + rafraîchissement -- */
.admin-updated{font-size:12.5px;font-family:var(--mono);color:var(--sourdine);font-variant-numeric:tabular-nums;white-space:nowrap;}
#adminRefresh.busy .ic{opacity:.45;}

/* -- squelette de chargement -- */
.admin-skel{display:block;border-radius:var(--r-ctl);background:var(--surface-2);}
.admin-skel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-bottom:22px;}
.admin-skel-stat{height:76px;border-radius:var(--r-card);}
.admin-skel-card{height:170px;border-radius:var(--r-card);margin-bottom:18px;}

/* -- entête de carte avec action à droite -- */
.admin-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:4px;}
.admin-card-head h3{margin-bottom:0;}
.admin-cols-2-1{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);}

/* -- sparkline (overview) -- */
.admin-spark-card{margin-top:4px;}
.admin-spark-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:6px;}
.admin-spark-head h3{margin-bottom:2px;}
.admin-spark{width:100%;height:56px;display:block;}
.admin-spark-line{fill:none;stroke:var(--brique);stroke-width:2;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke;}
.admin-spark-area{fill:var(--brique-voile);stroke:none;}
.admin-spark-dot{fill:var(--brique);}

/* -- histogrammes (croissance) -- */
.admin-growth-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px;}
.admin-growth-card{margin-bottom:0;}
.admin-growth-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.admin-growth-val{font-family:var(--display);font-size:28px;font-weight:700;color:var(--encre);line-height:1;font-variant-numeric:tabular-nums;}
.admin-growth-label{font-size:13px;font-weight:500;color:var(--sourdine);margin-top:5px;}
.admin-growth-delta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;}
.admin-barchart{width:100%;height:140px;display:block;}
.admin-bar{fill:var(--brique-voile);transition:fill .14s;}
.admin-bar-g:hover .admin-bar{fill:var(--brique);}
.tone-blue .admin-bar{fill:var(--repondu-voile);}
.tone-blue .admin-bar-g:hover .admin-bar{fill:var(--repondu);}
.tone-gold .admin-bar{fill:var(--brique-voile);}
.tone-gold .admin-spark-line{stroke:var(--brique);}
.tone-blue .admin-spark-line{stroke:var(--repondu);}
.tone-blue .admin-spark-area{fill:var(--repondu-voile);}

/* -- flux d'activité -- */
.admin-feed{display:flex;flex-direction:column;margin-top:10px;max-height:560px;overflow-y:auto;}
.admin-feed-item{display:flex;align-items:flex-start;gap:12px;padding:11px 4px;border-bottom:1px solid var(--bordure);}
.admin-feed-item:last-child{border-bottom:none;}
.admin-feed-ico{flex-shrink:0;width:26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:12px;background:var(--surface-2);color:var(--sourdine);}
.admin-feed-item.tone-ok .admin-feed-ico{background:var(--repondu-voile);color:var(--repondu);}
.admin-feed-item.tone-warn .admin-feed-ico{background:var(--attente-voile);color:var(--attente);}
.admin-feed-item.tone-danger .admin-feed-ico{background:var(--brique-voile);color:var(--brique-hover);}
.admin-feed-item.tone-admin .admin-feed-ico{background:var(--repondu-voile);color:var(--repondu);}
.admin-feed-body{flex:1;min-width:0;}
.admin-feed-title{font-size:13px;color:var(--encre);line-height:1.4;}
.admin-feed-sub{font-size:11.5px;color:var(--sourdine);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.admin-feed-time{flex-shrink:0;font-size:12.5px;font-family:var(--mono);color:var(--sourdine);font-variant-numeric:tabular-nums;white-space:nowrap;}

/* -- journal d'admin -- */
.admin-journal{display:flex;flex-direction:column;gap:2px;margin-top:10px;max-height:560px;overflow-y:auto;}
.admin-journal-row{padding:9px 4px;border-bottom:1px solid var(--bordure);}
.admin-journal-main{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.admin-journal-cible{font-size:12.5px;color:var(--encre);}
.admin-journal-detail{margin-top:3px;word-break:break-word;}
.admin-journal-meta{margin-top:3px;}

/* -- mini-timeline (fiche user) -- */
.admin-mini-feed{display:flex;flex-direction:column;gap:1px;max-height:230px;overflow-y:auto;}
.admin-mini-feed-item{display:flex;align-items:center;gap:9px;padding:6px 2px;font-size:12.5px;}
.admin-mini-feed-dot{width:7px;height:7px;border-radius:50%;background:var(--bordure-forte);flex-shrink:0;}
.admin-mini-feed-item.tone-ok .admin-mini-feed-dot{background:var(--repondu);}
.admin-mini-feed-item.tone-warn .admin-mini-feed-dot{background:var(--attente);}
.admin-mini-feed-item.tone-danger .admin-mini-feed-dot{background:var(--brique-hover);}
.admin-mini-feed-label{flex:1;color:var(--encre);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.admin-mini-feed-time{flex-shrink:0;font-size:12.5px;font-family:var(--mono);}

/* -- boutons copier (fiche user) -- */
.admin-detail-copy{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;}
.admin-chip-btn{background:var(--surface);border:1px solid var(--bordure-forte);color:var(--sourdine);font-size:12.5px;font-family:var(--mono);padding:3px 9px;border-radius:var(--r-badge);cursor:pointer;transition:background .14s ease,border-color .14s ease;}
.admin-chip-btn:hover{border-color:var(--bordure-forte);color:var(--brique);background:var(--brique-voile);}

/* -- feature flags -- */
.admin-flags{display:flex;flex-direction:column;gap:4px;margin-top:6px;}
.admin-flag-row{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:8px;background:var(--surface-2);font-size:13px;}
.admin-flag-row code{color:var(--encre);flex:1;}
.admin-flag-del{margin-left:auto;background:none;border:none;color:var(--sourdine);cursor:pointer;font-size:13px;line-height:1;padding:2px 6px;border-radius:6px;}
.admin-flag-del:hover{color:var(--brique-hover);background:var(--brique-voile);}

/* -- diffusion email -- */
.admin-broadcast-grid{display:grid;grid-template-columns:180px 1fr;gap:14px;margin-top:6px;}
.admin-field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-family:var(--sans);font-weight:500;letter-spacing:0;text-transform:none;color:var(--sourdine);}
.admin-field .admin-search,.admin-field select{flex:none;width:100%;text-transform:none;letter-spacing:normal;font-family:var(--sans);}

/* -- palette de commandes -- */
.admin-cmdk-overlay{position:fixed;inset:0;z-index:300;background:var(--encre);display:flex;justify-content:center;align-items:flex-start;padding-top:14vh;}
.admin-cmdk-panel{width:min(560px,92vw);background:var(--surface);border:1px solid var(--bordure);border-radius:var(--r-card);box-shadow:var(--ombre);overflow:hidden;}
.admin-cmdk-input{width:100%;border:none;background:transparent;color:var(--encre);font-size:16px;padding:18px 20px;font-family:inherit;border-bottom:1px solid var(--bordure);}
.admin-cmdk-input:focus{outline:none;}
.admin-cmdk-results{max-height:52vh;overflow-y:auto;padding:6px;}
.admin-cmdk-item{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--r-ctl);cursor:pointer;}
.admin-cmdk-item.active{background:var(--brique-voile);}
.admin-cmdk-item-label{color:var(--encre);font-size:13.5px;}
.admin-cmdk-item-sub{color:var(--sourdine);font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.admin-cmdk-item-hint{margin-left:auto;font-family:var(--mono);font-size:10.5px;color:var(--sourdine);flex-shrink:0;}
.admin-cmdk-empty{padding:24px;text-align:center;color:var(--sourdine);font-size:13px;}
.admin-cmdk-foot{display:flex;gap:10px;align-items:center;padding:10px 16px;border-top:1px solid var(--bordure);font-size:11px;color:var(--sourdine);}

/* -- overlay d'aide raccourcis -- */
.admin-help-overlay{position:fixed;inset:0;z-index:300;background:var(--encre);display:flex;align-items:center;justify-content:center;padding:20px;}
.admin-help-panel{width:min(420px,92vw);background:var(--surface);border:1px solid var(--bordure);border-radius:var(--r-card);padding:22px 24px;box-shadow:var(--ombre);}
.admin-help-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.admin-help-head h3{font-size:15px;color:var(--encre);}
.admin-help-table{width:100%;border-collapse:collapse;font-size:13px;}
.admin-help-table td{padding:8px 4px;border-bottom:1px solid var(--bordure);color:var(--encre);}
.admin-help-table td:first-child{white-space:nowrap;width:42%;}
.admin-help-note{color:var(--sourdine)!important;font-size:12px;padding-top:12px!important;border-bottom:none!important;}

/* -- bandeau global (injecté sur les pages de l'app) -- */
.reboundly-banner{background:var(--brique);color:var(--surface);text-align:center;font-size:13.5px;font-weight:500;padding:9px 16px;line-height:1.4;position:relative;z-index:110;}

@media(max-width:640px){
  .admin-funnel-row{grid-template-columns:100px 1fr 74px;gap:8px;}
  .admin-detail-grid{grid-template-columns:1fr;}
  .admin-stat-value{font-size:22px;}
  .admin-cols-2-1{grid-template-columns:1fr;}
  .admin-broadcast-grid{grid-template-columns:1fr;}
  .admin-cmdk-trigger span:not(.admin-cmdk-icon){display:none;}
  .admin-topbar{flex-wrap:wrap;gap:10px;}
  .admin-updated{display:none;}
  .admin-tabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;margin:0 -20px 20px;padding:0 20px;}
  .admin-tabs::-webkit-scrollbar{display:none;}
  .admin-tab{flex-shrink:0;}
}
