/* ============================================================
   Galaad — editorial.css
   Design system Phase 2 : Digital Curator éditorial.
   Étend base.css avec tokens surface tiers, typo éditoriale,
   layering (no shadows), animations, composants inner pages.
   ============================================================ */

:root {
  /* ---------- Surface tiers (Digital Curator) ---------- */
  --surface: var(--galaad-cream, #faf7f0);
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f4ef;
  --surface-container: #ecefe9;
  --surface-container-high: #e5e9e2;
  --surface-container-highest: #dde1d9;

  /* ---------- Ink & accents ---------- */
  --on-surface: var(--galaad-ink, #0f1419);
  --on-surface-variant: #4a5568;
  --on-surface-whisper: #8a94a6;
  --primary: #5f5e5e;
  --primary-dim: #535252;
  --on-primary: var(--surface);
  --tertiary: #486272;

  /* ---------- Ghost borders ---------- */
  --outline-variant: rgba(46, 52, 46, 0.15);
  --outline-variant-strong: rgba(46, 52, 46, 0.28);

  /* ---------- Typographie éditoriale ---------- */
  --display-lg: clamp(2.5rem, 5.5vw + 0.5rem, 4.25rem);
  --display-md: clamp(2rem, 4vw + 0.5rem, 3.25rem);
  --headline-lg: clamp(1.75rem, 2.8vw + 0.5rem, 2.5rem);
  --headline-md: clamp(1.375rem, 1.8vw + 0.5rem, 1.75rem);
  --title-lg: 1.375rem;
  --title-md: 1.125rem;
  --body-lg: 1.0625rem;
  --body-md: 1rem;
  --label-md: 0.8125rem;
  --label-sm: 0.6875rem;

  /* ---------- Spacing additionnel ---------- */
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --space-128: 128px;

  /* ---------- Max widths éditoriaux ---------- */
  --measure: 65ch;
  --narrow: 520px;
  --wide: 960px;
  --ultra-wide: 1280px;
}

/* ============================================================
   Typographie éditoriale
   ============================================================ */

.display-lg,
.editorial h1,
.editorial .display {
  font-family: var(--font-voice);
  font-size: var(--display-lg);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--on-surface);
}

.headline-lg,
.editorial h2 {
  font-family: var(--font-voice);
  font-size: var(--headline-lg);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--on-surface);
}

.headline-md,
.editorial h3 {
  font-family: var(--font-voice);
  font-size: var(--headline-md);
  font-weight: 500;
  line-height: 1.2;
  color: var(--on-surface);
}

.lede,
.editorial .lede {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: clamp(1.125rem, 1.2vw + 0.5rem, 1.375rem);
  line-height: 1.45;
  color: var(--on-surface-variant);
  max-width: 38em;
}

.body-lg,
.editorial p {
  font-family: var(--font-structure);
  font-size: var(--body-lg);
  line-height: 1.65;
  color: var(--on-surface);
  max-width: var(--measure);
}

.editorial p + p {
  margin-top: 1em;
}

.label-md,
.editorial .label {
  font-family: var(--font-structure);
  font-size: var(--label-md);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.label-sm {
  font-family: var(--font-structure);
  font-size: var(--label-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-whisper);
}

.editorial a:not([class]) {
  color: var(--on-surface);
  text-decoration: underline;
  text-decoration-color: var(--outline-variant-strong);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 200ms ease;
}

.editorial a:not([class]):hover {
  text-decoration-color: var(--on-surface);
}

.editorial ul,
.editorial ol {
  max-width: var(--measure);
  padding-left: 1.5em;
  line-height: 1.65;
  font-size: var(--body-lg);
}

.editorial li {
  margin-top: 0.5em;
  color: var(--on-surface);
}

.editorial blockquote {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.625rem);
  line-height: 1.4;
  color: var(--on-surface);
  max-width: 38em;
  padding-left: var(--space-24);
  border-left: 2px solid var(--outline-variant-strong);
  margin: var(--space-32) 0;
}

/* ============================================================
   Layout éditorial : sections et grilles asymétriques
   ============================================================ */

.ed-page {
  min-height: 100vh;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-structure);
}

/* Arrêt doux sur les sections : géré en JS dans main.js (compatible Lenis).
   Voir la fonction `snapToNearest` qui aligne la section la plus proche
   du haut de viewport après 180 ms d'inactivité scroll. */

.ed-section {
  padding: var(--space-96) var(--space-24);
  position: relative;
}

