/* Aurion Technologie — site société
 * Direction : index éditorial. Les produits sont des entrées numérotées,
 * pas des cartes. Voir docs/design.md.
 *
 * Aucun JS : l'entrée est une animation CSS au chargement, en fill-mode
 * `both`. Si les animations ne tournent pas, tout reste visible.
 */

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

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

body {
  font-family: var(--text);
  font-size: clamp(16px, 0.55vw + 14.4px, 17.5px);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Grain : atmosphère plutôt qu'aplat. Très faible, non interactif. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

.shell {
  width: 100%; max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

a { color: inherit; }

::selection { background: var(--accent); color: var(--paper); }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 14px 22px; z-index: 20;
  font-size: 0.85rem; letter-spacing: 0.04em;
}
.skip:focus { left: var(--pad); top: 14px; }

/* Petite étiquette de section : capitales espacées + filet */
.label {
  display: flex; align-items: center; gap: 18px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft);
}
.label::after {
  content: ''; flex: 1; height: 1px; background: var(--rule);
}

/* ═══ Masthead ═══════════════════════════════════════════ */

.masthead { border-bottom: 1px solid var(--rule); }

.masthead .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px 32px; flex-wrap: wrap;
  padding-block: 22px;
}

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand img { display: block; width: 30px; height: auto; flex: none; }

.brand-word {
  font-family: var(--display);
  font-variation-settings: 'opsz' 40, 'wght' 600, 'SOFT' 20, 'WONK' 1;
  font-size: 1.06rem;
  letter-spacing: 0.13em;
  line-height: 1;
}
.brand-kind {
  display: block; margin-top: 5px;
  font-family: var(--text);
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-soft);
}

.masthead nav { display: flex; align-items: center; gap: 26px; }

.langs { display: flex; align-items: center; gap: 9px; font-size: 0.78rem; letter-spacing: 0.1em; }
.langs a { color: var(--ink-faint); text-decoration: none; transition: color 0.25s var(--ease); }
.langs a:hover { color: var(--ink); }
.langs [aria-current='true'] { color: var(--ink); font-weight: 600; }
.langs i { font-style: normal; color: var(--rule-strong); }

/* Lien de contact : le soulignement se retire au survol */
.contact-link {
  position: relative; text-decoration: none;
  font-size: 0.83rem; font-weight: 500; letter-spacing: 0.05em;
  padding-bottom: 3px;
}
.contact-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(1); transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.contact-link:hover::after { transform: scaleX(0); }

/* ═══ Ouverture ══════════════════════════════════════════ */

.opening { overflow: clip; padding-block: clamp(56px, 8vw, 104px) var(--block); }

.opening .shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 68px);
}

