:root {
  --paper: #FBF6EF;
  --cream: #F8EFE3;
  --sand: #EADFCF;
  --peach: #F2D6B8;
  --ink: #3E4A3A;
  --ink-soft: #6F7966;
  --terra: #CF6A3C;
  --terra-light: #E3855A;
  --terra-dark: #A9502B;
  --sage: #869A7E;
  --sage-dark: #5F7458;
  --sage-light: #C6C3A8;
  --lavender: #A9A2B8;
  --night: #262821;
  --display: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", cursive;
  --ui: "Lato", system-ui, sans-serif;
  --gap: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Écran de code ---------- */
.gate {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: var(--paper);
}
.gate-card { text-align: center; max-width: 400px; width: 100%; }
.gate .crest { width: 120px; height: 120px; margin: 0 auto 12px; }
.gate-kicker { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--sage-dark); font-weight: 700; margin: 0 0 6px; }
.gate-title { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 7vw, 54px); line-height: 1; margin: 0 0 20px; }
.gate-title .amp { font-family: var(--script); font-weight: 400; color: var(--terra); font-size: 1.05em; padding: 0 .06em; }
.gate-sub { font-family: var(--display); font-size: 19px; color: var(--ink-soft); margin: 0 0 20px; }
.gate form { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gate input {
  width: 220px; padding: 14px 20px; border: 2px solid var(--sand); border-radius: 999px; background: #fff;
  font: 22px var(--ui); text-align: center; letter-spacing: .3em; color: var(--ink); outline: none;
  transition: border-color .2s;
}
.gate input:focus { border-color: var(--terra); }
.gate input::placeholder { letter-spacing: .15em; font-size: 18px; color: var(--sage-light); }
.gate .pill { min-width: 180px; }
.gate-err { color: var(--terra); font-size: 14px; margin: 10px 0 0; animation: shake .4s; }
@keyframes shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }

/* grain papier, comme sur le site */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .12; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .25 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scene { position: absolute; inset: 0; width: 100%; height: 100%; }

.card {
  background: rgba(255,255,255,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 16px; box-shadow: 0 10px 30px -12px rgba(62,74,58,.35);
}
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 150px; padding: 12px 28px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 2px solid var(--terra-light); background: rgba(251,246,239,.92); color: var(--terra);
  font-size: 17px; transition: background .25s, color .25s, transform .25s;
}
.pill:hover { transform: translateY(-2px); }
.pill-solid, .pill.ready { background: var(--terra); border-color: var(--terra); color: #fff; }
.pill-solid:hover { background: var(--terra-dark); border-color: var(--terra-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden;
  padding: 60px 16px 120px;
}
.hero-text {
  position: relative; z-index: 2; text-align: center; max-width: 680px; padding: 34px 36px 38px;
  background: rgba(251,246,239,.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 24px; box-shadow: 0 20px 50px -24px rgba(62,74,58,.45);
}
.crest { display: block; width: 160px; height: 160px; margin: -120px auto 0; filter: drop-shadow(0 8px 14px rgba(62,74,58,.2)); }
.kicker { font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--sage-dark); margin: 0 0 6px; font-weight: 700; }
.hero h1 {
  font-family: var(--display); font-weight: 500; font-size: clamp(44px, 8.5vw, 96px);
  line-height: 1; margin: 0 0 14px; letter-spacing: -.01em;
}
.hero h1 .amp { font-family: var(--script); font-weight: 400; color: var(--terra); font-size: 1.05em; padding: 0 .06em; }
.sub { font-family: var(--display); font-size: clamp(19px, 2.4vw, 23px); line-height: 1.4; margin: 0 0 26px; color: var(--ink-soft); }
.sub strong { color: var(--ink); font-weight: 600; }

.hero-stack { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.polaroid {
  position: absolute; background: #fff; padding: 8px 8px 30px; border-radius: 2px;
  box-shadow: 0 18px 40px -18px rgba(62,74,58,.55);
  opacity: 0; animation: drop 1.1s cubic-bezier(.2,.8,.2,1) forwards, float 9s ease-in-out infinite alternate;
}
.polaroid img { display: block; width: 100%; height: 100%; object-fit: cover; }
@keyframes drop { from { opacity: 0; translate: 0 -30px; } to { opacity: 1; translate: 0 0; } }
@keyframes float { from { margin-top: 0; } to { margin-top: 14px; } }
@media (max-width: 760px) {
  .polaroid { animation-name: dropSoft, float; }
  @keyframes dropSoft { from { opacity: 0; } to { opacity: .55; } }
  .hero-text { padding: 26px 20px 30px; }
}

/* ---------- Barre ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand);
}
.sun-track { height: 3px; background: linear-gradient(90deg, var(--sage-light), var(--sage), var(--terra-light), var(--terra), var(--terra-dark)); position: relative; }
.sun {
  position: absolute; top: -6px; left: 0; width: 15px; height: 15px; border-radius: 50%;
  background: var(--terra); box-shadow: 0 0 0 4px rgba(207,106,60,.2), 0 0 16px var(--terra-light);
  transform: translateX(-50%);
}
.bar-inner { max-width: 1600px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; }
.logo img { width: 46px; height: 46px; display: block; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap; border: 1px solid var(--sand); background: transparent;
  padding: 7px 15px; border-radius: 999px; cursor: pointer; font-size: 14px;
  transition: background .2s, color .2s, border-color .2s;
}
.chip b { font-family: var(--display); font-style: italic; font-weight: 600; color: var(--terra); margin-right: 5px; font-size: 16px; }
.chip:hover { border-color: var(--sage); }
.chip.on { background: var(--sage-dark); color: #fff; border-color: var(--sage-dark); }
.chip.on b { color: var(--peach); }
.actions { display: flex; gap: 6px; }
.btn {
  border: 1px solid var(--sand); background: transparent; border-radius: 999px;
  padding: 7px 15px; cursor: pointer; font-size: 14px; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: var(--terra-light); }
.btn b { font-weight: 700; color: var(--terra); }
.btn[aria-pressed="true"] { background: var(--terra); color: #fff; border-color: var(--terra); }
.btn[aria-pressed="true"] b { color: #fff; }
.btn-solid { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn-solid:hover { background: var(--terra-dark); border-color: var(--terra-dark); }
@media (max-width: 960px) {
  .bar-inner { flex-wrap: wrap; gap: 8px; }
  .chips { order: 3; flex-basis: 100%; }
  .actions { margin-left: auto; }
  .btn span { display: none; }
  .logo img { width: 38px; height: 38px; }
}

/* ---------- Galerie ---------- */
main { max-width: 1600px; margin: 0 auto; padding: 0 16px 40px; }
.chapter { padding-top: 60px; scroll-margin-top: 70px; }
.chapter-head { position: relative; display: flex; align-items: flex-end; gap: 20px; margin: 0 4px 24px; padding-bottom: 18px; }
.chapter-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='10'%3E%3Cpath d='M0 5C20 0 20 10 40 5S60 0 80 5' fill='none' stroke='%23869A7E' stroke-width='2'/%3E%3C/svg%3E") repeat-x;
  opacity: .7;
}
.chapter-num {
  flex: none; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: var(--terra); color: var(--cream); font-family: var(--display); font-style: italic; font-weight: 500; font-size: 34px;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--sage-light);
}
.chapter-num.heart { font-style: normal; font-size: 30px; }
.chapter-head h2 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 46px); margin: 0; line-height: 1.05; }
.chapter-head p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; letter-spacing: .04em; }
.chapter-head .script { font-family: var(--script); color: var(--terra); font-size: 26px; margin-left: 8px; letter-spacing: 0; }
.chapter-head .sprig { margin-left: auto; width: 96px; height: 77px; flex: none; }
@media (max-width: 600px) {
  .chapter-num { width: 56px; height: 56px; font-size: 26px; }
  .chapter-head { gap: 14px; }
  .chapter-head .sprig { display: none; }
}

