/* ============================================================
   Le Pincelier, accueil (chargée uniquement sur index.php)
   S'appuie sur les variables et polices de site.css.
   Toutes les classes de cette page sont préfixées « h- ».
   ============================================================ */

:root {
  --night:       #17120f;
  --night-2:     #211a15;
  --gilt-light:  #dbb976;   /* accent sur fond sombre */
  --paper:       #f1ece0;
  --on-night:    #f1ebdd;
  --on-night-2:  #b8ad9d;
  --line-dark:   rgba(241, 235, 221, .18);
  --focus-dark:  #8fb8ff;
  --ease:        cubic-bezier(.22, .61, .36, 1);
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --h-gutter:    clamp(1.1rem, 4vw, 3rem);
  --h-section:   clamp(5rem, 11vw, 10rem);
}

.is-home { background: var(--night); overflow-x: clip; }

.h-wrap { width: min(100% - 2 * var(--h-gutter), 84rem); margin-inline: auto; }

/* grain léger */
.is-home::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- En-tête : transparent sur le hero, plein au scroll ---------- */
.is-home .site-header {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent; backdrop-filter: none; border-bottom-color: transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.is-home .site-header.is-stuck {
  background: color-mix(in srgb, var(--night) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--line-dark);
}
/* même gabarit que le contenu de la page */
.is-home .site-header .wrap,
.is-home .site-footer .wrap { max-width: calc(84rem + 2 * var(--h-gutter)); padding-inline: var(--h-gutter); }
.is-home .brand__name { color: var(--on-night); }
.is-home .brand__sub  { color: var(--gilt-light); }
.is-home .nav-toggle span { background: var(--on-night); }
@media (min-width: 781px) {
  .is-home .nav a { color: var(--on-night); }
  .is-home .nav a::after { background: var(--gilt-light); }
  .is-home .nav a[aria-current="page"] { color: var(--gilt-light); }
}

/* ---------- Éléments communs ---------- */
.h-eyebrow {
  margin: 0 0 1.1rem; color: var(--oxblood);
  font: italic 500 clamp(1.3rem, 2vw, 1.6rem)/1.1 var(--serif); letter-spacing: 0;
}
.h-eyebrow--light { color: var(--gilt-light); }

.h-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .8rem 1.8rem;
  font: 700 .92rem/1 var(--sans); letter-spacing: .03em; text-decoration: none; border: 1px solid transparent; border-radius: 999px;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.h-btn:active { transform: scale(.98); }
.h-btn--light { background: var(--paper); color: var(--ink); }
.h-btn--light:hover { background: var(--gilt-light); color: var(--ink); }
.h-btn--line { border-color: rgba(241, 235, 221, .55); color: var(--on-night); }
.h-btn--line:hover { background: var(--on-night); color: var(--ink); border-color: var(--on-night); }
.h-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.h-link {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 2rem; padding-block: .5rem;
  font-weight: 700; color: var(--oxblood); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
}
.h-link svg { transition: transform .3s var(--ease); }
.h-link:hover { color: var(--oxblood-d); }
.h-link:hover svg { transform: translateX(5px); }

:where(.is-home) :focus-visible { outline: 3px solid var(--focus-dark); outline-offset: 3px; }
.h-gesture :focus-visible, .h-selection :focus-visible { outline-color: #1d4ed8; }

.h-clip { display: block; overflow: hidden; }
.h-clip img { width: 100%; height: 100%; object-fit: cover; }

/* ============================ HERO ============================ */
.h-hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end; isolation: isolate; overflow: clip;
  padding: calc(72px + 2rem) 0 clamp(2.5rem, 6vw, 4.5rem); background: var(--night);
}
.h-hero__bg { position: absolute; inset: -8% 0; z-index: -2; will-change: transform; }
.h-hero__bg picture, .h-hero__bg img { display: block; width: 100%; height: 100%; }
.h-hero__bg img { object-fit: cover; object-position: 50% 28%; transform: scale(1.1); transform-origin: 30% 30%; } /* rogne les bords du cadre photographié */
.h-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(23, 18, 15, .94) 0%, rgba(23, 18, 15, .5) 45%, rgba(23, 18, 15, .5) 100%),
    radial-gradient(110% 80% at 0% 100%, rgba(23, 18, 15, .6), transparent 60%);
}
.h-hero__content { position: relative; }

