/* Musée pour toi — styles communs. Les couleurs viennent de tokens.css (généré depuis shared/tokens.js). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--yellow); color: var(--on-yellow); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.container { width: min(100% - 40px, 1200px); margin-inline: auto; }
@media (min-width: 820px) { .container { width: min(100% - 64px, 1200px); } }

.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; color: var(--accent-text);
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--yellow); border-radius: 2px; }

/* ---------- Boutons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 22px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 0.975rem; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 0.925rem; }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--yellow); color: var(--on-yellow); }
.btn-primary:hover { background: #FFE04D; }
[data-theme='light'] .btn-primary { border-color: rgba(0, 0, 0, 0.08); }
[data-theme='light'] .btn-primary:focus-visible { outline-color: #121212; }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--text); }

.btn-ghost { background: transparent; color: var(--text); padding-inline: 12px; }
.btn-ghost:hover { background: var(--surface); }

.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }

.btn .btn-icon { width: 18px; height: 18px; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { border-color: var(--border-strong); }

.link-quiet { text-decoration: none; font-weight: 600; padding: 10px 6px; }
.link-quiet:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link { color: var(--text); font-weight: 600; text-underline-offset: 3px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg); border-bottom: 1px solid var(--border);
  min-height: 65px;
}
.header-bar { display: flex; align-items: center; gap: 24px; height: 64px; }
@media (min-width: 820px) { .header-bar { height: 76px; } .site-header { min-height: 77px; } }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand .logo-mark { width: 30px; height: 30px; color: var(--text); }
.brand-name { font-family: var(--font-serif); font-size: 1.45rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand--small .logo-mark { width: 24px; height: 24px; }
.brand--small .brand-name { font-size: 1.15rem; }

.nav-main { display: none; gap: 6px; margin-left: 28px; }
.nav-main a, .mobile-menu__links a {
  position: relative; text-decoration: none; color: var(--text-muted); font-weight: 500;
}
.nav-main a { padding: 10px 14px; }
.nav-main a:hover, .mobile-menu__links a:hover { color: var(--text); }
.nav-main a[aria-current='page'] { color: var(--text); font-weight: 600; }
.nav-main a[aria-current='page']::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--yellow); border-radius: 2px;
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-account { display: none; align-items: center; gap: 10px; }

.menu-toggle .menu-toggle__close { display: none; }
.is-menu-open .menu-toggle .menu-toggle__open { display: none; }
.is-menu-open .menu-toggle .menu-toggle__close { display: inline; }

@media (min-width: 820px) {
  .nav-main, .header-account { display: flex; }
  .menu-toggle { display: none; }
}

.account-link {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600;
  padding: 4px 14px 4px 4px; border: 1px solid var(--border); border-radius: var(--radius-pill);
}
.account-link:hover { border-color: var(--border-strong); }
.account-link[aria-current='page'] { border-color: var(--yellow); }
.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--yellow); color: var(--on-yellow); font-weight: 700; font-size: 0.9rem;
}
.account-link--block { width: 100%; padding: 6px; border-radius: var(--radius-md); font-size: 1.05rem; }

/* Interrupteur de thème : deux pictogrammes, la pastille jaune marque le thème actif. */
.theme-switch {
  position: relative; display: inline-flex; align-items: center;
  width: 76px; height: 40px; padding: 3px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; flex: none;
}
.theme-switch__icon {
  position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 32px;
  color: var(--text-muted); transition: color .2s;
}
.theme-switch__icon svg { width: 18px; height: 18px; }
.theme-switch__knob {
  position: absolute; top: 3px; left: 3px; width: 34px; height: 32px; border-radius: var(--radius-pill);
  background: var(--yellow); transition: transform .25s cubic-bezier(.3, .7, .2, 1);
}
.theme-switch[aria-checked='true'] .theme-switch__knob { transform: translateX(36px); }
.theme-switch[aria-checked='true'] .theme-switch__icon--moon,
.theme-switch[aria-checked='false'] .theme-switch__icon--sun { color: var(--on-yellow); }
.theme-switch:hover { border-color: var(--text-muted); }

