/* ── Ludi Design ─────────────────────────────────────────────────────────
   Portfolio de Cyrielle Lüdi.

   Trois mises en page :
     > 1080px   accueil en deux panneaux ; page projet : nom et
                description côte à côte, planches dessous
     ≤ 1280px   accueil à parts égales, pour la place des titres
     ≤ 1080px   colonne unique, la description passe sous le titre
     ≤ 860px    version mobile : menu replié ; à l'accueil, le projet
                présenté remplit une case, titres par-dessus le visuel
   ───────────────────────────────────────────────────────────────────── */

/* ── Polices ─────────────────────────────────────────────────────────────
   Hébergées sur le site (assets/fonts) : rien n'est chargé chez un tiers.
   Chaque police est découpée en deux fichiers ; le second (latin-ext) ne
   se charge que si un caractère rare l'exige.
   ───────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/instrument-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/instrument-sans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --cream: #FFF3D9;
  --white: #ffffff;
  --ink: #1d1d1b;
  --gold: #8a7a4f;
  --muted: #6f6f6a;  /* textes secondaires : lisible même en 11 px sur le crème */

  --sans: 'Instrument Sans', Helvetica, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;

  --page-pad-x: 44px;
  --item-h: 56px;
  --logo-h: 72px;
  --header-pad: 28px;  /* marge au-dessus du logo */

  /* Taille des titres du carrousel, au repos et au centre (lue aussi par
     app.js pour réduire les titres trop longs). */
  --title: 19px;
  --title-active: 22px;

  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

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

/* Les règles `display` ci-dessous l'emportent sur le style par défaut de
   [hidden] : on le rétablit pour que le routage puisse masquer les vues. */
[hidden] { display: none !important; }

/* Le défilement vers un élément (focus au clavier) s'arrête sous l'en-tête
   fixé en haut de l'écran. */
html { scroll-padding-top: 112px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page-bg, var(--cream));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* les vues entrent en glissant depuis les côtés */
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }

img { max-width: 100%; }

ul { list-style: none; margin: 0; padding: 0; }

p, li { text-wrap: pretty; }

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

.noscript {
  margin: 0;
  padding: 40px var(--page-pad-x);
  font-size: 16px;
  line-height: 1.6;
}

.noscript a { text-decoration: underline; }

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

/* ── Marque ──────────────────────────────────────────────────────────── */

.logo { display: block; position: relative; user-select: none; }

/* Le monogramme est étroit : sa zone cliquable déborde un peu. */
.logo::after {
  content: "";
  position: absolute;
  inset: -4px -10px;
}
.logo img { height: var(--logo-h); width: auto; display: block; }
.logo:hover { opacity: .7; }

/* ── Navigation ──────────────────────────────────────────────────────── */

.nav {
  display: flex;
  gap: clamp(28px, 3.5vw, 56px);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav__link { white-space: nowrap; }
.nav__link[aria-current] { font-weight: 600; }

/* Bouton du menu : version mobile seulement. */
.menu-toggle { display: none; }

/* ── Accueil ─────────────────────────────────────────────────────────── */

.view--home { display: flex; min-height: 100vh; }

/* Fond : celui des planches du projet présenté (posé par app.js). */
.home__visual {
  flex: 1.15;
  min-width: 0;
  background: var(--project-bg, var(--cream));
  transition: background-color .4s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* En haut, la place du logo et du nom, avec un peu d'air dessous. */
  padding: 116px 48px 48px;
}

.logo--home { position: absolute; top: var(--header-pad); left: var(--page-pad-x); }

/* Nom et métier, à droite du monogramme : la première chose qu'on lit en
   arrivant. Centrés sur la hauteur du logo (dont la largeur vaut 0,653
   fois la hauteur). */
.home__id {
  position: absolute;
  top: var(--header-pad);
  left: calc(var(--page-pad-x) + var(--logo-h) * 0.653 + 18px);
  height: var(--logo-h);
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-weight: 400;
}

.home__id-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1;
}

