/* ─────────────────────────────────────────
   Jan Günther — Personal Site
   Design system + shared styles
   ───────────────────────────────────────── */

/* Transitions de page douces (cross-fade) entre les pages du même site →
   supprime le « blink » de la navigation (le paint-hold de l'ancienne page).
   Progressif : ignoré par les navigateurs qui ne le supportent pas. */
@view-transition { navigation: auto; }

/* Le cross-fade par défaut fait fondre old ET new en même temps : au point
   milieu, si les deux pages ont des fonds différents (crème ↔ dark), un frame
   de fond nu apparaît → blink. On garde la nouvelle page posée dessous, pleine
   et opaque, et seule l'ancienne se fond par-dessus. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: vtRootFadeOut 0.32s var(--enter-ease) both;
  }
  ::view-transition-new(root) {
    animation: none;
  }
}
@keyframes vtRootFadeOut {
  to { opacity: 0; }
}

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

:root {
  --bg:             #f3e7d6;
  --text-primary:   #1A1A1A;
  --text-secondary: #5A5A55;
  --text-muted:     #A8A8A0;
  --border:         #E4E4DF;
  --tag-bg:         #EFEFEB;
  --hover-accent:   #E8471C;
  --dark-bg:        #2a2520;
  --dark-text:      #e8e0d0;
  --dark-muted:     #a89e8c;

  --font-sans:    'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1280px;
  --gutter: 40px;
}

/* ─── TYPOGRAPHY UTILITY ─────────────────── */

.t-body,
.hero-bio,
.chapter-description,
.detail-value,
.site-nav a,
.social-links,
.back-link,
.chapter-subtitle,
.site-footer p {
  letter-spacing: .006em;
  font-family: var(--font-sans);
  font-size: clamp(.9375rem, 1.15vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.68;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* fond crème dès la racine : évite le flash blanc inter-pages pendant la
     navigation (avant que le body soit peint) */
  background-color: var(--bg);
}

/* Pages dark (weazer, memoria, icon sets) : la racine doit être sombre elle
   aussi, sinon le crème du <html> transparaît un frame pendant la
   view-transition cross-document → blink clair en quittant une page dark. */
html:has(body.icon-sets-page) {
  background-color: var(--dark-bg);
}

/* ─── ACCESSIBILITY ──────────────────────── */

.skip-link {
  position: absolute;
  top: -120px;
  left: 12px;
  z-index: 9999;
  padding: 12px 20px;
  background-color: var(--text-primary);
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  outline: 3px solid var(--hover-accent);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--hover-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.back-square:focus-visible {
  outline-offset: 4px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── CO₂ BACKGROUND ─────────────────────── */

@keyframes waveFlow {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(-2.5%); }
  100% { transform: translateX(0); }
}

#bg-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  /* height : calculée dynamiquement par seismic-bg.js */
}

#bg-wave svg {
  animation: waveFlow 18s ease-in-out infinite;
}

/* Home : le fond #bg-wave est la carte de Batz (statique). On coupe la dérive
   horizontale waveFlow — seule la ligne de marée orange bouge (JS paintTide).
   On décale la carte vers la droite EN DÉCALANT LE CONTENU SVG (pas la boîte) :
   décaler la boîte la ferait déborder à droite et élargirait le layout viewport
   (innerWidth > viewport) → casse le positionnement fixed (burger hors-écran) et
   les unités vw. Le décalage se fait donc à l'intérieur d'une boîte overflow:hidden. */
.home-page #bg-wave svg {
  animation: none;
  transform: translateX(20%);
}
/* Sur tactile / petits écrans, le navigateur élargit le layout viewport pour
   englober le débordement du translate (même clippé) → innerWidth > viewport,
   ce qui éjecte le burger fixed hors-écran. Le décalage de la carte n'est qu'un
   raffinement desktop : on l'annule là où il casse le viewport. */
@media (max-width: 900px), (hover: none) {
  .home-page #bg-wave svg { transform: none; }
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.chapters,
.site-footer {
  background-color: var(--bg);
}

@keyframes badgeFadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.bg-attribution {
  background-color: #1e1e1e;
  color: #c8c8c0;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 3px;
  white-space: nowrap;
  animation: badgeFadeIn 0.7s ease 0.5s both;
}

.bg-attribution .source-link {
  color: var(--hover-accent);
  text-decoration: none;
  background-image:
    linear-gradient(var(--hover-accent), var(--hover-accent)),
    repeating-linear-gradient(to right, var(--hover-accent) 0 1.5px, transparent 1.5px 4px);
  background-size: 0% 2px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat, repeat-x;
  padding-bottom: 2px;
  transition: background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-attribution .source-link:hover,
.bg-attribution .source-link:focus-visible {
  background-size: 100% 2px, 100% 1px;
}

/* ─── HEADER ─────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px var(--gutter);
}

.logo {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text-primary);
}

/* ─── BURGER MENU ─────────────────────────── */

.burger {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px;          /* garde une zone de tap/clic confortable (~42px) */
  display: flex;
  flex-direction: column;
  gap: 5px;
  /* Burger TOUJOURS fixe en haut à droite (façon Aaron Walter) : jamais coincé
     dans un contexte d'empilement → flotte au-dessus du panneau, morph en place. */
  position: fixed;
  /* Aligné au repos sur le logo (top 29px). Sur les pages chapitre, il suit la
     progression du morph (scroll-header.js → --morph-progress) jusqu'à s'aligner
     sur le titre/carré flottant (top 12px, centre ~32px). */
  top: calc(29px - 17px * var(--morph-progress, 0));
  right: max(var(--gutter), calc(50vw - var(--max-width) / 2 + var(--gutter)));
  z-index: 200;           /* > panneau (100) et voile (90) */
  transition: opacity 0.2s ease;
}

/* Home : le header rétrécit par toggle (is-scrolled) → on transitionne le top
   avec la même courbe/durée que le morph du header. */
.home-page .burger {
  transition: opacity 0.2s ease, top 0.4s cubic-bezier(0.5, 0, 0, 1);
}
.home-page.is-scrolled .burger {
  top: 1px;
}

.burger span {
  display: block;
  width: 18px;            /* icône réduite */
  height: 2px;
  background: var(--hover-accent);
  border-radius: 1px;
  transform-origin: 50%;
  transition: transform 0.25s ease,
              opacity 0.2s ease,
              width 0.25s ease;
}

.burger:hover {
  opacity: 0.75;
}

/* Au tap : le burger se morphe en croix (toggle = fermer). Comme il est fixe et
   au-dessus du panneau, le morph se fait en place, sans rien déplacer. */
.burger.menu-x span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.menu-x span:nth-child(2) { opacity: 0; width: 0; }
.burger.menu-x span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── SLIDE-IN MENU PANEL ─────────────────── */

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  height: 100dvh;
  background: #1e1e1e;
  color: #e8e0d0;
  padding: 96px 64px 64px;
  z-index: 100;
  transform: translateX(100%);
  /* À la fermeture : on slide vers la droite (même bézier, même durée), et on ne
     masque (visibility) qu'APRÈS le slide (délai = durée). */
  transition: transform 0.45s cubic-bezier(0.5, 0, 0, 1),
              visibility 0s linear 0.45s;
  overflow-y: auto;
  visibility: hidden;
}

.menu-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  /* À l'ouverture : visible immédiatement (pas de délai), puis slide depuis la droite. */
  transition: transform 0.45s cubic-bezier(0.5, 0, 0, 1),
              visibility 0s linear 0s;
}

/* Dark scrim behind the panel — signals the sidebar is the focus and dims the
   page. Sits below the panel (z 100) and above everything else. Click to close. */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  z-index: 90;
  cursor: pointer;
  transition: opacity 0.45s cubic-bezier(0.5, 0, 0, 1), visibility 0.45s;
}

.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .menu-overlay {
    transition: none;
  }
}

.menu-close {
  display: none; /* remplacé par le burger qui se morphe en croix */
  position: absolute;
  top: 36px;
  right: 36px;
  background: transparent;
  border: none;
  color: var(--hover-accent);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  font-family: var(--font-display);
  font-weight: 300;
  transition: opacity 0.2s ease;
}