.mobile-menu {
  position: absolute; inset: 100% 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .5);
}
.mobile-menu__inner { padding: 12px 0 24px; display: grid; gap: 18px; }
.mobile-menu__links { display: grid; }
.mobile-menu__links a {
  padding: 14px 4px; font-size: 1.25rem; font-family: var(--font-serif); color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu__links a[aria-current='page'] { box-shadow: inset 3px 0 0 var(--yellow); padding-left: 14px; }
.mobile-menu__account { display: grid; gap: 10px; }
.mobile-menu__account .link-quiet { text-align: center; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 72px; }
.footer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 28px 0 36px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--text); }
.footer-note { margin-left: auto; color: var(--text-subtle); font-size: 0.875rem; }

/* ---------- Accueil ---------- */
.hero { padding: 40px 0 56px; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero__title { font-size: clamp(2.75rem, 9.5vw, 5.6rem); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.hero__lede { margin-top: 22px; font-size: 1.125rem; color: var(--text-muted); max-width: 34rem; }
.hero__cta { margin-top: 30px; display: grid; gap: 14px; justify-items: start; }
.hero__cta .btn-primary { min-width: min(100%, 300px); }
.hero__fineprint { color: var(--text-muted); font-size: 0.9rem; }
@media (max-width: 559px) {
  .hero { padding-top: 28px; }
  .hero__cta { justify-items: stretch; text-align: center; }
}
@media (min-width: 960px) {
  .hero { padding: 72px 0 80px; }
  .hero__grid { grid-template-columns: 1.02fr 1fr; gap: 56px; }
}

.tour { display: grid; gap: 14px; }
.tour-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong); background: var(--surface); aspect-ratio: 16 / 10.5;
}
.tour-card img { width: 100%; height: 100%; object-fit: cover; }
.tour-card__overlay {
  position: absolute; inset: auto 0 0 0; padding: 72px 22px 20px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, .86) 15%, rgba(0, 0, 0, 0));
  color: #F6F3EC;
}
.tour-card__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.tour-card__sub { color: rgba(246, 243, 236, .78); font-size: .95rem; margin-top: 4px; }
.btn-on-image {
  background: rgba(0, 0, 0, .55); color: #F6F3EC; border-color: rgba(255, 212, 0, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.btn-on-image:hover { border-color: var(--yellow); background: rgba(0, 0, 0, .75); }
.btn-on-image .play { width: 0; height: 0; border-left: 9px solid var(--yellow); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
@media (max-width: 520px) {
  .tour-card { aspect-ratio: 4 / 3.6; }
  .tour-card__overlay { flex-direction: column; align-items: stretch; padding: 64px 16px 16px; }
  .tour-card__overlay .btn { width: 100%; }
}

.section { padding: 56px 0 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 26px; }
.section__title { font-size: clamp(2rem, 4.5vw, 3rem); }
.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }

.room-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .room-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.room-card {
  margin: 0; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface);
}
.room-card img { width: 100%; aspect-ratio: 16 / 7.4; object-fit: cover; }
.room-card figcaption { padding: 20px 22px 24px; }
.room-card h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.room-card p { color: var(--text-muted); margin-top: 8px; }

.steps { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.step { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-strong); font-weight: 600; font-size: .9rem; margin-bottom: 14px;
}
.step h3 { font-size: 1.45rem; }
.step p { color: var(--text-muted); margin-top: 6px; }
.tag-soon {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); font: 600 .72rem/1.5 var(--font-sans); color: var(--text-muted);
  vertical-align: middle; letter-spacing: .02em;
}

.cta-band {
  margin-top: 64px; padding: 36px 28px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--surface); display: grid; gap: 22px; align-items: center;
}
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; padding: 40px 44px; } }
@media (max-width: 559px) { .cta-band__actions .btn { width: 100%; } }