.row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.tile {
  position: relative; overflow: hidden; border-radius: 6px; cursor: zoom-in;
  background: var(--sand); flex: none;
}
.tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transform: scale(1.04);
  transition: opacity .6s ease, transform .9s cubic-bezier(.2,.8,.2,1);
}
.tile img.in { opacity: 1; transform: scale(1); }
.tile img.now { transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(169,80,43,.6));
  opacity: 0; transition: opacity .35s;
}
.tile .n {
  position: absolute; left: 12px; bottom: 6px; z-index: 2; color: #fff;
  font-family: var(--display); font-style: italic; font-size: 20px; opacity: 0; translate: 0 8px;
  transition: opacity .35s, translate .35s;
}
.tile .heart {
  position: absolute; right: 8px; top: 8px; z-index: 2; width: 34px; height: 34px;
  border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(251,246,239,.88); color: var(--terra); font-size: 17px;
  opacity: 0; transition: opacity .25s, transform .2s;
}
.tile .heart:hover { transform: scale(1.12); }
.tile.fav .heart { opacity: 1; background: var(--terra); color: #fff; }
.tile:hover img.in, .tile:focus-visible img.in { transform: scale(1.05); }
.tile:hover::after, .tile:hover .n, .tile:hover .heart,
.tile:focus-visible::after, .tile:focus-visible .n { opacity: 1; translate: 0 0; }
.tile:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }
@media (hover: none) {
  .tile .heart { display: none; width: 26px; height: 26px; font-size: 13px; }
  .tile.fav .heart { display: grid; }
}

.empty { text-align: center; padding: 90px 16px; color: var(--ink-soft); }
.empty .script { font-family: var(--script); color: var(--terra); font-size: 44px; margin: 0 0 6px; }

/* ---------- Pied de page ---------- */
.foot { margin-top: 60px; text-align: center; color: var(--cream); }
.hills { display: block; width: 100%; height: 140px; margin-bottom: -2px; }
.foot-inner { background: var(--terra-light); padding: 8px 16px 50px; }
.foot .crest {
  margin: -70px auto 4px; width: 130px; height: 130px; padding: 6px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 10px 30px -14px rgba(62,74,58,.5); position: relative;
}
.foot .script { font-family: var(--script); font-size: 42px; margin: 0 0 6px; color: #fff; }
.foot p { margin: 4px 0; font-size: 14px; }

/* ---------- Visionneuse ---------- */
.lb {
  position: fixed; inset: 0; z-index: 50; background: var(--night); color: var(--cream);
  display: grid; grid-template-rows: auto 1fr auto; animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 10px; }
.lb-count { font-family: var(--display); font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count small { font-family: var(--ui); color: var(--sage-light); font-size: 13px; margin-left: 10px; }
.lb-tools { display: flex; gap: 6px; flex: none; }
.lb-btn {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(248,239,227,.2);
  background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; font-size: 16px; transition: background .2s, border-color .2s;
}
.lb-btn:hover { background: rgba(248,239,227,.1); border-color: rgba(248,239,227,.45); }
.lb-btn.on { background: var(--terra); border-color: var(--terra); }
.lb-dl { background: var(--terra); border-color: var(--terra); font-weight: 700; font-size: 14px; }
.lb-dl:hover { background: var(--terra-dark); border-color: var(--terra-dark); }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 70px; touch-action: pan-y; overflow: hidden; }
.lb-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none;
  box-shadow: 0 30px 80px -30px #000; transition: opacity .3s; transform-origin: center center;
}
.lb-stage img { max-width: none; max-height: none; object-fit: cover; }
.lb-stage img.low { filter: blur(6px); }
.lb-stage img.loading { opacity: .25; }
.lb.playing .lb-stage img { animation: burns var(--slide, 3s) ease-out forwards; }
@keyframes burns { from { transform: scale(.97); } to { transform: scale(1); } }
.lb-count .of { color: var(--sage-light); font-size: 16px; }
.lb-nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 52px; height: 52px; border-radius: 50%; z-index: 2;
  border: 0; background: rgba(248,239,227,.08); font-size: 34px; line-height: 1; cursor: pointer; transition: background .2s;
}
.lb-nav:hover { background: var(--terra); }
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }
.lb-strip { display: flex; gap: 6px; padding: 12px 16px 16px; height: 76px; box-sizing: border-box; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip button {
  flex: none; width: 64px; height: 44px; padding: 0; border: 2px solid transparent; border-radius: 4px;
  overflow: hidden; cursor: pointer; opacity: .45; background: #000; transition: opacity .2s, border-color .2s;
}
.lb-strip button:hover { opacity: .85; }
.lb-strip button.on { opacity: 1; border-color: var(--terra-light); }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--sage), var(--terra)); }
.lb.playing .lb-strip { opacity: .35; transition: opacity .4s; }
.lb.playing .lb-strip:hover { opacity: 1; }
.lb.playing .lb-top { opacity: .35; transition: opacity .4s; }
.lb.playing .lb-top:hover { opacity: 1; }
.lb.playing .lb-progress { animation: prog var(--slide, 5s) linear forwards; }
@keyframes prog { to { width: 100%; } }
@media (max-width: 700px) {
  .lb-stage { padding: 0; }
  .lb-nav { display: none; }
  .lb-btn { min-width: 36px; height: 36px; padding: 0 9px; font-size: 14px; }
  .lb-count small { display: none; }
  .lb-strip { justify-content: flex-start; }
  .lb-strip { height: 66px; }
  .lb-strip button { width: 52px; height: 36px; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 60;
  background: var(--sage-dark); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .polaroid, .tile img { opacity: 1 !important; transform: none !important; }
}

/* ---------- Jours ---------- */
.days { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--cream); border: 1px solid var(--sand); }
.day {
  position: relative; z-index: 1; display: grid; justify-items: center; line-height: 1; gap: 1px;
  min-width: 52px; padding: 6px 10px 5px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  transition: color .35s;
}
.day small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); transition: color .35s; }
.day b { font-family: var(--display); font-size: 22px; font-weight: 600; }
.day:hover b { color: var(--terra); }
.day.on, .day.on:hover b { color: #fff; }
.day.on small { color: var(--peach); }
.days-sun {
  position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--terra);
  box-shadow: 0 6px 16px -6px rgba(207,106,60,.8); opacity: 0;
  transition: transform .55s cubic-bezier(.5,1.6,.4,1), width .4s, opacity .3s;
}
.days-sun.show { opacity: 1; }
.chips-row { max-width: 1600px; margin: 0 auto; padding: 0 16px 8px; }
.bar-inner { justify-content: space-between; }
@media (max-width: 960px) {
  .bar-inner { flex-wrap: nowrap; }
  .days { order: 0; }
  .day { min-width: 44px; padding: 5px 7px 4px; }
  .day b { font-size: 19px; }
}
@media (max-width: 420px) {
  .logo { display: none; }
  .actions .btn { padding: 7px 11px; }
}