.home__id-role {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Jamais plus haut que l'écran : l'accueil tient sans défiler, la molette
   reste libre pour le carrousel. */
.home__hero {
  width: 100%;
  height: min(76vh, calc(100vh - 164px));
  object-fit: contain;
  object-position: center;
  transition: opacity .35s ease;
}

.home__hero.is-swapping { opacity: 0; }

.home__panel {
  flex: 1;
  min-width: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  padding: 40px 64px 56px;
}

.home__panel .nav { justify-content: flex-end; }

/* ── Carrousel des projets ───────────────────────────────────────────────
   Le projet sélectionné reste au centre ; la liste boucle et s'estompe
   vers les bords. Hauteur d'entrée fixe : le pas de défilement ne change
   pas quand le titre actif grossit.
   ───────────────────────────────────────────────────────────────────── */

.carousel {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  container-type: size;
}

.projects {
  --reach: 5.5;  /* rayon visible, en entrées (ajusté par app.js) */
  --solid: 3;    /* rayon pleinement opaque */
  --fade: linear-gradient(to bottom,
    transparent calc(50% - var(--reach) * var(--item-h)),
    #000 calc(50% - var(--solid) * var(--item-h)),
    #000 calc(50% + var(--solid) * var(--item-h)),
    transparent calc(50% + var(--reach) * var(--item-h)));

  position: relative;
  height: 100%;
  /* Marge sur les côtés, compensée : la flèche qui avance au survol et
     le contour de focus ne sont plus rognés par le bord de la liste. */
  margin-inline: -12px;
  padding-inline: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  /* Vertical seulement : le balayage horizontal reste libre pour le geste
     « page précédente » du trackpad. */
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  padding-block: calc(50cqh - var(--item-h) / 2);
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
  /* Le masque efface les titres, pas les clics : on retire donc de la zone
     cliquable ce qui est effacé, ou presque (la dernière demi-entrée), pour
     qu'un clic dans le vide au-dessus ou en dessous ne change rien. */
  clip-path: inset(calc(50% - (var(--reach) - 0.5) * var(--item-h)) 0);
}

.projects::-webkit-scrollbar { display: none; }

.projects li {
  height: var(--item-h);
  display: flex;
  align-items: center;
  scroll-snap-align: center;
}

.projects li > .project-link { flex: 1; min-width: 0; }

/* Entrées hors de vue : inutile de les animer. */
.projects li.is-far { animation: none; }

.project-link {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 44px;
  cursor: pointer;
}

.project-link__text { min-width: 0; }

/* Une seule ligne, toujours : un titre sur deux lignes casserait le pas
   régulier du carrousel. --fit (réglé par app.js) réduit juste assez les
   titres trop longs pour la colonne. */
.project-link__name {
  font-size: calc(var(--title) * var(--fit, 1));
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
  text-wrap: balance;
  transition: font-size .2s ease;
}

.project-link__meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
}

.projects li.is-active .project-link__name {
  font-size: calc(var(--title-active) * var(--fit, 1));
  font-weight: 700;
  font-style: italic;
}

/* Titres en noir ; sous le curseur (ou au clavier), ils prennent la
   couleur de leurs textes dans le portfolio (--item-ink, posée par app.js). */
.project-link:hover,
.project-link:focus-visible,
.project-link:active { color: var(--item-ink, var(--gold)); }

.project-link__go {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform .25s var(--ease-out), background-color .2s ease;
}

.projects li.is-active .project-link__go { display: flex; }
.project-link:hover .project-link__go {
  background: var(--item-ink, var(--gold));
  transform: translateX(4px);
}

/* Chevrons dessinés en CSS */
.chevron {
  width: 9px;
  height: 9px;
  border-top: 1.6px solid #fff;
  border-right: 1.6px solid #fff;
  transform: rotate(45deg);
  margin-left: -3px;
}

.chevron--left {
  border-right: 0;
  border-left: 1.6px solid #fff;
  transform: rotate(-45deg);
  margin-left: 3px;
}

/* ── Pages intérieures ───────────────────────────────────────────────── */

/* L'en-tête est fixé en haut de l'écran : le menu ne bouge jamais. La
   page lui réserve la place du logo et de la marge au-dessus. */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page-bg, var(--cream));
  padding: calc(var(--header-pad) + var(--logo-h)) var(--page-pad-x) 20px;
}

.page__header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: var(--header-pad) var(--page-pad-x) 12px;
  background: var(--page-bg, var(--cream));
  transition: box-shadow .2s ease;
}

/* Dès que la page défile, le logo se réduit de 30 %, ancré en haut à
   gauche, et un filet sépare l'en-tête du contenu. */
.page__header .logo img { transition: height .3s var(--ease-out); }

.is-scrolled .page__header { box-shadow: 0 1px 0 rgba(29, 29, 27, 0.1); }
.is-scrolled .page__header .logo img { height: calc(var(--logo-h) * 0.7); }

.page__header .nav { padding-top: 14px; }

/* ── Projet ──────────────────────────────────────────────────────────────
   En tête, le nom et la description, côte à côte. Dessous, les planches du
   portfolio sur toute la largeur : la page prend leur couleur de fond, si
   bien que leurs bords disparaissent. Chaque planche tient dans la hauteur
   de l'écran.
   ───────────────────────────────────────────────────────────────────── */