.menu-close:hover {
  opacity: 0.7;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.menu-link {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #e8e0d0;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
}

.menu-link:hover {
  color: #fff;
}

.menu-link.is-active {
  color: var(--hover-accent);
}

.menu-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hover-accent);
}

.menu-sublink-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.menu-sublink {
  font-size: 23px;
  color: #a8a098;
}

.menu-sublink:hover {
  color: #e8e0d0;
}

body.menu-is-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .menu-panel {
    padding: 88px 32px 48px;
  }
  .menu-close {
    top: 28px;
    right: 28px;
  }
  .menu-link {
    font-size: 24px;
  }
  .menu-sublink {
    font-size: 21px;
  }
}

/* ─── HERO ───────────────────────────────── */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 260px var(--gutter) 96px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 28px;
  max-width: 760px;
}

.hero h1 em {
  font-style: italic;
  color: var(--text-secondary);
}

.hero-bio {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-primary);
  max-width: 560px;
  margin-bottom: 36px;
}

.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;        /* évite un débordement de quelques px sur petit écran */
  gap: 12px;
  font-size: 14px;
}

.social-links a {
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--hover-accent);
}

.social-links .dot {
  color: var(--text-muted);
}

/* ─── CHAPTERS LIST ──────────────────────── */

.chapters {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 0;
}

.chapters + .chapters {
  margin-top: 80px;
}

.chapters-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid #D9CBB0;
  text-decoration: none;
  color: inherit;
}

.chapter-item:last-child {
  border-bottom: 1px solid #D9CBB0;
}

.chapter-item:hover .chapter-arrow {
  color: var(--text-primary);
}

.chapter-item:hover .chapter-title {
  color: var(--hover-accent);
  opacity: 1;
}

.chapter-item:hover .chapter-dates {
  color: var(--text-primary);
  font-weight: 700;
}

.chapter-item:hover .chapter-role {
  color: var(--text-primary);
}

.chapter-left {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
  min-width: 0;
}

.chapter-number {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  width: 28px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 0.5s cubic-bezier(0.5, 0, 0, 1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.chapter-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  width: auto;
}

.chapter-role {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  text-align: right;
  letter-spacing: 0.01em;
  white-space: nowrap !important;
  transition: color 0.5s cubic-bezier(0.5, 0, 0, 1);
}

.chapter-dates {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-align: right;
  transition: color 0.5s cubic-bezier(0.5, 0, 0, 1), font-weight 0.5s cubic-bezier(0.5, 0, 0, 1);
}

.chapter-arrow {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 36px;          /* carré : hauteur = largeur */
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;      /* les flèches sortent/entrent en se clippant sur le carré */
  transition: color 0.5s cubic-bezier(0.5, 0, 0, 1);
}
.chapter-arrow .arrow-ico {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.5, 0, 0, 1), opacity 0.45s cubic-bezier(0.5, 0, 0, 1);
}
/* flèche visible (centre) → part en haut-droite */
.chapter-arrow .arrow-ico:nth-child(1) {
  transform: translate(0, 0);
  opacity: 1;
}
/* flèche d'arrivée, en attente en bas-gauche */
.chapter-arrow .arrow-ico:nth-child(2) {
  transform: translate(-100%, 100%);
  opacity: 0;
}
.chapter-item:hover .chapter-arrow .arrow-ico:nth-child(1) {
  transform: translate(100%, -100%);
  opacity: 0;
}
.chapter-item:hover .chapter-arrow .arrow-ico:nth-child(2) {
  transform: translate(0, 0);
  opacity: 1;
}

/* ─── FOOTER ─────────────────────────────── */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── MOUNTAINS TRANSITION ───────────────── */

#mountains {
  position: relative;
  width: 100%;
  height: 380px;
  z-index: 1;
  background-color: var(--bg);
  margin-top: -1px;
  overflow: hidden;
}


/* ─── DARK FOOTER ────────────────────────── */

.dark-footer {
  background-color: var(--dark-bg);
  color: var(--dark-text);
  padding: 40px var(--gutter) 64px;
  position: relative;
  z-index: 1;
  margin-top: -1px;
}

.dark-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.dark-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 20px;
}

.dark-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 60px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--bg);
  margin-bottom: 64px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 80px;
}

.project-card {
  display: block;
  padding: 32px 28px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}

.project-image {
  margin: -32px -28px 24px;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: #1a1d22;
}

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

.project-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--hover-accent);
  margin-bottom: 16px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--bg);
  margin-bottom: 10px;
  display: inline-block;
  position: relative;
  padding-bottom: 4px;
}

.project-name::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--hover-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.5, 0, 0, 1);
}

.project-card:hover .project-name::after {
  transform: scaleX(1);
}

.project-desc {
  font-size: 14px;
  color: var(--dark-muted);
  line-height: 1.6;
}

.dark-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.dark-copy {
  font-size: 13px;
  color: var(--dark-muted);
}

.dark-social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;        /* évite un débordement de quelques px sur petit écran */
  gap: 12px;
  font-size: 13px;
}

.dark-social a {
  color: var(--dark-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.dark-social a:hover {
  color: var(--bg);
}

.dark-social .dot {
  color: rgba(255, 255, 255, 0.20);
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  #mountains {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .dark-footer {
    padding: 64px var(--gutter) 48px;
  }

  .dark-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ─── CHAPTER PAGES ──────────────────────── */

.chapter-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── ABOUT PAGE — portrait top-right ── */
.about-page .chapter-page {
  position: relative;
}

.about-portrait {
  position: absolute;
  top: 0;
  right: var(--gutter);
  width: min(600px, 100%);
  height: auto;
  border-radius: 6px;
  z-index: 2;
}

/* No sidebar on About: text spans full width but stays in a reading column
   so it never runs under the portrait. */
.about-page .chapter-body {
  display: block;
}

.about-page .chapter-description {
  max-width: 500px;
}

/* Below this width the 600px portrait + text column would collide, so stack. */
@media (max-width: 1240px) {
  .about-portrait {
    position: static;
    display: block;
    width: min(440px, 80%);
    margin: 0 0 32px;
  }
  .about-page .chapter-description {
    max-width: none;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin: 40px 0 72px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--text-primary);
}

.chapter-header {
  margin-bottom: 80px;
}

.chapter-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.chapter-page-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--text-primary);
  margin-bottom: 20px;
  /* Positioning is handled by JS once .chapter-page-title-placeholder is set up.
     The title becomes position: fixed and is tracked so it stays at the sticky
     bar position even after chapter-header has scrolled past. */
  z-index: 41;
  transform-origin: left top;
  /* (pas de will-change : un calque fixe dédié clignote au démontage de la page
     lors d'une navigation) */
  /* Non-interactive heading — never intercept clicks meant for the sticky
     bar / burger sitting beneath it once it floats over the top of the page. */
  pointer-events: none;
}

.chapter-page-title-placeholder {
  /* Height is set by JS to match the title's natural height so layout is
     preserved in the hero when the title is detached for fixed positioning. */
}

/* JS replaces any <br> inside the title with this span so we can swap
   between a line break (default) and a single-line layout (.is-pinned). */
.title-break {
  display: block;
  height: 0;
  overflow: hidden;
}

.chapter-page-title.is-pinned .title-break {
  display: inline;
}

.chapter-page-title.is-pinned .title-break::before {
  content: ' ';
}

.chapter-page-period {
  font-size: 14px;
  font-weight: 500;
  color: var(--hover-accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.chapter-header-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 28px;
}

.chapter-divider {
  width: 80px;
  height: 3px;
  background-color: var(--hover-accent);
  flex-shrink: 0;
}

/* When the divider has been moved to body by scroll-header.js, it floats
   just below the title with width matching the title's visual width. */
.chapter-divider--floating {
  position: fixed;
  width: 0;  /* set by JS */
  height: 3px;
  z-index: 41;
}

.chapter-body,
.chapter-nav {
  background-color: var(--bg);
}

/* ─── CHAPTER BODY ───────────────────────── */

.chapter-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  margin-bottom: 40px;
  align-items: start;
}

.chapter-description {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.78;
  color: var(--text-primary);
}

.chapter-description p + p {
  margin-top: 22px;
}

.chapter-description strong {
  font-weight: 500;
  color: var(--text-primary);
}

/* ─── SIDEBAR ────────────────────────────── */

.chapter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 6px;
}

.detail-block {}

.detail-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.detail-value {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.65;
}