/* ---------- Modales ---------- */
.modal {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 0;
  background: var(--bg); color: var(--text); width: min(100% - 24px, 560px); max-height: calc(100dvh - 24px);
}
.modal::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
[data-theme='dark'] .modal:not(.modal--preview) { background: var(--surface); }
[data-theme='dark'] .modal:not(.modal--preview) .modal__close { background: var(--surface); }
[data-theme='dark'] .modal .plan-detail__renew,
[data-theme='dark'] .modal .soon-banner,
[data-theme='dark'] .modal .plan-detail__spaces figure { background: var(--surface-raised); }
.modal--small { width: min(100% - 32px, 440px); }
.modal__body { padding: 28px; display: grid; gap: 14px; }
.modal__title { font-size: 1.9rem; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--bg); }
.modal[open] { animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* Aperçu (diaporama) */
.modal--preview { width: min(100% - 24px, 1080px); background: #000; color: #F6F3EC; border-color: #2A2A2A; }
.modal--preview .modal__close { background: rgba(0, 0, 0, .6); color: #F6F3EC; border-color: rgba(255, 255, 255, .25); }
.preview { display: grid; }
.preview__stage { position: relative; background: #000; aspect-ratio: 16 / 9; overflow: hidden; touch-action: pan-y; }
.preview__stage img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.preview__stage img.is-loading { opacity: .2; }
.preview__arrow {
  position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(0, 0, 0, .55); color: #F6F3EC;
}
.preview__arrow:hover { border-color: var(--yellow); }
.preview__arrow svg { width: 22px; height: 22px; }
.preview__arrow--prev { left: 14px; }
.preview__arrow--next { right: 14px; }
.preview__info { display: grid; gap: 16px; padding: 22px 26px 26px; }
@media (min-width: 760px) { .preview__info { grid-template-columns: 1fr auto; align-items: end; } }
.preview__kicker { font-size: .85rem; color: var(--yellow); font-weight: 600; }
.preview__title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-top: 4px; }
.preview__caption { color: rgba(246, 243, 236, .78); margin-top: 6px; max-width: 46rem; }
.preview__dots { display: flex; gap: 8px; }
.preview__dot {
  width: 64px; height: 40px; padding: 0; border-radius: 6px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: #111; opacity: .6;
}
.preview__dot img { width: 100%; height: 100%; object-fit: cover; }
.preview__dot[aria-current='true'] { border-color: var(--yellow); opacity: 1; }
.preview__dot:hover { opacity: 1; }
.preview__note { padding: 0 26px 22px; color: rgba(246, 243, 236, .6); font-size: .875rem; }
@media (max-width: 559px) {
  .preview__stage { aspect-ratio: 4 / 3.2; }
  .preview__arrow { width: 40px; height: 40px; }
  .preview__dot { width: 52px; height: 34px; }
  .preview__info { padding: 18px; }
  .preview__note { padding: 0 18px 18px; }
}

/* ---------- Forfaits ---------- */
.page-head { padding: 48px 0 32px; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: -0.02em; }
.page-head p { margin-top: 12px; color: var(--text-muted); font-size: 1.08rem; max-width: 44rem; }
@media (min-width: 820px) { .page-head { padding: 72px 0 40px; } }

.soon-banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface); margin-bottom: 36px; color: var(--text-muted);
}
.soon-banner strong { color: var(--text); }
.soon-banner__dot { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--yellow); }

