* { box-sizing: border-box; }
body { font-family: "Segoe UI", Arial, sans-serif; margin: 0; color: #1a1a1a; background: #f4f5f7; }
.topbar { display: flex; align-items: center; gap: 1.5rem; background: #14337a; color: #fff; padding: .6rem 1.2rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.brand { font-weight: 700; font-size: 1.1rem; }
.topbar nav { display: flex; gap: 1rem; }
.topbar .right { margin-left: auto; font-size: .9rem; }
main { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; margin-top: 1.6rem; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border: 1px solid #cdd3dd; padding: .35rem .5rem; font-size: .9rem; }
th { background: #eef1f6; text-align: left; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.zero td { background: #fde8e8; }
tr.ok td { background: #eaf7ea; }
.card { background: #fff; border: 1px solid #dde1e8; border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.msg { padding: .6rem 1rem; border-radius: 4px; background: #e8eefc; }
.msg-error, .msg-danger { background: #fde8e8; }
.msg-success { background: #eaf7ea; }
form.inline { display: inline; }
input[type=text], input[type=number], input[type=date], select {
  padding: .3rem .4rem; border: 1px solid #b9c2d0; border-radius: 4px; }
button, .btn { background: #14337a; color: #fff; border: 0; border-radius: 4px;
  padding: .45rem .9rem; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-light { background: #eef1f6; color: #14337a; border: 1px solid #cdd3dd; }
.small { font-size: .8rem; color: #555; }
.matrice th, .matrice td { font-size: .8rem; padding: .2rem .3rem; }
.matrice td.vide { background: #fde8e8; }
.matrice td.note { text-align: center; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 10px; background: #eef1f6; }

/* ---------- Bulletin imprimable ---------- */
.bulletin { background: #fff; max-width: 800px; margin: 1rem auto; padding: 1.4rem;
  border: 1px solid #999; font-size: .85rem; }
.bulletin .entete { text-align: center; line-height: 1.25; }
.bulletin .entete .republique { font-weight: 700; text-transform: uppercase; }
.bulletin .titre { font-weight: 700; font-size: 1.05rem; text-transform: uppercase;
  border: 2px solid #000; display: inline-block; padding: .15rem 1.5rem; margin: .4rem; }
.bulletin .meta { display: flex; justify-content: space-between; margin: .5rem 0; font-weight: 600; }
.bulletin table { font-size: .8rem; }
.bulletin th { background: #e8e8e8; text-align: center; }
.bulletin td { text-align: center; }
.bulletin td.gauche { text-align: left; }
.bulletin .sous-total { font-weight: 700; background: #f2f2f2; }
.bulletin .recap td { font-weight: 600; }
.bulletin .decision { display: flex; justify-content: space-between;
  border: 1px solid #000; padding: .5rem; margin-top: .6rem; }
.page-break { page-break-after: always; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  main { margin: 0; }
  .bulletin { border: 0; margin: 0; max-width: none; }
}