.opening h1 {
  font-family: var(--display);
  font-variation-settings: 'opsz' 144, 'wght' 460, 'SOFT' 40, 'WONK' 1;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

/* Le point final prend l'accent : un détail, mais il signe la page. */
.opening h1 b { color: var(--accent); font-weight: inherit; }

.lede {
  margin-top: clamp(20px, 2.4vw, 30px);
  max-width: 40ch;
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.72;
}

.opening-art { justify-self: end; width: 100%; }
.opening-art img {
  display: block;
  /* le visuel livré le 2026-08-31 est carré (1:1) : moins de débord
     latéral qu'un 4:3, sinon la colonne devient trop haute */
  width: 106%; max-width: none; height: auto;
  margin-left: -3%;
  /* le visuel a son propre fond : on l'estompe pour qu'il se fonde
     dans le papier au lieu d'y poser un rectangle */
  -webkit-mask-image: radial-gradient(70% 72% at 50% 48%, #000 38%, transparent 82%);
          mask-image: radial-gradient(70% 72% at 50% 48%, #000 38%, transparent 82%);
}

/* ═══ Index des produits ═════════════════════════════════ */

.index { padding-bottom: var(--block); }

.entries { list-style: none; margin-top: clamp(28px, 4vw, 46px); }

.entry { border-top: 1px solid var(--rule); }
.entry:last-child { border-bottom: 1px solid var(--rule); }

.entry a {
  position: relative; isolation: isolate;
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) auto 2rem;
  align-items: baseline;
  gap: 8px 26px;
  padding-block: clamp(26px, 3.4vw, 40px);
  text-decoration: none;
}

/* Lavis de couleur qui balaie la rangée, débordant dans la gouttière */
.entry a::before {
  content: ''; position: absolute; z-index: -1;
  inset: 0 calc(-1 * var(--pad));
  background: var(--wash);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.62s var(--ease-out);
}
.entry a:hover::before,
.entry a:focus-visible::before { transform: scaleX(1); }

.entry-num {
  font-family: var(--display);
  font-variation-settings: 'opsz' 20, 'wght' 500, 'WONK' 1;
  font-size: 0.98rem;
  color: var(--ink-faint);
  font-feature-settings: 'tnum';
  transition: color 0.4s var(--ease);
}
.entry a:hover .entry-num { color: var(--hue); }

.entry-name {
  display: block;
  font-family: var(--display);
  font-variation-settings: 'opsz' 90, 'wght' 500, 'SOFT' 30, 'WONK' 1;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
}

.entry-desc {
  display: block; margin-top: 9px;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.62;
}

.entry-state {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.entry-state::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--hue); flex: none;
}

.entry-go {
  justify-self: end;
  color: var(--ink-faint);
  transition: transform 0.52s var(--ease-out), color 0.4s var(--ease);
}
.entry a:hover .entry-go,
.entry a:focus-visible .entry-go { transform: translateX(7px); color: var(--hue); }
.entry-go svg { display: block; }

/* ═══ En parallèle — note marginale, volontairement discrète ═══ */

.aside {
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  padding-block: clamp(48px, 6vw, 76px);
}

.aside .shell {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}

.aside-body { max-width: 58ch; }
.aside-body p { color: var(--ink-soft); font-size: 0.96rem; }

.aside-item { margin-top: 22px; }
.aside-item strong {
  font-family: var(--display);
  font-variation-settings: 'opsz' 40, 'wght' 600, 'WONK' 1;
  font-size: 1.14rem; font-weight: inherit;
}
.aside-item a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px; margin-left: 6px;
  white-space: nowrap;
}
.aside-item a:hover { color: var(--accent-lift); }

/* ═══ Pied de page ═══════════════════════════════════════ */

.colophon { border-top: 1px solid var(--rule); padding-block: clamp(36px, 4.6vw, 56px); }

.colophon .shell {
  display: flex; flex-wrap: wrap; gap: 14px 40px;
  align-items: baseline; justify-content: space-between;
  font-size: 0.78rem; letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.colophon a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; }
.colophon a:hover { border-bottom-color: currentColor; }
.colophon .rights {
  text-transform: uppercase; letter-spacing: 0.13em;
  font-size: 0.68rem; color: var(--ink-faint);
}

/* ═══ Mouvement ══════════════════════════════════════════
 * Entrée au chargement, en CSS pur. `both` applique l'état initial
 * pendant le délai ; si les animations ne tournent pas, tout reste
 * visible — aucune dépendance au JS.
 */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.masthead .shell { animation: rise 0.7s var(--ease-out) both; }
.opening h1      { animation: rise 0.85s 0.06s var(--ease-out) both; }
.lede            { animation: rise 0.85s 0.14s var(--ease-out) both; }
.opening-art     { animation: rise 1s 0.2s var(--ease-out) both; }

/* Pas de révélation au défilement : `animation-timeline: view()` lie la
   visibilité du contenu à la position de défilement, et ses animations
   n'ont jamais de fin. Même famille de risque que le piège « contenu
   invisible sans JS » du CLAUDE.md. L'entrée au chargement suffit. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .entry a::before { transform: scaleX(1); opacity: 0.5; }
}

/* ═══ Étroit ═════════════════════════════════════════════ */

@media (max-width: 900px) {
  .opening .shell { grid-template-columns: 1fr; }
  .opening-art { justify-self: stretch; max-width: 560px; }
  .opening-art img { width: 100%; margin-left: 0; }
  .aside .shell { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .entry a {
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 6px 16px;
  }
  .entry-state { grid-column: 2; margin-top: 14px; }
  .entry-go { display: none; }   /* la rangée entière reste cliquable */
  .masthead .shell { padding-block: 16px; }
}