.ed-section--compact {
  padding: var(--space-48) var(--space-24);
}

.ed-section--hero {
  padding: clamp(var(--space-80), 14vh, 160px) var(--space-24) var(--space-80);
}

.ed-section--tier {
  background: var(--surface-container-low);
}

.ed-section--tier-high {
  background: var(--surface-container);
}

.ed-section--dark {
  background: var(--on-surface);
  color: var(--surface);
}

.ed-section--dark .label-md,
.ed-section--dark .body-lg,
.ed-section--dark p,
.ed-section--dark h2,
.ed-section--dark h3 {
  color: var(--surface);
}

.ed-container {
  width: 100%;
  max-width: var(--ultra-wide);
  margin: 0 auto;
}

.ed-container--narrow {
  max-width: var(--narrow);
}

.ed-container--wide {
  max-width: var(--wide);
}

/* Grille éditoriale 12 colonnes, asymétrique */
.ed-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-32) var(--space-24);
}

.ed-grid__sidebar {
  grid-column: 1 / span 4;
}

.ed-grid__main {
  grid-column: 5 / span 7;
}

.ed-grid__full {
  grid-column: 1 / -1;
}

.ed-grid__bleed-left {
  grid-column: 1 / span 8;
}

.ed-grid__bleed-right {
  grid-column: 5 / -1;
}

@media (max-width: 900px) {
  .ed-grid { gap: var(--space-24); }
  .ed-grid__sidebar,
  .ed-grid__main,
  .ed-grid__bleed-left,
  .ed-grid__bleed-right { grid-column: 1 / -1; }
}

/* ============================================================
   Hero éditorial (grand titre + lede + photo hors-grille)
   ============================================================ */

.ed-hero {
  padding: clamp(120px, 18vh, 200px) var(--space-24) var(--space-80);
  position: relative;
  overflow: hidden;
}

.ed-hero__eyebrow {
  display: block;
  margin-bottom: var(--space-24);
  font-family: var(--font-structure);
  font-size: var(--label-md);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.ed-hero__title {
  font-family: var(--font-voice);
  font-size: var(--display-lg);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--on-surface);
  max-width: 14em;
  margin-bottom: var(--space-32);
}

.ed-hero__lede {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: clamp(1.125rem, 1.3vw + 0.5rem, 1.5rem);
  line-height: 1.45;
  color: var(--on-surface-variant);
  max-width: 36em;
  margin-bottom: var(--space-48);
}

.ed-hero__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-container);
  margin-top: var(--space-48);
}

.ed-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ken-burns 18s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  0%   { transform: scale(1.01); transform-origin: 50% 50%; }
  100% { transform: scale(1.08); transform-origin: 55% 45%; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-hero__image img { animation: none; }
}

/* ============================================================
   Boutons éditoriaux
   ============================================================ */

.ed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-structure);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1),
              background 220ms ease,
              color 220ms ease,
              box-shadow 220ms ease;
  position: relative;
  user-select: none;
}

.ed-btn--primary {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dim) 100%);
  color: var(--on-primary);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.ed-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 52, 46, 0.18);
}

.ed-btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05) inset;
}

.ed-btn--secondary {
  background: transparent;
  color: var(--on-surface);
  box-shadow: inset 0 0 0 1px var(--outline-variant-strong);
}

.ed-btn--secondary:hover {
  background: var(--surface-container-low);
  box-shadow: inset 0 0 0 1px var(--on-surface);
  transform: translateY(-1px);
}

.ed-btn--tertiary {
  background: transparent;
  color: var(--on-surface);
  padding: 8px 0;
  text-decoration: underline;
  text-decoration-color: var(--on-surface);
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.ed-btn--tertiary:hover {
  text-underline-offset: 4px;
}

.ed-btn__arrow {
  display: inline-block;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-btn:hover .ed-btn__arrow {
  transform: translateX(4px);
}

.ed-btn:focus-visible {
  outline: 2px solid var(--on-surface);
  outline-offset: 3px;
}

.ed-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  align-items: center;
  margin-top: var(--space-32);
}

/* ============================================================
   Cards & tiles éditoriales (no borders, shift bg)
   ============================================================ */

.ed-card {
  background: var(--surface-container-low);
  padding: var(--space-48);
  transition: background 350ms ease, transform 350ms ease;
}

.ed-card:hover {
  background: var(--surface-container);
}

.ed-card--feature {
  background: var(--surface-container-lowest);
  padding: var(--space-48);
}

.ed-card__eyebrow {
  display: block;
  font-family: var(--font-structure);
  font-size: var(--label-md);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-16);
}

