/* Socle des maquettes GarageBook : styles par défaut des classes gb- (contrat README.md §9). À charger APRÈS
   tokens.css. Chaque design peut surcharger ces classes dans son propre fichier ; il ne les renomme pas.
   Identité de l'appli : fond gris clair, cartes blanches, orange #e8590c pour l'action principale, police système.

   Classes (contrat) : connexion §3, .gb-bouton(--principal, --secondaire), .gb-lien, .gb-pastille(--retard,
   --bientot, --ajour), .gb-tableau, .gb-infobulle, .gb-graphique (et ses parties), .gb-visuellement-cache,
   .gb-sans-impression.
   En plus, utilisables par les designs : .gb-carte, .gb-nombre (chiffres alignés à droite), .gb-chiffres
   (chiffres tabulaires), .gb-fort, .gb-discret, .gb-tableau-defile (conteneur qui fait défiler un tableau en
   gardant l'en-tête collé), .gb-legende, .gb-etincelle. */

/* ------------------------------ Remise à zéro légère ------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--gb-fond);
  color: var(--gb-texte);
  font-family: var(--gb-police);
  font-size: 16px;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 0 0 var(--gb-espace-3);
}

h1 { font-size: 1.625rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }

p { margin: 0 0 var(--gb-espace-2); }

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--gb-lien);
}

:focus-visible {
  outline: 3px solid var(--gb-focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.gb-visuellement-cache {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Une <table> ignore width et overflow : en bloc, elle se laisse réduire à 1 px (sinon elle élargissait la page). */
table.gb-visuellement-cache {
  display: block !important;
}

/* ------------------------------ Petits outils ------------------------------ */

.gb-carte {
  background: var(--gb-carte);
  border: 1px solid var(--gb-ligne);
  border-radius: var(--gb-rayon);
  box-shadow: var(--gb-ombre);
  padding: var(--gb-espace-4);
}

.gb-chiffres,
.gb-nombre {
  font-family: var(--gb-police-chiffres);
  font-variant-numeric: tabular-nums;
}

.gb-nombre { text-align: right; white-space: nowrap; }
.gb-fort { font-weight: 700; }
.gb-discret { color: var(--gb-discret); }

/* ------------------------------ Boutons et liens ------------------------------ */

.gb-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gb-espace-2);
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--gb-ligne-champ);
  background: var(--gb-carte);
  color: var(--gb-texte);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.gb-bouton:hover { border-color: var(--gb-texte); }
.gb-bouton:disabled,
.gb-bouton[aria-disabled="true"] { opacity: 0.6; cursor: progress; }

/* Blanc sur l'orange vif : 3,58:1. En gras de 19 px (« grand texte » WCAG), le seuil AA est 3:1. */
.gb-bouton--principal {
  background: var(--gb-principal);
  border-color: var(--gb-principal);
  color: var(--gb-principal-texte);
  font-size: 1.1875rem;
  font-weight: 700;
}

.gb-bouton--principal:hover { border-color: var(--gb-principal); filter: brightness(0.94); }

.gb-bouton--secondaire {
  background: var(--gb-carte);
  border-color: var(--gb-ligne-champ);
  color: var(--gb-texte);
}

.gb-lien {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--gb-lien);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.gb-lien:hover { text-decoration-thickness: 2px; }

/* ------------------------------ Connexion (§3) ------------------------------ */

.gb-connexion {
  max-width: 560px;
  margin: var(--gb-espace-6) auto;
  padding: var(--gb-espace-5);
  background: var(--gb-carte);
  border: 1px solid var(--gb-ligne);
  border-radius: var(--gb-rayon);
  box-shadow: var(--gb-ombre);
}

.gb-connexion-titre {
  font-size: 1.5rem;
  margin: 0 0 var(--gb-espace-4);
}

.gb-onglets {
  display: flex;
  gap: var(--gb-espace-1);
  margin: 0 0 var(--gb-espace-4);
  border-bottom: 1px solid var(--gb-ligne);
}

