/* Compta Domjan — thème sobre et calme, clair et sombre. Aucune ressource externe. */
:root {
  --fond: #f7f7f5;
  --surface: #ffffff;
  --texte: #23262b;
  --discret: #6b7078;
  --bord: #e2e2de;
  --accent: #2f6f8f;
  --ok: #3d7a57;
  --ok-fond: #e8f3ec;
  --info-fond: #eaf1f6;
  --attention: #9a6a1f;
  --attention-fond: #fbf3e4;
  --negatif: #b04a4a;
  --rayon: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #17191c;
    --surface: #1f2226;
    --texte: #e4e5e7;
    --discret: #9aa0a8;
    --bord: #33373d;
    --accent: #7fb3cf;
    --ok: #8cc6a2;
    --ok-fond: #1f3127;
    --info-fond: #1d2a33;
    --attention: #e0b46a;
    --attention-fond: #332a1b;
    --negatif: #e08f8f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
code { font-size: .9em; overflow-wrap: anywhere; }

.entete {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .75rem 1rem; background: var(--surface); border-bottom: 1px solid var(--bord);
}
.marque { font-weight: 600; color: var(--texte); text-decoration: none; }
.navigation { display: flex; flex-wrap: wrap; gap: .25rem 1rem; flex: 1; }
.navigation a, .navigation span { text-decoration: none; padding: .15rem 0; }
.navigation a[aria-current="page"] { font-weight: 600; border-bottom: 2px solid var(--accent); }
.navigation .bientot { color: var(--discret); opacity: .7; cursor: default; }
.deconnexion { display: flex; align-items: center; gap: .5rem; margin: 0; }
.utilisateur { color: var(--discret); }

.contenu { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.titre-page { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
h1 { font-size: 1.5rem; font-weight: 600; margin: .5rem 0; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 .5rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 .25rem; }
.discret { color: var(--discret); }
.ok-texte { color: var(--ok); }

.carte {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 1rem; margin: 1rem 0;
}
.bandeau { padding: .6rem 1rem; margin: 0; border-bottom: 1px solid var(--bord); }
.contenu .bandeau { border-radius: var(--rayon); border: 1px solid var(--bord); margin: 1rem 0; }
.bandeau.info { background: var(--info-fond); }
.bandeau.ok { background: var(--ok-fond); }
.bandeau.attention { background: var(--attention-fond); color: var(--texte); }

.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { font-weight: 600; color: var(--discret); font-size: .9rem; }
.nombre { text-align: right; white-space: nowrap; }
.montant { font-variant-numeric: tabular-nums; }
.montant.negatif { color: var(--negatif); }
details summary { cursor: pointer; color: var(--accent); margin: .25rem 0; }

button {
  font: inherit; padding: .5rem 1rem; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--surface); cursor: pointer;
}
button.secondaire { background: transparent; color: var(--accent); }
button.lien { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; }
input {
  font: inherit; width: 100%; padding: .5rem; margin-top: .25rem;
  border: 1px solid var(--bord); border-radius: 8px; background: var(--fond); color: var(--texte);
}
label { display: block; margin: 0 0 1rem; }

.connexion { max-width: 360px; margin: 10vh auto 0; }
.connexion form { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.25rem; }
.connexion button { width: 100%; }