.ed-card__title {
  font-family: var(--font-voice);
  font-size: var(--headline-md);
  font-weight: 500;
  line-height: 1.2;
  color: var(--on-surface);
  margin-bottom: var(--space-16);
}

.ed-card__body {
  color: var(--on-surface);
  font-size: var(--body-lg);
  line-height: 1.65;
  max-width: var(--measure);
}

.ed-card__footer {
  margin-top: var(--space-32);
  display: flex;
  gap: var(--space-24);
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   App tile (vignette app) : tilt subtil au hover
   ============================================================ */

.ed-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  text-decoration: none;
  color: inherit;
  padding: var(--space-32);
  background: var(--surface-container-lowest);
  transition: background 300ms ease, transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.ed-tile:hover {
  background: var(--surface-container-low);
}

.ed-tile__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-container);
}

.ed-tile__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-tile:hover .ed-tile__image img {
  transform: scale(1.04);
}

.ed-tile__label {
  font-family: var(--font-structure);
  font-size: var(--label-md);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.ed-tile__title {
  font-family: var(--font-voice);
  font-size: var(--headline-md);
  font-weight: 500;
  color: var(--on-surface);
  margin-top: 4px;
}

.ed-tile__tagline {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--on-surface-variant);
  line-height: 1.4;
}

.ed-tile__description {
  font-family: var(--font-structure);
  font-size: var(--body-md);
  line-height: 1.6;
  color: var(--on-surface);
  margin-top: var(--space-8);
}

.ed-tile__cta {
  margin-top: auto;
  font-family: var(--font-structure);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ed-tile__cta::after {
  content: '→';
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ed-tile:hover .ed-tile__cta::after {
  transform: translateX(5px);
}

/* ============================================================
   Catalogue (grille éditoriale asymétrique)
   ============================================================ */

.ed-catalogue {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-48) var(--space-24);
}

.ed-catalogue > .ed-tile:nth-child(odd) {
  grid-column: span 7;
}

.ed-catalogue > .ed-tile:nth-child(even) {
  grid-column: span 5;
}

.ed-catalogue > .ed-tile:nth-child(3n+1) {
  grid-column: span 5;
}

.ed-catalogue > .ed-tile:nth-child(3n+2) {
  grid-column: span 7;
}

@media (max-width: 900px) {
  .ed-catalogue > .ed-tile { grid-column: 1 / -1 !important; }
}

/* ============================================================
   Blog post layout
   ============================================================ */

.ed-article {
  padding: 120px var(--space-24) var(--space-96);
  max-width: var(--wide);
  margin: 0 auto;
}

.ed-article__meta {
  display: flex;
  gap: var(--space-24);
  font-family: var(--font-structure);
  font-size: var(--label-md);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-24);
}

.ed-article__title {
  font-family: var(--font-voice);
  font-size: var(--display-md);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18em;
  margin-bottom: var(--space-32);
  color: var(--on-surface);
}

.ed-article__tldr {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  padding: var(--space-24);
  background: var(--surface-container-low);
  border-left: 3px solid var(--tertiary);
  margin: var(--space-48) 0 var(--space-64);
  max-width: 38em;
  color: var(--on-surface-variant);
}

.ed-article__body h2 {
  font-family: var(--font-voice);
  font-size: var(--headline-lg);
  font-weight: 500;
  line-height: 1.2;
  margin: var(--space-64) 0 var(--space-24);
  max-width: 22em;
}

.ed-article__body h3 {
  font-family: var(--font-voice);
  font-size: var(--headline-md);
  font-weight: 500;
  margin: var(--space-48) 0 var(--space-16);
}

.ed-article__body p {
  font-size: var(--body-lg);
  line-height: 1.7;
  max-width: var(--measure);
  margin-bottom: var(--space-16);
}

.ed-article__signature {
  margin-top: var(--space-64);
  padding-top: var(--space-24);
  border-top: 1px solid var(--outline-variant);
  font-family: var(--font-voice);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--on-surface-variant);
}

/* ============================================================
   Animations : reveal on scroll, scroll progress, blur-up
   ============================================================ */

.ed-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.ed-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ed-reveal--delay-1 { transition-delay: 80ms; }
.ed-reveal--delay-2 { transition-delay: 160ms; }
.ed-reveal--delay-3 { transition-delay: 240ms; }
.ed-reveal--delay-4 { transition-delay: 320ms; }