.detail-value li {
  list-style: none;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}

.detail-value li:last-child {
  border-bottom: none;
}

/* ─── CLIENT TAGS ────────────────────────── */

.client-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.client-tag {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--tag-bg);
  padding: 5px 12px;
  border-radius: 3px;
  letter-spacing: 0.01em;
}

/* ─── BY THE NUMBERS ─────────────────────── */

.by-the-numbers {
  background-color: var(--bg);
  padding: 24px 0 64px;
}

.numbers-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: 0;
  border-top: 1px solid #D9CBB0;
  border-bottom: 1px solid #D9CBB0;
}

.number-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-right: 1px solid #D9CBB0;
  justify-content: flex-start;
}

.number-item:last-child {
  border-right: none;
}

.number-value {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--hover-accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.number-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Tablet : 3 colonnes (3+2) */
@media (max-width: 900px) {
  .numbers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .number-item {
    border-right: 1px solid #D9CBB0;
    border-bottom: none;
  }
  /* item 3 : fin de la 1re ligne, pas de bordure droite */
  .number-item:nth-child(3) {
    border-right: none;
  }
  /* items 1–3 : bordure bas pour séparer de la 2e ligne */
  .number-item:nth-child(-n+3) {
    border-bottom: 1px solid #D9CBB0;
  }
  /* item 5 (dernier) : fin de la 2e ligne, pas de bordure droite */
  .number-item:last-child {
    border-right: none;
  }
}

/* Mobile : 2 colonnes (2+2+1) */
@media (max-width: 540px) {
  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .number-item {
    border-right: 1px solid #D9CBB0;
    border-bottom: 1px solid #D9CBB0;
    min-height: 140px;
    padding: 28px 18px;
    gap: 14px;
  }
  /* fin de chaque ligne paire : pas de bordure droite */
  .number-item:nth-child(2n) {
    border-right: none;
  }
  /* dernier item (seul sur sa ligne) : pas de bordures */
  .number-item:last-child {
    border-right: none;
    border-bottom: none;
  }
}

/* ─── CASE STUDIES ───────────────────────── */

.case-studies {
  background-color: var(--bg);
  padding: 24px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.case-study {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  column-gap: 48px;
  align-items: start;
}

/* Colonne 1 : tout le texte (flow block naturel à l'intérieur).
   Colonne 2 : images, alignées à gauche, au sommet de la cellule. */
.case-text {
  display: block;
}

.case-images {
  display: block;
  align-self: start;
  justify-self: start;
  width: 100%;
}

/* Case study inversé : texte à droite, images à gauche.
   Colonnes 1fr / 1fr pour que la vidéo de la 1re row et chacune des vidéos
   de la row du bas aient la même largeur. */
.case-study--reversed {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Case study Design System : grid 1fr/1fr pour que l'image en colonne droite
   ait la même largeur que les 4 images en grille 2×2 en dessous. */
.case-study--text-priority {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.case-study--text-only {
  grid-template-columns: minmax(0, 1fr);
}

.case-figure {
  margin: 32px 0 0;
}

.case-figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── COLOPHON ────────────────────────────── */

.colophon-intro {
  max-width: 720px;
  margin: 0 0 100px;
}

.colophon-intro p {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.78;
  color: var(--text-primary);
  margin: 0;
}

.colophon-sections {
  display: flex;
  flex-direction: column;
  gap: 120px;
  margin: 0 0 120px;
}

.colophon-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 820px;
}

.colophon-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hover-accent);
  margin: 0 0 16px;
}

.colophon-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
  margin: 0 0 20px;
}

.colophon-body {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-primary);
}

.colophon-body p {
  margin: 0;
}

.colophon-body p + p {
  margin-top: 22px;
}

.colophon-body strong {
  font-weight: 500;
  color: var(--text-primary);
}

.colophon-body .case-link strong,
.colophon-body .case-list .case-link strong {
  color: inherit !important;
}

.colophon-figure {
  margin: 32px 0 0;
}

.colophon-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.colophon-body em {
  font-style: italic;
  color: var(--text-secondary);
}

.colophon-body code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 6px;
  border-radius: 3px;
}

@media (max-width: 900px) {
  .colophon-sections { gap: 80px; }
  .colophon-intro { margin-bottom: 80px; }
}

.case-list {
  margin: 18px 0;
  padding-left: 22px;
  list-style: none;
}

.case-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-primary);
}

.case-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--hover-accent);
  font-weight: 400;
  line-height: inherit;
}

.case-list li strong {
  font-weight: inherit;
  color: var(--text-primary);
}

.case-list--nested {
  margin: 10px 0 4px -18px;
  padding-left: 0;
}

.case-list--nested li {
  font-size: 16px;
  margin-bottom: 6px;
}

.case-study--reversed > .case-text {
  grid-column: 2;
  grid-row: 1;
}

.case-study--reversed > .case-images {
  grid-column: 1;
  grid-row: 1;
}

@media (max-width: 900px) {
  .case-study--reversed > .case-text,
  .case-study--reversed > .case-images {
    grid-column: 1;
    grid-row: auto;
  }
}

.case-images img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Images PNG transparentes (mockups navigateur DS, workshops triptyque) :
   neutralise border-radius + drop-shadow qui suit l'alpha. */
.case-images img[src*="ds-"],
.case-images img[src*="workshop"] {
  border-radius: 0;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.14)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.case-images img + img {
  margin-top: 24px;
}

.case-images video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.18), 0 4px 12px -4px rgba(0, 0, 0, 0.12);
}

.case-images video + video,
.case-images img + video,
.case-images video + img {
  margin-top: 32px;
}

/* Deux vidéos côte à côte, prennent la largeur complète du case study.
   gap: 48px pour matcher le column-gap du case-study parent → alignement parfait. */
.case-video-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
}

.case-video-row video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.18), 0 4px 12px -4px rgba(0, 0, 0, 0.12);
}

