/* ═══════════════════════════════════════════════
   CelebraPlume · socle commun des thèmes du moteur
   Mise en page et composants (balisage de classes/ThemeKit.php), mobile d'abord.
   Chaque thème fixe ces variables sémantiques à partir de sa palette, puis ajoute sa personnalité :
   --bg --bg-alt --surface --ink --ink-soft --accent --accent-2 --on-accent --line
   --accent-ink (accent lisible en petit texte, AA) --btn --on-btn (boutons pleins)
   --f-title --f-script --f-body --f-ui --radius --shadow
═══════════════════════════════════════════════ */
:root {
  --bg: #fbf8f2; --bg-alt: #f3ede2; --surface: #fff; --ink: #2b2620; --ink-soft: #6c6257; --accent: #b08f58; --accent-2: #e8d5b0;
  --on-accent: #1d1913; --line: rgba(176, 143, 88, .3); --dark: #1d1913; --on-dark: #f6efe2;
  --f-title: Georgia, serif; --f-script: cursive; --f-body: Georgia, serif; --f-ui: system-ui, sans-serif;
  --radius: 14px; --shadow: 0 24px 60px -32px rgba(40, 30, 20, .35);
  --gutter: clamp(18px, 5vw, 40px); --nav-h: 64px; --ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.65 var(--f-body); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.is-locked { overflow: hidden; }
img, svg, iframe { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.container { width: min(100%, 1120px); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(72px, 12vw, 128px) 0; scroll-margin-top: var(--nav-h); }
.amp { font-family: var(--f-title); font-style: italic; color: var(--accent); }
[data-empty]:empty::before { content: attr(data-empty); opacity: .45; }

/* Apparitions */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Titres de section */
.head { max-width: 680px; margin: 0 auto clamp(36px, 6vw, 56px); text-align: center; }
.head__tag { font: 600 12px var(--f-ui); letter-spacing: .32em; text-transform: uppercase; color: var(--accent-ink, var(--accent)); }
.head__title { margin-top: 10px; font: 400 clamp(36px, 7vw, 56px)/1.1 var(--f-title); color: var(--ink); }
.head__title em { padding-left: .06em; font-family: var(--f-script); font-style: normal; font-weight: 400; color: var(--accent); font-size: 1.15em; }
.head__sub { margin-top: 12px; color: var(--ink-soft); font-style: italic; }
.head__sub strong { font-style: normal; color: var(--ink); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 28px; border: 1px solid transparent; border-radius: 999px;
       font: 600 13px var(--f-ui); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s; }
.btn:active { transform: scale(.98); }
.btn--accent { background: var(--btn, var(--accent)); color: var(--on-btn, var(--on-accent)); box-shadow: 0 14px 30px -16px var(--btn, var(--accent)); }
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -16px var(--btn, var(--accent)); }
.btn--line { border-color: var(--accent); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--btn, var(--accent)); border-color: var(--btn, var(--accent)); color: var(--on-btn, var(--on-accent)); }
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 12px; }
.btn--block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }

/* Barre de progression, son */
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.sound { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 55; width: 50px; height: 50px; display: grid; place-items: center; border: 0; border-radius: 50%;
         background: var(--btn, var(--accent)); color: var(--on-btn, var(--on-accent)); box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .45); opacity: 0; transform: scale(.6); pointer-events: none; transition: .5s var(--ease); }
.sound.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.sound__bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.sound__bars i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; animation: bars 1s ease-in-out infinite alternate; }
.sound__bars i:nth-child(2) { animation-delay: -.3s; } .sound__bars i:nth-child(3) { animation-delay: -.6s; } .sound__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes bars { from { transform: scaleY(.25); } to { transform: none; } }
.sound__mute { display: none; }
.sound.is-muted .sound__bars { display: none; }
.sound.is-muted .sound__mute { display: block; }

/* Navigation */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: transform .45s var(--ease), background .4s, box-shadow .4s; }
.nav__inner { display: flex; align-items: center; gap: 18px; height: var(--nav-h); padding: 0 var(--gutter); }
.nav__brand { margin-right: auto; font: 400 22px var(--f-title); letter-spacing: .12em; text-decoration: none; }
.nav__brand span { font-family: var(--f-script); color: var(--accent); }
.nav__links { display: none; gap: 28px; }
.nav__link { font: 500 12px var(--f-ui); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; opacity: .85; }
.nav__link:hover { opacity: 1; color: var(--accent); }
.nav__cta { display: none; padding: 10px 20px; border: 1px solid var(--accent); color: inherit; border-radius: 999px; font: 600 11px var(--f-ui); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; }
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); color: var(--ink); }
.nav.is-hidden { transform: translateY(-100%); }
.burger { width: 44px; height: 44px; display: grid; place-content: center; gap: 7px; border: 0; background: none; }
.burger span { display: block; width: 24px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
.drawer-overlay { position: fixed; inset: 0; z-index: 48; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .4s; }
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 49; width: min(86vw, 360px); display: flex; flex-direction: column; padding: calc(var(--nav-h) + 20px) 30px 30px;
          background: var(--bg); color: var(--ink); transform: translateX(100%); visibility: hidden; transition: transform .5s var(--ease), visibility .5s; }
