:root {
  --fond: #f4f3ef;
  --carte: #fff;
  --texte: #1f2328;
  --discret: #6a6f76;
  --bord: #e2e0da;
  --accent: #1f4e79;
  --ok: #2e7d32;
  --ko: #c62828;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--texte);
  background: var(--fond);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.5rem 0 .75rem; }
.carte h2:first-child { margin-top: 0; }
code { background: #eeece6; padding: .1em .35em; border-radius: 4px; font-size: .9em; word-break: break-all; }

.cadre { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.menu { background: #1d2733; color: #cdd5de; padding: 1.25rem .75rem; display: flex; flex-direction: column; gap: .15rem; }
.menu a { color: inherit; text-decoration: none; padding: .5rem .75rem; border-radius: 6px; display: flex; align-items: center; gap: .5rem; }
.menu a:hover { background: #2a3746; }
.menu a.actif { background: #34465a; color: #fff; }
.menu .marque { color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: .75rem; }
.titre-menu { text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; color: #8695a6; margin: 1rem .75rem .25rem; }
.point { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; flex: none; }
.compte { margin-left: auto; background: #d9822b; color: #fff; border-radius: 999px; padding: 0 .5rem; font-size: .78rem; line-height: 1.4rem; }
.deconnexion { margin-top: auto; padding: .5rem .75rem; }
.deconnexion .lien { color: #8695a6; }

.contenu { padding: 2rem; max-width: 1200px; width: 100%; }
.contenu.seul { margin: 10vh auto; max-width: 380px; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.discret { color: var(--discret); font-size: .9rem; }
.ligne-titre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ligne-titre h1 { margin: 0; }

button, .bouton { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: .55rem 1rem; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondaire, .bouton.secondaire { background: #fff; color: var(--texte); border: 1px solid var(--bord); }
button.choisi { background: var(--accent); }
button.lien { background: none; color: var(--accent); padding: 0; text-decoration: underline; }
input, select, textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--bord); border-radius: 6px; background: #fff; width: 100%; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .75rem; }
label input, label textarea { margin-top: .35rem; font-weight: 400; }

.connexion h1 { margin-bottom: .25rem; }
.connexion button { width: 100%; }
.alerte { background: #fdecea; color: var(--ko); padding: .6rem .8rem; border-radius: 6px; }

.filtres { display: flex; gap: .5rem; margin-bottom: .5rem; }
.filtres input { flex: 1; }
.filtres select { width: auto; }

.site { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--c); border: 1px solid var(--c); border-radius: 999px; padding: 0 .55rem; line-height: 1.35rem; }
.statut { display: inline-block; font-size: .78rem; border-radius: 999px; padding: 0 .55rem; line-height: 1.35rem; background: #eceae4; }
.statut-nouveau { background: #fff1de; color: #9a5a00; }
.statut-en_cours { background: #e3eefa; color: #1f4e79; }
.statut-traite { background: #e6f4e7; color: var(--ok); }
.statut-spam { background: #fdecea; color: var(--ko); }

.liste-messages { padding: 0; overflow: hidden; }
.message { display: block; padding: .9rem 1.25rem; border-bottom: 1px solid var(--bord); color: inherit; text-decoration: none; }
.message:last-child { border-bottom: 0; }
.message:hover { background: #faf9f6; }
.message.non-lu { border-left: 4px solid #d9822b; padding-left: calc(1.25rem - 4px); }
.message.non-lu .m-nom { font-weight: 700; }
.m-haut { display: flex; justify-content: space-between; gap: 1rem; }
.m-date { color: var(--discret); font-size: .85rem; white-space: nowrap; }
.m-infos { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.m-extrait { color: var(--discret); font-size: .9rem; margin-top: .35rem; }
.vide { text-align: center; color: var(--discret); padding: 3rem; }

.pagination { display: flex; gap: .3rem; flex-wrap: wrap; }
.pagination a { padding: .3rem .65rem; border-radius: 6px; background: #fff; border: 1px solid var(--bord); text-decoration: none; }
.pagination a.actif { background: var(--accent); color: #fff; border-color: var(--accent); }

.detail { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; }
.coordonnees { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 1rem 0; }
.coordonnees dt { color: var(--discret); }
.coordonnees dd { margin: 0; font-weight: 600; }
.texte { background: #faf9f6; border-radius: 8px; padding: 1rem; line-height: 1.5; white-space: normal; }
.champs, .liste { width: 100%; border-collapse: collapse; font-size: .9rem; }
.champs th, .champs td, .liste th, .liste td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
.champs th { width: 30%; color: var(--discret); font-weight: 500; word-break: break-all; }
.champs td { word-break: break-word; }
.statuts { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.statuts button { padding: .4rem .7rem; font-size: .88rem; }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.site-carte { border-top: 4px solid var(--c); }
.site-carte h2 a { color: inherit; text-decoration: none; }
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 1rem 0; }
.chiffres div { background: #faf9f6; border-radius: 8px; padding: .6rem; text-align: center; }
.chiffres b { display: block; font-size: 1.4rem; }
.chiffres span { font-size: .75rem; color: var(--discret); }
.ok { color: var(--ok); font-weight: 600; }
.ko { color: var(--ko); font-weight: 600; }

@media (max-width: 800px) {
  .cadre { grid-template-columns: 1fr; }
  .menu { flex-direction: row; flex-wrap: wrap; }
  .titre-menu, .deconnexion { display: none; }
  .contenu { padding: 1rem; }
  .detail { grid-template-columns: 1fr; }
  .filtres { flex-wrap: wrap; }
}