.h-hero__title {
  margin: 0 0 clamp(1.75rem, 4vw, 3rem); color: var(--on-night); font-weight: 500;
  font-size: clamp(4.4rem, 20vw, 17rem); line-height: .8; letter-spacing: -.045em;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .18em; text-shadow: 0 2px 40px rgba(0, 0, 0, .4);
}
.h-line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.h-line--it { font-style: italic; color: var(--gilt-light); letter-spacing: -.05em; }
.js .h-line { transform: translateY(105%); animation: h-rise 1.2s var(--ease-out) .15s forwards; }
.js .h-line--it { animation-delay: .32s; }
@keyframes h-rise { to { transform: none; } }
@media (max-width: 40em) {
  .h-hero__title { flex-direction: column; font-size: clamp(4.2rem, 28vw, 8rem); line-height: .88; }
}

.h-hero__foot { display: grid; gap: 1.75rem; align-items: end; }
@media (min-width: 56em) { .h-hero__foot { grid-template-columns: minmax(0, 34rem) auto; justify-content: space-between; } }
.h-hero__lead {
  margin: 0; max-width: 26ch; color: var(--on-night); font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.45rem, 2.6vw, 2.15rem); line-height: 1.2;
}
.h-hero__caption {
  position: absolute; right: 0; top: -9rem; margin: 0; writing-mode: vertical-rl; transform: rotate(180deg);
  font: 700 .7rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--on-night-2);
}
.h-hero__caption span { margin-inline-start: 1rem; color: var(--gilt-light); }
@media (max-width: 56em) { .h-hero__caption { display: none; } }

.h-cue { position: absolute; left: 50%; bottom: 1rem; width: 1.6rem; height: 3rem; margin-left: -.8rem; display: none; }
@media (min-width: 56em) and (min-height: 40rem) { .h-cue { display: block; } }
.h-cue span { display: block; width: 1px; height: 100%; margin: 0 auto; background: linear-gradient(var(--on-night), transparent); transform-origin: top; animation: h-cue 2.4s var(--ease) infinite; }
@keyframes h-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ============================ BANDEAU ============================ */
.h-marquee { background: var(--oxblood); color: var(--on-night); overflow: hidden; }
.h-marquee__track { display: flex; width: max-content; animation: h-marquee 40s linear infinite; }
.h-marquee p { display: flex; align-items: center; flex: none; margin: 0; padding-block: 1.15rem; white-space: nowrap; }
.h-marquee span { padding-inline: 1.4rem; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.8rem); line-height: 1; }
.h-marquee i { font-style: normal; font-size: 1rem; color: var(--gilt-light); }
@keyframes h-marquee { to { transform: translateX(-50%); } }

/* ============================ LE GESTE ============================ */
.h-gesture { background: var(--plaster); color: var(--ink); padding-block: var(--h-section); }
.h-gesture__grid { display: grid; gap: clamp(3rem, 8vw, 6rem); align-items: start; }
@media (min-width: 62em) { .h-gesture__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }

.h-manifesto {
  margin: 0 0 clamp(2rem, 4vw, 3rem); max-width: 30em; font-weight: 500; font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  line-height: 1.3; letter-spacing: 0; text-wrap: pretty;
}
.h-figures {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(1.5rem, 5vw, 3.5rem);
  margin: 0; padding-top: 1.75rem; border-top: 1px solid var(--line);
}
.h-figures dt { font: 700 .7rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .35rem; }
.h-figures dd { margin: 0; font-family: var(--serif); font-weight: 600; font-variant-numeric: lining-nums; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; color: var(--oxblood); }
.h-figures dd.h-figures__it { font-style: italic; font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2rem); padding-top: .45rem; }