/* Scroll progress bar */
.ed-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--on-surface) 0%, var(--tertiary) 100%);
  width: 0%;
  z-index: 200;
  transform-origin: 0 0;
  will-change: width;
}

/* Image blur-up (lazy load) */
.ed-img-blur {
  filter: blur(6px);
  transition: filter 700ms ease;
  opacity: 0.85;
}

.ed-img-blur.is-loaded {
  filter: blur(0);
  opacity: 1;
}

/* ============================================================
   Breadcrumbs et back-links éditoriaux
   ============================================================ */

.ed-breadcrumb {
  display: flex;
  gap: 8px;
  font-family: var(--font-structure);
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-32);
  align-items: center;
  letter-spacing: 0.03em;
}

.ed-breadcrumb a {
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 200ms ease;
}

.ed-breadcrumb a:hover {
  color: var(--on-surface);
}

.ed-breadcrumb__sep {
  color: var(--outline-variant-strong);
}

/* ============================================================
   Table des matières (TOC) pour pages longues
   ============================================================ */

.ed-toc {
  position: sticky;
  top: 100px;
  padding-left: var(--space-16);
  border-left: 1px solid var(--outline-variant);
  font-family: var(--font-structure);
  font-size: var(--label-md);
  letter-spacing: 0.04em;
}

.ed-toc__title {
  font-size: var(--label-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-whisper);
  margin-bottom: var(--space-16);
}

.ed-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ed-toc__list li {
  margin-bottom: var(--space-8);
}

.ed-toc a {
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 200ms ease;
  display: block;
  padding: 4px 0;
  line-height: 1.4;
}

.ed-toc a:hover,
.ed-toc a.is-active {
  color: var(--on-surface);
}

/* ============================================================
   Formulaires éditoriaux (underline-only)
   ============================================================ */

.ed-field {
  display: block;
  margin-bottom: var(--space-24);
}

.ed-field__label {
  display: block;
  font-family: var(--font-structure);
  font-size: var(--label-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 8px;
}

.ed-field__input,
.ed-field__textarea {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--outline-variant-strong);
  background: transparent;
  font-family: var(--font-structure);
  font-size: var(--body-lg);
  color: var(--on-surface);
  transition: border-color 200ms ease;
}

.ed-field__input:focus,
.ed-field__textarea:focus {
  outline: none;
  border-bottom-color: var(--on-surface);
}

/* ============================================================
   Utilities
   ============================================================ */

.ed-spacer { display: block; height: var(--space-48); }
.ed-spacer--lg { height: var(--space-96); }
.ed-spacer--sm { height: var(--space-24); }

.ed-divider-soft {
  margin: var(--space-64) auto;
  width: 80px;
  height: 1px;
  background: var(--outline-variant-strong);
}

.ed-pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface-container);
  color: var(--on-surface-variant);
  font-family: var(--font-structure);
  font-size: var(--label-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ed-highlight {
  background: linear-gradient(180deg, transparent 60%, rgba(232, 192, 112, 0.35) 60%);
  padding: 0 2px;
}

/* ============================================================
   Header éditorial (override home.css si besoin)
   ============================================================ */

.ed-page .site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--outline-variant);
  transition: background 300ms ease;
}

/* ============================================================
   Footer éditorial (override si nécessaire)
   ============================================================ */

.ed-page .site-footer {
  background: var(--surface-container-low);
  padding: var(--space-48) var(--space-24);
  margin-top: var(--space-96);
  font-family: var(--font-structure);
  font-size: 0.875rem;
  color: var(--on-surface-variant);
}

/* ============================================================
   Bookshelf (apps layout — livres empilés)
   Image à gauche, texte à droite. Alternance de sens.
   ============================================================ */

.ed-shelf {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--space-48);
}

.ed-book {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-48);
  padding: var(--space-64) 0;
  align-items: center;
  border-top: 1px solid var(--outline-variant);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 400ms ease;
}

.ed-book__stretched {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  white-space: nowrap;
  text-indent: 120%;
  color: transparent;
  background: transparent;
  border: 0;
}
.ed-book__stretched:focus-visible {
  outline: 2px solid var(--tertiary);
  outline-offset: -4px;
}

/* CTAs inside actions remain clickable above the stretched link */
.ed-book__actions a {
  position: relative;
  z-index: 2;
}

