:root {
  --bleu: #142c63;
  --or: #c9a227;
  --fond: #f4f2ec;
  --carte: #ffffff;
  --texte: #26262b;
  --gris: #8a8a94;
  --bord: #e2ddd0;
  --ok: #2e7d52;
  --attente: #b8860b;
  --alerte: #b23b3b;
  --radius: 10px;
  font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--fond);
  color: var(--texte);
  line-height: 1.5;
  padding: 0 0 60px;
}

.topbar {
  background: var(--bleu);
  color: #fff;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 3px solid var(--or);
}
.topbar h1 { font-size: 1.25rem; font-weight: 600; }
.topbar .sub { font-size: 0.85rem; opacity: 0.75; margin-top: 2px; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--or);
  color: var(--or);
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
}
.btn-ghost:hover { background: var(--or); color: var(--bleu); }

.charte {
  background: #fbf6e8;
  border: 1px solid var(--or);
  border-radius: var(--radius);
  margin: 20px 28px 0;
  padding: 18px 24px;
}
.charte h2 { font-size: 1rem; color: var(--bleu); margin-bottom: 10px; }
.charte ul { list-style: none; display: grid; gap: 6px; }
.charte li { font-size: 0.9rem; padding-left: 18px; position: relative; }
.charte li::before { content: "×"; position: absolute; left: 0; color: var(--alerte); font-weight: 700; }
.hidden { display: none; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 28px 0;
}
.stat-card {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--radius);
  padding: 12px 18px;
  min-width: 120px;
}
.stat-card .n { font-size: 1.5rem; font-weight: 700; color: var(--bleu); }
.stat-card .l { font-size: 0.78rem; color: var(--gris); text-transform: uppercase; letter-spacing: 0.03em; }

.filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 20px 28px 10px;
}
.filtres input, .filtres select {
  padding: 9px 12px;
  border: 1px solid var(--bord);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: #fff;
}
.filtres input[type=search] { flex: 1; min-width: 200px; }
.compteur { font-size: 0.85rem; color: var(--gris); margin-left: auto; }

.tableau { padding: 0 28px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--carte); border-radius: var(--radius); overflow: hidden; }
thead { background: var(--bleu); color: #fff; }
th { text-align: left; padding: 11px 12px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
td { padding: 10px 12px; border-top: 1px solid var(--bord); font-size: 0.88rem; vertical-align: top; }
tr:hover td { background: #faf8f2; }
td a { color: var(--bleu); }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.b-a_contacter { background: #eee; color: #555; }
.b-envoye { background: #e3ecff; color: #2a5298; }
.b-relance { background: #fff2d6; color: var(--attente); }
.b-repondu { background: #e6f4ec; color: var(--ok); }
.b-interview { background: #d9f0e4; color: #1c6b42; }
.b-retombee { background: var(--or); color: var(--bleu); }
.b-refus { background: #f7e0e0; color: var(--alerte); }
.b-ecarte { background: #ededed; color: #999; }

.email-ok { color: var(--ok); font-weight: 600; }
.email-fail { color: var(--alerte); }
.email-unknown { color: var(--attente); }
.email-non_verifie { color: var(--gris); }
.no-email { color: var(--gris); font-style: italic; }

.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions select, .actions button {
  font-size: 0.78rem;
  padding: 4px 8px;
  border: 1px solid var(--bord);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.actions button:hover { background: var(--bleu); color: #fff; }

.retombees { padding: 30px 28px 0; }
.retombees h2 { font-size: 1.05rem; color: var(--bleu); margin-bottom: 12px; }
.retombees ul { list-style: none; display: grid; gap: 8px; }
.retombees li { background: var(--carte); border: 1px solid var(--bord); border-left: 3px solid var(--or); border-radius: 6px; padding: 10px 14px; font-size: 0.9rem; }

.pied { padding: 30px 28px 0; }
.pied p { font-size: 0.82rem; color: var(--gris); max-width: 700px; }

@media (max-width: 640px) {
  .topbar { padding: 16px; }
  .charte, .stats, .filtres, .tableau, .retombees, .pied { padding-left: 16px; padding-right: 16px; }
  th:nth-child(2), td:nth-child(2), th:nth-child(7), td:nth-child(7) { display: none; }
}