@media (max-width: 640px) {
  .case-video-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Click-to-play overlay */
.video-with-play {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.3s ease;
  padding: 0;
  z-index: 1;
}

.play-overlay::before {
  content: '';
  width: 72px;
  height: 72px;
  background-color: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  position: absolute;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

.play-overlay svg {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  color: var(--text-primary);
  margin-left: 4px; /* visual centering of triangle */
}

.play-overlay:hover {
  background: rgba(0, 0, 0, 0.22);
}

.play-overlay:hover::before {
  transform: scale(1.08);
}

.video-with-play.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.case-full-image {
  grid-column: 1 / -1;
  margin-top: 40px;
  width: 100%;
}

.case-full-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Grille d'images 2 colonnes pleine largeur sous le texte d'un case study */
.case-image-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 48px;
  margin-top: 40px;
  align-items: end;
}

/* Case study sans .case-images : texte en pleine largeur, puis grid d'images en dessous */
.case-study:not(:has(> .case-images)) {
  grid-template-columns: 1fr;
}

.case-study:not(:has(> .case-images)) > .case-text {
  grid-column: 1;
  grid-row: auto;
  max-width: 760px;
}

.case-image-grid--workspace-cal {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  column-gap: 48px;
  align-items: stretch;
}

.case-image-grid.case-image-grid--sensors img {
  filter: none;
}

.case-image-grid.case-image-grid--brand img {
  filter: none;
}

.case-image-grid--brand {
  grid-template-columns: 1fr 1fr;
}

/* Ecosystème Ubigreen : 5 produits étiquetés */
.case-image-grid--products {
  grid-template-columns: 1fr 1fr;
  gap: 56px 48px;
}


.case-image-grid--products .product-tile {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.case-image-grid.case-image-grid--products .product-tile img {
  width: 100%;
  height: auto;
  display: block;
  filter: none;
  border-radius: 4px;
}

.product-tile figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-tile-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.product-tile-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.case-image-grid.case-image-grid--workspace-cal img {
  filter: none;
}

.case-image-grid--workspace-cal img:first-child {
  width: 100%;
  aspect-ratio: 0.876;
  object-fit: contain;
  object-position: right bottom;
}

@media (max-width: 640px) {
  .case-image-grid--workspace-cal img:first-child {
    aspect-ratio: auto;
    object-position: center;
  }
}

.case-image-grid img {
  width: 100%;
  height: auto;
  display: block;
  /* drop-shadow suit l'alpha de l'image (coins arrondis du mockup respectés) */
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.14)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

@media (max-width: 640px) {
  .case-image-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.case-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hover-accent);
  margin-bottom: 16px;
}

.case-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* Hover : fond noir qui pousse de gauche à droite, ligne par ligne.
   box-decoration-break: clone → chaque ligne reçoit son propre fond + son padding.
   Texte passe en blanc avec délai pour suivre le fond. */
.case-title > span {
  display: inline;
  background-image: linear-gradient(var(--text-primary), var(--text-primary));
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 2px 8px;
  margin-left: -8px;
  /* État repos & hover-out : color revient en même temps que le fond rétrécit */
  transition:
    background-size 0.45s cubic-bezier(0.5, 0, 0, 1),
    color 0.45s cubic-bezier(0.5, 0, 0, 1);
}

.case-study:hover .case-title > span {
  /* État hover-in : color attend 200ms pour laisser le fond prendre l'avance */
  transition:
    background-size 0.45s cubic-bezier(0.5, 0, 0, 1),
    color 0.25s cubic-bezier(0.5, 0, 0, 1) 0.2s;
  background-size: 100% 100%;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .case-title > span {
    transition: none;
  }
}

/* Hyperlink inline dans le body des case studies, animation identique au titre :
   fond noir L→R + texte qui passe en blanc, ligne par ligne. */
/* Liens de contenu : accent + soulignement qui se dessine de gauche à droite */
.case-link {
  color: var(--hover-accent);
  text-decoration: none;
}

.case-link--italic {
  font-style: italic;
}

.case-link > span {
  display: inline;
  /* 2 couches en bas : trait plein animé (0 %) + pointillé fin permanent */
  background-image:
    linear-gradient(var(--hover-accent), var(--hover-accent)),
    repeating-linear-gradient(to right, var(--hover-accent) 0 1.5px, transparent 1.5px 4px);
  background-size: 0% 2px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat, repeat-x;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-bottom: 3px;
  transition: background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* au hover, le trait plein se dessine de gauche à droite par-dessus le pointillé */
.case-link:hover > span,
.case-link:focus-visible > span {
  background-size: 100% 2px, 100% 1px;
}

/* Le strong à l'intérieur d'un lien garde la couleur accent du lien */
.case-link strong { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .case-link > span { transition: none; }
}

.case-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.case-role {
  margin-top: 0;
  margin-bottom: 16px;
}

.case-role-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.8);
  margin-bottom: 4px;
}

.case-role-value {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
}

.case-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
}

.case-body p + p {
  margin-top: 18px;
}

/* Label de sous-section dans un case (ex. « Ce que j'ai initié et porté ») */
.case-body .case-decision-label {
  margin-top: 32px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hover-accent);
}
.case-body .case-decision-label + p {
  margin-top: 10px;
}

.case-body strong {
  font-weight: 700;
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .case-study {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ─── CHAPTER NAV ────────────────────────── */

.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 80px 0 120px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  gap: 32px;
}

.chapter-nav-link {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.chapter-nav-link:hover {
  opacity: 0.65;
}

.chapter-nav-link--prev {
  align-items: flex-start;
  text-align: left;
}

.chapter-nav-link--next {
  align-items: flex-end;
  text-align: right;
  margin-left: auto;
}

.chapter-nav-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chapter-nav-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

/* ─── RESPONSIVE ─────────────────────────── */

@media (max-width: 900px) {
  :root {
    --gutter: 32px;
  }

  .chapter-item {
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: flex-start;
  }

  .chapter-left {
    flex: 1;
    min-width: 0;
  }

  .chapter-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-left: 68px; /* aligné avec le titre (28px number width + 40px gap) */
    order: 3; /* après le titre et la flèche */
  }

  .chapter-role,
  .chapter-dates {
    text-align: left;
    /* en colonne mobile, les rôles longs doivent wrapper : le nowrap !important
       du desktop déborderait et élargirait le layout viewport (burger éjecté). */
    white-space: normal !important;
  }

  .chapter-arrow {
    margin-left: auto;   /* poussée tout à droite */
    align-self: flex-start;
    margin-top: 18px;    /* aligné approximativement avec le baseline du titre */
    order: 2;
  }

  .chapter-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .chapter-body {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 24px;
  }

  .site-header {
    /* +14px à gauche : le carré pend de 24px (margin 14 + largeur 10) à gauche du
       logo, soit toute la gouttière → il touchait le bord. On laisse cette marge. */
    padding: 28px var(--gutter) 28px calc(var(--gutter) + 14px);
  }

  /* Mobile : pas de morph sticky (scroll-header désactivé) → le burger reste au
     repos. On le centre verticalement sur le logo (logo centre ~40px : header
     pad-top 28 + demi-hauteur logo 12 ; burger 40px de haut → top 20px). */
  .burger {
    top: 20px;
  }

  /* Le badge source de données (fond quasi noir, white-space:nowrap) devient une
     grosse barre noire sur mobile : on le masque. */
  .bg-attribution {
    display: none;
  }

  /* Scroll-header désactivé sur mobile → le trait accent reste dans le flux. Le
     header-bottom est justifié à droite (position desktop au repos) : on le
     recale à gauche pour aligner le trait sous le titre. */
  .chapter-header-bottom {
    justify-content: flex-start;
  }

  .hero {
    padding: 52px var(--gutter) 64px;
  }

  .chapters {
    padding: 0 var(--gutter) 80px;
  }

  .chapter-item {
    padding: 20px 0;
  }

  .chapter-page-title {
    font-size: clamp(44px, 12vw, 64px);
  }

  .chapter-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* ─── ICON SETS — STICKER WALL ─────────────── */

.icon-sets-page {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

.icon-sets-page .chapter-body,
.icon-sets-page .chapter-nav,
.icon-sets-page .site-footer {
  background-color: transparent;
}

.icon-sets-page .logo {
  color: var(--dark-text);
}

.icon-sets-page .chapter-page-period {
  color: var(--dark-muted);
}

.icon-sets-page .chapter-page-title {
  color: var(--hover-accent);
}

.icon-sets-page .chapter-divider {
  background-color: rgba(255, 255, 255, 0.18);
}

.icon-sets-page .bg-attribution {
  background-color: var(--dark-text);
  color: var(--dark-bg);
}

.icon-sets-page .chapter-description {
  color: var(--dark-text);
}

.icon-sets-page .chapter-description strong {
  color: #fff;
  font-weight: 500;
}

.icon-sets-page .detail-label {
  color: var(--hover-accent);
}

.icon-sets-page .detail-value {
  color: var(--dark-text);
}

.icon-sets-page .chapter-nav {
  border-top-color: rgba(255, 255, 255, 0.10);
}

.icon-sets-page .chapter-nav-label {
  color: var(--dark-muted);
}

.icon-sets-page .chapter-nav-title {
  color: var(--dark-text);
}

.icon-sets-page .chapter-nav-link:hover .chapter-nav-title {
  color: var(--hover-accent);
}

.icon-sets-page .site-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
  color: var(--dark-muted);
}

.sticker-wall-section {
  max-width: 820px;
  margin: 80px auto 100px;
  padding: 0 var(--gutter);
}

.sticker-wall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.sticker-wall-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
}

.sticker-shuffle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: var(--dark-text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.5, 0, 0, 1);
}

.sticker-shuffle:hover {
  background: var(--hover-accent);
  color: #fff;
  border-color: var(--hover-accent);
  transform: rotate(15deg);
}

.sticker-wall {
  position: relative;
  width: 100%;
  height: 720px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.sticker {
  position: absolute;
  width: 100px;
  height: 100px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: grab;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.30));
  transition: filter 0.4s cubic-bezier(0.5, 0, 0, 1), transform 0.4s cubic-bezier(0.5, 0, 0, 1);
  will-change: transform, left, top;
  touch-action: none;
}

.sticker:hover {
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.55)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
  z-index: 200 !important;
}

.sticker.is-dragging {
  cursor: grabbing;
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.65)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.40));
  transition: none;
}

