/* ═══════════════════════════════════════════════════════════════════
   NewTech Prospects — feuille de style de l'application
   Typo    : Bricolage Grotesque (titres) + Instrument Sans (texte)
             + IBM Plex Mono (chiffres, étiquettes)
   Couleurs: la charte NewTech, définie dans newtech-marque.css.
   Ici, on dit seulement à quoi sert chaque couleur dans l'application.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Fonds et bordures */
  --fond:       var(--nt-fond);
  --surface:    var(--nt-blanc);
  --surface-2:  var(--nt-fond);
  --surface-3:  var(--nt-bord);
  --bord:       var(--nt-bord);
  --bord-clair: var(--nt-bord-2);

  /* Textes */
  --tx:         var(--nt-texte);
  --tx-doux:    var(--nt-texte-2);
  --tx-faible:  var(--nt-texte-3);

  /* La couleur de marque : boutons, liens, élément actif */
  --accent:       var(--nt-violet);
  --accent-fonce: var(--nt-violet-fonce);
  --accent-texte: var(--nt-blanc);   /* texte posé sur un bouton violet */
  --accent-doux:  var(--nt-violet-50);

  /* Couleurs de sens */
  --vert:       var(--nt-vert);
  --vert-fond:  var(--nt-vert-50);
  --ambre:      var(--nt-ambre);
  --ambre-fond: var(--nt-ambre-50);
  --rouge:      var(--nt-rouge);
  --rouge-fond: var(--nt-rouge-50);
  --bleu:       var(--nt-info);
  --bleu-fond:  var(--nt-info-50);
  --ombre:      var(--nt-ombre);

  /* Mesures */
  --barre-l:    240px;
  --r:          4px;
  --r-md:       8px;
  --gap:        20px;
  --transition: 180ms cubic-bezier(.4, 0, .2, 1);
}

/* ── La barre latérale est couleur d'encre, comme la marque ─────────────────
   Les couleurs sont redéclarées ICI, sur .barre : tout ce qui est
   dedans en hérite automatiquement. Aucune règle du menu n'a besoin
   d'être touchée, et le centre de la page garde ses couleurs à lui. */
.barre {
  --surface:    var(--nt-encre);
  --surface-2:  var(--nt-encre-2);
  --surface-3:  #30214F;
  --bord:       #2A1F47;
  --bord-clair: #43346B;

  --tx:         var(--nt-sur-encre);
  --tx-doux:    var(--nt-sur-encre-2);
  --tx-faible:  var(--nt-sur-encre-3);

  --accent:       var(--nt-violet-sur-encre);
  --accent-doux:  rgba(203, 182, 255, .16);
  --accent-texte: var(--nt-encre);

  --vert:  var(--nt-vert-sur-encre);
  --ambre: var(--nt-ambre-sur-encre);
  --rouge: var(--nt-rouge-sur-encre);
}

/* ── Réglages de base ────────────────────────────────────────────── */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--tx);
  font-family: 'Instrument Sans', ui-sans-serif, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Grain discret : donne de la matière au fond, sans image */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .035;
  background-image: radial-gradient(var(--tx) .5px, transparent .5px);
  background-size: 3px 3px;
}

h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', ui-sans-serif, sans-serif;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0;
  line-height: 1.15;
}

h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono, .nombre {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* ═══ BARRE LATÉRALE ═══════════════════════════════════════════════ */
.barre {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--barre-l);
  background: var(--surface);
  /* Sans cette ligne, le texte garde la couleur foncée héritée de la page */
  color: var(--tx);
  border-right: 1px solid var(--bord);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.marque {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--bord);
}

.marque-lien { display: flex; align-items: center; gap: 11px; color: inherit; }
.marque-lien:hover { text-decoration: none; }

.marque-sigle {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-texte);
  border-radius: var(--r);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.marque-nom {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -.02em;
}

.marque-sous {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--tx-faible);
}

.menu { flex: 1; overflow-y: auto; padding: 14px 10px; }

.menu-titre {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--tx-faible);
  padding: 16px 8px 7px;
}

.menu-lien {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  color: var(--tx-doux);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
}

.menu-lien:hover { background: var(--surface-2); color: var(--tx); text-decoration: none; }
.menu-lien i { font-size: 15px; width: 17px; text-align: center; }