.project {
  margin-top: 56px;
  /* Textes secondaires : l'encre éclaircie reste lisible sur tous les
     fonds, du blanc au gris de Fin Haut. */
  --muted: rgba(29, 29, 27, 0.75);
}

.project__intro {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.back {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 8px;
  transition: transform .25s var(--ease-out), background-color .2s ease;
}

.back:hover {
  background: var(--accent, var(--gold));
  transform: translateX(-4px);
}

.project__body {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 72px;
  align-items: start;
}

.detail__name {
  font-size: 44px;
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

.detail__meta {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

/* Première ligne alignée sur le haut des capitales du nom. */
.detail__text { padding-top: 6px; }

.detail__desc {
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: 560px;
}

.detail__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 56px;
  margin: 32px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

.detail__specs dd {
  margin: 0;
  color: var(--muted);
}

.boards {
  margin: 64px calc(-1 * var(--page-pad-x)) 0;
  display: grid;
  justify-items: center;
}

/* Chaque planche est un bouton (clic : planche agrandie). Sans bouton,
   pour un navigateur trop ancien, l'image garde la même largeur. */
.board-zoom,
.boards > .board {
  width: min(100%, calc((100vh - 96px) * 16 / 9));
}

.board-zoom {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.board-zoom:focus-visible { outline-offset: -6px; }

.board {
  display: block;
  width: 100%;
  height: auto;
}

/* Fin de la fiche : retour à la galerie, à gauche ; projet suivant, à
   droite. Au survol, seule la flèche prend la couleur du projet. */
.project__end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  margin-top: 72px;
}

.project__all {
  font-size: 14px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.project__next {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.project__all:hover,
.project__next:hover { color: inherit; }

.project__next-label {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.project__next-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1.1;
  text-wrap: balance;
}

.project__next-go {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform .25s var(--ease-out), background-color .2s ease;
}

.project__next:hover .project__next-go {
  background: var(--accent, var(--gold));
  transform: translateX(4px);
}

/* ── Planche agrandie ────────────────────────────────────────────────────
   Une planche seule, sur toute la fenêtre, sur le fond de son projet.
   Entière à l'écran quand la fenêtre est large ; sur un écran plus haut
   que large, elle prend toute la hauteur et se fait glisser. app.js gère
   l'ouverture, le grossissement à la souris et la fermeture.
   ───────────────────────────────────────────────────────────────────── */

.viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--page-bg, var(--cream));
  color: var(--ink);
  overflow: hidden;
}

.viewer::backdrop { background: transparent; }

.is-viewing { overflow: hidden; }

.viewer__stage {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.viewer__stage::-webkit-scrollbar { display: none; }

/* `margin: auto` centre la planche tant qu'elle tient dans la fenêtre, et
   la laisse défiler en entier quand elle dépasse. */
.viewer__img {
  display: block;
  flex: none;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  transition: transform .3s var(--ease-out);
}

@media (orientation: portrait) {
  .viewer__img {
    height: 100%;
    max-width: none;
  }
}

.viewer.can-zoom .viewer__img { cursor: zoom-in; }

.viewer.is-zoomed .viewer__stage { overflow: hidden; }

.viewer.is-zoomed .viewer__img {
  transform: scale(2);
  cursor: zoom-out;
}

.viewer__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  transition: background-color .2s ease;
}

.viewer__close::before,
.viewer__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.6px;
  background: #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}

.viewer__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.viewer__close:hover { background: var(--accent, var(--gold)); }

/* Passage d'une planche à l'autre, en bas au centre. */
.viewer__bar {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}

.viewer__step {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease;
}

.viewer__step:hover { background: rgba(255, 255, 255, 0.16); }

.viewer__count {
  min-width: 44px;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.viewer :focus-visible { outline-color: #fff; outline-offset: 2px; }
.viewer__close:focus-visible { box-shadow: 0 0 0 2px var(--ink); }

@media (pointer: coarse) {
  .viewer__step {
    width: 44px;
    height: 44px;
  }
}

/* ── À propos / Contact ──────────────────────────────────────────────── */

.simple {
  max-width: 620px;
  margin: 120px auto 0;
}

.simple h1 {
  font-size: 44px;
  font-weight: 600;
  margin: 0;
}

.simple p {
  font-size: 16px;
  line-height: 1.6;
  margin: 32px 0 0;
  text-wrap: pretty;
}

.mail {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  display: inline-block;
  margin-top: 6px;
  padding-block: 6px;
}

.simple .simple__note {
  margin-top: 40px;
  font-size: 15px;
  color: var(--muted);
}

.simple .simple__links {
  margin-top: 0;
  font-size: 14px;
}

.simple__links a,
.legal a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ── Mentions légales ────────────────────────────────────────────────── */

.legal {
  max-width: 720px;
  margin-top: 56px;
}

.legal h1 {
  font-size: 44px;
  font-weight: 600;
  margin: 0;
}

.legal h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  margin: 48px 0 0;
}

.legal p {
  font-size: 16px;
  line-height: 1.6;
  margin: 12px 0 0;
}

/* ── Pied de page ────────────────────────────────────────────────────────
   En bas de chaque page intérieure, même quand le contenu est court.
   L'encre éclaircie reste lisible sur tous les fonds de projet.
   ───────────────────────────────────────────────────────────────────── */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 32px;
  margin-top: auto;
  padding-top: 96px;
  font-size: 12px;
  color: rgba(29, 29, 27, 0.75);
}

.footer__copy { margin: 0; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

.footer__links a {
  display: inline-block;
  padding-block: 15px;
}

.footer__links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Services et tarifs ──────────────────────────────────────────────────
   Galerie des offres, dans l'esprit du portfolio mais en typographie :
   chaque famille de services est une case crème. À la souris, un résumé
   des tarifs remplace la description au survol ; au doigt, il est affiché
   sous la case. Un clic ouvre, sous la rangée, le détail des prestations.
   ───────────────────────────────────────────────────────────────────── */

.services { margin-top: 56px; }

.services__head { max-width: 720px; }

.services__head h1 {
  font-size: 44px;
  font-weight: 600;
  margin: 0;
}

.services__head p {
  font-size: 16px;
  line-height: 1.6;
  margin: 20px 0 0;
  text-wrap: pretty;
}

.services__head .services__tip {
  font-size: 14px;
  color: var(--muted);
}

.services__tip--hover { display: none; }

/* En mode « dense », les cases suivantes comblent la rangée laissée par un
   détail ouvert, qui passe dessous sur toute la largeur. */
.services__grid {
  --cols: 3;
  --gap: 12px;

  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 24px var(--gap);
  margin-top: 40px;
}

/* Cases plus larges que hautes : la hauteur suit la largeur de la colonne,
   en gardant au survol la place du résumé des tarifs sous le titre. */
.service {
  --frame-h: 60cqw;
  position: relative;
  container-type: inline-size;
}

.service__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  height: var(--frame-h);
  padding: 24px;
  background: var(--cream);
  transition: box-shadow .2s ease;
}

.service.is-open .service__frame { box-shadow: inset 0 0 0 2px var(--gold); }

.service__num {
  position: absolute;
  top: 26px;
  right: 24px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.service__name {
  display: block;
  max-width: calc(100% - 40px);
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 9cqw, 44px);
  line-height: 1.05;
}

/* Le titre est un bouton dont la zone cliquable couvre toute la case. */
.service__toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.service__toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

.service__toggle:focus-visible { outline: none; }

.service:has(.service__toggle:focus-visible) .service__frame {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.service__hint {
  display: block;
  max-width: calc(100% - 44px);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Le « + » des cases, qui devient une croix quand le détail est ouvert. */
.service__plus {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
  transition: transform .3s var(--ease-out), background-color .2s ease;
}

.service__plus::before,
.service__plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 1.6px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.service__plus::after { transform: translate(-50%, -50%) rotate(90deg); }

.service__frame > .service__plus {
  position: absolute;
  right: 24px;
  bottom: 24px;
}

.service.is-open .service__plus { transform: rotate(45deg); }
.service:hover .service__plus { background: var(--gold); }

/* Au doigt : le résumé des tarifs sous la case. */
.service__prices {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.service__list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-top: 1px solid rgba(29, 29, 27, 0.12);
}

.service__list li span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.service__more { display: none; }

.service__go {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: background-color .2s ease, transform .25s var(--ease-out);
}

.service__go .chevron {
  width: 7px;
  height: 7px;
  margin-left: -2px;
}

/* Dernière case : toute la case mène au contact. */
.service--cta .service__frame {
  justify-content: flex-start;
  color: inherit;
}

.service--cta .service__name { max-width: none; }

.service__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.service--cta .service__frame:hover .service__go {
  background: var(--gold);
  transform: translateX(4px);
}

@media (hover: hover) {
  .services__tip--hover { display: block; }
  .services__tip--touch { display: none; }

  /* À la souris : le résumé des tarifs remplace la description au survol. */
  .service__prices {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    margin: 0;
    padding: 0 24px 24px;
    background: var(--cream);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease, transform .35s var(--ease-out);
  }

  .service__more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 16px;
    font-style: italic;
    font-weight: 700;
  }

  .service:hover .service__prices,
  .service:focus-within .service__prices {
    opacity: 1;
    transform: none;
  }
}

/* Détail d'une famille de services, sous sa rangée, sur toute la largeur. */
.service-details {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px 56px;
  padding: 36px 40px 40px;
  background: var(--cream);
  animation: ldFade .3s ease backwards;
}

.service-details__intro {
  margin: 0;
  padding-right: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  text-wrap: pretty;
}

.service-details__rows { margin-right: 32px; }

.service-details__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  padding: 16px 0;
  border-top: 1px solid rgba(29, 29, 27, 0.14);
}

.service-details__row:last-child { border-bottom: 1px solid rgba(29, 29, 27, 0.14); }

.service-details__name {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.service-details__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 4px 0 0;
}

.service-details__price {
  font-size: 15px;
  margin: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.service-details__cta {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
}

.service-details__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.service-details__close::before,
.service-details__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%) rotate(45deg);
}

.service-details__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.service-details__close:hover::before,
.service-details__close:hover::after { background: var(--gold); }

.services__note {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* Packs d'heures : les prix restent visibles, les conditions juste dessous.
   Les cartes reprennent les colonnes de la grille des offres, et restent
   côte à côte quand celle-ci passe à deux colonnes. */
.packs { margin-top: 72px; }

.packs__intro,
.packs__rules { max-width: 720px; }

.packs__intro {
  font-size: 15px;
  line-height: 1.6;
  margin: 12px 0 0;
}

.packs__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.pack {
  padding: 20px;
  background: var(--cream);
}

.pack__hours {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.pack__price {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  line-height: 1.1;
  margin: 10px 0 0;
  font-variant-numeric: tabular-nums;
}

.pack__detail {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 6px 0 0;
}

.packs__rules {
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.services__invite {
  font-size: 16px;
  margin: 56px 0 0;
}

/* Titres de rubrique, listes à tirets et appel final : partagés avec la
   page À propos. */
.services__title,
.about__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  margin: 0 0 8px;
}

.packs__rules li,
.about__list li {
  position: relative;
  padding-left: 18px;
}

.packs__rules li + li,
.about__list li + li { margin-top: 6px; }

.packs__rules li::before,
.about__list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.services__cta,
.about__cta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  display: inline-block;
  margin-top: 12px;
  padding-block: 4px;
}

/* ── À propos ────────────────────────────────────────────────────────────
   Même langage que les pages Services et Portfolio : fond blanc, cases
   crème posées sur une grille de trois colonnes.
   ───────────────────────────────────────────────────────────────────── */

.about { margin-top: 56px; }

.about__intro {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 48px;
  align-items: start;
}

/* Le portrait, façon autocollant : bord crème et légère inclinaison, qui
   se redresse au survol. */
.about__portrait {
  display: block;
  width: 100%;
  height: auto;
  border: 8px solid var(--cream);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(29, 29, 27, 0.12);
  transform: rotate(-3deg);
  transition: transform .4s var(--ease-out);
}

.about__portrait:hover { transform: rotate(0deg) scale(1.02); }

.about__hello {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
}

.about__text p {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

.about__quote {
  max-width: 720px;
  margin: 56px 0 0;
  padding-left: 24px;
  border-left: 2px solid var(--gold);
}

.about__quote p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1.3;  /* sur téléphone, la citation court sur cinq lignes */
}

.about__section { margin-top: 64px; }

/* Cases crème, sur les mêmes colonnes que la galerie des offres. */
.about__cards {
  --cols: 3;

  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.about__card {
  position: relative;
  padding: 24px;
  background: var(--cream);
}

/* L'année, en haut à droite, comme le numéro des offres. */
.about__year {
  position: absolute;
  top: 26px;
  right: 24px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.about__name {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
}

.about__year + .about__name { max-width: calc(100% - 100px); }

.about__desc {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.about sup {
  font-size: 0.6em;
  line-height: 0;
}

.about__section > p {
  max-width: 720px;
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

.about__list {
  max-width: 720px;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
}

.about__invite {
  margin: 64px 0 0;
  font-size: 16px;
}

.about__links {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Liens isolés : assez hauts pour le doigt. */
.about__links a,
.simple__links a {
  display: inline-block;
  padding-block: 13px;
}

.about__links span { margin: 0 6px; }

.about__links a,
.about__list a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ── Portfolio : la galerie ──────────────────────────────────────────────
   Mosaïque sur fond blanc, chaque projet posé sur une vignette crème. Les
   colonnes sont décalées : app.js donne à chaque vignette sa hauteur en
   rangées de 1px, et la grille la range dans la colonne la plus courte.
   ───────────────────────────────────────────────────────────────────── */

.gallery { margin-top: 56px; }

.gallery__grid {
  --cols: 4;
  --gap: 12px;

  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: 1px;
  grid-auto-flow: row dense;
  column-gap: var(--gap);
}

.gallery__grid .anim { animation-delay: calc(var(--step, 0) * 45ms); }

.tile { align-self: start; }

.tile__link {
  position: relative;
  display: block;
}

.tile__frame {
  background: var(--tile-bg, var(--cream));
  padding: 9%;
  overflow: hidden;
}

.tile__img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity .5s ease, transform .7s var(--ease-out);
}

.tile__img.is-loaded { opacity: 1; }

/* Au doigt, le titre est affiché sous la vignette. */
.tile__caption {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
}

.tile__name {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.tile__meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.tile__go { display: none; }

/* À la souris : l'image seule, comme dans une planche ; le titre et la
   flèche apparaissent au survol. */
@media (hover: hover) {
  .tile__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 14px 14px;
    background: linear-gradient(to top, var(--tile-bg, var(--cream)) 50%, transparent);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease, transform .35s var(--ease-out);
  }

  .tile__name {
    font-size: 16px;
    font-weight: 700;
    font-style: italic;
  }

  .tile__go {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    transition: transform .25s var(--ease-out), background-color .2s ease;
  }

  .tile__go .chevron {
    width: 7px;
    height: 7px;
    margin-left: -2px;
  }

  .tile__link:hover { color: inherit; }

  /* Le titre reste noir au survol de la case : la couleur du projet
     n'apparaît que sur la flèche (--tile-ink, posée par app.js). */
  .tile__link:has(.tile__go:hover) .tile__name,
  .tile__link:focus-visible .tile__name { color: var(--tile-ink, inherit); }

  .tile__go:hover,
  .tile__link:focus-visible .tile__go {
    background: var(--tile-ink, var(--ink));
    transform: translateX(3px);
  }

  .tile__link:hover .tile__img { transform: scale(1.04); }

  .tile__link:hover .tile__caption,
  .tile__link:focus-visible .tile__caption {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 1680px) { .gallery__grid { --cols: 5; } }
@media (max-width: 1180px) { .gallery__grid { --cols: 3; } }
@media (max-width: 1080px) {
  .services__grid,
  .about__cards { --cols: 2; }
}

/* ── Entrées animées ─────────────────────────────────────────────────────
   La direction vient de [data-dir] posé sur <body> par app.js : on avance
   vers une page (glissé depuis la droite), on revient à l'accueil (glissé
   depuis la gauche), ou c'est le tout premier affichage (montée simple).
   ───────────────────────────────────────────────────────────────────── */

@keyframes ldFromRight {
  from { opacity: 0; transform: translate3d(40px, 0, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes ldFromLeft {
  from { opacity: 0; transform: translate3d(-40px, 0, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes ldRise {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: none; }
}

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

/* `backwards` et non `both` : une fois l'animation finie l'élément reprend
   ses styles normaux, sinon l'opacité figée casserait le fondu du visuel. */
.anim {
  animation: ldFromRight .55s var(--ease-out) backwards;
  animation-delay: calc(var(--step, 0) * 80ms);
}

[data-dir="back"] .anim  { animation-name: ldFromLeft; }
[data-dir="first"] .anim { animation-name: ldRise; }

/* La liste compte douze entrées : décalage plus serré. */
.projects .anim { animation-delay: calc(var(--step, 0) * 40ms); }

/* ── Très grands écrans ──────────────────────────────────────────────────
   Au-delà de 1768 px de large, les pages intérieures ne s'étirent plus :
   leur contenu garde 1680 px et reste centré, en-tête et pied de page
   compris. Les planches des projets occupent toujours toute la fenêtre.
   À l'accueil, la liste des projets grandit un peu avec l'écran.
   ───────────────────────────────────────────────────────────────────── */

@media (min-width: 1769px) {
  .page { --page-pad-x: calc((100vw - 1680px) / 2); }
}

@media (min-width: 1920px) and (min-height: 1000px) {
  :root {
    --item-h: 64px;
    --title: 22px;
    --title-active: 26px;
  }

  .carousel { max-width: 560px; }
  .project-link__meta { font-size: 12px; }

  .project-link__go {
    width: 44px;
    height: 44px;
  }
}

/* ── ≤ 1280px : accueil à parts égales ───────────────────────────────────
   Sur un écran d'ordinateur étroit, la liste gagne de la place pour que
   les titres longs restent lisibles sur une ligne.
   ───────────────────────────────────────────────────────────────────── */

@media (max-width: 1280px) {
  .home__visual { flex: 1; }
  .home__panel { padding-inline: 40px; }
}

/* ── ≤ 1080px : colonne unique ───────────────────────────────────────── */

@media (max-width: 1080px) {
  .project__body {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }

  .detail__text { padding-top: 0; }
  .boards { margin-top: 48px; }
}

/* ── ≤ 860px : version mobile ────────────────────────────────────────────
   Sans survol, le grand visuel d'accueil ne peut plus changer : on le
   remplace par une liste de cartes, chaque projet montrant son image.
   ───────────────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  :root {
    --page-pad-x: 22px;
    --logo-h: 44px;
    --header-pad: 16px;
  }

  html { scroll-padding-top: 80px; }

  /* ── Menu ──────────────────────────────────────────────────────────────
     Replié derrière un bouton. Ouvert, il couvre l'écran ; le logo et le
     bouton (devenu une croix) restent par-dessus.
     ───────────────────────────────────────────────────────────────────── */

  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    /* Le trait s'aligne sur la marge de la page, la cible reste large. */
    margin-right: -11px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;
  }

  .menu-toggle__bar {
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform .3s var(--ease-out);
  }

  .is-menu-open .menu-toggle__bar:first-child { transform: translateY(3.75px) rotate(45deg); }
  .is-menu-open .menu-toggle__bar:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

  .page__header .nav,
  .home__panel .nav { display: none; }

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

  .is-menu-open .page__header .nav,
  .is-menu-open .home__panel .nav {
    display: flex;
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    padding: 112px var(--page-pad-x) 40px;
    background: var(--cream);
    font-family: var(--serif);
    font-size: 40px;
    font-style: italic;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: ldFade .3s ease backwards;
  }

  /* Sous le logo et le bouton, qui sont dans le même empilement. */
  .is-menu-open .page__header .nav { z-index: -1; }
  .is-menu-open .home__panel .nav  { z-index: 2; }

  .is-menu-open .nav__link { padding: 6px 0; }
  .is-menu-open .nav__link[aria-current] { font-weight: 400; color: var(--gold); }

  /* Le logo est déjà réduit : il garde sa taille au défilement. */
  .is-scrolled .page__header .logo img { height: var(--logo-h); }

  /* ── Accueil ───────────────────────────────────────────────────────────
     Le projet présenté remplit une case, comme dans la galerie : son
     visuel en fond, et par-dessus, dans le bas de la case, le carrousel
     des titres qu'on fait glisser du doigt. Le visuel suit la sélection.
     ───────────────────────────────────────────────────────────────────── */

  .view--home {
    --band: 240px;  /* bande des titres, en bas de la case (lue par app.js) */
    display: block;
    position: relative;
    height: 100vh;
    height: 100svh;
    background: var(--white);
  }

  .logo--home {
    position: fixed;
    top: var(--header-pad);
    left: var(--page-pad-x);
    z-index: 11;
  }

  .home__id {
    position: fixed;
    left: calc(var(--page-pad-x) + var(--logo-h) * 0.653 + 12px);
    z-index: 11;
    gap: 4px;
  }

  .home__id-name { font-size: 19px; }
  .home__id-role { letter-spacing: 0.16em; }

  .home__visual,
  .home__panel {
    position: absolute;
    inset: calc(2 * var(--header-pad) + var(--logo-h)) var(--page-pad-x) var(--page-pad-x);
  }

  .home__visual {
    display: block;
    padding: 0;
    overflow: hidden;
  }

  /* Le visuel occupe le haut de la case et déborde un peu sous la bande,
     où un voile de la couleur du fond l'efface, comme sous la légende
     d'une case de la galerie. */
  .home__hero {
    position: absolute;
    top: 28px;
    left: 28px;
    width: calc(100% - 56px);
    height: calc(100% - var(--band) + 12px);
  }

  /* Voile de la couleur du fond, en fondu par un masque : il change de
     couleur en même temps que la case. */
  .home__visual::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--band);
    background: var(--project-bg, var(--cream));
    -webkit-mask-image: linear-gradient(to top, #000 70%, transparent);
    mask-image: linear-gradient(to top, #000 70%, transparent);
    transition: background-color .4s ease;
  }

  /* Le carrousel couvre toute la case : on le fait glisser n'importe où. */
  .home__panel {
    z-index: 1;
    padding: 0 20px;
    background: none;
  }

  .home__panel .menu-toggle {
    position: fixed;
    top: var(--header-pad);
    right: var(--page-pad-x);
    z-index: 3;
  }

  .carousel { max-width: none; }

  /* La sélection se fait au centre de la bande ; au-dessus, les titres
     s'effacent pour laisser voir le visuel. */
  .projects {
    --fade: linear-gradient(to bottom,
      transparent calc(100% - var(--band)),
      #000 calc(100% - var(--band) / 2 - var(--item-h)),
      #000 calc(100% - var(--band) / 2 + var(--item-h)),
      transparent 100%);
    scroll-padding-top: calc(100% - var(--band));
    /* Ici toute la case reste active : on y fait glisser la liste, et
       toucher le visuel ouvre le projet. */
    clip-path: none;
  }

  /* Pages intérieures */
  .page { padding-bottom: 10px; }

  .project { margin-top: 28px; }
  .boards { margin-top: 36px; }

  /* Le nom reste à côté de la flèche ; la description prend toute la
     largeur de l'écran, sous les deux. */
  .project__intro {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 28px 18px;
  }

  .project__body { display: contents; }
  .detail__text { grid-column: 1 / -1; }

  .gallery { margin-top: 28px; }
  .gallery__grid { --cols: 2; --gap: 10px; }

  .back {
    width: 44px;
    height: 44px;
    margin-top: 2px;
  }

  .detail__name { font-size: 32px; }
  .simple h1,
  .legal h1,
  .services__head h1 { font-size: 32px; }
  .legal { margin-top: 28px; }

  /* Fin de fiche : le projet suivant d'abord, sur toute la largeur. */
  .project__end {
    flex-direction: column-reverse;
    align-items: flex-start;
    margin-top: 48px;
  }

  .project__next {
    flex-wrap: wrap;
    gap: 4px 14px;
    min-height: 44px;
  }

  .project__next-name { font-size: 26px; }
  .project__all { padding-block: 14px; }

  .footer { padding-top: 72px; }
  .viewer__close { top: 14px; right: 14px; }
  .services { margin-top: 28px; }

  .service-details {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px 22px 32px;
  }
  .service-details__intro {
    padding-right: 36px;
    font-size: 20px;
  }
  .service-details__rows { margin-right: 0; }

  .about { margin-top: 28px; }
  .about__intro {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about__portrait { width: 170px; }
  .about__hello { font-size: 32px; }
  .about__quote p { font-size: 22px; }
  .simple { margin-top: 56px; }
}

/* ── Téléphone tenu à l'horizontale ──────────────────────────────────────
   Plus assez de hauteur pour empiler le visuel et la bande des titres :
   ils se placent côte à côte, et la sélection se fait de nouveau au milieu
   de la liste (--band à zéro, lu par app.js).
   ───────────────────────────────────────────────────────────────────── */

@media (max-width: 860px) and (orientation: landscape) and (max-height: 520px) {
  .view--home { --band: 0px; }

  .home__hero {
    top: 16px;
    left: 16px;
    width: calc(50% - 32px);
    height: calc(100% - 32px);
  }

  .home__visual::after { display: none; }

  .home__panel { left: 50%; }

  .projects {
    --fade: linear-gradient(to bottom,
      transparent 0,
      #000 30%,
      #000 70%,
      transparent 100%);
    scroll-padding-top: 0;
  }
}

@media (max-width: 520px) {
  .mail { font-size: 25px; }

  /* Liens du pied de page un peu plus serrés : l'e-mail, LinkedIn et les
     mentions légales tiennent sur une ligne dès 360px de large. */
  .footer__links { column-gap: 20px; }

  .service-details__row {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .services__grid,
  .about__cards { --cols: 1; }
  .service { --frame-h: 56cqw; }
  .packs__cards { grid-template-columns: minmax(0, 1fr); }
}

/* ── Mouvement réduit ────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .anim,
  .is-menu-open .page__header .nav,
  .is-menu-open .home__panel .nav {
    animation: none;
  }
  .home__hero,
  .home__visual,
  .home__visual::after,
  .viewer__img,
  .viewer__close,
  .viewer__step,
  .project__next-go,
  .about__portrait,
  .page__header .logo img,
  .menu-toggle__bar,
  .project-link__name,
  .project-link__go,
  .back,
  .tile__img,
  .tile__caption,
  .tile__go,
  .service__prices,
  .service__go,
  .service__plus,
  .service__frame {
    transition: none;
  }
  .service-details { animation: none; }
  .tile__link:hover .tile__img { transform: none; }
}