.sticker.is-wobble {
  animation: stickerWobble 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.sticker.is-shuffling {
  transition: left 0.5s cubic-bezier(0.5, 0, 0, 1), top 0.5s cubic-bezier(0.5, 0, 0, 1), transform 0.5s cubic-bezier(0.5, 0, 0, 1);
}

@keyframes stickerWobble {
  0%   { transform: rotate(var(--baseRot, 0deg)) scale(var(--baseScale, 1)); }
  20%  { transform: rotate(calc(var(--baseRot, 0deg) - 8deg)) scale(calc(var(--baseScale, 1) * 1.08)); }
  40%  { transform: rotate(calc(var(--baseRot, 0deg) + 6deg)) scale(calc(var(--baseScale, 1) * 1.04)); }
  60%  { transform: rotate(calc(var(--baseRot, 0deg) - 3deg)) scale(calc(var(--baseScale, 1) * 1.02)); }
  100% { transform: rotate(var(--baseRot, 0deg)) scale(var(--baseScale, 1)); }
}

@media (max-width: 760px) {
  .sticker-wall { height: 900px; }
  .sticker { width: 72px; height: 72px; }
}

/* ─── ICON SETS — MAC DOCK CONCEPT ─────────── */

.dock-section {
  max-width: 820px;
  margin: 0 auto 140px;
  padding: 0 var(--gutter);
  text-align: center;
}

.dock-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 8px;
}

.dock-section-help {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--dark-muted);
  margin-bottom: 24px;
}

.dock-help-arrow {
  display: inline-block;
  color: var(--hover-accent);
  animation: dockArrowBounce 1.8s ease-in-out infinite;
}

@keyframes dockArrowBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

.dock-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 380px; /* space for stack to open above */
}

/* The dock pill */
.mac-dock {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.28);
  border-radius: 26px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 5;
}

.dock-app,
.dock-folder,
.dock-trash {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1.4);
  position: relative;
}

.dock-app {
  background-size: 110%;
  background-repeat: no-repeat;
  background-position: center;
}

.dock-app[data-icon="1"] { background-image: url('assets/dock/dock-1.png'); }
.dock-app[data-icon="2"] { background-image: url('assets/dock/dock-2.png'); }
.dock-app[data-icon="3"] { background-image: url('assets/dock/dock-3.png'); }
.dock-app[data-icon="4"] { background-image: url('assets/dock/dock-4.png'); }
.dock-app[data-icon="5"] { background-image: url('assets/dock/dock-5.png'); }

.dock-app:hover,
.dock-folder:hover,
.dock-trash:hover {
  transform: translateY(-12px) scale(1.20);
}

.dock-app:hover ~ .dock-app,
.dock-app:has(+ .dock-app:hover) {
  /* placeholder for magnification — kept simple */
}

.dock-divider {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.20);
  margin: 0 4px;
  align-self: center;
}

.dock-folder {
  position: relative;
}

.dock-folder-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--hover-accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* The stack panel that opens above the folder */
.dock-stack {
  position: absolute;
  bottom: 92px; /* sits above the dock */
  left: 50%;
  transform: translateX(-50%) translateY(20px) scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition: all 0.45s cubic-bezier(0.5, 0, 0, 1);
  width: min(680px, 100%);
  z-index: 4;
}

.dock-stack.is-open {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.dock-stack-inner {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(36px) saturate(1.6);
  -webkit-backdrop-filter: blur(36px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.dock-stack-inner .stack-icon {
  aspect-ratio: 1 / 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  opacity: 0;
  transform: scale(0.6);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1.4);
  cursor: pointer;
}

.dock-stack.is-open .stack-icon {
  animation: stackIconIn 0.5s cubic-bezier(0.4, 0, 0.2, 1.4) forwards;
}

.dock-stack-inner .stack-icon:hover {
  transform: scale(1.18) translateY(-4px);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.55));
}

@keyframes stackIconIn {
  0%   { opacity: 0; transform: translateY(10px) scale(0.6); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.dock-folder.is-active svg {
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .dock-app, .dock-folder, .dock-trash { width: 48px; height: 48px; }
  .dock-folder svg { width: 44px; height: 44px; }
  .dock-trash svg { width: 38px; height: 38px; }
  .dock-stack-inner { grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 16px; }
  .dock-stage { padding-top: 320px; }
}

/* ─── ICON SETS — COLLECTION IMAGE ─────────── */

.icones-set-section {
  margin: 80px 0 100px;
}

.icon-sets-page .chapter-body {
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.icones-set-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 24px;
  text-align: left;
}

.icones-set-image {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.40);
  cursor: zoom-in;
  transition: transform 0.5s cubic-bezier(0.5, 0, 0, 1), border-color 0.5s cubic-bezier(0.5, 0, 0, 1);
}

.icones-set-image:hover {
  border-color: rgba(232, 71, 28, 0.45);
}

.icones-set-image:hover .icones-set-zoom-hint {
  opacity: 1;
}

.icones-set-zoom-hint {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(20, 18, 16, 0.85);
  color: var(--dark-text);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.5, 0, 0, 1);
  pointer-events: none;
}

/* ─── LIGHTBOX ─────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 8, 6, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.5, 0, 0, 1), visibility 0s linear 0.4s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.5, 0, 0, 1), visibility 0s;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.94);
  transition: transform 0.5s cubic-bezier(0.5, 0, 0, 1);
}

.lightbox.is-open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: 32px;
  right: 36px;
  background: transparent;
  border: none;
  color: var(--dark-text);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  font-family: var(--font-display);
  font-weight: 300;
  transition: color 0.2s ease, transform 0.4s cubic-bezier(0.5, 0, 0, 1);
  z-index: 201;
}

.lightbox-close:hover {
  color: var(--hover-accent);
  transform: rotate(90deg);
}

body.lightbox-open {
  overflow: hidden;
}

.icones-set-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── ICON SETS — FEATURED CLOSE-UPS ────────── */

.featured-section {
  margin: 0 0 100px;
}

.featured-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 24px;
  text-align: left;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.featured-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--dark-bg);
}

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

.featured-tile figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(20, 18, 16, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--dark-text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.5, 0, 0, 1);
  pointer-events: none;
}

.featured-tile:hover figcaption {
  opacity: 1;
}

@media (max-width: 760px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 480px) {
  .featured-grid { grid-template-columns: 1fr; }
}

/* ─── WEAZER PAGE ─────────────────────────── */

.weazer-video-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.weazer-video-stage {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.weazer-video {
  width: 100%;
  height: auto;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 12px 24px rgba(0, 0, 0, 0.35);
  display: block;
  background: #000;
}

.weazer-video-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.96);
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s cubic-bezier(0.5, 0, 0, 1), opacity 0.4s cubic-bezier(0.5, 0, 0, 1), background-color 0.25s ease;
  opacity: 0;
}

.weazer-video-stage:hover .weazer-video-btn,
.weazer-video-btn[data-state="paused"],
.weazer-video-btn[data-state="ended"] {
  opacity: 1;
}

.weazer-video-btn:hover {
  background: var(--hover-accent);
  color: #fff;
  transform: scale(1.06);
}

.weazer-video-icon {
  width: 22px;
  height: 22px;
  display: none;
}

.weazer-video-btn[data-state="playing"] .weazer-video-icon--pause,
.weazer-video-btn[data-state="paused"]  .weazer-video-icon--play,
.weazer-video-btn[data-state="ended"]   .weazer-video-icon--replay {
  display: block;
}

.weazer-page .chapter-body {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.weazer-extra-section {
  margin: 80px 0 100px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
}

.weazer-extra {
  margin: 0;
  min-width: 0;
}

.weazer-extra-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 20px;
}

.weazer-video-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(20, 18, 16, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--dark-text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.5, 0, 0, 1);
  pointer-events: none;
  border-radius: 32px;
  z-index: 2;
}

.weazer-video-stage:hover .weazer-video-caption {
  opacity: 1;
}

.weazer-video-stage--wide {
  width: 100%;
  max-width: 100%;
}

.weazer-video--wide {
  border-radius: 32px;
  width: 100%;
  height: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 12px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1000px) {
  .weazer-extra-section { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 600px) {
  .weazer-extra-section { grid-template-columns: 1fr; gap: 48px; }
  .weazer-video-stage--wide { max-width: 360px; margin: 0 auto; }
}

/* ─── SCROLL HEADER (sticky title bar on chapter pages) ─── */

.scroll-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--bg);
  z-index: 40;
  display: block;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  /* Sticky bar only appears in the final 25% of the morph (cross-fades with
     the shrinking hero title) */
  opacity: max(0, calc(var(--morph-progress, 0) * 4 - 3));
  pointer-events: none;
}

