:root {
  --vert: #2e7d32; --vert-clair: #4caf50; --bleu: #1565c0;
  --gris: #f4f5f7; --bord: #d9dce1; --texte: #22262b; --rouge: #c62828;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte); background: var(--gris);
}
a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; align-items: center; gap: 1.5rem;
  background: #fff; border-bottom: 1px solid var(--bord);
  padding: .8rem 1.2rem; flex-wrap: wrap;
}
.marque { font-weight: 700; font-size: 1.1rem; color: var(--vert); }
.topbar nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.topbar nav a.deco { color: var(--rouge); }

.conteneur { max-width: 960px; margin: 1.5rem auto; padding: 0 1rem; }
.pied { text-align: center; color: #888; font-size: .85rem; padding: 2rem 1rem; }

h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; margin-top: 2rem; }
.entete-section { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.aide, small { color: #666; font-size: .9rem; }

.carte {
  background: #fff; border: 1px solid var(--bord); border-radius: 10px;
  padding: 1.2rem; display: flex; flex-direction: column; gap: .7rem;
  max-width: 560px; margin: 1rem 0;
}
.carte label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .92rem; }
.carte label.ligne { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
@media (max-width: 560px) { .grille2 { grid-template-columns: 1fr; } }

.champ {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--bord);
  border-radius: 7px; font: inherit; font-weight: 400; background: #fff;
}
.bouton {
  background: var(--vert); color: #fff; border: 0; border-radius: 7px;
  padding: .6rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; align-self: flex-start;
}
.bouton:hover { background: var(--vert-clair); }

.tableau { width: 100%; border-collapse: collapse; background: #fff; margin: 1rem 0;
  border: 1px solid var(--bord); border-radius: 8px; overflow: hidden; }
.tableau th, .tableau td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid var(--bord); font-size: .92rem; }
.tableau th { background: #eef0f3; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.actions a.danger, a.danger { color: var(--rouge); }

.badge { padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: #fff; }
.badge-brouillon { background: #90a4ae; }
.badge-armee { background: var(--bleu); }
.badge-en_cours { background: #f9a825; }
.badge-confirmee, .badge-succes { background: var(--vert); }
.badge-echec, .badge-complet, .badge-licence_invalide { background: var(--rouge); }
.badge-pas_encore_ouvert, .badge-inconnu, .badge-session_expiree { background: #6d4c41; }

.flash { padding: .7rem 1rem; border-radius: 8px; margin: .5rem 0; }
.flash-ok { background: #e8f5e9; color: var(--vert); border: 1px solid #a5d6a7; }
.flash-err { background: #ffebee; color: var(--rouge); border: 1px solid #ef9a9a; }
.err { color: var(--rouge); font-size: .85rem; }
.vide { color: #888; font-style: italic; }

.fiche { display: grid; grid-template-columns: 180px 1fr; gap: .4rem 1rem; margin: 0; }
.fiche dt { font-weight: 600; color: #555; }
.fiche dd { margin: 0; }
.journal {
  background: #1e1e1e; color: #d4d4d4; padding: 1rem; border-radius: 8px;
  overflow-x: auto; font-size: .82rem; line-height: 1.5; white-space: pre-wrap;
}