.plans { display: grid; gap: 28px; align-items: stretch; }
@media (min-width: 980px) { .plans { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 28px 26px 26px;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface);
}
.plan--recommended { border: 3px solid var(--yellow); padding: 26px 24px 24px; }
.plan__badge {
  position: absolute; top: 0; left: 50%; translate: -50% -50%;
  background: var(--yellow); color: var(--on-yellow); font-weight: 700; font-size: .9rem;
  padding: 6px 18px; border-radius: var(--radius-pill); white-space: nowrap;
}
.plan__name { font-size: 2.3rem; }
.plan__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; }
.plan__amount { font-family: var(--font-serif); font-size: 3.4rem; line-height: 1; letter-spacing: -0.02em; }
.plan--recommended .plan__amount { color: var(--accent-text); }
.plan__billing { color: var(--text-muted); font-size: .95rem; }
.plan__rule { border: 0; border-top: 1px solid var(--border-strong); margin: 22px 0 20px; }
.plan__list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 11px; }
.plan__list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--text-muted); line-height: 1.4; }
.plan__list strong { color: var(--text); font-weight: 600; }
.plan__check { width: 16px; height: 16px; margin-top: 3px; color: var(--yellow); }
[data-theme='light'] .plan__check { color: #121212; }
.plan__foot { margin-top: auto; display: grid; gap: 14px; }
.plan__note { color: var(--text-muted); font-size: .875rem; line-height: 1.45; min-height: 2.9em; }
.plan--recommended .btn-primary { --h: 54px; font-size: 1.02rem; box-shadow: 0 10px 28px -12px rgba(255, 212, 0, .55); }
@media (max-width: 979px) { .plan--recommended { margin-top: 10px; } }

.plan-detail__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-detail__price .plan__amount { font-size: 2.6rem; }
.plan-detail__renew {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border); font-weight: 500;
}
.plan-detail__list { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 12px; }
.plan-detail__list li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--text-muted); }
.plan-detail__spaces { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-detail__spaces figure { margin: 0; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.plan-detail__spaces img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.plan-detail__spaces figcaption { padding: 10px 12px; font-size: .85rem; color: var(--text-muted); }
.plan-detail__spaces figcaption strong { display: block; color: var(--text); font-family: var(--font-serif); font-weight: 400; font-size: 1.1rem; }
.modal--plan { width: min(100% - 24px, 620px); }
.modal--plan .modal__body { padding-top: 32px; }

.space-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .space-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.space-card {
  display: grid; grid-template-columns: minmax(120px, 38%) 1fr; overflow: hidden; margin: 0;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface);
}
.space-card img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; }
.space-card figcaption { padding: 22px; }
.space-card h3 { font-size: 1.8rem; }
.space-card__occasion { font-weight: 600; margin-top: 4px; font-size: .95rem; }
.space-card p { color: var(--text-muted); margin-top: 10px; }
@media (max-width: 520px) {
  .space-card { grid-template-columns: 1fr; }
  .space-card img { aspect-ratio: 16 / 9; min-height: 0; height: auto; }
}
.accent-label { font-weight: 700; color: var(--accent-text); font-size: .95rem; }