.scroll-header.is-visible {
  pointer-events: auto;
}

.scroll-header-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.scroll-header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  pointer-events: none;
}

/* Triangle positioned in the gutter (outside content area) — same logic as
   the back-square in the site-header */
.scroll-header-back {
  position: absolute;
  left: var(--gutter);
  margin-left: -32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.5, 0, 0, 1), color 0.2s ease;
}

.scroll-header-back svg {
  width: 18px;
  height: 20px;
  display: block;
}

.scroll-header-back:hover {
  color: var(--hover-accent);
  transform: translateY(-50%) translateX(-3px);
}

.scroll-header-burger {
  flex-shrink: 0;
}

.icon-sets-page .scroll-header-back {
  color: var(--dark-text);
}
.icon-sets-page .scroll-header-back:hover {
  color: var(--hover-accent);
}

/* Square next to logo in site header — positioned in the gutter so the logo
   stays aligned with the rest of the page content */
.site-header-left {
  position: relative;
  display: flex;
  align-items: center;
}

/* Default: square sits inside .site-header-left, follows the flex layout.
   Used on the home page where it should travel with the (sticky) site-header. */
.back-square {
  position: absolute;
  right: 100%;
  top: 50%;
  margin-right: 14px;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  display: block;
  background-color: var(--text-primary);
  text-decoration: none;
  z-index: 50;
  transform: translateY(-50%) rotate(var(--square-rotation, 0deg));
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  transition: clip-path 0.45s cubic-bezier(0.5, 0, 0, 1),
              background-color 0.3s cubic-bezier(0.5, 0, 0, 1);
}

/* Chapter pages: scroll-header.js detaches the square to body and adds this
   class so it can be tracked as a free-floating element with the title morph. */
.back-square--floating {
  position: fixed;
  left: max(8px, calc(50vw - var(--max-width) / 2 + var(--gutter) - 34px));
  right: auto;
  margin: 0;
  transform: rotate(var(--square-rotation, 0deg));
}

/* Le carré flottant garde sa boîte de 10px (positionnée en JS), mais sa forme
   visible passe sur ::before : le clip-path qui dessine le triangle clippe aussi
   la zone cliquable. ::after fournit alors une cible tactile de 44px non clippée,
   sans déplacer la forme. */
.back-square--floating,
.icon-sets-page .back-square--floating {
  background-color: transparent;
  clip-path: none;
}
.back-square--floating::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--text-primary);
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  transition: clip-path 0.45s cubic-bezier(0.5, 0, 0, 1),
              background-color 0.3s cubic-bezier(0.5, 0, 0, 1);
}
.back-square--floating.is-triangle::before {
  clip-path: polygon(0% 50%, 100% 0%, 100% 100%, 0% 50%);
}
.back-square--floating:hover::before {
  background-color: var(--hover-accent);
}
.icon-sets-page .back-square--floating::before {
  background-color: var(--dark-text);
}
.icon-sets-page .back-square--floating:hover::before {
  background-color: var(--hover-accent);
}
/* Cible tactile élargie (44px) : transparente, déborde la boîte de 10px. */
.back-square--floating::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.back-square:hover {
  background-color: var(--hover-accent);
}

.icon-sets-page .back-square {
  background-color: var(--dark-text);
}
.icon-sets-page .back-square:hover {
  background-color: var(--hover-accent);
}

/* Hide the spacer used to keep the line correctly positioned in the bar */
.scroll-header-title-spacer {
  display: inline-block;
  height: 22px;
  visibility: hidden;
}

/* Smaller burger inside the sticky scroll bar */
.scroll-header-burger {
  padding: 6px;
  gap: 4px;
}

.scroll-header-burger span {
  width: 20px;
  height: 2px;
}

.scroll-header-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1;
}

.scroll-header-line {
  display: block;
  height: 3px;
  background-color: var(--hover-accent);
  width: 24px;
  transition: width 0.7s cubic-bezier(0.5, 0, 0, 1) 0.12s;
}

.scroll-header.is-visible .scroll-header-line {
  width: var(--scroll-title-width, 200px);
}

/* Dark variant pour les pages icon-sets / weazer */
.icon-sets-page .scroll-header {
  background-color: var(--dark-bg);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.icon-sets-page .scroll-header-title {
  color: var(--dark-text);
}

@media (max-width: 640px) {
  .scroll-header { height: 56px; }
  .scroll-header-title { font-size: 18px; }
}

/* ─── CLIENTS BLOCK (Science & Conseil sidebar) ──────── */

.clients-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.clients-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.8);
  margin: 0;
}

.clients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chapter-body:has(.clients-block--wide) {
  grid-template-columns: 1fr 600px;
}

/* Mobile/tablette : la colonne fixe de 600px déborde largement le viewport
   (et l'élargit jusqu'à ~970px → burger éjecté, scroll horizontal). Le sélecteur
   :has() est plus spécifique que le .chapter-body générique du media query, donc
   il faut le réécraser explicitement ici. */
@media (max-width: 900px) {
  .chapter-body:has(.clients-block--wide) {
    grid-template-columns: 1fr;
  }
}

/* ─── SUP3R8 GALLERY ──────────────────────────── */

.sup3r8-gallery {
  margin: 0 0 100px;
}

.gallery-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.8);
  margin: 0 0 24px;
}

.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.gallery-row {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.gallery-tile {
  margin: 0;
  flex: var(--aspect, 1) 1 0;
  min-width: 0;
}

.gallery-tile img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.gallery-tile:hover img {
  opacity: 1;
}

.gallery-tile figcaption {
  display: none;
}

@media (max-width: 640px) {
  .gallery-row { flex-direction: column; }
}

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

.clients-block--wide .clients-grid {
  grid-template-columns: repeat(3, 1fr);
}

.client-logo {
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 1px solid #D9CBB0;
  border-radius: 4px;
}

.client-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.client-logo img[src*="airbus"] {
  transform: scale(1.6);
}

.client-logo img[src*="credit-agricole"] {
  transform: scale(1.5);
}

.client-logo img[src*="ikea"] {
  transform: scale(1.5);
}


.client-logo:hover img {
  opacity: 1;
}

@media (max-width: 640px) {
  .clients-grid { grid-template-columns: repeat(3, 1fr); }
}

.clients-names {
  list-style: none;
  margin: 28px 0 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  font-size: 18px;
  font-weight: 300;
  color: var(--text-secondary);
}

.clients-names li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.clients-names li::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1.5px;
  background-color: var(--hover-accent);
  flex-shrink: 0;
}

/* ─── HOME PAGE — STICKY TOP BAR ─────────────── */

.home-page .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: padding 0.4s cubic-bezier(0.5, 0, 0, 1);
}

/* Full-viewport-width background behind the centered content, via a pseudo
   element that spans 100vw regardless of the site-header's max-width. */
.home-page .site-header::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background-color: transparent;
  z-index: -1;
  transition: background-color 0.4s cubic-bezier(0.5, 0, 0, 1);
}

/* Shrinks from 132px (40+content+40) down to 64px tall (matches chapter
   pages' sticky bar height) when scrolled. Elements re-center inside the
   shorter bar automatically because of flex align-items: center. */
.home-page.is-scrolled .site-header {
  padding: 12px var(--gutter);
}

.home-page.is-scrolled .site-header::before {
  background-color: var(--bg);
}

.home-page .logo,
.home-page .back-square {
  transition: color 0.4s cubic-bezier(0.5, 0, 0, 1),
              background-color 0.4s cubic-bezier(0.5, 0, 0, 1);
}
/* Survol du logo (home) : le carré cycle de forme (piloté en JS), SANS changer
   de couleur. États : plein → contour → pixels de 1px → (boucle). */
.home-page .back-square:hover {
  background-color: var(--text-primary);
  transition: none;            /* changements d'état nets (pas de fondu) */
}
.home-page .back-square.sq-solid {
  background-color: var(--text-primary);
  border: 0;
}
.home-page .back-square.sq-stroke {
  background-color: transparent;
  border: 1.5px solid var(--text-primary);
}
.home-page .back-square.sq-pixel {
  background-color: transparent;
  border: 0;
  /* tout le carré (intérieur compris) en pixels de ~1px, espacés de 2px */
  background-image: radial-gradient(var(--text-primary) 0.6px, transparent 0.7px);
  background-size: 2px 2px;
  background-position: 0 0;
}

