:root { --bleu: #1f2a44; --orange: #f28c28; --fond: #f5f6f8; --texte: #1b1f29; --bord: #d7dbe3; --gris: #5b6475; --vert: #2e7d4f; --rouge: #b3261e; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fond); color: var(--texte); font-size: 16px; }
[hidden] { display: none !important; }
.carte { max-width: 360px; margin: 12vh auto; padding: 24px; background: #fff; border-radius: 12px; }
.entete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; background: var(--bleu); color: #fff; }
.entete strong { margin-right: auto; }
.entete .discret { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.onglets { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--bord); }
.onglets button { white-space: nowrap; background: none; color: var(--bleu); border: 1px solid var(--bord); }
.onglets button.actif { background: var(--bleu); color: #fff; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
button { font: inherit; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--orange); background: var(--orange); color: #fff; cursor: pointer; }
button.discret { background: transparent; color: var(--bleu); border-color: var(--bord); }
button.gros { display: block; width: 100%; padding: 28px; font-size: 1.4rem; margin-bottom: 12px; }
button:disabled { opacity: 0.5; cursor: default; }
label { display: block; margin: 10px 0; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px; font: inherit; border: 1px solid var(--bord); border-radius: 8px; background: #fff; }
input[type="checkbox"] { display: inline-block; width: auto; margin: 4px 8px 0 0; }
.liste { list-style: none; padding: 0; margin: 0; }
.liste li { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.piece { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.vignette { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 6px; border: 1px solid var(--bord); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.grande { max-width: 100%; border-radius: 8px; }
.pastille { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 0.8rem; background: #e8ebf1; }
.pastille.recue, .pastille.rapprochee { background: #dff3e6; color: var(--vert); }
.pastille.erreur, .pastille.doublon { background: #fbe3e1; color: var(--rouge); }
.pastille.retiree { background: #eeeeee; color: var(--gris); text-decoration: line-through; }
.petit { color: var(--gris); font-size: 0.85rem; }
.total { font-weight: 700; }
.mois-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filtres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 10px; }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.en-attente { padding: 10px; border-radius: 8px; background: #fff4e5; }
.fiche { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.fiche dt { color: var(--gris); }
.fiche dd { margin: 0; }
.mdp { font-family: ui-monospace, monospace; font-size: 1.4rem; padding: 10px; background: #fff; border: 1px dashed var(--orange); border-radius: 8px; }
#message { position: fixed; left: 16px; right: 16px; bottom: 16px; margin: 0; padding: 12px; border-radius: 8px; color: #fff; background: var(--vert); }
#message.erreur { background: var(--rouge); }
.pastille-ronde { width: 14px; height: 14px; flex: none; margin-top: 4px; border-radius: 50%; background: var(--vert); }
.pastille-ronde.orange { background: var(--orange); }
.pastille-ronde.rouge { background: var(--rouge); }
.pastille-ronde.gris { background: var(--bord); }
.etape.faite { color: var(--gris); text-decoration: line-through; }
.etape.sans-objet { color: var(--gris); font-style: italic; }
fieldset { border: 1px solid var(--bord); border-radius: 8px; margin: 10px 0; }
label.case { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.entete a.site { color: #fff; font-size: 0.85rem; opacity: 0.85; }

.logo-connexion { display: block; width: 220px; max-width: 70%; margin: 0 auto 8px; }
.logo-entete { height: 34px; background: #fff; border-radius: 6px; padding: 2px 6px; }
.types-depense { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 14px; }
.type-depense { padding: 12px 8px; border: 1px solid #c9ced8; border-radius: 8px; background: #fff; color: #1f2a44; font-size: 0.95rem; }
.type-depense.choisi { background: #f28c1e; border-color: #f28c1e; color: #fff; font-weight: 600; }
button:disabled { opacity: 0.45; }
.bilan { font-weight: 600; margin: 14px 0 6px; }
.bilan.ok { color: #1b7f3b; }
.serie li { padding: 8px 10px; border-left: 4px solid #c9ced8; }
.serie li.serie-ok { border-left-color: #1b7f3b; }
.serie li.serie-encours { border-left-color: #2f6fd1; }
.serie li.serie-ko { border-left-color: #f28c1e; background: #fff4e6; }
.boutons-serie { display: grid; gap: 8px; margin-top: 10px; }