/* en-tête du jour */
.dayhead { display: flex; align-items: center; gap: 22px; padding: 46px 4px 0; }
.dayhead-date {
  font-family: var(--display); font-size: clamp(90px, 13vw, 150px); line-height: .8; font-weight: 500; color: var(--terra);
  text-shadow: 4px 4px 0 var(--peach);
}
.dayhead small { font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--sage-dark); font-weight: 700; }
.dayhead h2 { font-family: var(--script); font-weight: 400; font-size: clamp(44px, 6vw, 72px); line-height: 1.05; margin: 2px 0 0; color: var(--ink); }
.dayhead p { margin: 0; color: var(--ink-soft); }
body[data-view="jeudi"] .chapter:first-of-type, body[data-view="dimanche"] .chapter:first-of-type { padding-top: 30px; }

/* accueil : cartes des jours — photo pleine, texte posé dessus */
.home { padding: 50px 0 10px; }
.home-head { text-align: center; margin: 0 0 36px; }
.home-head .pill { font-size: 18px; padding: 15px 34px; }
.home-or { font-family: var(--display); font-style: italic; font-size: clamp(19px, 2.4vw, 23px); color: var(--ink-soft); margin: 16px 0 0; }
.daycards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .daycards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .daycards { grid-template-columns: 1fr; } }
.daycard {
  position: relative; display: block; overflow: hidden; isolation: isolate; text-decoration: none; color: #fff;
  aspect-ratio: 3 / 4.2; border-radius: 4px;
}
.daycards .daycard:nth-child(even) { margin-top: 48px; }
@media (max-width: 560px) { .daycards .daycard:nth-child(even) { margin-top: 0; } .daycard { aspect-ratio: 4 / 5; } }
.daycard-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transform: scale(1.04); transition: transform 1.6s cubic-bezier(.2,.8,.2,1), filter .8s;
  filter: saturate(.92);
}
.daycard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(38,40,33,0) 30%, rgba(38,40,33,.25) 55%, rgba(38,40,33,.82) 100%);
  transition: opacity .6s;
}
.daycard::after {
  content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.35); pointer-events: none;
  transition: inset .6s cubic-bezier(.2,.8,.2,1), border-color .6s;
}
.daycard-date {
  position: absolute; top: 6px; right: 18px; font-family: var(--display); font-weight: 400; font-style: italic;
  font-size: clamp(90px, 9vw, 140px); line-height: 1; color: transparent; -webkit-text-stroke: 1.2px rgba(255,255,255,.85);
  transition: transform .8s cubic-bezier(.2,.8,.2,1), color .6s;
}
.daycard-txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 26px 26px; }
.daycard-kicker {
  display: inline-block; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; font-weight: 700;
  color: var(--peach); margin-bottom: 10px;
}
.daycard small { display: block; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; opacity: .8; }
.daycard h3 { font-family: var(--script); font-weight: 400; font-size: clamp(40px, 3.6vw, 54px); line-height: 1.05; margin: 2px 0 6px; }
.daycard p {
  margin: 0; font-family: var(--display); font-size: 17px; line-height: 1.35; opacity: .85;
  max-height: 0; overflow: hidden; transition: max-height .7s cubic-bezier(.2,.8,.2,1), opacity .5s;
}
.daycard p i { font-style: normal; color: var(--peach); margin: 0 .45em; }
.daycard-cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 12px; letter-spacing: .26em;
  text-transform: uppercase; font-weight: 700;
}
.daycard-cta i { display: block; width: 26px; height: 1px; background: currentColor; position: relative; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.daycard-cta i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }
.daycard:hover .daycard-bg, .daycard:focus-visible .daycard-bg { transform: scale(1.1); filter: saturate(1.05); }
.daycard:hover::after, .daycard:focus-visible::after { inset: 18px; border-color: rgba(255,255,255,.6); }
.daycard:hover .daycard-date { transform: translateY(6px); color: rgba(207,106,60,.55); }
.daycard:hover p, .daycard:focus-visible p { max-height: 120px; }
.daycard:hover .daycard-cta i { width: 52px; }
@media (hover: none) { .daycard p { max-height: 120px; } }