.menu-lien.actif { background: var(--accent-doux); color: var(--tx); }
.menu-lien.actif i { color: var(--accent); }
.menu-lien.actif::before {
  content: '';
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 18px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.menu-compteur {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  background: var(--surface-3);
  color: var(--tx-doux);
  padding: 1px 6px;
  border-radius: 20px;
}

.menu-lien.actif .menu-compteur { background: var(--accent); color: var(--accent-texte); }

.barre-pied { padding: 12px 10px; border-top: 1px solid var(--bord); }

.utilisateur {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  color: inherit;
  transition: background var(--transition);
}

.utilisateur:hover { background: var(--surface-2); text-decoration: none; }

.avatar {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--bord-clair);
  border-radius: var(--r);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}

.utilisateur-nom { font-size: 13px; font-weight: 500; }
.utilisateur-sortie { font-size: 10.5px; color: var(--tx-faible); }

/* ═══ ZONE PRINCIPALE ══════════════════════════════════════════════ */
.principal {
  margin-left: var(--barre-l);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.entete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap);
  padding: 28px 30px 20px;
  border-bottom: 1px solid var(--bord);
  flex-wrap: wrap;
}

.entete-fil {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--tx-faible);
  margin-bottom: 6px;
}

.entete-sous { color: var(--tx-doux); font-size: 13.5px; margin-top: 5px; }

.contenu { padding: 24px 30px 60px; }

/* ═══ CARTES ═══════════════════════════════════════════════════════ */
.carte {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--r-md);
  padding: 20px;
}

.carte-titre {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.grille { display: grid; gap: var(--gap); }
.grille-2 { grid-template-columns: repeat(2, 1fr); }
.grille-3 { grid-template-columns: repeat(3, 1fr); }
.grille-4 { grid-template-columns: repeat(4, 1fr); }
/* Composition asymétrique du tableau de bord */
.grille-tunnel { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }

/* ── Tuiles de chiffres ─────────────────────────────────────────── */
.tuile {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--r-md);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.tuile::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: var(--bord-clair);
}

.tuile.accent::after { background: var(--accent); }
.tuile.attente::after { background: var(--ambre); }
.tuile.info::after { background: var(--bleu); }

.tuile-etiquette {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--tx-faible);
}

.tuile-valeur {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  line-height: 1;
}

.tuile-note { font-size: 12px; color: var(--tx-doux); margin-top: 5px; }

/* ── Tunnel de prospection ──────────────────────────────────────── */
.etape {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--bord);
}

.etape:last-child { border-bottom: 0; }

.etape-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--tx-faible);
}

.etape-nom { font-size: 13.5px; font-weight: 500; }

.etape-jauge {
  height: 3px;
  background: var(--surface-3);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.etape-jauge span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 600ms cubic-bezier(.4, 0, .2, 1);
}

.etape-nombre {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: right;
}

/* ═══ TABLEAUX ═════════════════════════════════════════════════════ */
.tableau-boite {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--r-md);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--bord);
  padding: 10px 14px;
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--tx-doux);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bord);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface-2); }

.cellule-titre { font-weight: 500; }
.cellule-titre a { color: var(--tx); }
.cellule-titre a:hover { color: var(--accent); }
.cellule-doux { color: var(--tx-doux); font-size: 13px; }

/* ── Score ──────────────────────────────────────────────────────── */
.score { display: flex; align-items: center; gap: 8px; min-width: 76px; }

.score-valeur {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 30px;
}

.score-barre {
  flex: 1;
  height: 3px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
}

.score-barre span { display: block; height: 100%; border-radius: 3px; }
.score-haut  .score-barre span { background: var(--vert); }
.score-haut  .score-valeur { color: var(--vert); }
.score-moyen .score-barre span { background: var(--ambre); }
.score-moyen .score-valeur { color: var(--ambre); }
.score-bas   .score-barre span { background: var(--tx-faible); }
.score-bas   .score-valeur { color: var(--tx-faible); }

/* ═══ ÉTIQUETTES D'ÉTAT ════════════════════════════════════════════ */
.etat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .04em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.etat-neutre  { background: var(--surface-3); color: var(--tx-doux); }
.etat-attente { background: var(--ambre-fond);  color: var(--ambre);  border-color: var(--ambre); }
.etat-ok      { background: var(--vert-fond);   color: var(--vert);   border-color: var(--vert); }
.etat-info    { background: var(--bleu-fond);   color: var(--bleu);   border-color: var(--bleu); }
.etat-mauvais { background: var(--rouge-fond);  color: var(--rouge);  border-color: var(--rouge); }