.facts { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.fact { padding: 18px 0; border-top: 1px solid var(--border); }
.fact h3 { font-size: 1.3rem; }
.fact p { color: var(--text-muted); margin-top: 6px; font-size: .95rem; }

/* ---------- Bandeau démo ---------- */
.demo-notice {
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
  padding: 12px 16px; border-radius: var(--radius-md); border: 1px dashed var(--border-strong);
  color: var(--text-muted); font-size: .9rem; line-height: 1.45;
}
.demo-notice__tag {
  flex: none; font-weight: 700; color: var(--on-yellow); background: var(--yellow);
  padding: 3px 10px; border-radius: var(--radius-pill); font-size: .8rem; letter-spacing: .02em;
}

/* ---------- Formulaires et authentification ---------- */
.auth { padding: 40px 0 0; }
.auth__card {
  width: min(100%, 460px); margin-inline: auto; display: grid; gap: 22px;
  padding: 32px 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
}
@media (max-width: 520px) { .auth__card { padding: 26px 20px; } .auth { padding-top: 24px; } }
.auth__card h1 { font-size: 2.5rem; }
.auth__intro { color: var(--text-muted); margin-top: 8px; }
.auth__alt { text-align: center; color: var(--text-muted); }
.auth__divider { display: flex; align-items: center; gap: 12px; color: var(--text-subtle); font-size: .85rem; }
.auth__divider::before, .auth__divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.auth .demo-notice { width: min(100%, 460px); margin: 0 auto 16px; }

/* Boutons Google / Apple — couleurs selon les chartes des deux marques */
.social-auth { display: grid; gap: 10px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid; font-weight: 600; font-size: .975rem; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.social-btn__logo { width: 20px; height: 20px; flex: none; }
.social-btn--google { background: #FFFFFF; color: #1F1F1F; border-color: #747775; }
.social-btn--google:hover { background: #F2F2F2; }
.social-btn--apple { background: #000000; color: #FFFFFF; border-color: #000000; }
.social-btn--apple:hover { background: #262626; }
.social-btn--apple .social-btn__logo { margin-top: -2px; }
.social-btn--email { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.social-btn--email:hover { border-color: var(--text); }
.auth-email { display: grid; gap: 18px; }
.auth__back {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; margin-top: -6px;
  border: 0; background: none; color: var(--text-muted); font-weight: 500; cursor: pointer;
}
.auth__back:hover { color: var(--text); }
.auth__demo { margin-top: 14px; text-align: center; }
.link-button {
  border: 0; background: none; padding: 6px 4px; cursor: pointer; color: var(--text-muted); font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover { color: var(--text); }
[data-theme='dark'] .social-btn--google { background: #131314; color: #E3E3E3; border-color: #8E918F; }
[data-theme='dark'] .social-btn--google:hover { background: #1F1F20; }
[data-theme='dark'] .social-btn--apple { background: #FFFFFF; color: #000000; border-color: #FFFFFF; }
[data-theme='dark'] .social-btn--apple:hover { background: #E8E8E8; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, .field .label { font-weight: 600; font-size: .95rem; }
.field__hint { color: var(--text-subtle); font-size: .85rem; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.input, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font-size: 1rem;
}
.textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:hover, .textarea:hover { border-color: var(--text-subtle); }
.input:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; border-radius: var(--radius-sm); }
.input[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: .875rem; font-weight: 500; }
.form-error {
  padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 500;
  color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, transparent); margin: 16px 0;
}
.form-success {
  padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--success) 45%, transparent);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}
.counter { color: var(--text-subtle); font-size: .82rem; font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 96px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; min-height: 36px; padding: 0 12px;
  border: 0; background: transparent; color: var(--text-muted); font-weight: 600; font-size: .875rem; cursor: pointer; border-radius: 6px;
}
.password-toggle:hover { color: var(--text); }

/* ---------- Studio ---------- */
.studio { padding: 36px 0 0; }
.studio__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.studio__head h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.studio__head p { color: var(--text-muted); margin-top: 6px; }
.studio .demo-notice { margin-bottom: 24px; }
@media (max-width: 559px) { .studio__head .btn { width: 100%; } }

.museum-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.museum-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface);
  transition: border-color .15s, transform .15s;
}
.museum-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.museum-card:focus-visible { outline-offset: 2px; border-radius: var(--radius-lg); }
.museum-card__cover { aspect-ratio: 16 / 10; background: var(--surface-raised); overflow: hidden; }
.museum-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.museum-card__body { padding: 16px 18px 18px; display: grid; gap: 6px; }
.museum-card__name { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.15; overflow-wrap: anywhere; }
.museum-card__meta { display: flex; align-items: center; gap: 10px; color: var(--text-subtle); font-size: .85rem; flex-wrap: wrap; }
.museum-card--example { border-style: dashed; }
.museum-card--example .museum-card__actions { margin-top: 8px; }

.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: .78rem; font-weight: 600; border: 1px solid var(--border-strong); color: var(--text-muted);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.status--example { border-color: var(--yellow); color: var(--text); }
.status--example::before { background: var(--yellow); opacity: 1; }

.cover-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-subtle);
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, color-mix(in srgb, var(--text) 5%, transparent) 46px 47px),
    var(--surface-raised);
}
.cover-placeholder svg { width: 54px; height: 54px; }

.empty {
  display: grid; justify-items: center; text-align: center; gap: 14px; padding: 56px 24px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}
.empty__frame {
  width: 120px; height: 90px; border: 2px solid var(--border-strong); border-radius: 4px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 8px var(--surface), inset 0 0 0 9px var(--border);
}
.empty__frame svg { width: 40px; height: 40px; color: var(--text-subtle); }
.empty h2 { font-size: 2rem; }
.empty p { color: var(--text-muted); max-width: 30rem; }

.studio__section { margin-top: 48px; }
.studio__section h2 { font-size: 1.7rem; margin-bottom: 16px; }

/* Éditeur */
.editor__back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-muted); font-weight: 500; margin-bottom: 18px; padding: 6px 0; }
.editor__back:hover { color: var(--text); }
.editor { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .editor { grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: 40px; } }
.editor__title { font-size: clamp(2rem, 5vw, 3rem); overflow-wrap: anywhere; }
.editor__status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-muted); font-size: .9rem; margin: 8px 0 26px; }
.save-state[data-state='dirty'] { color: var(--text); font-weight: 600; }
.save-state[data-state='dirty']::before { content: '● '; color: var(--yellow); }
[data-theme='light'] .save-state[data-state='dirty']::before { color: #B58F00; }

.dropzone {
  position: relative; display: grid; place-items: center; gap: 8px; padding: 26px 18px; text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--bg); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--yellow); }