.h-diptych { position: relative; display: grid; align-self: start; grid-template-columns: repeat(12, 1fr); align-items: start; }
.h-diptych__item { margin: 0; }
.h-diptych__item--1 { grid-column: 1 / 8; grid-row: 1; z-index: 1; }
.h-diptych__item--2 { grid-column: 7 / 13; grid-row: 1; margin-top: 46%; z-index: 2; }
.h-diptych__item--2 .h-clip { border: .6rem solid var(--plaster); box-shadow: var(--shadow); }
.h-diptych .h-clip { background: var(--plaster-2); aspect-ratio: 3 / 4; }
.h-diptych img { height: 112%; will-change: transform; }
.h-diptych figcaption { margin-top: .75rem; font-size: .78rem; letter-spacing: .06em; color: var(--ink-soft); }
.h-diptych__item--2 figcaption { text-align: right; }
@media (min-width: 62em) { .h-diptych { position: sticky; top: 6.5rem; } }
@media (max-width: 40em) {
  .h-diptych__item--1 { grid-column: 1 / 10; }
  .h-diptych__item--2 { grid-column: 5 / 13; grid-row: 2; margin-top: 1.5rem; }
}

/* ============================ LES UNIVERS ============================ */
.h-universes { background: var(--night); color: var(--on-night); padding-block: var(--h-section); }
.h-head { max-width: 46rem; margin-bottom: clamp(3rem, 7vw, 6rem); }
.h-head h2 { margin: 0; font-weight: 500; font-size: clamp(2.4rem, 6.4vw, 5.6rem); line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
.h-head__sub { margin: 1.5rem 0 0; color: var(--on-night-2); font-size: 1.1rem; }
.h-universes .h-head h2 { color: var(--on-night); }
.h-head--dark h2 { color: var(--ink); }

.h-head--split { max-width: none; display: grid; gap: 1.5rem 4rem; align-items: end; }
@media (min-width: 62em) { .h-head--split { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); } }
.h-head--split h2 { max-width: 14ch; }
.h-head--split .h-head__sub { margin: 0; max-width: 28ch; font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.25; color: var(--gilt-light); }

.h-panels { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); }
@media (min-width: 48em) { .h-panels { grid-template-columns: repeat(3, 1fr); align-items: start; } .h-panel:nth-child(2) { margin-top: clamp(2rem, 6vw, 5rem); } }

.h-panel a { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; color: var(--on-night); text-decoration: none; background: var(--night-2); isolation: isolate; }
.h-panel__img, .h-panel__img picture, .h-panel__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-panel__img { z-index: -2; }
.h-panel__img img { object-fit: cover; transition: transform 1.2s var(--ease-out); }
.h-panel a::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(23, 18, 15, .92) 0%, rgba(23, 18, 15, .35) 42%, rgba(23, 18, 15, .05) 70%); transition: opacity .4s var(--ease); }
.h-panel a:hover .h-panel__img img, .h-panel a:focus-visible .h-panel__img img { transform: scale(1.06); }

.h-panel__num { position: absolute; top: 1.25rem; left: 1.5rem; font: 700 .78rem/1 var(--sans); letter-spacing: .16em; color: var(--on-night); text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.h-panel__body { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: .3rem; padding: clamp(1.25rem, 2.4vw, 2rem); }
.h-panel__title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1; letter-spacing: -.02em; transition: color .3s var(--ease); }
.h-panel__sub { color: var(--on-night); font-size: .95rem; opacity: .9; }
.h-panel__count { display: inline-flex; align-items: center; justify-content: space-between; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid rgba(241, 235, 221, .35); font: 700 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gilt-light); }
.h-panel__count svg { transition: transform .4s var(--ease-out); }
.h-panel a:hover .h-panel__title, .h-panel a:focus-visible .h-panel__title { color: var(--gilt-light); }
.h-panel a:hover .h-panel__count svg, .h-panel a:focus-visible .h-panel__count svg { transform: translateX(6px); }