/* fin de journée : bandeau cinéma vers le jour suivant */
.dayend { margin: 80px 0 0; }
.daycard.next { aspect-ratio: auto; height: clamp(320px, 52vh, 520px); border-radius: 4px; }
.daycard.next::before { background: linear-gradient(90deg, rgba(38,40,33,.85) 0%, rgba(38,40,33,.45) 45%, rgba(38,40,33,0) 80%); }
.daycard.next .daycard-txt { top: 0; bottom: 0; right: auto; width: min(560px, 100%); padding: 0 clamp(26px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.daycard.next .daycard-kicker { font-family: var(--script); font-size: 36px; letter-spacing: 0; text-transform: none; font-weight: 400; margin-bottom: 4px; }
.daycard.next h3 { font-size: clamp(54px, 6vw, 88px); }
.daycard.next p { max-height: 120px; }
.daycard.next .daycard-date { top: auto; bottom: -10px; right: 28px; font-size: clamp(140px, 18vw, 260px); }
.daycard.next .daycard-cta i { width: 60px; }
.daycard.next:hover .daycard-cta i { width: 100px; }
@media (max-width: 560px) {
  .daycard.next { height: 70svh; }
  .daycard.next::before { background: linear-gradient(180deg, rgba(38,40,33,0) 25%, rgba(38,40,33,.85) 100%); }
  .daycard.next .daycard-txt { top: auto; justify-content: flex-end; padding-bottom: 28px; }
  .daycard.next .daycard-date { top: 0; bottom: auto; }
}

/* ---------- Photos mises en avant ---------- */
.feature { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.feature.flip { flex-direction: row-reverse; }
.feature-col { display: flex; flex-direction: column; gap: var(--gap); }
.feature-col .row { margin: 0; }
.row-star { justify-content: center; }
.tile.star { box-shadow: 0 14px 34px -18px rgba(62,74,58,.55); }
.tile .badge {
  position: absolute; left: 10px; top: 10px; z-index: 2; height: 28px; padding: 0 10px; border-radius: 999px;
  display: grid; place-items: center; background: rgba(251,246,239,.9); color: var(--terra); font-size: 14px;
  box-shadow: 0 4px 10px -4px rgba(0,0,0,.3);
}
.tile.star .n { font-size: 26px; }

/* ---------- Transition entre les jours ---------- */
.wipe {
  position: fixed; inset: 0; z-index: 45; pointer-events: none; display: grid; place-items: center;
  background: var(--terra); clip-path: circle(0 at var(--x, 50%) var(--y, 80px));
}
.wipe.in { pointer-events: auto; clip-path: circle(150% at var(--x, 50%) var(--y, 80px)); transition: clip-path .65s cubic-bezier(.7,0,.3,1); }
.wipe.out { clip-path: circle(0 at 50% 110%); transition: clip-path .6s cubic-bezier(.7,0,.3,1); }
.wipe-text { text-align: center; color: var(--cream); opacity: 0; translate: 0 14px; transition: opacity .3s .25s, translate .4s .25s; }
.wipe.in .wipe-text { opacity: 1; translate: 0 0; }
.wipe.out .wipe-text { opacity: 0; transition-delay: 0s; }
.wipe small { display: block; font-size: 14px; letter-spacing: .3em; text-transform: uppercase; font-weight: 700; color: var(--peach); }
.wipe span { font-family: var(--script); font-size: clamp(54px, 10vw, 110px); line-height: 1.1; }

/* ---------- Écrans-titres du diaporama ---------- */
.lb-title {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; text-align: center; pointer-events: none;
  background: var(--terra); color: var(--cream); padding: 16px;
  clip-path: circle(0 at 50% 50%); visibility: hidden;
}
.lb-title.is-chapter {
  background: rgba(251,246,239,.82); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); color: var(--ink);
  clip-path: inset(0 0 0 0); opacity: 0; visibility: hidden;
}
.lb-title.in { visibility: visible; clip-path: circle(150% at 50% 50%); transition: clip-path .65s cubic-bezier(.7,0,.3,1); }
.lb-title.is-chapter.in { clip-path: inset(0 0 0 0); opacity: 1; transition: opacity .5s ease; }
.lb-title.out { clip-path: circle(0 at 50% 110%); transition: clip-path .55s cubic-bezier(.7,0,.3,1), visibility 0s .55s; visibility: hidden; }
.lb-title.is-chapter.out { clip-path: inset(0 0 0 0); opacity: 0; transition: opacity .45s ease, visibility 0s .45s; visibility: hidden; }
.lb-title > div { opacity: 0; translate: 0 14px; transition: opacity .35s .3s, translate .45s .3s; }
.lb-title.in > div { opacity: 1; translate: 0 0; }
.lb-title.out > div { opacity: 0; transition-delay: 0s; }
.lb-title small { display: block; font-size: 14px; letter-spacing: .3em; text-transform: uppercase; font-weight: 700; color: var(--peach); }
.lb-title.is-chapter small { color: var(--sage); letter-spacing: .22em; font-size: 13px; }
.lb-title span { display: block; font-family: var(--script); font-size: clamp(56px, 10vw, 120px); line-height: 1.1; }
.lb-title.is-chapter span { font-family: var(--script); font-weight: 400; font-size: clamp(44px, 8vw, 88px); color: var(--ink); }
.lb-title em { display: block; font-family: var(--display); font-size: clamp(20px, 2.6vw, 28px); margin-top: 6px; }
.lb-title.is-chapter em { color: var(--ink-soft); font-size: clamp(17px, 2.2vw, 24px); }

/* ---------- Photobooth ---------- */
.day.booth-tab b { display: grid; place-items: center; height: 22px; }
.day.booth-tab svg { width: 21px; height: 21px; }
.days { flex-wrap: nowrap; }

.booth-head { position: relative; isolation: isolate; text-align: center; padding: 70px 16px 30px; margin: 0 -16px; }
.booth-head::before {
  content: ""; position: absolute; inset: 0 0 -120px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(227,133,90,.32), transparent 70%),
    radial-gradient(520px 320px at 0% 80%, rgba(134,154,126,.28), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
}
.booth-logo { width: 120px; height: 120px; display: block; margin: 0 auto 6px; }
.booth-kicker { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; font-weight: 700; color: var(--terra); margin: 0 0 4px; }
.booth-head h2 {
  font-family: var(--ui); font-weight: 900; font-size: clamp(48px, 9vw, 110px); line-height: .95; margin: 0 0 18px;
  color: #2F4A3A; letter-spacing: -.02em;
}
.booth-head h2::after { content: ""; display: block; width: 90px; height: 6px; border-radius: 6px; margin: 14px auto 0; background: linear-gradient(90deg, var(--terra), var(--peach)); }
.booth-rules { max-width: 620px; margin: 0 auto 22px; font-size: clamp(16px, 2vw, 19px); line-height: 1.55; color: var(--ink); letter-spacing: .02em; }
.booth-rules span { color: var(--ink-soft); font-style: italic; }
.booth-stats { display: flex; justify-content: center; gap: 28px; margin: 0 0 24px; }
.booth-stats span { display: grid; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.booth-stats b { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--terra); font-weight: 500; letter-spacing: 0; }
.booth-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.booth-hour { padding-top: 46px; }
.booth-hour-head { display: flex; align-items: baseline; gap: 14px; margin: 0 4px 20px; border-bottom: 1px dashed var(--sage-light); padding-bottom: 8px; }
.booth-hour-head span { font-family: var(--ui); font-weight: 900; font-size: clamp(44px, 6vw, 72px); line-height: .9; color: #2F4A3A; }
.booth-hour-head em { font-family: var(--script); font-style: normal; font-size: clamp(26px, 3vw, 36px); color: var(--terra); }
.booth-hour-head small { margin-left: auto; font-size: 13px; color: var(--ink-soft); letter-spacing: .1em; }

.wall { display: flex; gap: var(--gap); align-items: flex-start; }
.wall-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--gap); min-width: 0; }
.bt {
  position: relative; padding: 0; border: 0; cursor: zoom-in; border-radius: 4px; overflow: hidden;
  rotate: var(--r); box-shadow: 0 14px 30px -16px rgba(47,74,58,.55);
  transition: rotate .4s cubic-bezier(.3,1.6,.5,1), transform .4s cubic-bezier(.3,1.6,.5,1), box-shadow .4s;
}
.bt img, .bt video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bt img { opacity: 0; transition: opacity .5s; }
.bt img.in { opacity: 1; }
.bt:hover, .bt:focus-visible { rotate: 0deg; transform: scale(1.04); z-index: 2; box-shadow: 0 24px 44px -18px rgba(47,74,58,.65); }
.bt:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; }
.bt-strip { border-radius: 2px; }
.bt-time {
  position: absolute; right: 8px; bottom: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(251,246,239,.9); color: #2F4A3A; opacity: 0; transition: opacity .3s;
}
.bt:hover .bt-time { opacity: 1; }
.bt-rec {
  position: absolute; left: 10px; top: 8px; font-size: 11px; font-weight: 900; letter-spacing: .12em; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.bt-rec::first-letter { color: #ff4d3d; }
.bt-video .bt-rec { animation: rec 1.4s steps(1) infinite; }
@keyframes rec { 50% { opacity: .35; } }

/* carte photobooth sur l'accueil */
.boothcard {
  position: relative; display: block; margin-top: 26px; height: clamp(300px, 46vh, 460px); overflow: hidden; isolation: isolate;
  border-radius: 4px; text-decoration: none; color: #fff; background: #2F4A3A;
}
.boothcard-vids { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 4px; z-index: -2; }
.boothcard-vids video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.2,.8,.2,1); }
.boothcard:hover video { transform: scale(1.06); }
.boothcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(47,74,58,.72), rgba(47,74,58,.35) 75%); }
.boothcard::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.35); pointer-events: none; transition: inset .6s; }
.boothcard:hover::after { inset: 18px; }
.boothcard-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 16px; }
.boothcard h3 { font-family: var(--ui); font-weight: 900; font-size: clamp(46px, 7vw, 92px); line-height: 1; margin: 6px 0 8px; letter-spacing: -.02em; }
.boothcard p { margin: 0; font-family: var(--display); font-size: 20px; opacity: .9; }
.boothcard .daycard-cta { justify-self: center; }
.boothcard:hover .daycard-cta i { width: 52px; }
@media (max-width: 560px) { .boothcard-vids { grid-template-columns: 1fr; } .boothcard-vids video:not(:nth-child(2)) { display: none; } }