.gb-onglet {
  flex: 1 1 0;
  min-height: 44px;
  padding: var(--gb-espace-2) var(--gb-espace-3);
  margin-bottom: -1px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--gb-discret);
  font-weight: 600;
  cursor: pointer;
}

.gb-onglet:hover { color: var(--gb-texte); }

.gb-onglet[aria-selected="true"] {
  color: var(--gb-lien);
  border-bottom-color: var(--gb-principal);
}

.gb-panneau { padding-top: var(--gb-espace-1); }

.gb-champ {
  display: block;
  margin: 0 0 var(--gb-espace-4);
}

.gb-champ label,
.gb-champ > span:first-child {
  display: block;
  font-weight: 600;
  margin-bottom: var(--gb-espace-1);
}

.gb-champ input,
.gb-champ select,
.gb-champ textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--gb-ligne-champ);
  border-radius: var(--gb-rayon-petit);
  background: var(--gb-carte);
  color: var(--gb-texte);
}

.gb-champ input[type="checkbox"] {
  display: inline-block;
  width: 18px;
  min-height: 0;
  height: 18px;
  accent-color: var(--gb-principal);
}

.gb-aide {
  margin: var(--gb-espace-1) 0 0;
  color: var(--gb-discret);
  font-size: 0.875rem;
}

.gb-statut {
  min-height: 1.5em;
  margin: var(--gb-espace-3) 0 0;
}

.gb-statut--erreur { color: var(--gb-danger); font-weight: 600; }
.gb-statut--info { color: var(--gb-discret); }
.gb-statut--ok { color: var(--gb-ok); font-weight: 600; }

.gb-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  margin: var(--gb-espace-3) auto;
  padding: var(--gb-espace-3);
  max-width: 300px;
  background: #ffffff; /* un QR code se lit en sombre sur clair, même en thème sombre */
  color: #000000;
  border-radius: var(--gb-rayon-petit);
}

.gb-qr svg {
  display: block;
  width: 260px;
  height: auto;
  max-width: 100%;
}

.gb-code4 {
  margin: var(--gb-espace-2) 0;
  font-family: var(--gb-police-chiffres);
  font-variant-numeric: tabular-nums;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
}

.gb-etapes {
  margin: var(--gb-espace-3) 0;
  padding-left: 1.5em;
}

.gb-etapes li { margin: var(--gb-espace-1) 0; }

.gb-note {
  color: var(--gb-discret);
  font-size: 0.875rem;
}

.gb-encadre {
  margin: var(--gb-espace-3) 0;
  padding: var(--gb-espace-3) var(--gb-espace-4);
  border-radius: var(--gb-rayon-petit);
  background: var(--gb-surface);
  border: 1px solid var(--gb-ligne);
}

.gb-encadre--attention {
  background: var(--gb-bientot-fond);
  color: var(--gb-bientot-texte);
  border-color: transparent;
  border-left: 4px solid var(--gb-attention);
}

/* Connexion « grand écran » (option `large` de creerConnexion) : deux colonnes sur toute la page dès 900 px, une
   seule au téléphone (le QR code reste visible sans défiler). Le QR code a sa propre petite carte claire arrondie
   (sa marge de lecture) ; jamais de grand fond blanc autour d'un bouton. Chaque design en règle les couleurs. */

.gb-connexion--large {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr); /* une colonne : la marque en haut, le geste prend le reste */
}

.gb-connexion-geste {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gb-espace-5) var(--gb-espace-4);
}

.gb-connexion-corps { width: 100%; max-width: 54rem; }
.gb-connexion--large .gb-connexion-titre:focus { outline: none; } /* titre focalisé par programme, jamais au clavier */
.gb-connexion--large .gb-connexion-titre { font-size: 2rem; line-height: 1.15; }