.ed-book:last-child {
  border-bottom: 1px solid var(--outline-variant);
}

.ed-book:hover {
  background: var(--surface-container-low);
}

.ed-book:hover .ed-book__image img {
  transform: scale(1.03);
}

.ed-book:hover .ed-book__cta::after {
  transform: translateX(6px);
}

.ed-book__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-container);
  position: relative;
}

.ed-book__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  display: block;
}

.ed-book__image--contain {
  background: var(--surface-container-lowest);
}

.ed-book__image--contain img {
  object-fit: contain;
  padding: var(--space-24);
}

.ed-book__content {
  padding: 0 var(--space-24);
}

.ed-book__status {
  display: inline-block;
  font-family: var(--font-structure);
  font-size: var(--label-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--on-surface-whisper);
  margin-bottom: var(--space-16);
}

.ed-book__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--headline-md);
  line-height: 1.15;
  color: var(--on-surface);
  margin: 0 0 var(--space-12) 0;
  letter-spacing: -0.01em;
}

.ed-book__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--tertiary);
  margin: 0 0 var(--space-24) 0;
}

.ed-book__description {
  font-family: var(--font-body);
  font-size: var(--body-md);
  line-height: 1.65;
  color: var(--on-surface-variant);
  margin: 0 0 var(--space-16) 0;
  max-width: 52ch;
}

.ed-book__stack {
  font-family: var(--font-structure);
  font-size: var(--label-sm);
  color: var(--on-surface-whisper);
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-24) 0;
}

.ed-book__actions {
  display: flex;
  gap: var(--space-16);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--space-24);
}

.ed-book__cta {
  font-family: var(--font-structure);
  font-size: 0.875rem;
  color: var(--on-surface);
  text-decoration: none;
  border-bottom: 1px solid var(--outline-variant-strong);
  padding-bottom: 2px;
  position: relative;
  font-weight: 500;
}

.ed-book__cta::after {
  content: " →";
  display: inline-block;
  transition: transform 300ms ease;
}

.ed-book__cta--store {
  border-bottom: none;
  padding: 8px 14px;
  background: var(--on-surface);
  color: var(--surface);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.ed-book__cta--store:hover {
  background: var(--primary-dim);
}

.ed-book__cta--ghost {
  color: var(--on-surface-variant);
  border-bottom-color: var(--outline-variant);
}

/* Alternance image/texte : un livre sur deux inverse */
.ed-book--flip {
  grid-template-columns: 7fr 5fr;
}

.ed-book--flip .ed-book__image {
  order: 2;
}

.ed-book--flip .ed-book__content {
  order: 1;
}

@media (max-width: 820px) {
  .ed-book,
  .ed-book--flip {
    grid-template-columns: 1fr;
    gap: var(--space-24);
    padding: var(--space-48) 0;
  }
  .ed-book--flip .ed-book__image,
  .ed-book--flip .ed-book__content {
    order: initial;
  }
  .ed-book__content {
    padding: 0;
  }
}

/* ============================================================
   Hero fullbleed (style Le Parédé : image derrière, texte sur)
   Pour les articles de blog. Image de fond, titre + TL;DR
   en sur-impression, scroll pour entrer dans l'article.
   ============================================================ */

.ed-hero--fullbleed {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 180px var(--space-24) var(--space-96);
  overflow: hidden;
  background: var(--on-surface);
  color: var(--surface);
  margin-top: calc(-1 * var(--space-48));
}

.ed-hero--fullbleed::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  opacity: 0.58;
  z-index: 0;
  animation: ken-burns 22s ease-in-out infinite alternate;
}

.ed-hero--fullbleed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(15, 20, 25, 0.35) 0%,
    rgba(15, 20, 25, 0.55) 50%,
    rgba(15, 20, 25, 0.82) 100%);
  z-index: 1;
}

.ed-hero--fullbleed > .ed-container {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.ed-hero--fullbleed .ed-breadcrumb,
.ed-hero--fullbleed .ed-article__meta {
  color: rgba(250, 249, 245, 0.78);
}

.ed-hero--fullbleed .ed-breadcrumb a {
  color: rgba(250, 249, 245, 0.78);
}

.ed-hero--fullbleed .ed-article__title {
  color: var(--surface);
  font-size: var(--display-lg);
  line-height: 1.05;
  margin-top: var(--space-24);
}

.ed-hero--fullbleed .ed-article__tldr {
  background: rgba(15, 20, 25, 0.36);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  color: rgba(250, 249, 245, 0.94);
  padding: var(--space-24) var(--space-32);
  border-left: 2px solid rgba(250, 249, 245, 0.4);
  max-width: 720px;
  margin-top: var(--space-32);
}

.ed-hero--fullbleed .ed-article__tldr strong {
  color: var(--surface);
}

.ed-hero__scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-structure);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 249, 245, 0.62);
  opacity: 0.85;
  animation: scroll-bounce 2s ease-in-out infinite;
}

