/* Jarvis Card, maquette : composants des écrans de gestion (professeur, administration, comptable).
   Couleurs uniquement par variables : le mode sombre et la charte de chaque école suivent tout seuls. */

/* ---------- Barre du haut ---------- */
.dapp-top h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dapp-top .recherche, .dapp-top .action-top { flex: none; }
@media (max-width: 600px) {
  .dapp-top { gap: 8px; }
  .dapp-top h1 { font-size: 17px; }
  .action-top { width: 44px; padding: 0; }
  .action-top .lib { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.dapp-moi .avatar { width: 40px; height: 40px; }

/* ---------- Mise en page des vues ---------- */
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.intro h2 { font-size: 22px; }
.intro p { color: var(--muted); font-size: 14.5px; margin-top: 3px; }
.pile { display: grid; gap: 20px; align-content: start; min-width: 0; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grille-2-egal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 1100px) {
  .grille-3 { grid-template-columns: 1fr; }
  .grille-2-egal { grid-template-columns: 1fr; }
}

/* ---------- Panneaux ---------- */
.panneau { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); min-width: 0; }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 16px 20px; }
.panneau-tete h2 { font-size: 17px; }
.panneau-tete .sous { display: block; font-size: 13.5px; color: var(--muted); font-weight: 400; margin-top: 3px; }
.panneau-corps { padding: 0 20px 20px; }
.panneau-corps.sep { padding-top: 18px; border-top: 1px solid var(--line); }
.panneau > .tbl-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-card) var(--r-card); }
.panneau > .tbl-wrap:not(:last-child) { border-radius: 0; }
.panneau-pied { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panneau .liste { padding: 0 20px 8px; }
.panneau .vide { padding: 32px 20px; }
.panneau-ecole { background: var(--ecole); border-color: var(--ecole); color: var(--on-ecole); }
.panneau-ecole .sous, .panneau-ecole p { color: color-mix(in srgb, var(--on-ecole) 82%, transparent); }
.panneau-ecole .btn-secondary { background: var(--on-ecole); color: var(--ecole); border-color: transparent; }
.panneau-ecole .btn-secondary:hover { background: color-mix(in srgb, var(--on-ecole) 88%, var(--ecole)); }

/* ---------- Tuiles, compléments ---------- */
.tuile .val small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tuile-ecole .val small { color: color-mix(in srgb, var(--on-ecole) 80%, transparent); }
a.tuile { text-decoration: none; color: inherit; }
a.tuile:hover { border-color: var(--ecole-lite); }
.jauge { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.jauge > span { display: block; height: 100%; width: var(--p, 0%); background: var(--ecole-lite); border-radius: inherit; }
.tuile-ecole .jauge { background: color-mix(in srgb, var(--on-ecole) 22%, transparent); }
.tuile-ecole .jauge > span { background: var(--on-ecole); }
.tuiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tuiles-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tuiles-5 { grid-template-columns: 1fr 1fr; } }
.tuile-mini { padding: 12px 14px; }
.tuile-mini .val { font-size: 22px; }

/* ---------- Graphique en barres (valeurs écrites sur chaque barre) ---------- */
.graphe { margin: 0; }
.graphe figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; }
.barres { list-style: none; margin: 0; padding: 0; height: 230px; display: flex; gap: 12px; border-bottom: 1px solid var(--line-2); }
.barres li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.barres .v { font-size: 12.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.barres .b { width: min(56px, 100%); height: var(--h); min-height: 4px; background: var(--ecole); border-radius: 6px 6px 0 0; }
.barres .b.encours { background: var(--ecole-soft); border: 2px dashed var(--ecole-lite); border-bottom: 0; }
.barres-axe { display: flex; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.barres-axe span { flex: 1 1 0; min-width: 0; text-align: center; }
.legende { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 12px; height: 12px; border-radius: 3px; background: var(--ecole); display: inline-block; }
.legende i.encours { background: var(--ecole-soft); border: 2px dashed var(--ecole-lite); }
@media (max-width: 520px) {
  .barres, .barres-axe { gap: 5px; }
  .barres .v, .barres-axe { font-size: 11px; }
}

/* Barres horizontales (répartition par moyen de paiement) */
.hbarres { display: grid; gap: 16px; }
.hbarre { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.hbarre .nom { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; min-width: 0; }
.hbarre .nom img { height: 24px; width: auto; border-radius: 5px; flex: none; }
.hbarre .nom .puce-ic { width: 32px; height: 24px; border-radius: 6px; }
.hbarre .nom .puce-ic .ic { width: 16px; height: 16px; }
.hbarre .piste { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.hbarre .piste span { display: block; height: 100%; width: var(--p); background: var(--ecole); border-radius: 6px; }
.hbarre .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; white-space: nowrap; }
.hbarre .val small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) {
  .hbarre { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .hbarre .piste { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Tableaux ---------- */
.tbl .mono { font-size: 14px; }
.tbl tr.cliquable { cursor: pointer; }
.tbl tr.cliquable:focus-visible { outline: none; }
.tbl tr.cliquable:focus-visible td { background: var(--ecole-soft); }
.tbl td.serre, .tbl th.serre { width: 1%; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); }
.cel-eleve { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cel-eleve > div { min-width: 0; }
.cel-eleve strong, .cel-eleve .lien-ligne { display: block; font-size: 15px; }
.cel-eleve span { display: block; font-size: 13px; color: var(--muted); }
.lien-ligne { border: 0; background: none; padding: 0; margin: 0; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.lien-ligne:hover { color: var(--ecole-lite); text-decoration: underline; }
.case { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px -8px; cursor: pointer; }
.dapp input[type="checkbox"], .sheet input[type="checkbox"], .dapp input[type="radio"], .sheet input[type="radio"] { accent-color: var(--ecole); width: 20px; height: 20px; margin: 0; }
.avatar.ini { display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--ecole-soft); color: var(--ecole-lite); }
.avatar-sm { width: 32px; height: 32px; font-size: 12.5px; }
.avatar.ini.avatar-lg { font-size: 19px; }
@media (max-width: 900px) {
  .tbl-pile tr.cliquable:hover td { background: transparent; }
  .tbl-pile td.serre { width: auto; }
  .tbl-pile td.r { text-align: left; }
  .tbl-pile .case { margin: 0; }
  .tbl-pile td.chk { position: absolute; right: 8px; top: 6px; }
  .tbl-pile tr { position: relative; }
}

/* ---------- Filtres et barres d'outils ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filtres .field { flex: 1 1 170px; min-width: 0; }
.filtres .field.large { flex: 2 1 260px; }
.filtres .compte-res { font-size: 14px; color: var(--muted); padding-bottom: 12px; }
.champ-recherche { position: relative; }
.champ-recherche .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.champ-recherche .input { padding-left: 38px; }
.dapp .seg, .sheet .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dapp .seg::-webkit-scrollbar { display: none; }
.dapp .seg button, .sheet .seg button { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.seg .nb { font-size: 12px; padding: 0 7px; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions .espace { flex: 1; }

/* ---------- Formulaires ---------- */
.form-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grille .plein { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grille { grid-template-columns: 1fr; } }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; display: inline-flex; }
.option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.option span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.option .coche { display: none; }
.option input:checked + span { background: var(--ecole-soft); border-color: var(--ecole-lite); color: var(--ecole-lite); }
.option input:checked + span .coche { display: inline-block; }
.option input:focus-visible + span { box-shadow: var(--ring); }
.option img { height: 20px; width: auto; border-radius: 4px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field > legend { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.input-montant { position: relative; }
.input-montant .input { padding-right: 34px; font-variant-numeric: tabular-nums; }
.input-montant > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.alerte-danger { background: var(--danger-soft); color: var(--danger); }
.alerte .ic { flex: none; margin-top: 1px; }
.alerte a { color: inherit; font-weight: 700; }

/* ---------- Interrupteurs ---------- */
.interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; min-height: 56px; cursor: pointer; }
.interrupteur + .interrupteur { border-top: 1px solid var(--line); }
.interrupteur .txt { display: grid; gap: 2px; min-width: 0; }
.interrupteur .txt strong { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.interrupteur .txt span { font-size: 13.5px; color: var(--muted); }
.interrupteur input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; margin: 0; border-radius: 15px; background: var(--surface-3); border: 1px solid var(--line-2); cursor: pointer; transition: background var(--t-fast); }
.interrupteur input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--ease); }
.interrupteur input:checked { background: var(--ecole); border-color: var(--ecole); }
.interrupteur input:checked::after { transform: translateX(20px); background: var(--on-ecole); }
.interrupteur input:focus-visible { box-shadow: var(--ring); outline: none; }

/* ---------- Pastilles de couleur de la charte ---------- */
.pastilles { display: flex; gap: 16px; flex-wrap: wrap; }
.pastille { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.pastille i { display: block; width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line); }
.pastille .mono { font-size: 12.5px; color: var(--muted); }

/* ---------- Appel ---------- */
.appel-compteurs { display: flex; gap: 8px; flex-wrap: wrap; }
.appel-groupe { padding: 12px 20px 8px; font-size: 13px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface-2); }
.appel-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 10px 20px; border-top: 1px solid var(--line); }
.appel-groupe + .appel-ligne { border-top: 0; }
.appel-ligne .qui { display: flex; align-items: center; gap: 12px; min-width: 0; }
.appel-ligne .qui > div { min-width: 0; }
.appel-ligne .qui strong { display: block; font-size: 15px; }
.appel-ligne .qui > div > span { display: block; font-size: 13px; color: var(--muted); }
.appel-ligne .qui .signal { color: var(--warn); font-weight: 600; }
.choix { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 6px; }
.choix button { min-height: 44px; min-width: 104px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.choix button .ic { width: 18px; height: 18px; }
.choix button:hover { border-color: var(--ink-2); }
.choix button[aria-pressed="true"][data-s="present"] { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.choix button[aria-pressed="true"][data-s="absent"] { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.choix button[aria-pressed="true"][data-s="retard"] { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
@media (max-width: 760px) {
  .appel-ligne { grid-template-columns: 1fr; padding: 12px 16px; }
  .appel-groupe { padding: 10px 16px 8px; }
  .choix { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .choix button { min-width: 0; padding: 0 8px; font-size: 14px; }
}
.barre-validation { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 0 0 var(--r-card) var(--r-card); }
.barre-validation .resume { font-size: 14.5px; color: var(--ink-2); }
.barre-validation .resume strong { color: var(--ink); }
@media (max-width: 520px) {
  .barre-validation { padding: 10px 14px; gap: 8px; }
  .barre-validation > .btn { width: 100%; }
  .barre-validation .actions { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .barre-validation .actions .btn { flex: 1; padding: 0 10px; font-size: 14px; }
  .barre-validation .resume { font-size: 13.5px; }
}

/* ---------- Saisie des notes ---------- */
.tbl-notes td { padding-top: 8px; padding-bottom: 8px; }
.tbl-notes .note-champ { width: 96px; }
.tbl-notes .note-champ .input { min-height: 42px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; padding: 8px; }
.tbl-notes .note-champ .error { display: block; margin-top: 4px; white-space: normal; line-height: 1.25; }
.tbl-notes .num-ordre { color: var(--muted); font-size: 13px; width: 1%; }
.tbl-notes .fixe { font-variant-numeric: tabular-nums; color: var(--ink-2); }
@media (max-width: 640px) {
  .tbl-notes th, .tbl-notes td { padding-left: 10px; padding-right: 10px; }
  .tbl-notes .num-ordre, .tbl-notes .cache-tel { display: none; }
  .tbl-notes .note-champ { width: 84px; }

}

/* ---------- Emploi du temps ---------- */
.edt { display: grid; grid-template-columns: 52px repeat(var(--jours, 6), minmax(0, 1fr)); grid-template-rows: 40px repeat(var(--q, 36), 16px); column-gap: 8px; }
.edt .jour { grid-row: 1; align-self: end; font-weight: 700; font-size: 13.5px; color: var(--ink-2); padding: 0 4px 8px; border-bottom: 2px solid var(--line); }
.edt .jour.auj { color: var(--ecole-lite); border-bottom-color: var(--ecole-lite); }
.edt .heure { grid-column: 1; font-family: var(--mono); font-size: 12px; color: var(--muted); transform: translateY(-8px); }
.edt .trait { grid-column: 2 / -1; border-top: 1px dashed var(--line); }
.edt .cours { position: relative; margin: 2px 0; padding: 6px 8px; border-left: 4px solid var(--ecole); background: var(--ecole-soft); border-radius: 8px; overflow: hidden; font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.edt .cours strong { display: block; font-size: 13.5px; color: var(--ink); }
.edt .cours .mono { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.edt .cours.autre { border-left-color: var(--muted); background: var(--surface-2); }
.edt-liste { display: none; }
.edt-liste .jour-bloc { display: grid; gap: 8px; }
.edt-liste h3 { font-size: 15px; }
.edt-liste .jour-bloc.auj h3 { color: var(--ecole-lite); }
.edt-liste .cr { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
.edt-liste .cr .mono { font-size: 12.5px; color: var(--muted); display: grid; align-content: space-between; padding: 4px 0; }
.edt-liste .cr > div:last-child { border-left: 4px solid var(--ecole); background: var(--ecole-soft); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; color: var(--ink-2); }
.edt-liste .cr strong { display: block; font-size: 14.5px; color: var(--ink); }
.edt-liste .rien { font-size: 13.5px; color: var(--muted); }
@media (max-width: 900px) {
  .edt { display: none; }
  .edt-liste { display: grid; gap: 18px; }
}

/* ---------- Messagerie ---------- */
.messagerie { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); min-height: 520px; }
.messagerie .fils { border-right: 1px solid var(--line); min-width: 0; }
.messagerie .fils a { display: flex; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.messagerie .fils a:first-child { border-top: 0; }
.messagerie .fils a:hover { background: var(--surface-2); }
.messagerie .fils a[aria-current="true"] { background: var(--ecole-soft); }
.messagerie .fils .corps { flex: 1; min-width: 0; display: grid; gap: 1px; }
.messagerie .fils .corps strong { font-size: 14.5px; display: flex; justify-content: space-between; gap: 8px; }
.messagerie .fils .corps strong time { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.messagerie .fils .corps .role { font-size: 12.5px; color: var(--muted); }
.messagerie .fils .corps .apercu { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.messagerie .fils .non-lu .apercu { font-weight: 700; color: var(--ink); }
.messagerie .conv { display: flex; flex-direction: column; min-width: 0; }
.messagerie .conv-tete { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.messagerie .conv-tete strong { display: block; }
.messagerie .conv-tete span { font-size: 13px; color: var(--muted); }
.messagerie .conv-fil { flex: 1; padding: 18px 20px; display: grid; gap: 10px; align-content: start; }
.bulle { max-width: min(78%, 520px); justify-self: start; padding: 10px 13px; border-radius: 14px; background: var(--surface-2); font-size: 14.5px; }
.bulle.moi { justify-self: end; background: var(--ecole); color: var(--on-ecole); }
.bulle time { display: block; font-size: 11.5px; opacity: .72; margin-top: 4px; }
.messagerie form { display: flex; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.retour-fils { display: none; }
@media (max-width: 900px) {
  .messagerie { grid-template-columns: 1fr; min-height: 0; }
  .messagerie .fils { border-right: 0; }
  .messagerie.avec-fil .fils { display: none; }
  .messagerie:not(.avec-fil) .conv { display: none; }
  .retour-fils { display: inline-flex; }
  .messagerie .conv-tete { padding: 12px 16px; }
  .messagerie .conv-fil { padding: 16px; }
  .messagerie form { padding: 12px 16px 16px; }
  .bulle { max-width: 88%; }
}

/* ---------- Divers ---------- */
.progression { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progression > span { display: block; height: 100%; width: 0; background: var(--ecole); border-radius: inherit; transition: width 120ms linear; }
.apercu-message { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.suggestions { margin-top: 6px; border: 1px solid var(--line-2); border-radius: var(--r-field); background: var(--surface); max-height: 300px; overflow-y: auto; }
.suggestions button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.suggestions button:first-child { border-top: 0; }
.suggestions button:hover, .suggestions button:focus-visible { background: var(--surface-2); border-radius: 0; }
.suggestions button strong { display: block; font-size: 14.5px; }
.suggestions button span { display: block; font-size: 13px; color: var(--muted); }
.suggestions .rien { padding: 12px; font-size: 14px; color: var(--muted); }
.choisi { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ecole-lite); background: var(--ecole-soft); }
.choisi > div { flex: 1; min-width: 0; }
.choisi strong { display: block; }
.choisi span { font-size: 13.5px; color: var(--ink-2); }
.infos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 0; }
.infos div { min-width: 0; }
.infos dt { font-size: 12.5px; color: var(--muted); }
.infos dd { margin: 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.fiche-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.fiche-tete h2 { font-size: 21px; }
.fiche-tete p { color: var(--muted); font-size: 14px; }
.fiche-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.fiche-section h3 { font-size: 15px; margin-bottom: 10px; }
.sheet .fiche-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sheet .actions-bas { display: flex; gap: 10px; margin-top: 18px; }
.sheet .actions-bas .btn { flex: 1; }
.sheet h2.titre-feuille { font-size: 20px; }
.sheet .sous-feuille { color: var(--muted); margin-top: 4px; font-size: 14.5px; }
.sheet-large .sheet { width: min(760px, 100%); }
.mini-liste { display: grid; gap: 0; }
.mini-liste > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.mini-liste > div:first-child { border-top: 0; }
.mini-liste .num { font-weight: 700; white-space: nowrap; }
.droits td, .droits th { text-align: center; }
.droits td:first-child, .droits th:first-child { text-align: left; }
.droits .oui { color: var(--ok); }
.droits .non { color: var(--line-2); }
.carte-apercu { max-width: 360px; }
.carte-apercu canvas { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-2); }
.etat-cmd { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.etat-cmd strong { display: block; font-size: 14.5px; }
.lien-ecole { color: var(--ecole-lite); font-weight: 600; text-decoration: none; }
.lien-ecole:hover { text-decoration: underline; }
.num-grand { font-variant-numeric: tabular-nums; }
.compteur-car { font-size: 12.5px; color: var(--muted); text-align: right; }
.tbl-notes .error, .barre-validation .error, .sheet .error { color: var(--danger); font-weight: 500; font-size: 12.5px; }
.tbl-notes .note-champ .error:empty, .field .error:empty { display: none; }
.dapp [hidden], .sheet [hidden] { display: none !important; }
a.tuile.tuile-ecole { color: var(--on-ecole); }
.dapp-moi .avatar-initiales { color: var(--on-ecole); font-size: 15px; }
.ligne .corps .mono { white-space: nowrap; }
.dapp .interrupteur input[type="checkbox"] { width: 50px; height: 30px; accent-color: auto; }
.tbl .actions { flex-wrap: nowrap; gap: 6px; }
.tuiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tuile { min-width: 0; }
@media (max-width: 640px) { .tuiles-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) {
  .tuile { padding: 14px; }
  .tuile .val { font-size: 18px; }
  .tuile .val small { font-size: 13px; }
}
.dapp-content { grid-template-columns: minmax(0, 1fr); }
.tbl-wrap, .seg { position: relative; }
.tuile .val, .hbarre .val { font-variant-numeric: normal; }
@media (max-width: 520px) {
  .filtres { gap: 10px; }
  .filtres .field { flex: 1 1 calc(50% - 5px); }
  .filtres .field.large { flex-basis: 100%; }
  .filtres .compte-res { flex-basis: 100%; padding-bottom: 0; }
}
