/* ============================================================
   Chantiers : pages de réalisation, vignettes, galerie
   ============================================================ */

/* ---------- Vignettes (pages catégorie, liste) ---------- */
.ch-section{ padding: 8px 0 72px; background: var(--ivory); }
.ch-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom: 26px; flex-wrap:wrap; }
.ch-head h2{ font-family: var(--serif); color: var(--navy); font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.ch-head a{ font-size: .92rem; color: var(--brass); }
.ch-cards{ display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.ch-card{ display:block; color: inherit; }
.ch-card .ch-img{ overflow:hidden; aspect-ratio: 4/5; background: var(--ivory-deep); border-radius: var(--radius); }
.ch-card img{ width:100%; height:100%; object-fit: cover; display:block; transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .6s; filter: saturate(.92); }
.ch-card:hover img{ transform: scale(1.045); filter: saturate(1.05); }
.ch-card .ch-meta{ display:flex; justify-content:space-between; gap:12px; margin-top: 14px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }
.ch-card h3{ font-family: var(--serif); color: var(--navy); font-size: 1.22rem; margin-top: 6px; line-height:1.3; }
.ch-card p{ font-size: .93rem; margin-top: 6px; }

/* ---------- Page chantier : ouverture ---------- */
.ch-hero{ position:relative; min-height: min(86vh, 860px); display:flex; align-items:flex-end; color: var(--ivory); overflow:hidden; background: var(--navy-deep); }
.ch-hero img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position: center 60%; transform: scale(1.06); animation: chZoom 2.4s cubic-bezier(.2,.7,.2,1) forwards; }
.ch-hero::after{ content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(20,39,61,.45) 0%, rgba(20,39,61,0) 28%, rgba(20,39,61,.15) 55%, rgba(20,39,61,.88) 100%), linear-gradient(90deg, rgba(20,39,61,.55) 0%, rgba(20,39,61,0) 60%); }
.ch-hero .wrap{ position:relative; z-index:1; width:100%; padding-bottom: 64px; }
.ch-hero .crumb, .ch-hero .crumb a{ color: rgba(246,242,233,.78); }
.ch-hero .crumb{ margin-bottom: 18px; }
.ch-kicker{ font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: #EAD6B0; }
.ch-hero h1{ font-family: var(--serif); font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1.04; color: var(--ivory); margin-top: 10px; max-width: 16ch; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.ch-hero .ch-accroche, .ch-hero .ch-kicker{ text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.ch-hero .ch-accroche{ margin-top: 16px; max-width: 46ch; color: rgba(246,242,233,.88); font-size: 1.08rem; }
@keyframes chZoom{ to{ transform: scale(1); } }

/* ---------- Page chantier : récit + fiche ---------- */
.ch-story{ padding: 84px 0 40px; background: var(--ivory); }
.ch-story-grid{ display:grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 72px; align-items:start; }
.ch-story-text p{ font-size: 1.08rem; line-height: 1.85; }
.ch-story-text p + p{ margin-top: 18px; }
.ch-story-text p:first-child::first-letter{ font-family: var(--serif); float:left; font-size: 3.6em; line-height: .86; padding: 6px 10px 0 0; color: var(--brass); }
.ch-fiche{ border-top: 2px solid var(--navy); }
.ch-fiche div{ display:grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.ch-fiche dt{ color: var(--brass); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
.ch-fiche dd{ margin:0; color: var(--ink); }

/* ---------- Galerie éditoriale ---------- */
.ch-gallery{ padding: 40px 0 40px; background: var(--ivory); }
.ch-grid{ display:grid; grid-template-columns: repeat(12, 1fr); column-gap: 28px; row-gap: 72px; align-items:start; }
.ch-fig{ margin:0; cursor: zoom-in; }
.ch-fig .ch-frame{ overflow:hidden; background: var(--ivory-deep); border-radius: var(--radius); }
.ch-fig img{ display:block; width:100%; height:auto; transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.ch-fig:hover img{ transform: scale(1.03); }
.ch-fig figcaption{ display:flex; gap: 14px; align-items:baseline; margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }
.ch-fig .ch-num{ font-family: var(--serif); color: var(--brass); font-size: 1.05rem; letter-spacing: .04em; }
/* Rythme sur 5 photos, répété ensuite */
.ch-fig.p0{ grid-column: 1 / span 7; }
.ch-fig.p1{ grid-column: 9 / span 4; margin-top: 160px; }
.ch-fig.p2{ grid-column: 2 / span 4; margin-top: -40px; }
.ch-fig.p3{ grid-column: 7 / span 5; margin-top: 0; }
.ch-fig.p4{ grid-column: 3 / span 8; }
.ch-quote{ grid-column: 2 / span 10; text-align:center; font-family: var(--serif); color: var(--navy); font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.4; padding: 20px 0; }
.ch-note{ margin-top: 48px; font-size: .8rem; color: var(--ink-soft); opacity: .8; }

/* Apparition au défilement */
.ch-reveal{ opacity:0; transform: translateY(36px); transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.ch-reveal.in{ opacity:1; transform:none; }

/* ---------- Pied de page chantier ---------- */
.ch-next{ padding: 40px 0 96px; background: var(--ivory); }
.ch-next .wrap{ display:flex; justify-content:space-between; gap: 18px; flex-wrap:wrap; border-top: 1px solid var(--line); padding-top: 28px; }
.ch-next a{ font-family: var(--serif); color: var(--navy); font-size: 1.05rem; }
.ch-next a:hover{ color: var(--brass); }

/* ---------- Visionneuse ---------- */
.ch-lb{ position:fixed; inset:0; z-index:200; background: rgba(12,22,35,.94); display:none; align-items:center; justify-content:center; }
.ch-lb.open{ display:flex; }
.ch-lb img{ max-width: 92vw; max-height: 84vh; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.ch-lb .ch-lb-cap{ position:absolute; bottom: 22px; left:0; right:0; text-align:center; color: rgba(246,242,233,.8); font-size: .9rem; }
.ch-lb button{ position:absolute; background:none; border:0; color: var(--ivory); cursor:pointer; padding: 18px; font-size: 1.8rem; line-height:1; opacity:.75; }
.ch-lb button:hover{ opacity:1; }
.ch-lb .x{ top: 8px; right: 12px; }
.ch-lb .prev{ left: 8px; top: 50%; transform: translateY(-50%); }
.ch-lb .next{ right: 8px; top: 50%; transform: translateY(-50%); }
body.lb-open{ overflow:hidden; }

@media (max-width: 860px){
  .ch-story{ padding-top: 56px; }
  .ch-story-grid{ grid-template-columns: 1fr; gap: 40px; }
  .ch-grid{ grid-template-columns: 1fr; row-gap: 44px; }
  .ch-fig.p0, .ch-fig.p1, .ch-fig.p2, .ch-fig.p3, .ch-fig.p4, .ch-quote{ grid-column: 1; margin-top: 0; }
  .ch-fig.p1, .ch-fig.p3{ margin-left: 14%; }
  .ch-fig.p2{ margin-right: 14%; }
  .ch-hero{ min-height: 78vh; }
  .ch-hero .wrap{ padding-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce){
  .ch-hero img{ animation:none; transform:none; }
  .ch-reveal{ opacity:1; transform:none; transition:none; }
  .ch-card img, .ch-fig img{ transition:none; }
}
