.iv-gallery {
  --iv-paper:#f2eee5; --iv-ink:#122d25; --iv-line:#263e2e40; --iv-accent:#aa4920;
  --iv-turn:0deg; --iv-lift:0px; --iv-pan:0px; --iv-light:38%;
  position:relative; isolation:isolate; overflow:hidden; color:var(--iv-ink); background:var(--iv-paper);
  padding:clamp(48px,6vw,100px) clamp(22px,5.5vw,90px) 0;
  font-family:var(--tc-serif,Georgia,serif); scroll-margin-top:90px;
}
.iv-gallery[data-palette="craie"] { --iv-paper:#f1f2eb; --iv-ink:#14362d; }
.iv-gallery::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(ellipse at var(--iv-light) 20%,#fff9,transparent 55%),linear-gradient(112deg,transparent 47%,#bbb6a429 50%,transparent 53%); }
.iv-gallery .iv-running { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:20px; border-bottom:1px solid var(--iv-line); }
.iv-gallery .iv-running span,.iv-gallery .iv-kicker,.iv-gallery .iv-caption,.iv-gallery .iv-pause {
  font-family:var(--tc-sans,Arial,sans-serif); font-size:11px; line-height:1.5; letter-spacing:.13em; text-transform:uppercase;
}
.iv-gallery .iv-running span:last-child { color:var(--iv-accent); }
.iv-gallery .iv-heading { display:grid; grid-template-columns:1.5fr 1fr; align-items:end; gap:32px; padding:40px 0 38px; }
.iv-gallery .iv-heading h2 { color:inherit; margin:0; font:400 clamp(46px,6.4vw,100px)/.99 var(--tc-serif,Georgia,serif); letter-spacing:-.045em; max-width:13ch; text-wrap:balance; }
.iv-gallery .iv-heading p { margin:0 0 4px; justify-self:end; max-width:32ch; font-size:clamp(16px,1.35vw,21px); line-height:1.65; color:#334d42; }
.iv-gallery .iv-stage { position:relative; perspective:1400px; margin:0; min-height:500px; padding:16px 0 88px; }
.iv-gallery .iv-picture { position:relative; width:90%; height:clamp(380px,39vw,620px); transform:rotateY(var(--iv-turn)) translateY(var(--iv-lift)); transform-origin:52% 50%;
  overflow:hidden; border:10px solid #fcf9f1; outline:1px solid #c4bcaa; box-shadow:0 32px 50px -35px #13241ddd; background:#d6d2c6; }
.iv-gallery .iv-picture img { width:100%; height:100%; object-fit:cover; object-position:50% 50%; display:block; transform:scale(1.08) translateX(var(--iv-pan)); }
.iv-gallery .iv-wash { position:absolute; inset:-10%; pointer-events:none; opacity:.65;
  background:linear-gradient(116deg,transparent 25%,#fff7 36%,transparent 45%,#fffa 47%,transparent 51%); mix-blend-mode:soft-light; transform:translateX(-15%) skewX(-12deg); }
.iv-gallery[data-active="true"][data-moving="true"] .iv-wash { animation:iv-reflection 13s cubic-bezier(.45,0,.55,1) infinite alternate; }
@keyframes iv-reflection { from{transform:translateX(-23%) skewX(-12deg)} to{transform:translateX(29%) skewX(8deg)} }
.iv-gallery .iv-volume { position:absolute; right:-5%; bottom:162px; width:29%; height:72%; max-height:440px; pointer-events:none; }
.iv-gallery .iv-volume canvas { width:100%; height:100%; display:block; }
.iv-gallery .iv-volume:empty { display:none; }
.iv-gallery .iv-caption { display:flex; align-items:center; justify-content:space-between; gap:20px; width:87%; padding-top:23px; color:#445249; }
.iv-gallery .iv-caption span:first-child { max-width:42ch; }
.iv-gallery .iv-caption b { font-weight:400; color:var(--iv-accent); }
.iv-gallery .iv-pause { display:inline-flex; align-items:center; justify-content:center; border:1px solid #173c2966; border-radius:0; background:var(--iv-paper); color:var(--iv-ink); padding:12px 18px; min-height:44px; min-width:145px; cursor:pointer; }
.iv-gallery .iv-pause:hover,.iv-gallery .iv-pause:focus-visible { background:var(--iv-ink); color:var(--iv-paper); outline:2px solid var(--iv-accent); outline-offset:3px; }
.iv-gallery .iv-bottom { display:flex; justify-content:space-between; gap:20px; border-top:1px solid var(--iv-line); padding:23px 0 25px; font-size:13px; }
.iv-gallery .iv-bottom a { color:inherit; text-underline-offset:5px; }
.iv-gallery[data-layout="vertical"] .iv-picture { width:78%; height:620px; }
.iv-gallery[data-layout="vertical"] .iv-volume { width:33%; right:-4%; }
.iv-gallery[data-layout="reverse"] .iv-picture { margin-left:auto; }
.iv-gallery[data-layout="reverse"] .iv-volume { right:auto; left:-5%; }
.iv-gallery[data-layout="reverse"] .iv-caption { margin-left:auto; }
body.tc-ivory:not(#ivory) :is(.ed-responsibilities,.ed-correspondence,.va-cabinet) { border-top:1px solid #adac9c65; }
body.tc-ivory:not(#ivory) .iv-gallery + :is(.ed-responsibilities,.ed-correspondence) { padding-top:70px; }
@media(max-width:700px) {
  .iv-gallery { padding:36px 22px 0; scroll-margin-top:76px; }
  .iv-gallery .iv-running span { font-size:9px; letter-spacing:.1em; }
  .iv-gallery .iv-heading { grid-template-columns:1fr; gap:23px; padding:30px 0; }
  .iv-gallery .iv-heading h2 { font-size:clamp(43px,11.8vw,67px); }
  .iv-gallery .iv-heading p { justify-self:start; font-size:16px; max-width:31ch; }
  .iv-gallery .iv-stage { padding-bottom:30px; min-height:0; }
  .iv-gallery .iv-picture,.iv-gallery[data-layout="vertical"] .iv-picture { width:100%; height:400px; border-width:5px; }
  .iv-gallery .iv-volume,.iv-gallery[data-layout="vertical"] .iv-volume { width:45%; right:-11%; height:255px; bottom:179px; }
  .iv-gallery[data-layout="reverse"] .iv-volume { left:-11%; right:auto; }
  .iv-gallery .iv-caption { width:100%; align-items:flex-start; padding-top:26px; gap:18px; font-size:9px; letter-spacing:.07em; }
  .iv-gallery .iv-caption span:first-child { max-width:18ch; }
  .iv-gallery .iv-pause { min-width:129px; padding:10px; font-size:9px; }
  .iv-gallery .iv-bottom { font-size:12px; }
}
@media(prefers-reduced-motion:reduce),(prefers-contrast:more),(forced-colors:active) {
  .iv-gallery .iv-picture,.iv-gallery .iv-picture img { transform:none!important; }
  .iv-gallery .iv-wash { animation:none!important; display:none; }
}
@media(forced-colors:active) { .iv-gallery .iv-volume { display:none; } .iv-gallery { border:1px solid CanvasText; } }
/* Direction italienne (Claude, 29/09) : tête et pied de galerie à deux filets, folio gravé ; palette inchangée. */
.iv-gallery .iv-running { background:linear-gradient(var(--it-f2,#a7350b6b),var(--it-f2,#a7350b6b)) 0 calc(100% - 4px)/100% 1px no-repeat; }
.iv-gallery .iv-bottom { background:linear-gradient(var(--it-f2,#a7350b6b),var(--it-f2,#a7350b6b)) 0 4px/100% 1px no-repeat; }
.iv-gallery .iv-running span:last-child { text-shadow:var(--it-grave-clair,none); font-variant-numeric:lining-nums; }
@media(prefers-contrast:more),(forced-colors:active),print { .iv-gallery :is(.iv-running,.iv-bottom) { background:none; } .iv-gallery .iv-running span:last-child { text-shadow:none; } }