.home-page.is-scrolled .logo {
  color: var(--text-primary);
}

.home-page.is-scrolled .back-square {
  background-color: var(--hover-accent);
}

/* ─── PAGE LOAD ENTRANCE ANIMATIONS ─────────────── */

@keyframes pageEnterUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageEnterFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* M3 emphasized easing used throughout */
:root {
  --enter-ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ── Background and site-header arrive immediately ── */
.home-page #bg-wave {
  animation: none;
  /* le décalage est porté par le <svg> à l'intérieur ; la boîte reste à la
     largeur du viewport et clippe le débordement → pas d'inflation du viewport */
  overflow: hidden;
}

/* La carte décalée déborderait à droite : on clippe l'overflow horizontal.
   `clip` (et non `hidden`) n'établit pas de conteneur de scroll → le header
   sticky de la home reste intact.
   #bg-wave étant en position:absolute sans ancêtre positionné, son bloc
   conteneur est <html> : le clip doit donc être posé sur <html> aussi, sinon
   la carte s'échappe du clip de <body> et crée un scroll horizontal. */
body.home-page,
html:has(body.home-page) {
  overflow-x: clip;
}

#bg-wave {
  animation: pageEnterFade 0.6s var(--enter-ease) both;
}

.site-header {
  animation: pageEnterFade 0.35s var(--enter-ease) both;
}

.back-square {
  animation: pageEnterFade 0.4s var(--enter-ease) both;
  animation-delay: 60ms;
}

/* ── HERO (chapter pages) ── */
.chapter-page-period {
  animation: pageEnterUp 0.45s var(--enter-ease) both;
  animation-delay: 80ms;
}

/* Title is moved to body by JS — opacity only since JS owns the transform */
.chapter-page-title {
  animation: pageEnterFade 0.45s var(--enter-ease) both;
  animation-delay: 160ms;
}

/* Divider is moved to body too, opacity only */
.chapter-divider--floating {
  animation: pageEnterFade 0.45s var(--enter-ease) both;
  animation-delay: 240ms;
}

.bg-attribution {
  animation: pageEnterUp 0.45s var(--enter-ease) both;
  animation-delay: 320ms;
}

/* ── BELOW HERO (chapter pages) ── */
.chapter-body {
  animation: pageEnterUp 0.5s var(--enter-ease) both;
  animation-delay: 480ms;
}

.by-the-numbers {
  animation: pageEnterUp 0.5s var(--enter-ease) both;
  animation-delay: 560ms;
}

.case-study {
  animation: pageEnterUp 0.5s var(--enter-ease) both;
}
.case-study:nth-of-type(1) { animation-delay: 640ms; }
.case-study:nth-of-type(2) { animation-delay: 700ms; }
.case-study:nth-of-type(3) { animation-delay: 760ms; }
.case-study:nth-of-type(4) { animation-delay: 820ms; }
.case-study:nth-of-type(5) { animation-delay: 880ms; }

.clients-block,
.clients-names,
.icones-set-section,
.featured-section,
.sticker-wall-section,
.weazer-extra-section {
  animation: pageEnterUp 0.5s var(--enter-ease) both;
  animation-delay: 560ms;
}

.chapter-nav {
  animation: pageEnterUp 0.45s var(--enter-ease) both;
  animation-delay: 900ms;
}

/* ── HERO (home) ── */
.hero h1 {
  animation: pageEnterUp 0.5s var(--enter-ease) both;
  animation-delay: 120ms;
}

.hero-bio {
  animation: pageEnterUp 0.5s var(--enter-ease) both;
  animation-delay: 260ms;
}

.social-links {
  animation: pageEnterUp 0.5s var(--enter-ease) both;
  animation-delay: 380ms;
}

.chapters {
  animation: pageEnterUp 0.5s var(--enter-ease) both;
  animation-delay: 500ms;
}

.chapters--theme {
  animation-delay: 600ms;
}

.dark-footer {
  animation: pageEnterFade 0.5s var(--enter-ease) both;
  animation-delay: 720ms;
}

/* Anti-flash : on cache l'état initial EN DUR (1re frame garantie invisible)
   avant que le backwards-fill de l'animation s'applique — sinon clignotement
   (l'élément apparaît en état final puis saute à l'état initial). On exclut
   #bg-wave (animation désactivée sur la home → resterait invisible). */
@media (prefers-reduced-motion: no-preference) {
  body:not(.home-page) #bg-wave,
  .site-header,
  .back-square,
  .chapter-page-period,
  .chapter-page-title,
  .chapter-divider--floating,
  .bg-attribution,
  .chapter-body,
  .by-the-numbers,
  .case-study,
  .clients-block,
  .clients-names,
  .icones-set-section,
  .featured-section,
  .sticker-wall-section,
  .weazer-extra-section,
  .chapter-nav,
  .hero h1,
  .hero-bio,
  .social-links,
  .chapters,
  .dark-footer {
    opacity: 0;
  }
}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  #bg-wave,
  .site-header,
  .back-square,
  .chapter-page-period,
  .chapter-page-title,
  .chapter-divider--floating,
  .bg-attribution,
  .chapter-body,
  .by-the-numbers,
  .case-study,
  .clients-block,
  .clients-names,
  .icones-set-section,
  .featured-section,
  .sticker-wall-section,
  .weazer-extra-section,
  .chapter-nav,
  .hero h1,
  .hero-bio,
  .social-links,
  .chapters,
  .dark-footer {
    animation: none;
  }
}


/* ─── SITE FOOTER (slim, toutes les pages) ─── */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
}
.footer-copy {
  color: var(--text-secondary);
  margin: 0;
}
.footer-copy strong {
  color: var(--hover-accent);
  font-weight: 700;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-link {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--hover-accent);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (max-width: 600px) {
  .site-footer { flex-direction: column; align-items: flex-start; gap: 22px; }
}

/* ─── COLOPHON — fenêtre navigateur (image) + Étoile de la Mort ─── */
.browser-mock {
  margin: 40px 0 8px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.14)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.06));
}
.browser-bar-img {
  display: block;
  width: 100%;
  height: auto;
}
.browser-screen {
  background: #1e1e1e;
  padding: 0;
  border-radius: 0 0 14px 14px;
  margin-top: -1px;
  overflow: hidden;
}
#deathstar {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* Variante corps paddé (démo typographie) */
.browser-screen--pad {
  padding: clamp(28px, 4.5vw, 52px);
  overflow: visible;
}

/* IA — sections en deux colonnes (texte / média) */
.ia-split {
  display: grid;
  grid-template-columns: 1fr 1.4fr; /* texte | média : image ~30% plus grande */
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  max-width: 1160px;
}
.ia-split--media-left {
  grid-template-columns: 1.4fr 1fr; /* média | texte */
  align-items: start;               /* la pile média est haute : on aligne en haut */
}
/* Colonne média empilée : schéma des couches + arbre couche 2 */
.ia-media-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.5vw, 30px);
}
.ia-tree-caption {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text-tertiary, #A8A8A0);
  margin: 2px 0 -8px;
}
.ia-split-text { min-width: 0; }
.ia-split-media { margin: 0; min-width: 0; align-self: start; }
/* Image avec son propre chrome (Claude + Obsidian) : aucun style ajouté */
.ia-shot {
  /* décale l'image pour aligner son haut avec le titre, pas avec l'eyebrow
     (hauteur eyebrow 11px + sa marge-bas 16px) */
  margin-top: calc(11px * 1.2 + 16px);
}
.ia-shot img {
  display: block;
  width: 100%;
  height: auto;
}
/* La fenêtre browser-mock (ASCII) reprend le drop-shadow, on annule juste sa marge */
.ia-split-media.browser-mock { margin: 0; }