/* Les deux façons de se connecter, sans onglets : téléphone, « ou », mot de passe. L'une sous l'autre jusqu'à
   1024 px, côte à côte au-delà (« ou » devient un filet vertical). */
.gb-facon-titre { margin: 0 0 var(--gb-espace-3); font-size: 1rem; font-weight: 700; }
.gb-facon--mdp { max-width: 26rem; padding: var(--gb-espace-4); border: 1px solid var(--gb-ligne); border-radius: 16px; }
.gb-facon--mdp .gb-champ { margin-bottom: var(--gb-espace-3); }
.gb-facon--mdp .gb-bouton--principal { width: 100%; }
.gb-facon--mdp form > p:last-child { margin: var(--gb-espace-2) 0 0; }
.gb-facon--mdp .gb-statut:empty { min-height: 0; margin: 0; }
.gb-facon--mdp .gb-lien { display: inline-flex; align-items: center; min-height: 44px; }

.gb-ou {
  display: flex;
  align-items: center;
  gap: var(--gb-espace-3);
  margin: var(--gb-espace-4) 0;
  color: var(--gb-discret);
  font-size: 0.875rem;
}

.gb-ou::before,
.gb-ou::after { content: ''; flex: 1; height: 1px; background: var(--gb-ligne); }

.gb-qr-ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gb-espace-4) var(--gb-espace-5);
}

.gb-qr-visuel {
  flex: none;
  width: clamp(15rem, 21vw, 28rem);
  max-width: 100%;
  aspect-ratio: 1;
}

.gb-connexion--large .gb-qr {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: var(--gb-espace-4);
  background: none;
  color: inherit;
  border: 2px dashed var(--gb-ligne);
  border-radius: 16px;
  text-align: center;
}

.gb-connexion--large .gb-qr:has(svg) { padding: 0; border: 0; }
.gb-connexion--large .gb-qr svg { width: 100%; height: 100%; border-radius: 16px; }

.gb-connexion--large .gb-qr-visuel .gb-encadre {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.gb-code4-libelle { margin: 0; font-weight: 600; }
.gb-connexion--large .gb-code4 { font-size: clamp(3rem, 5vw, 4.5rem); margin: var(--gb-espace-2) 0; }

.gb-etapes--courtes { flex: 1 1 13rem; margin: 0; font-size: 1.0625rem; }
.gb-etapes--courtes li { margin: 0 0 var(--gb-espace-3); padding-left: var(--gb-espace-1); }

.gb-dev-coin {
  position: fixed;
  right: var(--gb-espace-4);
  bottom: var(--gb-espace-4);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 2px 2px var(--gb-espace-2);
  border: 1px dashed var(--gb-ligne-champ);
  border-radius: 999px;
  background: var(--gb-carte);
  color: var(--gb-discret);
  font-size: 0.8125rem;
}

.gb-dev-bouton {
  min-height: 44px;
  padding: 0 var(--gb-espace-3);
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.gb-dev-bouton:hover { color: var(--gb-texte); background: var(--gb-surface); }

.gb-dev-etiquette {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gb-surface);
  color: var(--gb-texte);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 56.25em) {
  .gb-connexion--large { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-rows: minmax(0, 1fr); }
  .gb-connexion-geste { padding: var(--gb-espace-6) var(--gb-espace-5) 5rem; } /* 5rem en bas : rien sous le bouton Dev du coin */
}

@media (min-width: 64em) {
  .gb-facons { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(16rem, 20rem); align-items: start; gap: 0 var(--gb-espace-5); }
  .gb-facon--telephone .gb-qr-ligne { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; }
  .gb-facon--telephone .gb-etapes--courtes { flex: none; font-size: 1rem; }
  .gb-qr-visuel { width: clamp(13rem, 17vw, 24rem); }
  .gb-facon--mdp { max-width: none; margin-top: calc(1.5rem + var(--gb-espace-3)); } /* aligné sur le haut du QR code */
  .gb-ou { flex-direction: column; align-self: stretch; margin: 0; }
  .gb-ou::before,
  .gb-ou::after { width: 1px; height: auto; }
}

@media (max-width: 39.99em) {
  .gb-connexion--large .gb-connexion-titre { font-size: 1.5rem; }
  .gb-qr-ligne { flex-direction: column; align-items: stretch; }
  .gb-qr-visuel { width: min(100%, 18rem); margin: 0 auto; }
  .gb-etapes--courtes { flex: none; }
  /* Au téléphone, le bouton Dev ne flotte pas sur le formulaire : il se range en bas de page. */
  .gb-dev-coin { position: static; margin: var(--gb-espace-4) 0 0 auto; display: flex; flex-wrap: wrap; width: max-content; max-width: 100%; }
}

/* ------------------------------ Pastilles d'échéance ------------------------------ */
/* Tons doux de l'export tableur. Le mot (« En retard », « Bientôt », « À jour ») porte l'information ;
   le petit rond devant est un repère de plus, jamais la couleur seule. */

.gb-pastille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: var(--gb-surface);
  color: var(--gb-texte);
  border: 1px solid var(--gb-ligne);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.gb-pastille::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.gb-pastille--retard { background: var(--gb-retard-fond); color: var(--gb-retard-texte); border-color: transparent; }
.gb-pastille--bientot { background: var(--gb-bientot-fond); color: var(--gb-bientot-texte); border-color: transparent; }
.gb-pastille--ajour { background: var(--gb-ajour-fond); color: var(--gb-ajour-texte); border-color: transparent; }

/* ------------------------------ Tableaux ------------------------------ */

.gb-tableau-defile {
  position: relative; /* contient les textes cachés en position absolue des en-têtes */
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--gb-ligne);
  border-radius: var(--gb-rayon-petit);
  background: var(--gb-carte);
}