/* visionneuse photobooth */
.pb .lb-stage video { box-shadow: 0 30px 80px -30px #000; background: #000; }
.pb .lb-stage img, .pb .lb-stage video { max-width: none; max-height: none; object-fit: contain; }
.pb.party .lb-nav, .pb.party .lb-top .lb-count small { opacity: .25; }
.pb-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 6; }
.pb-flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.pb-countdown {
  position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(38,40,33,.88);
  font-family: var(--ui); font-weight: 900; font-size: clamp(140px, 30vw, 320px); color: var(--terra-light);
}
.pb-countdown.tick { animation: tick .65s cubic-bezier(.2,.8,.2,1); }
@keyframes tick { from { transform: scale(1.6); opacity: 0; } 30% { opacity: 1; } to { transform: scale(.9); } }
@media (max-width: 700px) { #pbParty span { display: none; } }
@media (max-width: 480px) {
  .bar-inner { gap: 6px; padding: 8px 12px; }
  .day { min-width: 38px; padding: 5px 4px 4px; }
  .day small { font-size: 9px; letter-spacing: .08em; }
  .day b { font-size: 18px; }
  .actions .btn { padding: 7px 10px; }
}

/* ---------- Tri local (dev_server.py) ---------- */
.trash {
  position: absolute; right: 8px; bottom: 8px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer; background: rgba(38,40,33,.72); opacity: 0; transition: opacity .2s, transform .2s, background .2s;
}
.trash::before { content: "🗑"; font-size: 15px; filter: grayscale(1) brightness(3); }
.tile:hover .trash, .bt:hover .trash { opacity: 1; }
.trash:hover { transform: scale(1.12); background: #B3261E; }
.bt .trash { right: 8px; top: 8px; bottom: auto; }
.tile.trashed, .bt.trashed { outline: 3px solid #B3261E; outline-offset: -3px; }
.tile.trashed img, .bt.trashed img, .bt.trashed video { filter: grayscale(1) opacity(.35); }
.tile.trashed .trash, .bt.trashed .trash { opacity: 1; background: #B3261E; }
.tile.trashed .trash::before, .bt.trashed .trash::before { content: "↺"; filter: none; color: #fff; font-size: 18px; font-weight: 700; }
.lb-trash.on { background: #B3261E; border-color: #B3261E; }
.dev-badge {
  position: fixed; left: 12px; bottom: 12px; z-index: 30; padding: 8px 14px; border-radius: 999px; font-size: 12px;
  background: rgba(38,40,33,.88); color: var(--cream); box-shadow: 0 8px 20px -10px rgba(0,0,0,.5);
}
.dev-badge b { color: #ff8a7a; }
@media (hover: none) { .dev .trash { opacity: .85; } }

/* ---------- Photos des invités : « from you » ---------- */
.guests-row {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 22px;
  margin: 18px 0 24px; padding: 26px 16px 22px; border-radius: 6px;
  background:
    repeating-linear-gradient(-45deg, rgba(134,154,126,.07) 0 12px, transparent 12px 24px),
    var(--cream);
  border: 1px dashed var(--sage-light);
}
.guests-label { display: grid; text-align: center; line-height: 1; margin-right: 6px; }
.guests-label span { font-family: var(--script); font-size: 40px; color: var(--terra); }
.guests-label small { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--sage-dark); font-weight: 700; margin-top: 4px; }
.tile.guest {
  background: #fff !important; padding: 7px 7px 27px; border-radius: 2px; overflow: visible;
  rotate: var(--r, 0deg); box-shadow: 0 10px 22px -12px rgba(62,74,58,.55);
  transition: rotate .4s cubic-bezier(.3,1.6,.5,1), transform .4s cubic-bezier(.3,1.6,.5,1);
}
.tile.guest::before {   /* bout de scotch */
  content: ""; position: absolute; top: -9px; left: 50%; translate: -50% 0; width: 46px; height: 16px; z-index: 2;
  background: rgba(242,214,184,.75); rotate: calc(var(--r, 0deg) * -2); box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.tile.guest img { filter: saturate(.92) contrast(.98); }
.tile.guest::after { display: none; }
.tile.guest .n {
  opacity: 1; translate: 0 0; left: 0; right: 0; bottom: 3px; text-align: center; color: var(--ink-soft);
  font-family: var(--script); font-style: normal; font-size: 18px;
}
.tile.guest .n::before { content: "from you · "; color: var(--terra); }
.tile.guest:hover { rotate: 0deg; transform: scale(1.06); z-index: 3; }
.tile.guest:hover img.in { transform: none; }
.tile.guest .heart { top: 12px; right: 12px; width: 28px; height: 28px; font-size: 13px; }
.tile.guest .trash { bottom: 32px; right: 12px; }
.from-you { font-family: var(--script); color: var(--terra); font-size: 1.35em; letter-spacing: 0; text-transform: none; }
@media (max-width: 560px) {
  /* mobile : bande qui défile horizontalement */
  .guests-row {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity;
    gap: 16px; padding: 24px 16px 18px; margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0;
    scrollbar-width: none;
  }
  .guests-row::-webkit-scrollbar { display: none; }
  .guests-row .tile { flex: none; scroll-snap-align: center; }
  .guests-label { flex: none; width: 84px; margin: 0; }
  .guests-label span { font-size: 30px; }
  .guests-label small { font-size: 9px; letter-spacing: .14em; }
}

/* ---------- Le film ---------- */
.film {
  position: relative; margin: 6px 0 calc(var(--gap) + 18px); aspect-ratio: 16 / 9; max-height: 82vh; width: 100%;
  border-radius: 4px; overflow: hidden; background: #111 var(--bg) center / cover no-repeat; isolation: isolate;
}
.film::before { content: ""; position: absolute; inset: -20px; z-index: -1; background: inherit; filter: blur(6px) brightness(.55) saturate(.9); }
.film.on::before { display: none; }
.film-play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  border: 0; background: transparent; color: #fff; cursor: pointer;
}
.film-play::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.35); pointer-events: none; transition: inset .6s; }
.film-play:hover::after { inset: 22px; }
.film-btn {
  width: 96px; height: 96px; border-radius: 50%; background: var(--terra); display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(207,106,60,.25), 0 20px 40px -14px rgba(0,0,0,.6); transition: transform .4s cubic-bezier(.3,1.6,.5,1), box-shadow .4s;
}
.film-btn::before { content: ""; margin-left: 8px; border-left: 30px solid #fff; border-top: 18px solid transparent; border-bottom: 18px solid transparent; }
.film-play:hover .film-btn { transform: scale(1.08); box-shadow: 0 0 0 18px rgba(207,106,60,.18), 0 20px 40px -14px rgba(0,0,0,.6); }
.film-txt { display: grid; text-align: center; }
.film-txt small { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; font-weight: 700; color: var(--peach); }
.film-txt b { font-family: var(--script); font-weight: 400; font-size: clamp(56px, 8vw, 104px); line-height: 1.05; }
.film-txt em { font-family: var(--display); font-size: 20px; opacity: .85; }
.film video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
@media (max-width: 560px) { .film-btn { width: 70px; height: 70px; } .film-btn::before { border-left-width: 22px; border-top-width: 13px; border-bottom-width: 13px; } }
.dev-badge button {
  margin-left: 10px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(248,239,227,.35);
  background: transparent; color: var(--cream); font-size: 11px; cursor: pointer;
}
.dev-badge button:hover { background: rgba(248,239,227,.15); }
.foot a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 3px; }
.foot a:hover { text-decoration-color: #fff; }
/* jours sur deux dates (Before / After) */
.dayhead-date.multi { font-size: clamp(64px, 9vw, 110px); letter-spacing: -.02em; }
.daycard-date.multi { font-size: clamp(64px, 6vw, 96px); }
.daycard.next .daycard-date.multi { font-size: clamp(100px, 12vw, 180px); }
.tile .doubt {
  position: absolute; left: 50%; top: -12px; translate: -50% 0; z-index: 4; padding: 2px 8px; border-radius: 999px;
  background: #E8A13A; color: #2b1d0e; font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: 0 3px 8px -3px rgba(0,0,0,.4);
}
/* rangement local des photos d'invités */
.tile.guest .mv {
  position: absolute; top: calc(50% - 14px); translate: 0 -50%; z-index: 4; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; background: var(--sage-dark); color: #fff;
  font: 700 20px/1 var(--ui); opacity: 0; transition: opacity .2s, transform .2s;
}
.tile.guest .mv-l { left: -12px; }
.tile.guest .mv-r { right: -12px; }
.tile.guest:hover .mv { opacity: 1; }
.tile.guest .mv:hover { transform: scale(1.15); background: var(--terra); }
@media (hover: none) { .dev .tile.guest .mv { opacity: .9; } }
.tile.guest .sz {
  position: absolute; left: 12px; top: 12px; z-index: 4; height: 26px; min-width: 26px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer; background: rgba(38,40,33,.75); color: #fff;
  font: 700 11px/1 var(--ui); opacity: 0; transition: opacity .2s;
}
.tile.guest .sz::before { content: "⤢"; font-size: 14px; }
.tile.guest[data-size="1"] .sz::before { content: "Grande"; font-size: 11px; }
.tile.guest[data-size="2"] .sz::before { content: "Très grande"; font-size: 11px; }
.tile.guest:hover .sz, .tile.guest[data-size="1"] .sz, .tile.guest[data-size="2"] .sz { opacity: 1; }
.tile.guest[data-size="1"] .sz { background: var(--sage-dark); }
.tile.guest[data-size="2"] .sz { background: var(--terra); }
@media (hover: none) { .dev .tile.guest .sz { opacity: .9; } }

/* photos du photographe : bouton local mise en avant / bandeau */
.tile:not(.guest) .sz {
  position: absolute; left: 50%; top: 10px; translate: -50% 0; z-index: 4; height: 28px; padding: 0 12px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer; background: rgba(38,40,33,.75); color: #fff;
  font: 700 11px/1 var(--ui); white-space: nowrap; opacity: 0; transition: opacity .2s;
}
.tile:not(.guest) .sz::before { content: "⤢ agrandir"; }
.tile[data-psize="1"] .sz::before { content: "Mise en avant"; }
.tile[data-psize="2"] .sz::before { content: "Bandeau"; }
.tile:not(.guest):hover .sz { opacity: 1; }
.tile[data-psize="1"] .sz { background: var(--sage-dark); }
.tile[data-psize="2"] .sz { background: var(--terra); opacity: 1; }
@media (hover: none) { .dev .tile:not(.guest) .sz { opacity: .9; } }

/* bandeau pleine largeur : la photo seule, sur un fond flouté d'elle-même */
.hero-photo {
  position: relative; display: flex; justify-content: center; margin: 4px 0 calc(var(--gap) + 4px); overflow: hidden; border-radius: 4px;
  isolation: isolate;
}
.hero-photo::before {
  content: ""; position: absolute; inset: -30px; z-index: -1; background: var(--bg) center / cover; filter: blur(28px) brightness(.85) saturate(1.1);
}
.hero-photo .tile { border-radius: 0; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); }
.hero-photo.starfill { gap: var(--gap); }
.hero-photo.starfill .tile { box-shadow: 0 16px 40px -18px rgba(0,0,0,.55); }

/* mode soirée : effets d'apparition */
.pb .fx-pop     { animation: fxPop .45s cubic-bezier(.2,1.6,.4,1); }
.pb .fx-left    { animation: fxLeft .4s cubic-bezier(.2,.9,.3,1); }
.pb .fx-right   { animation: fxRight .4s cubic-bezier(.2,.9,.3,1); }
.pb .fx-spin    { animation: fxSpin .5s cubic-bezier(.2,1.2,.4,1); }
.pb .fx-blur    { animation: fxBlur .45s ease-out; }
.pb .fx-drop    { animation: fxDrop .5s cubic-bezier(.3,1.5,.5,1); }
.pb .fx-flip    { animation: fxFlip .5s cubic-bezier(.2,.9,.3,1); }
.pb .fx-zoomout { animation: fxZoomOut .45s cubic-bezier(.2,.9,.3,1); }
@keyframes fxPop     { from { transform: scale(.3); opacity: 0; } }
@keyframes fxLeft    { from { transform: translateX(-60vw) rotate(-8deg); opacity: 0; } }
@keyframes fxRight   { from { transform: translateX(60vw) rotate(8deg); opacity: 0; } }
@keyframes fxSpin    { from { transform: rotate(-200deg) scale(.2); opacity: 0; } }
@keyframes fxBlur    { from { filter: blur(30px) brightness(2); opacity: 0; transform: scale(1.08); } }
@keyframes fxDrop    { from { transform: translateY(-80vh) rotate(6deg); } }
@keyframes fxFlip    { from { transform: perspective(900px) rotateY(90deg); opacity: .3; } }
@keyframes fxZoomOut { from { transform: scale(2.2); opacity: 0; } }
.pb .lb-stage { perspective: 900px; }

/* ---------- Polaroids ---------- */
.tile.pola img { filter: contrast(1.04) saturate(1.05) sepia(.06); }
.tile.pola::before {   /* petit grain argentique */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: overlay; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tile.pola .n { font-family: var(--script); font-style: normal; font-size: 22px; }

/* bandeau « à placer » (local) */
.pola-tray {
  position: sticky; top: 108px; z-index: 15; margin: 22px 0 6px; padding: 12px 14px 14px; border-radius: 10px;
  background: rgba(38,40,33,.92); color: var(--cream); box-shadow: 0 14px 30px -16px rgba(0,0,0,.6);
}
.pola-tray-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.pola-tray-head b { font-family: var(--script); font-weight: 400; font-size: 28px; color: var(--peach); }
.pola-tray-head span { opacity: .8; }
.pola-tray-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pola-tray-list img {
  flex: none; height: 74px; border: 4px solid #fff; border-bottom-width: 12px; cursor: grab; border-radius: 2px;
  transition: transform .2s;
}
.pola-tray-list img:hover { transform: translateY(-3px) rotate(-2deg); }
.pola-tray-list em { opacity: .7; font-size: 13px; }

/* indicateur de dépôt + bouton retirer */
.tile.drop-before { box-shadow: inset 6px 0 0 var(--terra), -4px 0 0 var(--terra); }
.tile.drop-after { box-shadow: inset -6px 0 0 var(--terra), 4px 0 0 var(--terra); }
.tile.pola[draggable="true"] { cursor: grab; }
.tile .unplace {
  position: absolute; right: 50px; top: 8px; z-index: 4; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; background: rgba(38,40,33,.75); color: #fff; font-size: 13px;
  opacity: 0; transition: opacity .2s;
}
.tile:hover .unplace { opacity: 1; }
.tile .unplace:hover { background: var(--terra); }
.pola-item { position: relative; flex: none; }
.pola-tray .rot, .tile .rot {
  position: absolute; z-index: 4; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; background: rgba(38,40,33,.8); color: #fff; font-size: 15px; opacity: 0; transition: opacity .2s, background .2s;
}
.pola-tray .rot { right: 4px; top: 4px; }
.tile .rot { right: 88px; top: 10px; width: 30px; height: 30px; }
.pola-item:hover .rot, .tile:hover .rot { opacity: 1; }
.pola-tray .rot:hover, .tile .rot:hover { background: var(--terra); }
.tile.pola .n:empty { display: none; }
.lb-tag { position: absolute; z-index: 3; overflow: hidden; pointer-events: none; }
.lb-tag .ribbon {
  position: absolute; left: -62px; top: 30px; width: 250px; rotate: -45deg; padding: 5px 0 7px; text-align: center;
  background: var(--terra); color: #fff; box-shadow: 0 6px 16px -6px rgba(0,0,0,.55);
  font-family: var(--script); font-size: 30px; line-height: 1;
}
.dev-badge .tray-toggle { margin-left: 6px; }
.dev-badge .tray-toggle.on { background: var(--terra); border-color: var(--terra); }

/* visionneuse : passe-partout des photos de Marie-Clémence */
.lb-stage img.framed {
  box-sizing: border-box; background: #FBF6EF; object-fit: contain;
  outline: 1px solid rgba(62,74,58,.28); outline-offset: -7px;
  box-shadow: 0 30px 80px -30px #000, 0 0 0 1px rgba(0,0,0,.25);
}
@media (max-width: 700px) {
  .lb-stage img.framed { outline-offset: -4px; }
}

/* menu des jours : plus large et plus lisible */
@media (min-width: 961px) {
  .days { gap: 6px; padding: 5px; }
  .day { min-width: 104px; padding: 10px 18px 9px; gap: 4px; }
  .day small { font-size: 12px; letter-spacing: .2em; font-weight: 700; }
  .day b { font-size: 27px; }
  .day.booth-tab b { height: 27px; }
  .day.booth-tab svg { width: 26px; height: 26px; }
}
@media (min-width: 481px) and (max-width: 960px) {
  .day { min-width: 62px; padding: 7px 10px 6px; }
  .day small { font-size: 11px; }
  .day b { font-size: 21px; }
}

/* chapitres : centrés sous le menu, en liens discrets */
.chips-row { padding-bottom: 6px; }
.chips-row .chips { gap: 2px; }
.chips-row .chip:first-child { margin-left: auto; }
.chips-row .chip:last-child { margin-right: auto; }
.chips-row .chip {
  border: 0; border-radius: 0; background: none; padding: 5px 12px 6px; font-size: 13px; color: var(--ink-soft);
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.chips-row .chip b { font-size: 14px; color: var(--sage); margin-right: 6px; }
.chips-row .chip:hover { color: var(--ink); border-bottom-color: var(--sand); }
.chips-row .chip.on { background: none; color: var(--terra); border-bottom-color: var(--terra); }
.chips-row .chip.on b { color: var(--terra); }
.chips-row .chip + .chip::before { content: "·"; color: var(--sand); margin: 0 10px 0 -10px; }
@media (min-width: 961px) {
  /* logo | jours (au centre de la page) | boutons */
  .bar-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .bar-inner .actions { justify-self: end; }
}

/* ================= Menu en une ligne (refonte) ================= */
.bar { border-bottom: 0; }
.bar-inner { padding-top: 10px; padding-bottom: 10px; }

/* case du jour actif : affiche le chapitre en cours */
.day { grid-template-columns: auto; transition: color .35s, padding .4s; }
.day .cur { display: none; }
.days:has(.day.on .cur:not(:empty)) .day.on {
  grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 14px; text-align: left; padding-right: 16px;
}
.day.on .cur:not(:empty) {
  display: flex; align-items: center; gap: 6px; grid-column: 2; grid-row: 1 / span 2; max-width: 260px;
  padding-left: 14px; border-left: 1px solid rgba(255,255,255,.35);
  font-family: var(--display); font-style: italic; font-size: 17px; line-height: 1.15; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: curIn .45s cubic-bezier(.2,.8,.2,1);
}
.day.on .cur:not(:empty)::after { content: "▾"; font-style: normal; font-size: 11px; opacity: .8; }
.day.on small, .day.on b { grid-column: 1; justify-self: center; }
@keyframes curIn { from { opacity: 0; transform: translateX(-8px); } }
.days-sun { transition: transform .5s cubic-bezier(.5,1.4,.4,1), width .45s cubic-bezier(.2,.8,.2,1), opacity .3s; }

/* frise des chapitres */
.track { position: relative; height: 4px; background: var(--sand); }
.track-segs { position: absolute; inset: 0; display: flex; gap: 3px; }
.seg {
  position: relative; flex: 1 1 0; min-width: 6px; height: 100%; padding: 0; border: 0; cursor: pointer;
  background: var(--sand); transition: background .3s, height .2s, transform .2s;
}
.seg.past { background: var(--sage-light); }
.seg.on { background: var(--terra-light); }
.seg:hover { transform: scaleY(2.2); background: var(--terra); }
.seg i {
  position: absolute; left: 50%; top: 12px; translate: -50% 0; padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  background: var(--ink); color: var(--paper); font-family: var(--ui); font-style: normal; font-size: 12px;
  pointer-events: none; opacity: 0; transform: scaleY(.45); transform-origin: top; transition: opacity .2s;
}
.seg:hover i { opacity: 1; }
.track:not(.has-segs) { background: linear-gradient(90deg, var(--sage-light), var(--sage), var(--terra-light), var(--terra), var(--terra-dark)); height: 3px; }
.track .sun { top: 50%; translate: 0 -50%; transform: translateX(-50%); z-index: 2; pointer-events: none; transition: left .15s linear; }

/* liste des chapitres (clic sur la case du jour) */
.ch-pop {
  position: absolute; top: calc(100% + 8px); z-index: 30; min-width: 280px; padding: 8px; border-radius: 14px;
  background: var(--paper); box-shadow: 0 24px 50px -20px rgba(38,40,33,.5), 0 0 0 1px var(--sand);
  animation: popIn .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes popIn { from { opacity: 0; transform: translateY(-6px); } }
.ch-pop button {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: baseline; gap: 8px; width: 100%; padding: 9px 12px;
  border: 0; border-radius: 9px; background: none; cursor: pointer; text-align: left;
}
.ch-pop button:hover { background: var(--cream); }
.ch-pop button.on { background: var(--cream); }
.ch-pop b { font-family: var(--display); font-style: italic; font-size: 18px; color: var(--terra); font-weight: 500; }
.ch-pop span { font-family: var(--display); font-size: 19px; color: var(--ink); }
.ch-pop small { font-size: 12px; color: var(--ink-soft); }

/* filtres du photobooth, dans son en-tête */
.booth-filters { display: flex; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.booth-filters button {
  border: 1px solid var(--sand); background: rgba(251,246,239,.8); border-radius: 999px; padding: 7px 16px; cursor: pointer; font-size: 14px;
}
.booth-filters button b { color: var(--terra); margin-left: 4px; }
.booth-filters button.on { background: #2F4A3A; color: #fff; border-color: #2F4A3A; }
.booth-filters button.on b { color: var(--peach); }

/* petits écrans : la case active ne montre pas le chapitre (la frise et la liste restent) */
@media (max-width: 700px) {
  .days:has(.day.on .cur:not(:empty)) .day.on { grid-template-columns: auto; padding-right: 7px; text-align: center; }
  .day.on .cur:not(:empty) { display: none; }
  .ch-pop { min-width: 0; width: calc(100vw - 24px); }
  .track { height: 5px; }
}

/* ================= Titres (refonte) : un seul niveau d'accent ================= */
.dayhead { display: block; text-align: center; padding: 64px 16px 10px; }
.dayhead small {
  display: block; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); font-weight: 400;
}
.dayhead small b { color: var(--terra); font-weight: 700; }
.dayhead h2 { font-family: var(--script); font-weight: 400; font-size: clamp(56px, 8vw, 104px); line-height: 1; margin: 10px 0 0; color: var(--ink); }

.chapter { padding-top: 70px; }
.chapter-head { display: block; text-align: center; margin: 0 4px 30px; padding: 0; }
.chapter-head::after { display: none; }
.ch-roman {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 6px;
  font-family: var(--display); font-style: italic; font-size: 18px; color: var(--terra);
}
.ch-roman::before, .ch-roman::after { content: ""; width: 56px; height: 1px; background: var(--sage-light); }
.chapter-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; margin: 0; letter-spacing: .01em; }
body[data-view="balaruc"] .chapter:first-of-type, body[data-view="after"] .chapter:first-of-type { padding-top: 36px; }
.day.booth-tab b.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 22px; line-height: 1; }

/* ---------- Vidéos des invités ---------- */
.tile.vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vbadge {
  position: absolute; left: 10px; bottom: 10px; z-index: 2; padding: 3px 9px; border-radius: 999px;
  background: rgba(38,40,33,.7); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; pointer-events: none;
}
.pola-item .vbadge { left: 6px; bottom: 16px; font-size: 10px; padding: 1px 6px; }
.lb-stage video#lbVid { background: #000; box-shadow: 0 30px 80px -30px #000; max-width: none; max-height: none; }

/* ================= Bandeaux (refonte) ================= */
.hero-photo::before { display: none; }          /* plus de fond flouté */
.hero-photo { overflow: visible; border-radius: 0; }
/* paysage : bord à bord, sur toute la largeur de l'écran */
.hero-photo.bleed { margin: 34px calc(50% - 50vw) 34px; }
.hero-photo.bleed .tile { border-radius: 0; box-shadow: none; }
.hero-photo.bleed .tile img.in { transform: scale(1); transition: transform 2.4s cubic-bezier(.2,.8,.2,1), opacity .6s; }
.hero-photo.bleed .tile:hover img.in { transform: scale(1.025); }
/* portrait / vedette seule : tirage sur passe-partout */
.hero-photo.print { gap: 28px; padding: 30px 0 36px; }
.hero-photo.print .tile {
  padding: 14px; border-radius: 1px; background: #FBF6EF !important;
  outline: 1px solid rgba(62,74,58,.22); outline-offset: -8px;
  box-shadow: 0 2px 4px rgba(62,74,58,.08), 0 26px 50px -24px rgba(62,74,58,.45);
}
.hero-photo.print .tile img { border-radius: 0; }
.hero-photo.print .tile::after { inset: 14px; }
@media (max-width: 700px) {
  .hero-photo.bleed { margin: 22px -16px; }
  .hero-photo.print { padding: 18px 0 22px; }
  .hero-photo.print .tile { padding: 8px; outline-offset: -5px; }
  .hero-photo.print .tile::after { inset: 8px; }
}

/* ================= Visionneuse claire (photos) ================= */
#lb { background: var(--paper); color: var(--ink); transition: background .35s; }
#lb.from-guest {
  background:
    repeating-linear-gradient(-45deg, rgba(134,154,126,.10) 0 14px, transparent 14px 28px),
    var(--cream);
}
#lb .lb-count small { color: var(--ink-soft); }
#lb .lb-count .of { color: var(--ink-soft); }
#lb .lb-btn { border-color: rgba(62,74,58,.18); color: var(--ink); }
#lb .lb-btn:hover { background: var(--cream); border-color: rgba(62,74,58,.35); }
#lb .lb-btn.on { background: var(--terra); border-color: var(--terra); color: #fff; }
#lb .lb-dl { color: #fff; }
#lb .lb-nav { background: rgba(62,74,58,.07); color: var(--ink); }
#lb .lb-nav:hover { background: var(--terra); color: #fff; }
#lb .lb-stage img { box-shadow: 0 24px 60px -28px rgba(38,40,33,.55); }
#lb .lb-stage img.framed { box-shadow: 0 2px 4px rgba(62,74,58,.08), 0 30px 60px -28px rgba(38,40,33,.5); outline-color: rgba(62,74,58,.22); }
#lb .lb-strip button { background: var(--sand); opacity: .55; }
#lb .lb-strip button:hover { opacity: .9; }
#lb .lb-strip button.on { opacity: 1; border-color: var(--terra); }
#lb .lb-trash.on { color: #fff; }

/* visionneuse : flèches rondes sur les côtés, 5 vignettes en bas */
#lb .lb-strip { gap: 8px; }
#lb .lb-strip button { width: 84px; height: 56px; }
@media (max-width: 700px) { #lb .lb-strip { justify-content: center; } #lb .lb-strip button { width: 58px; height: 40px; } }

/* « from you » en grand, derrière la photo des invités */
#lb .lb-stage > * { position: relative; z-index: 1; }
#lb .lb-stage > .lb-nav { position: absolute; z-index: 2; }
/* signature en bas à droite : « from you » (invités) ou « Marie-Clémence David » (photographe), même style sobre */
#lb.from-guest::after, #lb.by-mcd::after {
  position: absolute; right: 32px; bottom: 36px; z-index: 3; pointer-events: none; white-space: nowrap; animation: fyIn .6s ease-out;
  font-family: var(--ui); font-size: 11px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
}
#lb.from-guest::after { content: "from you"; color: var(--terra); }
#lb.by-mcd::after { content: "Marie-Clémence David"; color: #1d1d1b; }
@media (max-width: 700px) {
  #lb.from-guest::after, #lb.by-mcd::after { right: 12px; bottom: 66px; font-size: 9px; letter-spacing: .2em; }
}
@keyframes fyIn { from { opacity: 0; scale: .96; } }
/* visionneuse claire : ombre plus marquée sous la photo */
#lb .lb-stage img, #lb .lb-stage video#lbVid {
  box-shadow: 0 3px 8px rgba(38,40,33,.14), 0 22px 40px -18px rgba(38,40,33,.45), 0 50px 110px -40px rgba(38,40,33,.6);
}
#lb .lb-stage img.framed {
  box-shadow: 0 0 0 1px rgba(62,74,58,.08), 0 3px 8px rgba(38,40,33,.14), 0 22px 40px -18px rgba(38,40,33,.45), 0 50px 110px -40px rgba(38,40,33,.6);
}

/* 6 pages + Extra : menu un peu plus serré, accueil en 3 colonnes */
@media (min-width: 961px) {
  .day { min-width: 0; padding: 10px 14px 9px; }
  .day small { letter-spacing: .14em; white-space: nowrap; }
}
@media (max-width: 960px) {
  .days { overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 120px); }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: none; }
}
.daycards { grid-template-columns: repeat(3, 1fr); }
.daycards .daycard:nth-child(even) { margin-top: 0; }
.daycards .daycard:nth-child(3n+2) { margin-top: 48px; }
@media (max-width: 1100px) { .daycards { grid-template-columns: repeat(2, 1fr); } .daycards .daycard:nth-child(3n+2) { margin-top: 0; } .daycards .daycard:nth-child(even) { margin-top: 48px; } }
@media (max-width: 560px) { .daycards { grid-template-columns: 1fr; } .daycards .daycard:nth-child(n) { margin-top: 0; } }
.day b.num { font-family: var(--display); font-style: italic; font-weight: 500; }
/* menu : « Chapitre N » en petit, nom en grand */
.day small { font-size: 10px; letter-spacing: .18em; }
.day b.name { font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.1; white-space: nowrap; }
.day.booth-tab small svg { width: 15px; height: 15px; display: block; margin: 0 auto -2px; }
.day.booth-tab b { height: auto; }
@media (max-width: 960px) { .day b.name { font-size: 17px; } }
/* écrans moyens : boutons de droite en icône seule, puis menu un peu plus compact */
@media (max-width: 1380px) { .actions .btn span { display: none; } }
@media (min-width: 961px) and (max-width: 1200px) {
  .day { padding: 9px 10px 8px; }
  .day b.name { font-size: 18px; }
  .day small { font-size: 9px; letter-spacing: .12em; }
  .days:has(.day.on .cur:not(:empty)) .day.on .cur { max-width: 150px; }
}