/* Corps de fenêtre pour le schéma ASCII */
.browser-screen--ascii {
  padding: clamp(16px, 2.2vw, 28px);
  overflow: hidden;
}
.arch-ascii {
  margin: 0;
  font-family: var(--font-mono, "Space Mono", ui-monospace, "SF Mono", Menlo, monospace);
  font-size: clamp(9px, 1.05vw, 13px);
  line-height: 1.5;
  color: #e8e0d0;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  tab-size: 2;
}
.arch-ascii::-webkit-scrollbar { height: 6px; width: 6px; }
.arch-ascii::-webkit-scrollbar-thumb { background: rgba(243, 231, 214, 0.18); border-radius: 3px; }

/* IA — zoom couche 2 : arbre long, scroll vertical interne */
.ia-tree-mock { margin: 0; }
.arch-tree {
  font-size: clamp(9px, 0.92vw, 12.5px);
  max-height: clamp(300px, 46vh, 440px);
  overflow: auto;
}

/* Mobile : une seule colonne, texte d'abord puis média */
@media (max-width: 820px) {
  .ia-split { grid-template-columns: 1fr; gap: 28px; }
  .ia-split-text { order: 1; }
  .ia-split-media { order: 2; }
  .ia-shot { margin-top: 0; }
  .arch-ascii { font-size: clamp(11px, 2.8vw, 15px); }
  /* l'arbre reste compact pour limiter le scroll horizontal */
  .arch-tree { font-size: clamp(8.5px, 2.3vw, 12px); }
}
.type-display {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #f3e7d6;
  margin: 0;
  min-height: 1.18em;
}
.type-body {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.7;
  color: #e8e0d0;
  margin: 32px 0 0;
  min-height: 1.7em;
}
.type-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 231, 214, 0.42);
  margin: 14px 0 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.type-label.is-visible {
  opacity: 1;
}
.type-cursor {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  background: currentColor;
  margin-left: 3px;
  vertical-align: -0.12em;
  animation: type-blink 1s steps(1, end) infinite;
}
@keyframes type-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .type-cursor { display: none; }
  .type-label { opacity: 1; transition: none; }
}

/* ─── ABOUT — bloc contact (click-to-copy) ─── */
.about-contact {
  margin-top: 56px;
}
.about-contact .detail-label {
  margin: 0 0 14px;
}
.copy-email {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}
.copy-email:hover,
.copy-email:focus-visible,
.copy-email.is-copied {
  color: var(--hover-accent);
}
.contact-hint {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-muted);
  margin: 10px 0 0;
}
.copy-status {
  font-size: 13px;
  color: var(--hover-accent);
  margin: 6px 0 0;
  min-height: 1.1em;
}
.about-contact .social-links {
  margin-top: 28px;
}

/* ─── PAGE LECTURES ─── */
.reading-intro {
  max-width: 620px;
  margin: 0 0 56px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.reading-intro p { margin: 0; }
.reading-section { margin: 0 0 64px; }
.reading-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hover-accent);
  margin: 0 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid #C9B89B;
}
.book-list { display: flex; flex-direction: column; gap: 40px; }
.book {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  align-items: start;
  max-width: 760px;
}
.book-cover img {
  width: 96px;
  height: auto;
  display: block;
  border-radius: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16), 0 2px 5px rgba(0, 0, 0, 0.10);
}
.book-cover--ph {
  width: 96px;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  background: #1e1e1e;
  color: rgba(243, 231, 214, 0.55);
  border-radius: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.3;
}
.book-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 2px 0 4px;
}
.book-fav { color: var(--hover-accent); font-size: 15px; }
.book-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.book-take {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}
@media (max-width: 540px) {
  .book { grid-template-columns: 72px 1fr; gap: 18px; }
  .book-cover img, .book-cover--ph { width: 72px; }
}

/* Page Lectures — livres cliquables (lien éditeur) + hover léger */
a.book { text-decoration: none; color: inherit; }
.book-title { transition: color 0.2s ease; }
.book-cover img,
.book-cover--ph { transition: transform 0.25s cubic-bezier(0.5,0,0,1), box-shadow 0.25s ease; }
a.book:hover .book-title { color: var(--hover-accent); }
a.book:hover .book-cover img,
a.book:hover .book-cover--ph {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22), 0 4px 10px rgba(0, 0, 0, 0.12);
}
@media (prefers-reduced-motion: reduce) {
  .book-cover img, .book-cover--ph { transition: box-shadow 0.25s ease; }
  a.book:hover .book-cover img, a.book:hover .book-cover--ph { transform: none; }
}

/* ─── HOME FX (climate probe + hyperspace + hologram) ────── */

/* ── Climate probe (cursor tooltip) */
.cursor-probe {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  background-color: var(--text-primary);
  color: var(--bg);
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.18s ease;
  will-change: transform, opacity;
}

.cursor-probe.is-visible { opacity: 1; }

.cursor-probe .probe-label {
  color: rgba(243, 231, 214, 0.6);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cursor-probe .probe-value {
  color: var(--hover-accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cursor-probe .probe-year {
  color: rgba(243, 231, 214, 0.7);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-probe { display: none; }
}

/* ── Carte de Batz : POI = pastilles SVG (dans la carte) + label terminal ── */

/* Pastille = cercle SVG, toujours visible mais faible ; s'allume quand actif. */
.poi-dot {
  fill: var(--hover-accent);
  opacity: 0.32;
  transition: opacity 0.2s ease;
}
.poi-dot.is-active,
.poi-dot.is-pinging {
  opacity: 1;
}

/* Onde sonar : un anneau qui s'écarte et s'efface, très léger. Délai/durée
   aléatoires par pastille (JS) → les ondes partent en ordre désynchronisé. */
.poi-ping {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;   /* centre l'anneau sur le point */
  border-radius: 50%;
  border: 1px solid var(--hover-accent);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}
/* Jouée à la demande (une à la fois, orchestrée en JS). */
.poi-ping.is-pinging {
  animation-name: poiSonar;
  animation-timing-function: ease-out;
  animation-iteration-count: 1;
}
@keyframes poiSonar {
  0%   { transform: scale(0.4); opacity: 0; }
  12%  { opacity: 0.38; }
  100% { transform: scale(3.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .poi-ping { display: none; }
}
/* Sur tactile / petits écrans : l'anneau sonar (scale 3.6×) déborde le viewport
   près du bord droit et l'élargit (burger poussé). La carte y est un fond
   décoratif et la navigation passe par le burger : on coupe les pings. */
@media (max-width: 900px), (hover: none) {
  .poi-ping { display: none; }
}

/* Label « terminal » : HTML sur body, posé (via JS) à côté de la pastille. */
.poi-label {
  position: absolute;
  z-index: 60;
  transform: translateY(-50%);
  pointer-events: none;
  background-color: #1e1e1e;
  color: #f3e7d6;
  font-family: var(--font-mono, "Space Mono", ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 12px;
  line-height: 1.2;
  padding: 5px 9px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.poi-label.is-visible { opacity: 1; }

/* Curseur bloc clignotant pendant la frappe. */
.poi-label.is-typing::after {
  content: '▋';
  margin-left: 1px;
  animation: poiBlink 0.9s steps(1, end) infinite;
}
@keyframes poiBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .poi-label.is-typing::after { animation: none; }
}

/* ── Île de Batz tide readout badge */
.tide-badge {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 14px;
  background-color: #1e1e1e;
  color: #c8c8c0;
  font-family: var(--font-sans);
  border-radius: 3px;
  pointer-events: none;
  user-select: none;
}
.tide-badge-label {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 200, 192, 0.65);
}
.tide-badge-value {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--hover-accent);
  font-variant-numeric: tabular-nums;
}

/* ─── MEMORIA — vidéos iPhone 15 Pro (19.5:9) letterboxées en 9:16 (bandes noires
   latérales de 54px). Boîte au ratio 19.5:9 + object-fit: cover → recadre PILE les
   bandes (contenu réel = 19.5:9, rien d'utile perdu). Largeur d'affichage limitée
   pour rester à la taille d'origine du contenu (pas d'effet zoom). Toutes identiques. ─── */
.memoria-page .weazer-extra-section {
  justify-items: center;
}
/* Le RATIO + overflow sont sur le conteneur (div) = fiable ; la vidéo le remplit
   et object-fit: cover recadre les bandes noires latérales. */
.memoria-page .weazer-video-stage {
  max-width: 100%;   /* remplit la colonne, comme Weazer */
  aspect-ratio: 498 / 1080;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 12px 24px rgba(0, 0, 0, 0.35);
}
.memoria-page .weazer-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}