/* ═══ BOUTONS ══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--bord-clair);
  border-radius: var(--r);
  background: var(--surface-2);
  color: var(--tx);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              transform var(--transition);
}

.btn:hover { background: var(--surface-3); border-color: var(--tx-faible); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-principal {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-texte);
  font-weight: 600;
}

.btn-principal:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }

.btn-danger { color: var(--rouge); border-color: var(--rouge); background: var(--rouge-fond); }
.btn-danger:hover { background: var(--rouge); color: #fff; border-color: var(--rouge); }

.btn-petit { padding: 5px 10px; font-size: 12px; }
.btn-fantome { background: transparent; border-color: var(--bord); color: var(--tx-doux); }
.btn-fantome:hover { color: var(--tx); }

.groupe-boutons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═══ FORMULAIRES ══════════════════════════════════════════════════ */
.champ-groupe { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }

.champ-groupe label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--tx-doux);
}

.champ {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-bottom: 2px solid var(--bord-clair);
  border-radius: var(--r);
  color: var(--tx);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition);
}

.champ::placeholder { color: var(--tx-faible); }

.champ:hover { border-color: var(--bord-clair); }

.champ:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--bord-clair);
  border-bottom-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-doux);
}

.champ:disabled { opacity: .5; cursor: not-allowed; }

textarea.champ { resize: vertical; min-height: 70px; line-height: 1.6; }
select.champ { cursor: pointer; }

.case {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Une liste de cases à cocher (« Où chercher ») ─────────────────
   Le conteneur ne porte PAS .case : cette classe dessine une case de
   16 pixels, et la liste entière s'y écrasait. Deux colonnes dès que
   la place le permet, pour ne pas dérouler huit lignes.             */
.liste-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px 14px;
}

/* L'intitulé d'une ligne est du texte à lire, pas un nom de champ :
   on annule ici le style des étiquettes de .champ-groupe.           */
.liste-cases label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--r);
  cursor: pointer;
  font-family: 'Instrument Sans', ui-sans-serif, sans-serif;
  font-size: 13.5px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--tx);
}

.liste-cases label:hover { background: var(--surface-2); }
.liste-cases .case { flex: none; margin: 0; }

/* ── Une case à cocher seule ───────────────────────────────────────
   Son intitulé se met à côté, pas au-dessus : « Cible active » en
   petites majuscules au-dessus d'une case perdue ne veut rien dire. */
.champ-groupe:has(> .case) { flex-direction: row; align-items: center; gap: 9px; }

.champ-groupe:has(> .case) label {
  order: 2;
  font-family: 'Instrument Sans', ui-sans-serif, sans-serif;
  font-size: 13.5px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--tx);
  cursor: pointer;
}

.champ-ligne { display: flex; align-items: center; gap: 9px; }

.aide { font-size: 12px; color: var(--tx-faible); line-height: 1.45; }

.erreur {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--rouge);
  animation: glisse-haut 220ms ease;
}

@keyframes glisse-haut {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ MESSAGES SYSTÈME ═════════════════════════════════════════════ */
.alerte {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--bord);
  border-left-width: 2px;
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 14px;
  font-size: 13.5px;
  animation: glisse-haut 260ms ease;
}

.alerte i { font-size: 15px; margin-top: 1px; }
.alerte-succes  { border-left-color: var(--vert); }
.alerte-succes i { color: var(--vert); }
.alerte-info    { border-left-color: var(--bleu); }
.alerte-info i  { color: var(--bleu); }
.alerte-avert   { border-left-color: var(--ambre); }
.alerte-avert i { color: var(--ambre); }
.alerte-erreur  { border-left-color: var(--rouge); }
.alerte-erreur i { color: var(--rouge); }

/* ═══ VIDE / FILTRES / DIVERS ══════════════════════════════════════ */
.vide { text-align: center; padding: 46px 20px; color: var(--tx-doux); }
.vide i { font-size: 30px; color: var(--tx-faible); display: block; margin-bottom: 12px; }
.vide-titre { font-family: 'Bricolage Grotesque', sans-serif; font-size: 16px; color: var(--tx); margin-bottom: 6px; }

.filtres {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: var(--gap);
}

.filtres .champ-groupe { margin-bottom: 0; min-width: 160px; }

.puce {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--bord);
  border-radius: 20px;
  background: var(--surface);
  color: var(--tx-doux);
  font-size: 12.5px;
  transition: all var(--transition);
}

