/* ==========================================================================
   REGALITO — RESET, ÉLÉMENTS DE BASE & UTILITAIRES
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Décale les ancres pour qu'elles ne passent ni sous l'en-tête fixe,
     ni sous la sous-navigation collante de la carte. */
  scroll-padding-top: calc(var(--header-h-scrolled) + var(--menu-nav-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--text-on-light);
  background: var(--cream-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-optical-sizing: auto;
}

/* Empêche le défilement de l'arrière-plan quand un panneau est ouvert */
body.is-locked {
  overflow: hidden;
}

/* L'attribut HTML `hidden` doit toujours l'emporter.
   Sans cette règle, n'importe quel `display: flex/grid/block` posé par une
   classe est plus spécifique que le `display: none` du navigateur, et
   l'élément reste visible alors que le JavaScript le croit masqué. */
[hidden] {
  display: none !important;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
}

figure {
  margin: 0;
}

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

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* La bibliothèque d'icônes ne doit rien occuper à l'écran */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Toutes les icônes <use> héritent de la couleur du texte */
svg use {
  color: inherit;
}

/* --------------------------------------------------------------------------
   TITRES
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-display);
  margin: 0;
  text-wrap: balance;
}

.h2 {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
}

.h2 em,
.h3 em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-500);
  display: block;
}

/* Sur fond clair, l'or doit être plus foncé pour rester lisible */
.on-light .h2 em,
.on-alt .h2 em {
  color: var(--gold-600);
}

/* --------------------------------------------------------------------------
   TEXTE COURANT
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}

.on-light .eyebrow,
.on-alt .eyebrow {
  color: var(--gold-600);
}

.lede {
  font-size: var(--fs-lg);
  color: var(--fg-soft);
  max-width: var(--measure);
  text-wrap: pretty;
}

.section-note {
  margin-top: var(--space-8);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--fg-faint);
}

/* --------------------------------------------------------------------------
   MISE EN PAGE
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6) var(--space-8);
  flex-wrap: wrap;
  margin-bottom: var(--space-9);
}

.section-head .lede {
  padding-bottom: 0.35em;
}

.section-head--center {
  justify-content: center;
  text-align: center;
}

.section-head--center > div {
  max-width: 60ch;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head--center .eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}

.section-head--center .lede {
  margin-inline: auto;
  margin-top: var(--space-4);
}

@media (max-width: 720px) {
  .section-head {
    margin-bottom: var(--space-7);
  }
}

/* --------------------------------------------------------------------------
   ACCESSIBILITÉ
   -------------------------------------------------------------------------- */

/* Anneau de focus visible uniquement au clavier */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Lien « aller au contenu » — apparaît à la première tabulation */
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--ink-900);
  color: var(--text-on-dark);
  border-radius: var(--r-pill);
  font-size: var(--fs-base);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Réservé aux lecteurs d'écran */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   SÉLECTION DE TEXTE
   -------------------------------------------------------------------------- */
::selection {
  background: var(--gold-500);
  color: var(--ink-900);
}

/* --------------------------------------------------------------------------
   BARRE DE DÉFILEMENT (navigateurs de bureau)
   -------------------------------------------------------------------------- */
@media (pointer: fine) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-400) transparent;
  }
}
