/* ==========================================================================
   Gestion Lab — Styles de base
   ========================================================================== */

body {
  font-family: var(--gl-font-texte);
  font-size: var(--gl-t-corps);
  line-height: 1.65;
  color: var(--gl-noir);
  -webkit-font-smoothing: antialiased;
}

/* --- Titres ---------------------------------------------------------- */

h1, h2, h3, h4,
.gl-titre {
  font-family: var(--gl-font-display);
  font-variation-settings: 'wdth' 115;
  font-weight: 800;
  letter-spacing: -0.02em;   /* resserré : le mot-symbole est déjà très ouvert */
  line-height: 1.05;
  margin: 0 0 var(--gl-esp-sm);
  text-wrap: balance;
}

h1 { font-size: var(--gl-t-h1); }
h2 { font-size: var(--gl-t-h2); }
h3 { font-size: var(--gl-t-h3); font-weight: 700; line-height: 1.2; }

/* Repli si la police variable n'est pas chargée */
@supports not (font-variation-settings: 'wdth' 115) {
  h1, h2, h3, h4, .gl-titre { letter-spacing: 0; }
}

/* --- Surtitre monospace ----------------------------------------------
   L'accessoire signature. Fragments courts, majuscules, jamais du texte
   courant ni un titre. Voir la note du plan sur la retenue. */

.gl-surtitre {
  display: inline-block;
  font-family: var(--gl-font-mono);
  font-size: var(--gl-t-mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gl-or-texte);
  margin-bottom: var(--gl-esp-sm);
}

.gl-section--sombre .gl-surtitre { color: var(--gl-or); }

/* --- Sections --------------------------------------------------------- */

.gl-section {
  padding-block: var(--gl-esp-xl);
}

.gl-section--sombre {
  background: var(--gl-noir);
  color: var(--gl-blanc);
}

.gl-section--sombre h1,
.gl-section--sombre h2,
.gl-section--sombre h3 { color: var(--gl-blanc); }

.gl-contenu {
  max-width: var(--gl-largeur-max);
  margin-inline: auto;
  padding-inline: var(--gl-esp-md);
}

/* --- Texte en dégradé -------------------------------------------------
   Réservé aux mots-clés d'un H1 ou H2, sur fond foncé uniquement. */

.gl-degrade-texte {
  background: var(--gl-degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Boutons ---------------------------------------------------------- */

.gl-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gl-esp-xs);
  font-family: var(--gl-font-texte);
  font-size: var(--gl-t-petit);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.85rem;
  border: 1px solid transparent;
  border-radius: var(--gl-rayon);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--gl-transition),
              background-color var(--gl-transition),
              border-color var(--gl-transition);
}

.gl-btn--or {
  background: var(--gl-degrade);
  color: var(--gl-noir);
}

.gl-btn--or:hover,
.gl-btn--or:focus-visible { transform: translateY(-2px); }

.gl-btn--contour {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--gl-blanc);
}

.gl-btn--contour:hover,
.gl-btn--contour:focus-visible {
  border-color: var(--gl-or);
  color: var(--gl-or);
}

/* Fond clair : le contour passe en noir */
.gl-section:not(.gl-section--sombre) .gl-btn--contour {
  border-color: var(--gl-gris-200);
  color: var(--gl-noir);
}

/* --- Plancher de qualité ---------------------------------------------- */

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--gl-or);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