.drawer.is-open { transform: none; visibility: visible; box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .3); }
.drawer__brand { font: 400 34px/1.1 var(--f-script); color: var(--accent); }
.drawer__links { display: flex; flex-direction: column; gap: 4px; margin: 28px 0; }
.drawer__links a { padding: 12px 0; border-bottom: 1px solid var(--line); font: 400 24px var(--f-title); text-decoration: none; }
.drawer__cta { margin-top: 16px; border: 0 !important; color: var(--accent); }
.drawer__foot { margin-top: auto; font: 500 12px var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
@media (min-width: 900px) { .nav__links, .nav__cta { display: flex; } .burger { display: none; } }

/* Ouverture (le décor est propre à chaque thème) */
.intro { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow: hidden; transition: opacity 1.2s var(--ease), visibility 1.2s; }
.intro.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro__content { position: relative; z-index: 2; width: min(100%, 520px); padding: 24px var(--gutter) 80px; text-align: center; }
.intro__skip { position: absolute; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px;
               border: 1px solid currentColor; background: transparent; font: 500 11px var(--f-ui); letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.intro__skip .ico { width: 14px; height: 14px; }
.intro__hint { margin-top: 26px; font: 500 12px var(--f-ui); letter-spacing: .28em; text-transform: uppercase; opacity: .85; }
.intro__hint span { display: block; margin-top: 8px; font-size: 11px; color: var(--accent-ink, var(--accent)); }
.cp-demo-on .intro__content { padding-bottom: 110px; }
.cp-demo-on .intro__skip, .cp-demo-on .sound { bottom: calc(80px + env(safe-area-inset-bottom)); }
.cp-demo-on .footer { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }

/* Compte à rebours */
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2vw, 18px); max-width: 680px; margin: 0 auto; }
.cd__box { padding: clamp(14px, 3vw, 24px) 6px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cd__num { display: block; font: 400 clamp(32px, 8vw, 56px)/1 var(--f-title); font-variant-numeric: lining-nums tabular-nums; color: var(--accent); }
.cd__label { display: block; margin-top: 8px; font: 600 10px var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.cd__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }

/* Photos */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery__item { position: relative; padding: 0; border: 0; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: var(--bg-alt); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery--1 { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
.gallery--3 .gallery__item:first-child, .gallery--5 .gallery__item:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 14px; } .gallery--2, .gallery--4 { grid-template-columns: repeat(2, 1fr); } }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(10, 8, 6, .92); opacity: 0; transition: opacity .35s; }
.lightbox[hidden] { display: none; }   /* sans ce correctif, [hidden] perd face à .lightbox { display: grid } : l'overlay couvre tout l'écran en invisible mais reste cliquable */
.lightbox.is-open { opacity: 1; }
.lightbox__img { max-width: 92vw; max-height: 84vh; border-radius: 8px; transition: opacity .3s; }
.lightbox__close, .lightbox__nav { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav--prev { left: 12px; } .lightbox__nav--next { right: 12px; }

/* Programme */
.timeline { position: relative; max-width: 760px; margin: 0 auto; --fill: 0; }
.timeline::before, .timeline::after { content: ''; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline::after { background: var(--accent); transform: scaleY(var(--fill)); transform-origin: top; }
.step { position: relative; padding-left: 54px; }
.step + .step { margin-top: 22px; }
.step__dot { position: absolute; left: 12px; top: 28px; z-index: 1; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--accent); background: var(--bg); transition: background .5s, box-shadow .5s; }
.step.is-lit .step__dot { background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent); }
.step__card { position: relative; padding: 24px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.step__icon { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); }
.step__time { font: 600 13px var(--f-ui); letter-spacing: .18em; color: var(--accent-ink, var(--accent)); }
.step__title { margin-top: 6px; padding-right: 54px; font: 500 clamp(26px, 4vw, 32px)/1.15 var(--f-title); }
.step__place { margin-top: 6px; font: 600 11px var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.step__text { margin-top: 10px; color: var(--ink-soft); }
@media (min-width: 768px) {
  .timeline::before, .timeline::after { left: 50%; }
  .step { width: 50%; padding: 0 44px 0 0; }
  .step:nth-child(even) { margin-left: 50%; padding: 0 0 0 44px; }
  .step + .step { margin-top: -28px; }
  .step__dot { left: auto; right: -8px; }
  .step:nth-child(even) .step__dot { left: -7px; right: auto; }
}

/* Lieux */
.venues__grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .venues__grid--2 { grid-template-columns: 1fr 1fr; } }
.venue { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.venue__map { position: relative; height: 230px; background: var(--bg-alt); }
.venue__map iframe { width: 100%; height: 100%; border: 0; filter: saturate(.75); }
.venue__map--static { display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--bg-alt) 0 14px, color-mix(in srgb, var(--bg-alt) 70%, var(--line)) 14px 15px); }
.venue__pin { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--btn, var(--accent)); color: var(--on-btn, var(--on-accent)); }
.venue__body { padding: 22px; }
.venue__kind { display: flex; align-items: center; gap: 8px; font: 600 11px var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink, var(--accent)); }
.venue__kind .ico { width: 16px; height: 16px; }
.venue__title { margin-top: 10px; font: 500 30px/1.15 var(--f-title); }
.venue__addr { margin-top: 6px; color: var(--ink-soft); }
.venue__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Infos pratiques */
.infos__grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .infos__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .infos__grid { grid-template-columns: repeat(3, 1fr); } }
.info { padding: 26px 22px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.info--feature { grid-column: 1 / -1; }
.info__ico { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); }
.info__title { font: 500 25px/1.2 var(--f-title); }
.info__text { margin-top: 8px; color: var(--ink-soft); font-size: 17px; }
.swatches { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }

/* Réponses */
.form { position: relative; max-width: 680px; margin: 0 auto; padding: clamp(24px, 5vw, 44px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { margin-bottom: 8px; padding: 0; font: 600 12px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: 400 17px var(--f-ui); color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field .is-invalid { border-color: #b3261e; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg__opt input, .pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg__opt span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font: 500 15px var(--f-ui); text-align: center; transition: .25s; }
.seg__opt input:checked + span { background: var(--btn, var(--accent)); border-color: var(--btn, var(--accent)); color: var(--on-btn, var(--on-accent)); }
.seg__opt input:focus-visible + span, .pick input:focus-visible + .pick__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.picks { display: grid; gap: 10px; }
.pick__box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; transition: .25s; }
.pick__ico { color: var(--accent); }
.pick__txt { flex: 1; display: flex; flex-direction: column; font: 400 16px var(--f-ui); }
.pick__txt strong { font: 500 20px var(--f-title); }
.pick__txt em { font-style: normal; font-size: 13px; color: var(--ink-soft); }
.pick__check { opacity: 0; color: var(--accent); }
.pick input:checked + .pick__box { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pick input:checked + .pick__box .pick__check { opacity: 1; }
#attendBlock { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s var(--ease), opacity .4s; }
#attendBlock.is-collapsed { grid-template-rows: 0fr; opacity: 0; }
.attend-inner { overflow: hidden; }
.form__status { min-height: 24px; margin-top: 16px; text-align: center; font: 500 15px var(--f-ui); }
.form__status.is-error { color: #b3261e; }
.form__status.is-success { color: var(--accent-ink, var(--accent)); }
.thanks { display: none; text-align: center; padding: 10px 0; }
.thanks:focus { outline: none; }
.form.is-sent .form__fields { display: none; }
.form.is-sent .thanks { display: block; animation: rise .9s var(--ease) both; }
.thanks__title { font: 400 clamp(46px, 11vw, 70px)/1.1 var(--f-script); color: var(--accent); }
.thanks__text { margin-top: 10px; color: var(--ink-soft); }
.thanks__again { margin-top: 22px; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Livre d'or */
.book-form { max-width: 640px; margin: 0 auto; padding: clamp(22px, 4vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.book-list { display: grid; gap: 14px; max-width: 820px; margin: 30px auto 0; }
@media (min-width: 768px) { .book-list { grid-template-columns: 1fr 1fr; } }
.book-entry { position: relative; padding: 22px 22px 18px 50px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.book-entry::before { content: '“'; position: absolute; left: 14px; top: 2px; font: 400 52px/1 var(--f-title); color: var(--accent); }
.book-entry__msg { font: italic 400 19px/1.55 var(--f-title); }
.book-entry__name { margin-top: 8px; font: 600 11px var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink, var(--accent)); }
.book-entry.is-new { animation: rise .9s var(--ease) both; }

/* Pied de page */
.footer { padding: 80px var(--gutter) 60px; text-align: center; }
.footer__credit { margin-top: 26px; font: 400 13px var(--f-ui); opacity: .75; }
.footer__credit a { text-underline-offset: 3px; }

/* Aperçu de l'éditeur : tout visible, aucune animation d'entrée */
.cp-preview .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