.dropzone:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone svg { width: 28px; height: 28px; color: var(--text-muted); }
.dropzone strong { font-weight: 600; }
.dropzone span { color: var(--text-subtle); font-size: .85rem; }
.cover-current { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
.cover-current img { width: 88px; height: 58px; object-fit: cover; border-radius: 6px; }
.cover-current__text { flex: 1; min-width: 0; font-size: .9rem; color: var(--text-muted); }
.cover-current__actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.editor__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.editor__danger { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: .9rem; }

@media (max-width: 959px) {
  .editor__actions--sticky {
    position: sticky; bottom: 0; z-index: 5; margin-inline: -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--border);
  }
  .editor__actions--sticky .btn-primary { flex: 1; }
}

.facade { position: sticky; top: 100px; display: grid; gap: 16px; }
.facade__label { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.facade__card { position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); aspect-ratio: 16 / 11; background: var(--surface-raised); }
.facade__card img, .facade__card .cover-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.facade__overlay { position: absolute; inset: auto 0 0 0; padding: 70px 22px 20px; background: linear-gradient(to top, rgba(0, 0, 0, .86) 15%, rgba(0, 0, 0, 0)); color: #F6F3EC; }
.facade__name { font-size: clamp(1.6rem, 3vw, 2.3rem); overflow-wrap: anywhere; }
.facade__desc { color: rgba(246, 243, 236, .8); margin-top: 6px; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.facade__card--empty .facade__overlay { background: none; color: var(--text); }
.facade__card--empty .facade__desc { color: var(--text-muted); }
@media (max-width: 959px) { .facade { position: static; } }

.roadmap { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.roadmap h3 { font-size: 1.25rem; }
.roadmap ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.roadmap li { display: flex; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: .95rem; }

/* Compte */
.account { padding: 40px 0 0; display: grid; gap: 24px; max-width: 720px; }
.account h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); }
.account-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 6px 22px; }
.account-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.account-row:last-child { border-bottom: 0; }
.account-row dt { color: var(--text-muted); }
.account-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Toasts */
.toast-region { position: fixed; z-index: 60; left: 50%; bottom: 24px; translate: -50% 0; display: grid; gap: 8px; width: min(100% - 32px, 420px); pointer-events: none; }
.toast {
  padding: 13px 18px; border-radius: var(--radius-md); background: var(--text); color: var(--bg);
  font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: toast-in .2s ease-out; text-align: center;
}
.toast--success::before { content: '✓  '; color: var(--success); }
[data-theme='dark'] .toast--success::before { color: #1D7A35; }
.toast--error { background: var(--danger); color: #fff; }
.toast.is-leaving { opacity: 0; transition: opacity .35s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.loading { padding: 80px 0; text-align: center; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Studio : décor 3D et lien des invités ---------- */
.decor-section { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--border); display: grid; gap: 14px; scroll-margin-top: 90px; }
.decor-section__title { font-size: 1.7rem; }
.decor-grid { display: grid; gap: 14px; }
.decor-card { display: grid; grid-template-columns: minmax(0, 220px) 1fr; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.decor-card img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; background: #211a15; }
.decor-card__body { padding: 16px 18px; display: grid; gap: 8px; align-content: center; justify-items: start; }
.decor-card h3 { font-size: 1.4rem; }
.decor-card--chosen { border-color: var(--border-strong); }
.guest-link { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; display: grid; gap: 10px; }
.guest-link h3 { font-size: 1.25rem; }
.guest-link__row { display: flex; gap: 8px; }
.guest-link__row .input { flex: 1; min-width: 0; font-size: .875rem; }
.guest-link__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: -12px; }
@media (max-width: 560px) {
  .decor-card { grid-template-columns: 1fr; }
  .decor-card img { aspect-ratio: 16 / 9; min-height: 0; }
}