.puce:hover { color: var(--tx); border-color: var(--bord-clair); text-decoration: none; }
.puce.actif { background: var(--accent-doux); border-color: var(--accent); color: var(--accent); }

.source-puce {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--tx-doux);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Bloc message IA */
.bloc-message {
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-left: 2px solid var(--accent);
  border-radius: var(--r);
  padding: 15px 17px;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
}

/* Journal d'activité */
.ligne-journal {
  display: grid;
  grid-template-columns: 72px 130px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--bord);
  font-size: 13px;
  align-items: baseline;
}

.ligne-journal:last-child { border-bottom: 0; }
.journal-heure { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--tx-faible); }
.journal-etape { font-size: 11.5px; color: var(--tx-doux); }
.journal-detail { color: var(--tx-faible); font-size: 12px; margin-top: 3px; }
.n-INFO   { color: var(--tx); }
.n-SUCCES { color: var(--vert); }
.n-AVERT  { color: var(--ambre); }
.n-ERREUR { color: var(--rouge); }

/* Liste de points forts / faibles */
.points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.points li { display: flex; gap: 8px; font-size: 13px; }
.points i { margin-top: 3px; font-size: 12px; }
.points-forts i { color: var(--vert); }
.points-faibles i { color: var(--ambre); }

/* Jeton API */
.jeton {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: var(--r);
  padding: 10px 13px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  word-break: break-all;
}

/* Page de connexion */
.page-connexion {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.boite-connexion {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--r-md);
  padding: 32px;
  box-shadow: var(--ombre);
  animation: apparait 420ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes apparait {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Apparition en cascade des blocs du tableau de bord */
.cascade > * {
  opacity: 0;
  animation: apparait 460ms cubic-bezier(.2, .8, .2, 1) forwards;
}

.cascade > *:nth-child(1) { animation-delay: 40ms; }
.cascade > *:nth-child(2) { animation-delay: 90ms; }
.cascade > *:nth-child(3) { animation-delay: 140ms; }
.cascade > *:nth-child(4) { animation-delay: 190ms; }

/* ═══ ÉCRANS ÉTROITS ═══════════════════════════════════════════════ */
.bouton-menu { display: none; }

@media (max-width: 1100px) {
  .grille-tunnel, .grille-3, .grille-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .barre { transform: translateX(-100%); transition: transform 240ms ease; }
  .barre.ouverte { transform: translateX(0); }
  .principal { margin-left: 0; }
  .bouton-menu { display: inline-flex; }
  .entete, .contenu { padding-left: 16px; padding-right: 16px; }
  .grille-tunnel, .grille-2, .grille-3, .grille-4 { grid-template-columns: 1fr; }
  .tableau-boite { overflow-x: auto; }
  table { min-width: 620px; }
}

/* ═══════════════════════════════════════════════════════════════════
   Utilisation de l'abonnement Anthropic — bas de la barre latérale.
   Toujours visible : c'est le budget qui fait tourner l'agent.
   ═══════════════════════════════════════════════════════════════════ */
.quota {
  display: block;
  margin: 0 0 10px;
  padding: 9px 11px 10px;
  border: 1px solid var(--bord);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}

.quota:hover {
  background: var(--surface-2);
  border-color: var(--bord-clair);
}

.quota-ligne {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.quota-nom {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--tx-faible);
}

.quota-valeur {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--tx-doux);
}

/* La jauge reste visible même à 0 % : on voit qu'elle existe. */
.quota-jauge {
  display: block;
  height: 4px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}

.quota-jauge > span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--tx-faible);
  transition: width .3s ease;
}

.quota-note {
  margin-top: 5px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--tx-faible);
}

/* Les trois états renvoyés par Anthropic. */
.quota-ok .quota-valeur      { color: var(--vert); }
.quota-ok .quota-jauge > span { background: var(--vert); }

.quota-attention .quota-valeur      { color: var(--ambre); }
.quota-attention .quota-jauge > span { background: var(--ambre); }
.quota-attention                     { border-color: var(--ambre); }

.quota-plein .quota-valeur      { color: var(--rouge); }
.quota-plein .quota-jauge > span { background: var(--rouge); }
.quota-plein                     { border-color: var(--rouge); }


/* ═══ Mot de passe révélable (page Connexions) ══════════════════════ */
.secret {
  display: flex;
  align-items: center;
  gap: 6px;
}