.gb-tableau {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--gb-carte);
  font-size: 0.9375rem;
}

.gb-tableau caption {
  text-align: left;
  font-weight: 600;
  padding: 0 0 var(--gb-espace-2);
}

.gb-tableau th,
.gb-tableau td {
  padding: var(--gb-espace-2) var(--gb-espace-3);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--gb-ligne);
}

.gb-tableau thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--gb-surface);
  color: var(--gb-discret);
  font-size: 0.8125rem;
  font-weight: 700;
  border-bottom: 1px solid var(--gb-ligne-champ);
  white-space: nowrap;
}

.gb-tableau tbody th { font-weight: 600; }
.gb-tableau tbody tr:nth-child(even) > * { background: var(--gb-surface); }
.gb-tableau tbody tr:hover > * { background: var(--gb-principal-doux); }

.gb-tableau .gb-nombre,
.gb-tableau td.gb-nombre,
.gb-tableau th.gb-nombre {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gb-tableau tfoot td,
.gb-tableau tfoot th {
  font-weight: 700;
  border-top: 1px solid var(--gb-ligne-champ);
  border-bottom: 0;
}

/* ------------------------------ Infobulle ------------------------------ */

.gb-infobulle {
  position: absolute;
  z-index: 10;
  left: 0;
  top: 0;
  max-width: 280px;
  padding: var(--gb-espace-2) var(--gb-espace-3);
  background: var(--gb-carte);
  color: var(--gb-texte);
  border: 1px solid var(--gb-ligne-champ);
  border-radius: var(--gb-rayon-petit);
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.16);
  font-size: 0.8125rem;
  line-height: 1.4;
  pointer-events: none;
}

.gb-infobulle-valeur {
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gb-infobulle-libelle { color: var(--gb-texte); }
.gb-infobulle-detail { color: var(--gb-discret); }

.gb-infobulle-liste {
  list-style: none;
  margin: var(--gb-espace-1) 0 0;
  padding: var(--gb-espace-1) 0 0;
  border-top: 1px solid var(--gb-ligne);
}

.gb-infobulle-liste li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 6px;
}

