/* homin-ad — archive
   Refs : crédits de pochette (signe + bloc texte), listes centrées en capitales
   grises (Classic Future), mono fine très espacée (Michelin), mentions légales en pied.
   Les images sont le centre : petites, sans cadre, sur toute la largeur. */

@font-face { font-family: "Suisse"; src: url("assets/fonts/suisse-regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Suisse"; src: url("assets/fonts/suisse-semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --paper: #ffffff;
  --ink: #1d1d1b;
  --tone: #a7a7a1;        /* gris des tags inactifs (hiérarchie par tons) */
  --tone-light: #dadad5;
  --mute: #8a8a85;

  --sans: "Suisse", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", "Courier New", monospace;   /* interface (barre, tags, légendes) */

  --h: clamp(120px, 13vw, 200px); /* hauteur cible des vignettes */
  --gap: 3px;
  --gutter: clamp(10px, 1.6vw, 22px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* place de la barre de défilement réservée : la largeur ne change pas au chargement
   (sinon toutes les rangées se recalculent en pleine animation) */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; overflow-y: scroll; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.25;
  overflow-x: clip;   /* clip (et pas hidden) : hidden empêcherait l'en-tête de rester collé en haut */
}
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; cursor: pointer; }

/* ── Barre fine (reste en haut au défilement) ──── */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem 2rem; flex-wrap: wrap;
  padding: 10px var(--gutter);
  background: var(--paper);
  font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
/* Bloc logo : rectangle 3:4 + nom centré verticalement sur le rectangle */
.bar__brand { display: flex; align-items: stretch; gap: 9px; color: var(--ink); text-decoration: none; }
.bar__name { display: flex; align-items: center; height: 24px; line-height: 1; }   /* une ligne, centrée sur le rectangle */
.bar__mark { flex: none; align-self: center; height: 13px; width: auto; }   /* monogramme HAD */
/* Logo de la barre : silhouettes en blanc dans un rectangle noir 3:4 (toutes les pages) */
.bar__badge { flex: none; display: grid; place-items: center; width: 18px; height: 24px; background: #000; }
.bar__badge img { width: 13px; height: auto; filter: invert(1); }   /* le SVG est noir : on l'inverse en blanc */
.bar__count { color: var(--mute); align-self: flex-start; padding-top: 1px; }

/* Tags : petits, sur leur propre ligne, avec de l'air au-dessus et en dessous */
.tags {
  display: flex; flex-wrap: wrap; gap: 0 0.5ch;
  padding: clamp(34px, 5vw, 78px) var(--gutter) clamp(26px, 3.5vw, 56px);
  font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.tag { color: var(--tone); transition: color 0.25s var(--ease); }
.tag:hover { color: var(--ink); }
.tag.is-on { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tag[disabled] { color: var(--tone-light); cursor: default; }
.tag__n { font-size: 0.8em; margin-left: 0.3ch; }
.tags__sep { color: var(--tone-light); }

/* ── Archive : un bloc-ligne par projet, sans titre ── */
.archive { padding: 0 var(--gutter) clamp(60px, 8vw, 110px); }

.line { display: flex; flex-wrap: wrap; gap: var(--gap); }
.line + .line { margin-top: clamp(14px, 1.8vw, 22px); }
.break { flex: none; display: block; }   /* blanc entre deux projets, dimensionné par le JS */

.thumb {
  position: relative; display: block; flex: none;
  height: var(--h); width: calc(var(--h) * var(--ar));
  overflow: hidden; cursor: zoom-in;
}
.thumb { content-visibility: auto; }   /* hors écran : contenu ignoré par le navigateur (gros gain avec le défilement infini) */
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

.empty { font-family: var(--mono); font-weight: 300; text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; color: var(--mute); text-align: center; padding: 3rem 0; }

/* ── Étiquette qui suit le curseur (nom du projet) ── */
.cursor-tag {
  position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none;
  font-family: var(--mono); font-weight: 300; text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 11px; color: var(--ink); background: var(--paper); padding: 1px 4px; white-space: nowrap;
  opacity: 0; transition: opacity 0.15s;
}
.cursor-tag.is-on { opacity: 1; }

.ghosts { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.ghosts > * { position: fixed; margin: 0; }

/* ── Accueil : barre + tags fixés en haut ─────── */
.top-fixed { position: sticky; top: 0; z-index: 10; background: var(--paper); }
.top-fixed .bar { position: static; }
.infinite-sentinel { height: 1px; }

/* ── Liens de la barre ──────────────────────── */
a { color: inherit; }
.bar__links { display: flex; gap: 2ch; }
.bar__links a { color: var(--mute); text-decoration: none; transition: color 0.2s; }
.bar__links a:hover, .bar__links a.is-current { color: var(--ink); }
.thumb { cursor: pointer; }

.section-label {
  font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mute); margin-bottom: 0.8rem;
}

/* ── Pied de page : mentions légales façon affiche ── */
.foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
  padding: clamp(40px, 6vw, 80px) var(--gutter) var(--gutter); font-size: 10px; line-height: 1.3; color: var(--mute);
}
.foot__code { font-family: var(--mono); font-weight: 300; letter-spacing: 0.08em; }

/* ── Page Info ─────────────────────────────────── */
.doc { padding: clamp(80px, 12vw, 180px) var(--gutter) 0; }
.doc__lead { max-width: 64ch; }
.doc__title { font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin-bottom: 1.4rem; }
.doc__statement { font-size: clamp(20px, 2.2vw, 30px); line-height: 1.2; letter-spacing: -0.01em;
  text-align: justify; hyphens: auto; -webkit-hyphens: auto; }   /* justifié : bords droits des deux côtés */
.doc__statement + .doc__statement { margin-top: 0.9em; }
.doc__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem;
  margin-top: clamp(60px, 8vw, 120px); font-size: 14px; line-height: 1.35;
}
.doc__block p + p { margin-top: 0.6em; }
.doc__block p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.doc__list { list-style: none; }
.doc__list li {
  display: flex; justify-content: space-between; padding: 4px 0; border-top: 1px solid var(--tone-light);
  font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.doc__list li:last-child { border-bottom: 1px solid var(--tone-light); }
.doc__n, .doc__meta { color: var(--mute); }
.doc__meta { margin-top: 1rem; font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Page Contact : composition centrée (ref "We Grow Together") ── */
.contact {
  min-height: calc(100vh - 140px); display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--gutter) var(--gutter) clamp(70px, 16vh, 200px); text-align: center;   /* marge basse : bloc un peu au-dessus du centre */
}
.contact__logo-wrap { position: relative; margin-bottom: clamp(14px, 1.8vw, 22px); }
.contact__logo { display: block; width: clamp(28px, 2.8vw, 40px); height: auto; }
/* © en haut à droite du logo, comme sur le logo d'origine */
.contact__c { position: absolute; top: -0.2em; left: calc(100% + 0.25em); font-size: clamp(9px, 0.75vw, 11px); line-height: 1; }
.contact__text { font-family: var(--sans); font-size: clamp(15px, 1.45vw, 22px); line-height: 1.14; letter-spacing: -0.01em; position: relative; z-index: 1; }
.contact__text a { text-decoration: none; }
.contact__text a:hover { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 1px; }
/* Monogramme redessiné + 6 encadré, sous les lignes (comme la ligne du bas du logo) */
.contact__signature { width: clamp(200px, 24vw, 340px); height: auto; margin-top: clamp(26px, 3.2vw, 44px); }

/* ── Page projet : fiche ───────────────────────── */
.sheet {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem var(--gutter);
  padding: clamp(40px, 7vw, 100px) var(--gutter) clamp(30px, 4vw, 60px);
}
.sheet__meta { grid-column: 1 / span 4; }
.sheet__title { font-weight: 600; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -0.01em; line-height: 1.05; margin-bottom: 0.9rem; }
.sheet__line {
  display: grid; grid-template-columns: 6rem 1fr; padding: 4px 0; border-top: 1px solid var(--tone-light);
  font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.sheet__line:last-child { border-bottom: 1px solid var(--tone-light); }
.sheet__label { color: var(--mute); }
.sheet__toggle {
  display: none; position: absolute; top: 14px; right: calc(var(--gutter) - 10px);
  border: 0; background: none; padding: 8px 10px; cursor: pointer; color: var(--ink);
  font-family: var(--mono); font-weight: 300; font-size: 26px; line-height: 1;
  transition: transform 0.25s var(--ease);
}
.sheet.is-open .sheet__toggle { transform: rotate(45deg); }   /* le + devient × */
.sheet__text { grid-column: 7 / span 5; align-self: end; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.35; max-width: 42ch; }

/* ── Page projet : planches ────────────────────── */
.plates {
  --plate-gap: 6px;                                   /* bandes blanches fines entre les images */
  display: flex; flex-direction: column; gap: var(--plate-gap); padding: 0 var(--plate-gap);
}
.plate { margin: 0; scroll-margin-top: 60px; cursor: zoom-in; }
.plate img, .plate video { display: block; }
/* Ouverture : toute la largeur et toute la hauteur d'écran (sous la fiche), image recadrée pour remplir */
.plate--hero { height: calc(100vh - 56px); height: calc(100svh - 56px); overflow: hidden; background: #f4f4f2; }
.plate--hero img, .plate--hero video { width: 100%; height: 100%; object-fit: cover; }
/* Blocs : largeur proportionnelle au format (--r) => même hauteur sur toute la rangée */
.plates__row { display: flex; gap: var(--plate-gap); align-self: center; width: 100%; }
.plate--block { flex: var(--r) 1 0; min-width: 0; aspect-ratio: var(--r); overflow: hidden; background: #f4f4f2; }
.plate--block img, .plate--block video { width: 100%; height: 100%; object-fit: cover; }

/* ── Carrousel plein écran (js/lightbox.js) ── */
.lb { position: fixed; inset: 0; z-index: 100; display: none; background: var(--paper); }
.lb.is-open { display: block; animation: lb-in 0.2s ease-out; }
@keyframes lb-in { from { opacity: 0; } }
.lb__win { width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr; }
.lb__head {
  display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px var(--gutter);
  font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.lb__count { margin: 0; }
.lb__view { position: relative; min-height: 0; }
.lb__stage { position: absolute; inset: 0 60px 20px; display: flex; align-items: center; justify-content: center; }
.lb__stage img, .lb__stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.lb__btn {
  border: 0; background: none; color: var(--ink); cursor: pointer;
  font-family: var(--mono); font-weight: 300; font-size: 22px; line-height: 1; padding: 10px 12px;
}
.lb__btn:hover { color: var(--mute); }
.lb__btn:focus-visible { outline: 1px solid var(--ink); }
.lb__close { font-size: 24px; padding: 4px 10px; }
.lb__prev, .lb__next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb__prev { left: 6px; }
.lb__next { right: 6px; }
html.lb-lock { overflow: hidden; }

.pager { padding: clamp(50px, 7vw, 100px) var(--gutter) 0; }
.pager__head { margin: 0 0 12px; padding-top: 8px; border-top: 1px solid var(--ink); font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.pager__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.pager__card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; min-width: 0; }
.pager__card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; margin-bottom: 6px; background: var(--tone-light); }
.pager__code { font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.pager__title { font-weight: 600; font-size: clamp(15px, 1.4vw, 20px); letter-spacing: -0.01em; }
.pager__card:hover .pager__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ── Transition entre pages : la vignette cliquée se transforme en média ── */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

@media (max-width: 640px) {
  :root { --h: 96px; }
  .foot { flex-direction: column; align-items: flex-start; }
  .doc__grid { grid-template-columns: 1fr; }
  .contact { flex-direction: column; text-align: center; }
  .sheet__meta, .sheet__text { grid-column: 1 / -1; }
  /* fiche projet repliée : juste le titre et un "+", les infos s'ouvrent au toucher (on voit surtout les images) */
  .sheet { position: relative; padding: 22px var(--gutter) 18px; gap: 14px; }
  .sheet__title { margin-bottom: 0; padding-right: 44px; }
  .sheet__toggle { display: block; }
  .sheet:not(.is-open) .sheet__line, .sheet:not(.is-open) .sheet__text { display: none; }
  .sheet.is-open .sheet__title { margin-bottom: 0.9rem; }
  .pager__code { display: none; }
  .lb__stage { inset: 10px 8px; }          /* mobile : média bord à bord, flèches par-dessus */
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