.secret input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--bord);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--tx-doux);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.secret input:read-only {
  cursor: text;
}

/* Le bouton œil, posé contre le champ. */
.secret .btn {
  flex: 0 0 auto;
  padding: 5px 8px;
}

/* ══════════════════════════════════════════════════════════════════
   Suivi en direct d'une recherche, sur la page Cibles.
   Une frise verticale : une pastille par étape, reliées par un trait.
   ══════════════════════════════════════════════════════════════════ */

.direct {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--bord);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  background: var(--surface-2);
}

.direct-entete {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tx-doux);
}

/* La pastille qui respire : elle dit « ça tourne » sans écrire un mot. */
.direct-pouls {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: direct-respire 1.4s ease-in-out infinite;
}

@keyframes direct-respire {
  0%, 100% { opacity: 1;  transform: scale(1); }
  50%      { opacity: .35; transform: scale(.7); }
}

/* Recherche finie : le pouls s'arrête, le trait passe au vert. */
.direct.fini { border-left-color: var(--vert); }
.direct.fini .direct-pouls { animation: none; background: var(--vert); }
.direct.rate { border-left-color: var(--rouge); }
.direct.rate .direct-pouls { animation: none; background: var(--rouge); }

.direct-frise {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.direct-etape {
  position: relative;
  padding: 0 0 14px 22px;
  border-left: 1px solid var(--bord-clair);
}

.direct-etape:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.direct-etape::before {
  content: '';
  position: absolute;
  left: -4.5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bord-clair);
}

.direct-etape.e-SUCCES::before { background: var(--vert); }
.direct-etape.e-AVERT::before  { background: var(--ambre); }
.direct-etape.e-ERREUR::before { background: var(--rouge); }
.direct-etape.e-INFO::before   { background: var(--bleu); }

/* La dernière étape d'une recherche en cours : c'est là qu'on en est. */
.direct-etape.en-cours::before {
  box-shadow: 0 0 0 4px var(--accent-doux);
}

.direct-heure {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--tx-faible);
}

.direct-message {
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 1px;
}

.direct-detail {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--tx-doux);
  margin-top: 3px;
}

/* Les étapes arrivent une par une : on les fait apparaître en douceur,
   sinon on ne voit pas laquelle vient de tomber. */
.direct-etape {
  animation: direct-arrive .35s ease-out;
}

@keyframes direct-arrive {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .direct-pouls, .direct-etape { animation: none; }
}

/* Recherche MCP en attente : ambre, parce que ça attend quelqu'un
   plutôt que de travailler. */
.direct.attend { border-left-color: var(--ambre); }
.direct.attend .direct-pouls { background: var(--ambre); }

/* ═══ PARCOURS CANDIDATURE ═════════════════════════════════════════ */

/* La barre d'actions au-dessus d'un tableau à cases : « pour la sélection… » */
.barre-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bord);
}
.barre-actions .champ { width: auto; }

/* Une liste de cases à cocher, une par ligne */


/* Le compte rendu d'une recherche : une ligne par plateforme */
.compte-rendu {
  white-space: pre-line;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--tx-doux);
  margin-top: 6px;
}

/* Le texte d'une offre : on garde les retours à la ligne, et on fait défiler */
.texte-offre {
  white-space: pre-line;
  max-height: 420px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
}

.colonne { display: flex; flex-direction: column; gap: var(--gap); }

/* Le menu « ⋮ » d'une ligne de tableau : les mêmes actions que la barre du
   haut, pour cette offre-là seulement.

   Il FLOTTE au-dessus de la page (position: fixed) : s'il s'ouvrait dans la
   ligne, toute la ligne s'agrandirait. Et comme la boîte du tableau coupe ce
   qui dépasse, c'est app.js qui le place sous le petit bouton. */
.menu-ligne > summary {
  list-style: none;
  display: inline-flex;
}
.menu-ligne > summary::-webkit-details-marker { display: none; }
.menu-ligne > summary::marker { content: ''; }
.menu-ligne[open] > summary { border-color: var(--accent); color: var(--accent); }

.menu-ligne-liste {
  position: fixed;
  left: 0; top: 0;          /* app.js pose les vraies coordonnées */
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 210px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--r-md);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}
.menu-ligne-liste .btn { width: 100%; justify-content: flex-start; }

/* Les boutons d'une cellule restent à leur hauteur, sans s'étirer */
td.groupe-boutons { align-items: center; }
