:root {
  --encre: #1b2430;
  --discret: #6b7684;
  --fond: #f5f6f8;
  --carte: #ffffff;
  --trait: #e2e5ea;
  --marine: #1c2241;
  --jaune: #fdc40a;
  --accent: #2b3a8c;
  --vert: #2e7d4f;
  --rouge: #b3261e;
  --orange: #b25e09;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--encre); background: var(--fond); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
main { max-width: 1280px; margin: 0 auto; padding: 1.2rem 1.2rem 3rem; }

.entete { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: .6rem 1.2rem; background: var(--marine); color: #fff; }
.entete a { color: #fff; }
.marque { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.1rem; }
.marque img { width: 28px; height: 28px; border-radius: 6px; }
.entete nav { display: flex; gap: .3rem; flex-wrap: wrap; flex: 1; }
.entete nav a, .entete nav span { padding: .35rem .7rem; border-radius: 6px; }
.entete nav a.actif { background: var(--jaune); color: var(--marine); font-weight: 600; }
.entete nav .bientot { opacity: .45; cursor: default; }
.moi { font-size: .85rem; opacity: .85; }

.pied { max-width: 1280px; margin: 0 auto; padding: .8rem 1.2rem 2rem; font-size: .8rem; color: var(--discret); }
.discret { color: var(--discret); }
.alerte { color: var(--rouge); font-weight: 600; }
.erreur { color: var(--rouge); background: #fdecea; padding: .6rem .8rem; border-radius: 6px; }
.message { background: #e7f4ec; color: var(--vert); padding: .5rem .8rem; border-radius: 6px; }
.vide { background: var(--carte); border: 1px dashed var(--trait); border-radius: 10px; padding: 2rem; text-align: center; color: var(--discret); }
.nowrap { white-space: nowrap; }
.nombre { text-align: right; font-variant-numeric: tabular-nums; }

.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.carte { display: block; background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; padding: 1rem; color: inherit; }
.carte:hover { text-decoration: none; border-color: var(--jaune); }
.carte.choisie { border: 2px solid var(--jaune); box-shadow: 0 0 0 3px rgba(253,196,10,.18); }
.carte-titre { font-weight: 700; margin-bottom: .6rem; }
.chiffres { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-bottom: .5rem; }
.chiffres div { display: flex; flex-direction: column; }
.chiffres b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.chiffres span { font-size: .75rem; color: var(--discret); }

.filtres { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
input, select, textarea, button { font: inherit; }
input[type=search], input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], select, textarea {
  padding: .45rem .6rem; border: 1px solid #c9ced6; border-radius: 6px; background: #fff; }
.filtres input[type=search] { min-width: 260px; }
.court { display: flex; align-items: center; gap: .3rem; }
button { padding: .45rem 1.1rem; border: 0; border-radius: 31px; background: var(--jaune); color: var(--marine); font-weight: 600; cursor: pointer; }
button:hover { background: #e9b300; }

.tableau { overflow-x: auto; background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-size: .8rem; color: var(--discret); font-weight: 600; background: #fafbfc; }
tr.cliquable { cursor: pointer; }
tr.cliquable:hover td { background: #fff8e1; }
td.adresse { word-break: break-all; }

.pastille { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; background: #eef0f3; white-space: nowrap; }
.suite-reponse, .etape-interessee, .etape-visio, .etape-devis { background: #e3f1e8; color: var(--vert); font-weight: 600; }
.etape-gagnee { background: var(--vert); color: #fff; font-weight: 600; }
.suite-stop, .suite-rebond, .suite-desinscrit, .etape-exclue, .etape-perdue { background: #fbe9e7; color: var(--rouge); }
.suite-auto { background: #fff4e0; color: var(--orange); }
.etape-a_appeler { background: var(--jaune); color: var(--marine); font-weight: 600; }
.etape-contactee { background: #e8f0f6; color: var(--accent); }
.role { text-transform: capitalize; }

.pagination { display: flex; gap: 1rem; justify-content: center; align-items: center; margin: 1rem 0; }

.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2rem; }
.fiche { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; padding: 1rem; }
.fiche dt { color: var(--discret); }
.fiche dd { margin: 0; word-break: break-word; }
.fiche.petite { font-size: .85rem; margin-top: .5rem; }
pre.mail { white-space: pre-wrap; word-wrap: break-word; font: inherit; background: var(--carte); border: 1px solid var(--trait); border-radius: 10px; padding: 1rem; margin: 0; }
pre.mail.court { max-height: 12rem; overflow: auto; padding: .6rem; }
.reponse { margin-bottom: 1rem; }
.reponse.stop pre, .evenement.stop pre { border-color: var(--rouge); }

.titre-commune { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.titre-commune h1 span { font-size: 1rem; font-weight: 400; }
.etape label { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.contacts { list-style: none; padding: 0; margin: 0 0 .8rem; }
.contacts li { padding: .45rem 0; border-bottom: 1px solid var(--trait); word-break: break-all; }
details { margin: .6rem 0; }
summary { cursor: pointer; color: var(--accent); }
.formulaire { display: flex; flex-direction: column; gap: .5rem; max-width: 520px; margin-top: .5rem; }
.formulaire label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.formulaire button { align-self: flex-start; }
.evenement { border-left: 3px solid var(--trait); padding: .2rem 0 .7rem .8rem; margin-bottom: .3rem; }
.evenement.envoi { border-color: var(--accent); }
.evenement.reponse { border-color: var(--vert); }
.evenement.note { border-color: var(--jaune); }
.evenement.stop { border-color: var(--rouge); }
.evenement p { margin: .2rem 0; }
.note { white-space: pre-wrap; }

.boite-connexion { max-width: 380px; margin: 8vh auto; background: var(--carte); border: 1px solid var(--trait); border-radius: 14px; padding: 2rem; text-align: center; }
.boite-connexion img { border-radius: 12px; }
.boite-connexion h1 { margin: .6rem 0 0; }
.boite-connexion form { display: flex; flex-direction: column; gap: .8rem; text-align: left; margin-top: 1.2rem; }
.boite-connexion label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.boite-connexion button { padding: .7rem; }

@media (max-width: 800px) {
  .deux-colonnes { grid-template-columns: 1fr; }
  .chiffres { grid-template-columns: repeat(3, 1fr); }
  .filtres input[type=search] { min-width: 0; flex: 1 1 100%; }
  .moi { width: 100%; }
  .entete nav .bientot { display: none; }
  .entete { gap: .6rem; }
}

.lien-cree { background: #fff8e1; border: 1px solid var(--jaune); border-radius: 10px; padding: 1rem; margin-bottom: 1.2rem; }
.copie { display: flex; gap: .5rem; flex-wrap: wrap; }
.copie input { flex: 1 1 320px; font-size: .9rem; }
td.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
td.actions form { margin: 0; }
button.sec { background: transparent; border: 1px solid #c9ced6; color: var(--encre); font-weight: 500; }
button.sec:hover { background: #fff8e1; }
.boite-connexion p { text-align: left; }
