* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f6f9;
  color: #1f2933;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1rem;
  text-align: center;
}

h1 { margin-bottom: 2rem; }

.menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover { background: #1d4ed8; transform: translateY(-1px); }

.btn-secondary { background: #64748b; font-size: 1rem; }
.btn-secondary:hover { background: #475569; }

.form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  max-width: 320px;
  margin: 0 auto 1.5rem;
}

.form input:not([type="checkbox"]),
.form textarea {
  padding: 0.75rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 1rem;
}

.form button { border: 0; cursor: pointer; }

.error { color: #b91c1c; margin: 0; }

.back { color: #2563eb; }

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer { margin-top: 2.5rem; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e4e7eb;
  font-size: 0.9rem;
}
.topbar a { color: #2563eb; }
.topbar .brand { font-weight: 700; text-decoration: none; color: #1f2933; }

.flash {
  background: #dcfce7;
  color: #166534;
  padding: 0.75rem;
  border-radius: 6px;
}

.form fieldset {
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  padding: 0.75rem;
}
.form .check { display: flex; gap: 0.5rem; align-items: center; padding: 0.2rem 0; }

.container:has(table) { max-width: 1600px; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  text-align: left;
}
th, td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #e4e7eb; vertical-align: top; }
.tag {
  display: inline-block;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin: 0.1rem;
  font-size: 0.85rem;
}
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; margin-left: 0.5rem; }
.link-danger {
  background: none;
  border: 0;
  color: #b91c1c;
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
  padding: 0;
}

.form textarea { font: inherit; resize: vertical; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.search { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; flex: 1; }
.search input {
  flex: 1;
  min-width: 0;
  max-width: 360px;
  padding: 0.75rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 1rem;
}
.search .btn, .toolbar .btn { padding: 0.75rem 1.25rem; font-size: 1rem; border: 0; cursor: pointer; }
.count { text-align: left; color: #52606d; font-size: 0.9rem; }
td.empty { text-align: center; color: #7b8794; font-style: italic; }

.form-wide { max-width: 480px; }
.perms { background: transparent; }
.perms th, .perms td { padding: 0.35rem 0.5rem; }
.perms td:not(:first-child), .perms th:not(:first-child) { text-align: center; width: 5.5rem; }
.hint { color: #52606d; font-size: 0.85rem; margin: 0.5rem 0 0; }
.tag small { opacity: 0.75; }

.toolbar-end { justify-content: flex-end; }
.num { text-align: right; white-space: nowrap; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
td.center form { display: inline; }
.form .check { display: flex; gap: 0.5rem; align-items: center; }

.form select {
  padding: 0.75rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  max-width: 100%;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.modal {
  border: 0;
  border-radius: 10px;
  padding: 1.5rem;
  width: min(480px, calc(100vw - 2rem));
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  text-align: left;
}
.modal::backdrop { background: rgba(15, 23, 42, 0.5); }
.modal h2 { margin-top: 0; }
.modal form { text-align: right; margin-top: 1rem; }
.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
}
.details dt { font-weight: 600; color: #52606d; }
.details dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

.flashes { margin-bottom: 1rem; text-align: left; }
.flash { margin: 0 0 0.25rem; }
.flash-error { background: #fee2e2; color: #991b1b; }

.csv-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.csv-import { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.csv-import input[type="file"] { max-width: 100%; font-size: 0.9rem; }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.9rem; border: 0; cursor: pointer; }
label .hint { font-weight: normal; }

.top-back { text-align: left; margin-bottom: 0.5rem; }
.top-back + h1 { margin-top: 0.5rem; }

/* Colonne d'actions figée à droite : toujours visible quand le tableau défile */
.row-actions {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -6px 0 6px -6px rgba(15, 23, 42, 0.25);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filters select {
  padding: 0.7rem 0.6rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  max-width: 14rem;
}

/* Accueil : zones Lycée / Campus / IT */
.container:has(.zones) { max-width: 1000px; }
.zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.zone {
  background: #fff;
  border: 1px solid #e4e7eb;
  border-radius: 10px;
  padding: 1.25rem;
}
.zone h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: #52606d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.zone .btn { font-size: 1rem; }

/* Tableau à nombreuses colonnes (élèves) */
table.compact th, table.compact td { padding: 0.45rem 0.55rem; font-size: 0.9rem; }

/* Formulaire sur deux colonnes (élève) */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1rem;
  max-width: 640px;
}
.form-grid .field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-grid .form-end { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0.75rem; }
.form-grid select {
  padding: 0.75rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
}

/* Ligne de filtres sous les en-têtes de colonnes */
.filter-row th { padding-top: 0; font-weight: normal; }
.filter-row select {
  width: 100%;
  min-width: 3.4rem;
  max-width: 9rem;
  padding: 0.2rem 0.1rem;
  border: 1px solid #cbd2d9;
  border-radius: 4px;
  font-size: 0.85rem;
  background: #fff;
}
.filter-row select.active { border-color: #2563eb; background: #eff6ff; font-weight: 600; }

/* Gestion des salles */
.container:has(.room) { max-width: 1600px; }
.room-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.room-form .field { display: flex; flex-direction: column; gap: 0.35rem; text-align: left; }
.room-form input {
  width: 9rem;
  padding: 0.75rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 1rem;
}
.room-form .btn { border: 0; cursor: pointer; padding: 0.8rem 1.5rem; font-size: 1rem; }
.room-wrap { overflow-x: auto; padding-bottom: 0.5rem; margin-top: 0.75rem; }
.room { display: grid; gap: 0.75rem; }
.room-table {
  padding: 1rem 0.5rem;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: #1f2933;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.room-table:hover { background: #eff6ff; border-color: #2563eb; }

.room-table.unused {
  background: #e5e7eb;
  border-style: dashed;
  color: #6b7280;
  font-weight: normal;
  font-style: italic;
}
.room-table.unused:hover { background: #d1d5db; border-color: #6b7280; }

.context-menu {
  position: fixed;
  z-index: 10;
  min-width: 9rem;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}
.context-menu button {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 4px;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.context-menu button:hover, .context-menu button:focus { background: #eff6ff; outline: none; }

.room-load, .room-save {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}
.room-load { margin-bottom: 1rem; }
.room-load select, .room-save input[type="text"] {
  padding: 0.5rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  max-width: 100%;
}
.room-current { margin: 0 0 1rem; }
.badge-warn {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
}
.room-save-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Tables avec élève placé */
.room-table { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.room-table-name { font-weight: 600; }
.room-table.occupied { background: #eff6ff; border-color: #2563eb; }
.room-student { font-weight: normal; font-size: 0.85rem; line-height: 1.2; }
.room-class { font-weight: normal; font-size: 0.75rem; color: #52606d; }
.room-table.unused .room-table-name { font-weight: normal; }

/* Pop-up de choix d'un élève */
.modal-wide { width: min(720px, calc(100vw - 2rem)); }
.student-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.student-filters input[type="search"], .student-filters select {
  padding: 0.5rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
}
.student-filters input[type="search"] { flex: 1; min-width: 10rem; }
.student-filters .check { display: flex; gap: 0.35rem; align-items: center; font-size: 0.9rem; }
.student-list-wrap { max-height: 50vh; overflow: auto; border: 1px solid #e4e7eb; border-radius: 6px; }
.student-list { font-size: 0.9rem; }
.student-list th { position: sticky; top: 0; background: #f8fafc; }
.student-list td:last-child { white-space: nowrap; text-align: right; }
.student-list .btn { border: 0; cursor: pointer; }
.student-list-wrap .empty { text-align: center; color: #7b8794; font-style: italic; margin: 1rem; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; gap: 1rem; }
.modal-actions .btn { border: 0; cursor: pointer; margin-left: auto; }

/* Impression du plan de salle */
.print-actions { text-align: right; margin-top: 0.5rem; }
.print-actions .btn { border: 0; cursor: pointer; }
.print-title { display: none; }

@media print {
  /* Marge de page nulle : le navigateur n'a plus de place pour ses en-têtes et
     pieds de page (adresse, date, titre) ; la marge est recréée par le body. */
  @page { size: landscape; margin: 0; }
  body { background: #fff; padding: 1cm; }
  .topbar, .top-back, .container > h1, .flashes, .room-load, .room-current, .room-form,
  .room-form + .error, .hint, .print-actions, .room-save-bar, .context-menu, dialog { display: none !important; }
  .container { max-width: none !important; padding: 0; }
  .print-title { display: block; text-align: center; margin-bottom: 0.75rem; }
  .print-title h2 { margin: 0 0 0.25rem; }
  .room-wrap { overflow: visible; margin: 0; }
  .room { gap: 0.4rem; }
  .room-table {
    border: 1px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
    padding: 0.5rem 0.25rem;
    break-inside: avoid;
  }
  .room-class { color: #333; }
  /* Tables inutilisées : emplacement laissé vide */
  .room-table.unused { visibility: hidden; }
}

/* Pied de page et pages légales */
.footer {
  /* Liens légaux au centre, crédit en bas à droite */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 2rem 0 1rem;
  padding: 0 1rem;
  font-size: 0.85rem;
  color: #7b8794;
}
.footer-links { grid-column: 2; text-align: center; }
.footer-credit { grid-column: 3; text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .footer { grid-template-columns: 1fr; }
  .footer-links, .footer-credit { grid-column: 1; text-align: center; }
}
.footer a { color: #52606d; }
.legal h2 { margin-top: 1.75rem; font-size: 1.15rem; }
.legal p, .legal li { line-height: 1.55; }
.legal .todo { color: #b45309; font-style: italic; }
.legal table { margin: 0.5rem 0 1rem; }
@media print { .footer { display: none; } }

/* Case « Afficher les masqués » dans la barre de recherche */
.search .check { display: flex; gap: 0.35rem; align-items: center; white-space: nowrap; }
.search .check input { flex: none; width: auto; padding: 0; }
.row-hidden td:not(.row-actions) { color: #9aa5b1; font-style: italic; }

/* Zones de champs (étudiants du campus) : tableau */
.group-row th {
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334e68;
  border-bottom: 2px solid #9fb3c8;
}
.group-row th.g0 { background: #e6eef7; }
.group-row th.g1 { background: #f0f4f8; }
.group-row th.row-actions { background: #fff; border-bottom-color: transparent; }
th.g-start, td.g-start { border-left: 2px solid #9fb3c8; }

/* Zones de champs : fiche */
.container:has(.field-group legend) { max-width: 1100px; }
.form-grid:has(.field-group legend) { max-width: 1040px; }
.form .field-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1rem;
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
  border: 1px solid #9fb3c8;
  border-left: 5px solid #2563eb;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  min-width: 0;
}
.form .field-group + .field-group { margin-top: 0.75rem; }
.field-group legend {
  padding: 0.25rem 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: #2563eb;
  border-radius: 6px;
}
.field-group.untitled { display: contents; }
.field-group .field { display: flex; flex-direction: column; gap: 0.35rem; }

/* Ligne de total (journal de bord) */
.total-row th, .total-row td { font-weight: 700; border-top: 2px solid #9fb3c8; border-bottom: 0; background: #f8fafc; }

/* Bouton d'effacement total */
.danger-zone { margin-top: 1.5rem; text-align: right; }
.btn-danger { background: #dc2626; color: #fff; border: 0; cursor: pointer; }
.btn-danger:hover { background: #b91c1c; }

/* Accueil : logos lycée / campus */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
  margin: -2.5rem auto 0.5rem;
}
.hero-logo {
  height: 110px;
  width: auto;
  max-width: 100%;
  /* Le fond blanc des JPG se fond dans le gris de la page */
  mix-blend-mode: multiply;
}
.field-check { width: 1.4rem; height: 1.4rem; margin: 0.5rem 0; }

/* Colonne de boutons à droite de la recherche (Nouvel étudiant, Retours en retard) */
.toolbar-side { display: flex; flex-direction: column; align-items: stretch; gap: 0.5rem; }
.toolbar .toolbar-side .btn-small { padding: 0.45rem 1rem; font-size: 0.9rem; text-align: center; }
.btn-warning { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74 !important; }
.btn-warning:hover { background: #ffedd5; }
.btn-warning.active { background: #ea580c; color: #fff; border-color: #ea580c !important; }

/* Ascenseur horizontal au-dessus des grands tableaux */
.scroll-top {
  overflow-x: scroll;
  overflow-y: hidden;
  height: 14px;
  margin-bottom: 2px;
  /* Toujours visible (pas d'ascenseur flottant qui n'apparaît qu'au survol) */
  scrollbar-width: auto;
  scrollbar-color: #9aa5b1 #e4e7eb;
}
.scroll-top::-webkit-scrollbar { height: 14px; }
.scroll-top::-webkit-scrollbar-track { background: #e4e7eb; border-radius: 7px; }
.scroll-top::-webkit-scrollbar-thumb { background: #9aa5b1; border-radius: 7px; }
.scroll-top::-webkit-scrollbar-thumb:hover { background: #7b8794; }
.scroll-top > div { height: 1px; }
@media print { .scroll-top { display: none !important; } }

/* Modification directe dans le tableau des fiches */
td.editable { cursor: text; }
td.editable:hover { background: #eff6ff; box-shadow: inset 0 0 0 1px #93c5fd; }
td.editable:focus { outline: 2px solid #2563eb; outline-offset: -2px; }
td.editing { padding: 0.15rem !important; background: #fff; }
.cell-input {
  width: 100%;
  min-width: 5rem;
  padding: 0.3rem 0.4rem;
  font: inherit;
  border: 2px solid #2563eb;
  border-radius: 4px;
  background: #fff;
}
td.saving { opacity: 0.5; }
td.saved { background: #dcfce7 !important; transition: background 0.3s; }
td.error .cell-input { border-color: #dc2626; background: #fef2f2; }
td.editable textarea.cell-input { min-width: 16rem; resize: vertical; }
.cell-edit-hint { margin-left: 0.4rem; color: #9aa5b1; cursor: pointer; font-size: 0.8rem; }
td.editable:hover .cell-edit-hint { color: #2563eb; }

/* Champ mot de passe avec bouton Voir / Masquer */
.password-field { display: flex; gap: 0.5rem; align-items: stretch; }
.password-field input { flex: 1; min-width: 0; }
.form .password-toggle {
  padding: 0 0.9rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  background: #f8fafc;
  color: #334e68;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.form .password-toggle:hover { background: #eff6ff; border-color: #93c5fd; }
.form .password-toggle[aria-pressed="true"] { background: #e0e7ff; }

/* Gestion des mails */
.container:has(.email-field) { max-width: 720px; }
.notice {
  text-align: left;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0 auto 1.25rem;
  max-width: 480px;
  border: 1px solid;
}
.notice p { margin: 0.25rem 0; }
.notice ul { margin: 0.25rem 0; padding-left: 1.25rem; }
.notice .details { margin: 0.5rem 0; }
.notice code { font-size: 1rem; background: #fff; padding: 0.1rem 0.4rem; border-radius: 4px; user-select: all; }
.notice-success { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.notice-warning { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
.notice-error { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }
.email-field { display: flex; align-items: center; gap: 0.4rem; }
.email-field input { flex: 1; min-width: 0; }
.email-field span { color: #52606d; white-space: nowrap; }
.form fieldset:disabled { opacity: 0.6; }
.form-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.form-buttons .btn { flex: 1; }
.form fieldset.stack { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.form fieldset.stack > label:not(.check) { margin-top: 0.3rem; }
.form fieldset.stack .hint { margin-top: -0.35rem; }

/* Impression des tableaux élèves / étudiants */
.print-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.4rem 1rem; text-align: left; }
.print-zones .check { display: flex; gap: 0.4rem; align-items: center; }
.print-zones-all { text-align: left; font-size: 0.9rem; margin: 0.5rem 0 0; }
.print-meta { margin: 0; font-size: 0.85rem; color: #333; }
@media print {
  .container:has(.fiches-table) { padding: 0; }
  .toolbar, .csv-bar, .count, .scroll-top, .filter-row, .row-actions, .footer, .print-actions { display: none !important; }
  .table-wrap { overflow: visible !important; }
  table.fiches-table { font-size: 7.5pt; width: 100%; }
  table.fiches-table th, table.fiches-table td { padding: 2px 4px !important; border: 1px solid #999 !important; background: #fff !important; color: #000 !important; }
  table.fiches-table .group-row th { background: #eee !important; }
  table.fiches-table tr { break-inside: avoid; }
  table.fiches-table td, table.fiches-table th { overflow-wrap: anywhere; }
  table.fiches-table thead { display: table-header-group; }  /* en-têtes répétés sur chaque page */
  td.editable:hover { box-shadow: none; }
}

/* Historique des actions */
.container:has(table.audit) { max-width: 1400px; }
table.audit td { text-align: left; }
.search select { padding: 0.7rem 0.5rem; border: 1px solid #cbd2d9; border-radius: 6px; font-size: 0.95rem; background: #fff; max-width: 220px; }
.audit-action { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: #e4e7eb; font-size: 0.8rem; font-weight: 600; }
.audit-suppression .audit-action, .audit-effacement-du-journal .audit-action { background: #fee2e2; color: #991b1b; }
.audit-création .audit-action, .audit-compte-google-créé .audit-action { background: #dcfce7; color: #166534; }
.audit-modification .audit-action { background: #dbeafe; color: #1e40af; }
.audit-export-csv .audit-action, .audit-import-csv .audit-action { background: #fef3c7; color: #92400e; }
.audit-échec-de-connexion .audit-action, .audit-connexion-bloquée .audit-action { background: #ffedd5; color: #9a3412; }
.pager { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }

/* Bandeau « Actualiser la liste » après une modification directe */
.refresh-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 0.5rem;
  padding: 0.5rem 1rem;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  color: #1e3a8a;
  font-size: 0.9rem;
}
.refresh-bar .btn { border: 0; cursor: pointer; }
@media print { .refresh-bar { display: none !important; } }