.gb-infobulle-liste strong {
  font-variant-numeric: tabular-nums;
  padding-left: var(--gb-espace-3);
}

/* ------------------------------ Graphiques ------------------------------ */

.gb-graphique {
  position: relative; /* contient la table cachée équivalente */
  margin: 0;
  min-width: 0;
}

.gb-graphique-titre {
  font-weight: 600;
  margin: 0 0 var(--gb-espace-2);
}

.gb-graphique-cadre {
  position: relative;
  min-width: 0;
}

.gb-graphique-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--gb-police-chiffres);
  font-variant-numeric: tabular-nums;
}

.gb-graphique-vide {
  margin: 0;
  padding: var(--gb-espace-5) var(--gb-espace-3);
  color: var(--gb-discret);
  text-align: center;
  border: 1px dashed var(--gb-ligne-champ);
  border-radius: var(--gb-rayon-petit);
}

.gb-grille-ligne { stroke: var(--gb-ligne); stroke-width: 1; }
.gb-axe-base { stroke: var(--gb-ligne-champ); stroke-width: 1; }
.gb-axe-texte { fill: var(--gb-discret); font-size: 12px; }
.gb-axe-texte.gb-fort { fill: var(--gb-texte); }
.gb-valeur { fill: var(--gb-texte); font-size: 12px; font-weight: 600; }

.gb-barre { fill: var(--gb-cat-1); }
.gb-barre.gb-actif,
.gb-colonne.gb-actif .gb-barre,
.gb-secteur.gb-actif { filter: brightness(1.12) saturate(1.05); }

/* Zones de survol et de focus (plus grandes que la marque) */
.gb-cible { fill: transparent; outline: none; }
rect.gb-cible:hover,
rect.gb-cible.gb-marque:focus-visible { fill: var(--gb-texte); fill-opacity: 0.05; }
.gb-cible:focus-visible { stroke: var(--gb-focus); stroke-width: 2; }
.gb-secteur.gb-cible:focus-visible { stroke: var(--gb-focus); stroke-width: 3; }
.gb-zone-survol { fill: transparent; }

.gb-ligne-courbe {
  fill: none;
  stroke: var(--gb-cat-1);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.gb-aire { fill: var(--gb-cat-1); fill-opacity: 0.1; stroke: none; }

.gb-point {
  fill: var(--gb-cat-1);
  stroke: var(--gb-carte);
  stroke-width: 2;
}

.gb-point--discret { opacity: 0; }
.gb-point.gb-actif { opacity: 1; r: 6px; }

.gb-reticule { stroke: var(--gb-ligne-champ); stroke-width: 1; pointer-events: none; }

.gb-anneau-fond { fill: none; stroke: var(--gb-surface); }
.gb-secteur { stroke: none; }
.gb-anneau-centre { fill: var(--gb-texte); font-size: 20px; font-weight: 700; }
.gb-anneau-centre-2 { fill: var(--gb-discret); font-size: 12px; }

.gb-graphique--anneau-avec-legende {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  column-gap: var(--gb-espace-5);
  align-items: center;
}

.gb-graphique--anneau-avec-legende > .gb-graphique-titre,
.gb-graphique--anneau-avec-legende > table { grid-column: 1 / -1; }

@media (max-width: 520px) {
  .gb-graphique--anneau-avec-legende { grid-template-columns: minmax(0, 1fr); }
  .gb-anneau-cadre { max-width: 220px; margin: 0 auto; }
}

/* Légendes */
.gb-legende {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gb-espace-1) var(--gb-espace-4);
  list-style: none;
  margin: var(--gb-espace-2) 0 0;
  padding: 0;
  color: var(--gb-discret);
  font-size: 0.8125rem;
}

.gb-legende li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gb-legende-pastille { flex: none; }
.gb-pastille-trait { stroke-width: 3; stroke-linecap: round; }

