/* ==========================================================================
   Accueil : bio courte sous le diptyque (26/11/2026, demande d'Olaf : « plus court… avec un bout d'actu »)
   — titre au même dessin que « Presse », un paragraphe, puis l'actualité en trois lignes : chaque
     <li> commence par un <strong> qui devient sa petite étiquette rouge.
   Texte modifiable dans l'admin « Bio » (champ « Texte de l'accueil »), posé par HomeController entre
   les repères bio-accueil de index.html. Préfixe hb- (home bio).
   ========================================================================== */

.hb {
  --wall: #efedf0; --ink: #1c1c1e; --ink-dim: #6e6e73; --red: #e3051b;
  background: var(--wall); color: var(--ink);
  padding: 72px clamp(16px, 4vw, 56px) 24px;
}
.hb-in {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 22px clamp(28px, 5vw, 72px);
  align-items: start;
}
.hb-title {
  margin: 0; font: 600 clamp(36px, 5vw, 64px)/.95 var(--font-titres, "Josefin Sans", sans-serif);
  letter-spacing: .06em; text-transform: uppercase;
}
.hb-text { max-width: 66ch; font-size: 17px; line-height: 1.6; }
.hb-text p { margin: 0 0 1.1em; }
.hb-text a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hb-text a:hover { color: var(--red); }

/* l'actualité : trois lignes séparées d'un filet, étiquette rouge au-dessus */
.hb-text ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(28, 28, 30, .14); }
.hb-text li { padding: 14px 0 15px; border-bottom: 1px solid rgba(28, 28, 30, .14); font-size: 15.5px; line-height: 1.5; }
.hb-text li p { margin: 0; }   /* l'éditeur de l'admin met un <p> dans chaque puce */
.hb-text li strong:first-child {
  display: block; margin-bottom: 4px;
  font: 600 11.5px/1.2 var(--font-titres, "Josefin Sans", sans-serif); letter-spacing: .16em; text-transform: uppercase;
  color: var(--red);
}
.hb-text li a { white-space: nowrap; font-weight: 600; }
.hb-text li a::after { content: " →"; }

.hb-more {
  display: inline-block; margin-top: 22px;
  font: 600 12px/1 var(--font-titres, "Josefin Sans", sans-serif); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.hb-more:hover { color: var(--red); }

/* ---- Photos d'Olaf (26/11/2026) : tirage révélé + planche contact, assets/js/home-bio.js -------------- */
.hb-side { display: grid; gap: 34px; justify-items: start; }
.hb-photos { width: 100%; max-width: 330px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.hb-photos * { box-sizing: border-box; }   /* la planche défile, elle n'élargit jamais la colonne */
.hb-photos:not(.is-built) > img {   /* sans JavaScript : la première photo, simple tirage */
  width: 100%; height: auto; border: 12px solid #f7f5ef; border-bottom-width: 30px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16); transform: rotate(-1.6deg);
}
.hb-photos:not(.is-built) > img ~ img { display: none; }

/* le paquet : le tirage du dessus et, à partir de 2 photos, les suivants qui dépassent dessous (27/11/2026) */
.hb-stack { position: relative; display: block; margin-top: 10px; }
.hb-under {
  position: absolute; inset: 0; display: block; padding: 12px 12px 34px;
  background: #f2efe7; box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 8px 18px -6px rgba(0, 0, 0, .2);
  transition: rotate .5s cubic-bezier(.3, 1.3, .5, 1), translate .5s cubic-bezier(.3, 1.3, .5, 1);
}
.hb-under img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(.94); }
.hb-under-1 { rotate: 3.2deg; translate: 9px 5px; }
.hb-under-2 { rotate: -4.6deg; translate: -9px 9px; }
.hb-stack:hover .hb-under-1 { rotate: 6deg; translate: 22px 0; }   /* au survol, le paquet s'écarte */
.hb-stack:hover .hb-under-2 { rotate: -8deg; translate: -20px 12px; }

/* le tirage : papier baryté, grande marge en bas pour le crédit, scotché au mur ; s'incline vers la souris */
.hb-print {
  position: relative; display: block; width: 100%; padding: 12px 12px 34px; margin: 0;
  border: 0; border-radius: 1px; font: inherit; color: inherit; text-align: left;
  background: #f7f5ef linear-gradient(160deg, rgba(255, 255, 255, .7), rgba(0, 0, 0, .025));
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 12px 26px -6px rgba(0, 0, 0, .22), 0 30px 50px -30px rgba(0, 0, 0, .3);
  rotate: -1.6deg;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: rotate .45s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s, transform .7s cubic-bezier(.2, .8, .3, 1);
}
.hb-stack.is-tilting .hb-print { transition: rotate .45s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s, transform .12s linear; }
.hb-print::after {   /* le reflet du papier baryté, qui suit la souris */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 52%);
  mix-blend-mode: soft-light; opacity: 0; transition: opacity .45s;
}
.hb-stack.is-tilting .hb-print::after { opacity: 1; }
button.hb-print { cursor: pointer; }
button.hb-print:hover { rotate: -.6deg; box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 18px 34px -8px rgba(0, 0, 0, .26), 0 40px 60px -34px rgba(0, 0, 0, .32); }
.hb-print:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }

.hb-paper {   /* la zone sensible : papier vierge tant que rien n'est révélé */
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  background: #eeebe3; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
}
.hb-emulsion, .hb-shot { position: absolute; inset: 0; }
.hb-shot { width: 100%; height: 100%; object-fit: cover; display: block; }

/* le révélateur : l'image monte du blanc, d'abord pâle et chaude, puis prend sa densité */
.hb-shot.is-developing-slow { animation: hb-develop 3.2s cubic-bezier(.35, .1, .25, 1) both; }
.hb-shot.is-developing { animation: hb-develop 1.5s cubic-bezier(.35, .1, .25, 1) both; }
@keyframes hb-develop {
  0%   { opacity: 0; filter: brightness(2.6) contrast(.25) sepia(.6) blur(1.2px); }
  25%  { opacity: 1; filter: brightness(2) contrast(.4) sepia(.55) blur(.6px); }
  70%  { filter: brightness(1.15) contrast(.9) sepia(.15) blur(0); }
  100% { opacity: 1; filter: none; }
}

/* morceau de scotch de masquage, bords déchirés */
.hb-tape {
  position: absolute; z-index: 2; top: -13px; left: 50%; width: 38%; height: 28px; translate: -50% 0; rotate: 3deg;
  background: linear-gradient(180deg, rgba(240, 232, 206, .86), rgba(226, 216, 186, .82));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  clip-path: polygon(0 6%, 4% 0, 9% 9%, 13% 1%, 87% 0, 92% 8%, 96% 0, 100% 7%, 98% 50%, 100% 94%, 95% 100%, 90% 92%, 85% 100%, 12% 100%, 7% 91%, 3% 100%, 0 93%, 2% 48%);
}

/* crédit au crayon, dans la marge du bas */
.hb-credit {
  position: absolute; left: 14px; right: 14px; bottom: 5px;
  font: 400 17px/1 "Caveat", "Kalam", cursive; color: #55534d; rotate: -1deg;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* la planche contact : bande de film tirée sur papier, la vue choisie entourée au crayon gras */
.hb-strip {
  position: relative; padding: 9px; rotate: .8deg;
  background: #f7f5ef; box-shadow: 0 1px 1px rgba(0, 0, 0, .08), 0 10px 22px -8px rgba(0, 0, 0, .22);
}
.hb-film {
  position: relative; padding: 23px 0 19px; background: #141312;
}
.hb-film::before, .hb-film::after {   /* perforations */
  content: ""; position: absolute; left: 0; right: 0; height: 5px;
  background: repeating-linear-gradient(90deg, transparent 0 5px, #d8d3c7 5px 10px, transparent 10px 14px);
  opacity: .8;
}
.hb-film::before { top: 4px; }
.hb-film::after { bottom: 4px; }
.hb-edge {
  position: absolute; top: 11px; left: 8px; right: 8px; overflow: hidden; white-space: nowrap;
  font: 600 7.5px/1 "Familjen Grotesk", monospace; letter-spacing: .28em; color: #c9953a; opacity: .8;
}
.hb-frames {
  position: relative; display: flex; gap: 7px; padding: 0 8px; overflow-x: auto; scrollbar-width: none;
}
.hb-frames::-webkit-scrollbar { display: none; }
.hb-frame {
  position: relative; flex: 0 0 auto; width: 54px; padding: 0 0 13px; border: 0; background: none; cursor: pointer;
}
.hb-frame img {
  display: block; width: 54px; aspect-ratio: 4 / 5; object-fit: cover;
  opacity: .72; transition: opacity .25s, transform .25s;
}
.hb-frame:hover img, .hb-frame[aria-pressed="true"] img { opacity: 1; }
.hb-frame:hover img { transform: scale(1.04); }
.hb-frame:focus-visible { outline: 2px solid #f7f5ef; outline-offset: 2px; }
.hb-num {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  font: 600 7.5px/1 "Familjen Grotesk", monospace; letter-spacing: .12em; color: #c9953a; opacity: .8;
}
.hb-num i { font-style: normal; margin: 0 2px; }
.hb-loop { position: absolute; z-index: 3; pointer-events: none; overflow: visible; }
.hb-loop path {
  fill: none; stroke: var(--red); stroke-width: 3.4px; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; opacity: .9;
}

@media (prefers-reduced-motion: reduce) {
  .hb-print, .hb-under { transition: none; }
}

@media (max-width: 820px) {
  .hb { padding-top: 48px; }
  .hb-in { grid-template-columns: 1fr; }
  .hb-text { font-size: 16px; }
  /* téléphone (27/11/2026) : le tirage à côté du titre, plus en pleine largeur avant le texte ; la planche contact
     passe dessous, sur toute la largeur */
  .hb-side { grid-template-columns: minmax(0, 1fr) minmax(0, 46%); align-items: center; justify-items: stretch; gap: 22px 18px; }
  .hb-title { font-size: clamp(36px, 12vw, 56px); }
  .hb-photos { display: contents; }
  .hb-photos > img, .hb-stack { grid-column: 2; grid-row: 1; }
  .hb-strip { grid-column: 1 / -1; }
  .hb-print, .hb-under { padding: 8px 8px 25px; }
  .hb-photos:not(.is-built) > img { border-width: 8px 8px 24px; }
  .hb-credit { left: 9px; right: 9px; bottom: 4px; font-size: 14px; }
  .hb-tape { top: -10px; height: 20px; }
}
