/* ==========================================================================
   Base + composants communs
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-height);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

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

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

/* ---- Lien d'évitement ---- */
.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-foreground);
  color: var(--color-background);
  font-size: var(--fs-small);
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ---- Typographie ---- */
.t-signature {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-signature);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-transform: lowercase;
}

.t-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: var(--lh-title);
  letter-spacing: var(--tracking-title);
}

.t-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.t-lead {
  font-size: var(--fs-lead);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.t-label {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.t-muted { color: var(--color-text-muted); }

/* ---- Lien éditorial (soulignement animé) ---- */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  color: var(--color-text);
  padding-block: 0.15em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size var(--dur-base) var(--ease-out), color var(--dur-fast);
}
.link:hover { color: var(--color-forest); background-size: 0 1px; background-position: 100% 100%; }
/* ---- Flèches : une seule icône (même trait), orientée par modificateur ---- */
.arrow {
  display: inline-block;
  flex: none;
  width: 0.95em;
  height: 0.95em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v17M5.5 14l6.5 6.5 6.5-6.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v17M5.5 14l6.5 6.5 6.5-6.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: translate var(--dur-base) var(--ease-out);
}
.arrow--down { transform: none; }
.arrow--right { transform: rotate(-90deg); }
.arrow--left { transform: rotate(90deg); }
.arrow--up-right { transform: rotate(-135deg); }
.link:hover .arrow--down { translate: 0 3px; }
.link:hover .arrow--right { translate: 3px 0; }
.link:hover .arrow--up-right { translate: 2px -2px; }

/* ---- En-tête ---- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--page-margin);
}
/* Fond flou sur un calque à part : posé sur l'en-tête lui-même, le flou enfermerait
   le menu mobile (position fixe) dans la hauteur de l'en-tête, sans fond lisible. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(240 240 240 / 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  white-space: nowrap;
}



.site-nav ul {
  display: flex;
  gap: clamp(1rem, 2.2vw, 2.25rem);
}

.site-nav a {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 500;
  padding-block: var(--space-2);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.2rem;
  height: 1px;
  background: var(--color-forest);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}
.site-nav a:hover::after,
.site-nav a[aria-current='true']::after { transform: scaleX(1); transform-origin: left; }
.site-nav a[aria-current='true'] { color: var(--color-forest); }

.menu-toggle {
  display: none;
  font: 500 var(--fs-small) / 1 var(--font-body);
  color: inherit;
  background: none;
  border: 0;
  padding: var(--space-3) 0 var(--space-3) var(--space-3);
  cursor: pointer;
}

@media (max-width: 767px) {
  .menu-toggle { display: inline-flex; gap: var(--space-2); align-items: center; }
  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    padding: var(--space-6) var(--page-margin);
    background: var(--color-background);
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
  }
  .site-nav[data-open='true'] {
    visibility: visible;
    opacity: 1;
    transition: opacity var(--dur-base) var(--ease-out);
  }
  .site-nav ul { flex-direction: column; gap: var(--space-2); }
  .site-nav a {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.25rem, 11vw, 3.5rem);
    letter-spacing: var(--tracking-title);
    line-height: 1.1;
  }
  .site-nav a::after { display: none; }
}