/* ============================ ŒUVRES CHOISIES ============================ */
.h-selection { background: var(--plaster-2); color: var(--ink); padding-block: var(--h-section); }
.h-works { columns: 1; column-gap: clamp(1rem, 3vw, 2.5rem); }
@media (min-width: 40em) { .h-works { columns: 2; } }
@media (min-width: 64em) { .h-works { columns: 3; } }

.h-work { display: block; break-inside: avoid; margin-bottom: clamp(2rem, 4vw, 3.25rem); text-decoration: none; color: inherit; cursor: zoom-in; }
.h-work__media { position: relative; background: var(--plaster); }
.h-work__media img { height: auto; transition: transform 1.1s var(--ease-out); }
.h-work:hover img { transform: scale(1.05); }
.h-work__zoom {
  position: absolute; right: 1rem; bottom: 1rem; width: 3rem; height: 3rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--paper); color: var(--ink); scale: .6; opacity: 0;
  transition: scale .4s var(--ease-out), opacity .3s var(--ease);
}
.h-work:hover .h-work__zoom, .h-work:focus-visible .h-work__zoom { scale: 1; opacity: 1; }
@media (hover: none) { .h-work__zoom { scale: 1; opacity: 1; } }
.h-work__cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .15rem 1rem; padding-top: 1rem; }
.h-work__cap strong { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.h-work__cap span { font: 700 .7rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--oxblood); }

/* ============================ CTA ============================ */
.h-cta { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(6rem, 14vw, 13rem); background: var(--oxblood-d); color: var(--on-night); }
.h-cta__bg { position: absolute; inset: -10% 0; z-index: -2; will-change: transform; }
.h-cta__bg picture, .h-cta__bg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.h-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to right, rgba(60, 17, 25, .93), rgba(60, 17, 25, .6)); }
.h-cta__inner { display: grid; gap: 3rem; align-items: end; }
@media (min-width: 62em) { .h-cta__inner { grid-template-columns: 1fr auto; column-gap: 4rem; } }
.h-cta h2 { margin: 0; max-width: 11ch; font-weight: 500; color: var(--on-night); font-size: clamp(3rem, 9.5vw, 9rem); line-height: .92; letter-spacing: -.025em; text-wrap: balance; }
.h-cta__text { margin: 2rem 0 0; max-width: 40ch; font-size: 1.15rem; color: var(--on-night); }
.h-round {
  display: inline-flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  width: 10.5rem; height: 10.5rem; padding: 2.2rem 1.9rem 1.7rem; border-radius: 50%; background: var(--gilt-light); color: var(--night);
  font: 700 .95rem/1.2 var(--sans); text-decoration: none; justify-self: start;
  transition: background-color .35s var(--ease), transform .5s var(--ease-out);
}
.h-round:hover { background: var(--paper); color: var(--night); transform: scale(1.06) rotate(-4deg); }
.h-round svg { align-self: flex-end; transition: transform .4s var(--ease-out); }
.h-round:hover svg { transform: translateX(4px); }
@media (min-width: 62em) { .h-round { width: 12.5rem; height: 12.5rem; font-size: 1.05rem; justify-self: end; } }

/* ---------- Pied de page existant, accordé à la nuit ---------- */
.is-home .site-footer { border-top: 1px solid var(--line-dark); }

/* ============================ RÉVÉLATIONS ============================ */
.js .h-reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .h-reveal.is-visible { opacity: 1; transform: none; }
.js .h-clip { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease-out); }
.js .h-clip.is-visible { clip-path: inset(0); }

.h-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.h-w > span { display: inline-block; }
.js [data-split] .h-w > span { transform: translateY(110%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 45ms); }
.js [data-split].is-visible .h-w > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .h-marquee__track { animation: none; width: auto; }
  .h-marquee p:nth-child(2) { display: none; }
  .js .h-line, .js .h-reveal, .js [data-split] .h-w > span { transform: none; opacity: 1; }
  .js .h-clip { clip-path: none; }
  .h-hero__bg, .h-cta__bg, .h-diptych img { will-change: auto; }
}