/* Style « macOS » de toute l'application (demande du 20/11/2026), couleurs ardoise et doré conservées, mode clair.
   Chargé en dernier : formes du Mac (pastille de sélection, boutons poussoirs, champs avec halo, listes à lignes
   alternées, fenêtres sur fond flouté, barres de défilement fines). Écran seulement : les impressions ne changent pas. */
@media screen {
  :root {
    --mac-fond: #f2f2f4;
    --mac-carte: #ffffff;
    --mac-trait: rgba(0, 0, 0, .09);
    --mac-trait-fort: rgba(0, 0, 0, .16);
    --mac-texte-2: #6e6e73;
    --mac-zebre: #f7f7f9;
    --mac-survol: rgba(58, 69, 75, .06);
    --mac-halo: 0 0 0 3.5px rgba(249, 191, 59, .45);
    --mac-ombre: 0 0 0 .5px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .06);
  }
  body { background: var(--mac-fond); }

  /* --- Barre latérale : sélection en pastille dorée, comme le Finder --- */
  .sidebar .nav-link { border-radius: 8px; padding-top: 7px; padding-bottom: 7px; margin: 1px 0; font-weight: 500; }
  .sidebar .nav-link:hover { background: rgba(255, 255, 255, .08); }
  .sidebar .nav-link.active, .gs-menu-mobile .sidebar .nav-link.active {
    background: var(--or, #f9bf3b); color: var(--ardoise-fonce, #2f383d); box-shadow: none; font-weight: 650;
  }
  .sidebar nav p { font-size: 11px; font-weight: 650; letter-spacing: .02em; text-transform: none; color: rgba(255, 255, 255, .5); margin-left: 12px; }
  .sidebar .user { border-radius: 12px; background: rgba(0, 0, 0, .18); }

  /* --- Titres « grand titre » --- */
  main h1 { font-size: 1.85rem; letter-spacing: -.025em; font-weight: 700; }
  .card h2, .modal-head h2 { letter-spacing: -.01em; }

  /* --- Boutons poussoirs --- */
  button.primary, button.secondary, a.primary, a.secondary, .gs-relance-bouton {
    border-radius: 8px; font-weight: 550; font-size: 13px; min-height: 30px; padding: 6px 14px; line-height: 1.25;
  }
  .primary { background: var(--ardoise, #3a454b); color: #fff; border: 0; box-shadow: 0 .5px 0 rgba(0, 0, 0, .2), inset 0 .5px 0 rgba(255, 255, 255, .12); }
  .primary:hover { background: var(--ardoise-fonce, #2f383d); }
  .secondary { background: #fff; color: #1d1d1f; border: .5px solid var(--mac-trait-fort); box-shadow: 0 .5px 1.5px rgba(0, 0, 0, .1); }
  .secondary:hover { background: #fafafa; border-color: var(--mac-trait-fort); }
  .text-button { color: #8a6300; font-weight: 550; border-radius: 6px; }
  .text-button:hover { background: rgba(249, 191, 59, .14); }
  button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: none; box-shadow: var(--mac-halo); }

  /* --- Champs, listes déroulantes, zones de texte --- */
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
    border-radius: 8px; border: .5px solid var(--mac-trait-fort); background: #fff; color: #1d1d1f;
    box-shadow: inset 0 .5px 1px rgba(0, 0, 0, .06); transition: box-shadow 140ms ease-out, border-color 140ms ease-out;
  }
  input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none; border-color: #c58608; box-shadow: var(--mac-halo);
  }
  input::placeholder, textarea::placeholder { color: #a1a1a6; }
  input[type="checkbox"], input[type="radio"] { accent-color: var(--ardoise, #3a454b); }
  /* Champ de recherche de l'en-tête : style « barre d'outils » (gris clair, arrondi). */
  #gs-recherche-champ, header input[type="search"] { background: #e9e9ec; border-color: transparent; box-shadow: none; }
  #gs-recherche-champ:focus, header input[type="search"]:focus { background: #fff; }

  /* --- Cartes --- */
  .card, .metrics article, .empty, #gs-plus-details { border-radius: 14px; border: 0; box-shadow: var(--mac-ombre); background: var(--mac-carte); }
  .card-title { border-bottom-color: var(--mac-trait); }

  /* --- Tableaux : listes du Mac (en-tête discret, lignes alternées, pas de traits) --- */
  table { border-collapse: separate; border-spacing: 0; }
  th { background: #fff; color: var(--mac-texte-2); font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0;
    border-bottom: .5px solid var(--mac-trait-fort); }
  td { border-bottom: 0; color: #1d1d1f; }
  tbody tr:nth-child(even) td { background: var(--mac-zebre); }
  tbody tr:hover td { background: var(--mac-survol); }
  tbody tr td:first-child { border-top-left-radius: 7px; border-bottom-left-radius: 7px; }
  tbody tr td:last-child { border-top-right-radius: 7px; border-bottom-right-radius: 7px; }
  .gs-mois-table td, .gs-mois-table tbody tr:nth-child(even) td { background: transparent; border-radius: 0; }

  /* Matricule et classe sur une seule ligne dans la liste des élèves. */
  #students-body td:first-child, #students-body td:nth-child(3), #payment-status-body td:first-child, #payment-status-body td:nth-child(3) { white-space: nowrap; }
  /* Intitulés des champs : encre du Mac. */
  label { color: #3a3a3c; }

  /* --- Étiquettes en pastilles --- */
  .tag { border-radius: 999px; padding: 2px 9px; font-weight: 600; font-size: 11.5px; }

  /* --- Fenêtres : feuille posée sur un fond flouté --- */
  dialog, .modal-box { border-radius: 14px; border: 0; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 22px 70px rgba(0, 0, 0, .3); }
  dialog::backdrop { background: rgba(30, 30, 35, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .modal.open { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .modal-actions { gap: 8px; }

  /* --- Barres de défilement fines --- */
  * { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .28) transparent; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .25); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
  ::-webkit-scrollbar-thumb:hover { background-color: rgba(0, 0, 0, .4); }
  ::-webkit-scrollbar-track { background: transparent; }
  .sidebar ::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .25); }

  @media (prefers-reduced-transparency: reduce) { dialog::backdrop, .modal.open { -webkit-backdrop-filter: none; backdrop-filter: none; } }
  @media (prefers-contrast: more) { .secondary, input, select, textarea { border-color: #6e6e73; } tbody tr:nth-child(even) td { background: #eeeef1; } }
}