.ed-hero__scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 28px;
  background: rgba(250, 249, 245, 0.4);
  margin: 8px auto 0;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

.ed-article--with-hero {
  padding-top: var(--space-64);
}

/* ============================================================
   Galerie de captures d'écran (fiches app détail)
   ============================================================ */

.ed-screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-24);
  margin-top: var(--space-32);
}

.ed-screen {
  background: var(--surface-container-lowest);
  padding: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.ed-screen__frame {
  aspect-ratio: 575 / 1280;
  overflow: hidden;
  background: var(--surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ed-screen__frame--phone {
  aspect-ratio: 575 / 1280;
}

.ed-screen__frame--phone-short {
  aspect-ratio: 575 / 1090;
}

.ed-screen__frame--wide {
  aspect-ratio: 4 / 3;
}

/* ============================================================
   Navigation entre apps (bas des fiches /apps/[slug]/)
   ============================================================ */

.ed-app-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-24);
  align-items: stretch;
  padding: var(--space-48) var(--space-24);
  max-width: var(--ultra-wide);
  margin: 0 auto;
  border-top: 1px solid var(--outline-variant);
}

.ed-app-nav__prev,
.ed-app-nav__next,
.ed-app-nav__top {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  text-decoration: none;
  color: var(--on-surface);
  padding: var(--space-16) var(--space-24);
  transition: background 200ms ease, color 200ms ease;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-structure);
}

.ed-app-nav__prev { justify-content: flex-start; }
.ed-app-nav__next { justify-content: flex-end; }
.ed-app-nav__top {
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: var(--surface-container-low);
  min-width: 120px;
}

.ed-app-nav__prev:hover,
.ed-app-nav__next:hover,
.ed-app-nav__top:hover {
  background: var(--surface-container);
  color: var(--on-surface);
}

.ed-app-nav__arrow {
  font-family: var(--font-voice);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  color: var(--on-surface-variant);
  transition: transform 300ms ease, color 200ms ease;
  display: inline-block;
}

.ed-app-nav__prev:hover .ed-app-nav__arrow { transform: translateX(-4px); color: var(--on-surface); }
.ed-app-nav__next:hover .ed-app-nav__arrow { transform: translateX(4px); color: var(--on-surface); }
.ed-app-nav__top:hover .ed-app-nav__arrow { transform: translateY(-3px); color: var(--on-surface); }

.ed-app-nav__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.ed-app-nav__next .ed-app-nav__label {
  text-align: right;
}

.ed-app-nav__hint {
  font-size: var(--label-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-whisper);
}

.ed-app-nav__name {
  font-family: var(--font-voice);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--on-surface);
}

.ed-app-nav__top .ed-app-nav__label {
  font-size: var(--label-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

@media (max-width: 720px) {
  .ed-app-nav {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "prev next" "top top";
    gap: var(--space-16);
    padding: var(--space-32) var(--space-16);
  }
  .ed-app-nav__prev { grid-area: prev; }
  .ed-app-nav__next { grid-area: next; }
  .ed-app-nav__top  { grid-area: top; }
  .ed-app-nav__name { font-size: 1rem; }
  .ed-app-nav__arrow { font-size: 1.5rem; }
}

.ed-screen__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ed-screen__frame--contain img {
  object-fit: contain;
}

.ed-screen__frame--landscape {
  aspect-ratio: 16 / 10;
}

.ed-screen__caption {
  font-family: var(--font-structure);
  font-size: var(--label-md);
  color: var(--on-surface-variant);
  line-height: 1.4;
}

.ed-screen__caption strong {
  color: var(--on-surface);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .ed-screens {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Respect prefers-reduced-motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .ed-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ed-hero__image img { animation: none; }
  .ed-tile:hover .ed-tile__image img { transform: none; }
  .ed-book:hover .ed-book__image img { transform: none; }
  .ed-hero--fullbleed::before { animation: none; }
  .ed-hero__scroll-cue { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
