/* ==========================================================================
   Soy Almería — base : typographie, coquille, boutons, utilitaires
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink-soft);
  background: var(--chalk);
  overflow-x: clip;
}

::selection {
  background: var(--navy);
  color: var(--on-navy);
}

/* --- Coquille de composition --------------------------------------------- */

.shell {
  width: min(var(--shell), 100% - 2 * var(--shell-pad));
  margin-inline: auto;
}

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

.display {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}

/* Accent éditorial : un mot-clé du titre bascule en italique terracotta. */
.display em {
  font-style: italic;
  font-weight: 440;
  color: var(--terra);
}

.on-dark .display em,
.cinema .display em,
.final .display em {
  color: var(--terra-light);
}

.display--hero { font-size: var(--display-hero); }
.display--xl { font-size: var(--display-xl); }
.display--lg { font-size: var(--display-lg); }
.display--md { font-size: var(--display-md); }

.lead {
  font-size: var(--text-lead);
  font-weight: 410;
  line-height: 1.65;
  max-width: 34em;
}

.lead strong {
  font-weight: 680;
  color: var(--ink);
}

/* Dans le corps des textes, l'emphase parle la langue des titres :
   italique serif, un cran plus grand, terracotta profond. */
.lead em,
.guide__body em,
.note em,
.iti__desc em,
.practical__col em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.07em;
  color: var(--terra-deep);
}

.on-dark .lead em,
.cinema .lead em {
  color: var(--terra-light);
}

.kicker {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 680;
  font-stretch: 78%;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--terra);
}

/* Couche « méta » : étiquettes d'archive condensées, en cuivre foncé. */
.meta-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 620;
  font-stretch: 80%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper-ink);
}

/* --- Liens et boutons ----------------------------------------------------- */

a {
  text-underline-offset: 0.2em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 1.05em 1.9em;
  font-size: 0.8rem;
  font-weight: 660;
  font-stretch: 84%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out),
    outline-offset 200ms var(--ease-out);
}

.btn--navy {
  background: var(--navy);
  color: var(--on-navy);
}

.btn--navy:hover {
  background: var(--navy-deep);
}

.btn--terra {
  background: var(--terra);
  color: #fbf5e9;
}

.btn--terra:hover {
  background: #93411f;
}

.btn--ghost {
  border: 1px solid currentColor;
  color: var(--on-navy);
  background: transparent;
}

.btn--ghost:hover {
  background: rgb(255 255 255 / 0.08);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8rem;
  font-weight: 660;
  font-stretch: 84%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
}

.link-arrow::after {
  content: '';
  order: 1;
  width: 2.4em;
  height: 1.5px;
  background: currentColor;
  transition: width 250ms var(--ease-out);
}

.link-arrow:hover::after {
  width: 3.2em;
}

.link-arrow .arrow-head {
  order: 2;
  margin-left: -1.05em;
  font-size: 1.2em;
  line-height: 1;
}

.link-arrow:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
  border-radius: 1px;
}

.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: var(--copper-soft);
}

/* --- Utilitaires ----------------------------------------------------------- */

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7em 1.2em;
  background: var(--navy);
  color: var(--on-navy);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-300%);
  transition: transform 200ms var(--ease-out);
}

.skip-link:focus-visible {
  transform: none;
}

/* --- Apparition au défilement ---------------------------------------------
   data-reveal est purement progressif : sans JavaScript ou avec
   prefers-reduced-motion, tout reste visible. */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(1.6rem);
    transition: opacity var(--speed) var(--ease-out), transform var(--speed) var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}