.gb-legende--valeurs {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto auto;
  gap: var(--gb-espace-1) var(--gb-espace-2);
  align-items: center;
  margin: 0;
  color: var(--gb-texte);
  font-size: 0.875rem;
}

.gb-legende--valeurs li { display: contents; }
.gb-legende-valeur,
.gb-legende-part { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gb-legende-part { color: var(--gb-discret); min-width: 3.5em; }
.gb-legende--nulle .gb-legende-nom,
.gb-legende--nulle .gb-legende-valeur { color: var(--gb-discret); }

.gb-graphique-table { margin-top: var(--gb-espace-3); }

/* Étincelle */
.gb-etincelle { display: inline-block; vertical-align: middle; line-height: 0; }
.gb-etincelle-svg { display: block; overflow: visible; }
.gb-etincelle-ligne { fill: none; stroke: var(--gb-discret); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.gb-etincelle-point { fill: var(--gb-principal); stroke: var(--gb-carte); stroke-width: 1.5; }

/* Mouvements doux, seulement si la personne ne les a pas désactivés */
@media (prefers-reduced-motion: no-preference) {
  .gb-bouton,
  .gb-onglet,
  .gb-barre,
  .gb-secteur,
  .gb-point { transition: filter 120ms ease, opacity 120ms ease, border-color 120ms ease, color 120ms ease; }
}

/* Mode contraste forcé de Windows : les marques gardent un contour lisible */
@media (forced-colors: active) {
  .gb-barre,
  .gb-secteur,
  .gb-point { stroke: CanvasText; stroke-width: 1; }
  .gb-pastille { border: 1px solid CanvasText; }
}

/* ------------------------------ Impression ------------------------------ */

@media print {
  /* Couleurs du thème clair, même si l'écran est en sombre */
  :root:root:root {
    color-scheme: light;
    --gb-fond: #ffffff;
    --gb-carte: #ffffff;
    --gb-surface: #f7f8fa;
    --gb-texte: #000000;
    --gb-discret: #4a515c;
    --gb-ligne: #d5d9de;
    --gb-ligne-champ: #878e99;
    --gb-lien: #000000;
    --gb-principal-doux: #fdebdd;
    --gb-danger: #c92a2a;
    --gb-attention: #a85d00;
    --gb-ok: #2b7a3b;
    --gb-info: #1d4e78;
    --gb-retard-fond: #fbeaea;
    --gb-retard-texte: #8a3b3b;
    --gb-bientot-fond: #fdf3e1;
    --gb-bientot-texte: #7a5a1e;
    --gb-ajour-fond: #eaf4ec;
    --gb-ajour-texte: #2f5e3a;
    --gb-cat-1: #2a67bd;
    --gb-cat-2: #c1313c;
    --gb-cat-3: #7945ab;
    --gb-cat-4: #006776;
    --gb-cat-5: #638922;
    --gb-cat-6: #85491a;
    --gb-cat-7: #5b5abc;
    --gb-cat-8: #af3b85;
    --gb-cat-9: #a58108;
    --gb-cat-10: #23723b;
    --gb-cat-11: #005b95;
    --gb-cat-12: #7e848a;
    --gb-ombre: none;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .gb-sans-impression,
  .gb-bouton,
  .gb-onglets,
  .gb-infobulle,
  button {
    display: none !important;
  }

  a,
  .gb-lien {
    color: inherit;
    text-decoration: none;
  }

  .gb-carte,
  .gb-connexion {
    box-shadow: none;
    border-color: #d5d9de;
  }

  .gb-graphique,
  .gb-carte,
  .gb-tableau tr {
    break-inside: avoid;
  }

  .gb-graphique,
  .gb-pastille,
  .gb-tableau {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .gb-tableau-defile {
    overflow: visible;
    max-height: none;
    border: 0;
  }

  .gb-tableau thead { display: table-header-group; }
  .gb-tableau thead th { position: static; }
  .gb-point--discret { opacity: 0; }
  .gb-reticule { visibility: hidden; }
}
