/* ==========================================================
   Thème sombre + nouveaux éléments (messagerie, paiement,
   badges, boutique, portfolio). Chargé après style.css.
   ========================================================== */
:root{
  color-scheme:dark;
  --ink:#eef0ff;
  --ink-2:#c3c7ec;
  --muted:#9095c4;
  --red:#ff5a73;
  --red-2:#d9344c;
  --red-soft:rgba(255,90,115,.16);
  --glass:rgba(20,22,56,.62);
  --glass-strong:rgba(16,18,46,.88);
  --glass-line:rgba(255,255,255,.12);
  --surface:rgba(255,255,255,.06);
  --surface-2:rgba(255,255,255,.1);
  --surface-hi:rgba(255,255,255,.16);
  --line:rgba(255,255,255,.12);
  --shadow:0 18px 50px -18px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.25);
}
body{background:#0e1030}
.vignette{background:
  radial-gradient(120% 90% at 50% 40%, transparent 50%, rgba(6,6,24,.55) 100%),
  radial-gradient(60% 75% at 0% 32%, rgba(14,16,48,.72) 0%, rgba(14,16,48,.38) 45%, rgba(14,16,48,0) 75%)}
.logo,.intro h1{text-shadow:0 2px 18px rgba(0,0,0,.55)}
.intro h1 em{text-shadow:0 2px 18px rgba(0,0,0,.4)}
.lead.dark{text-shadow:none}

/* Surfaces claires → sombres */
.nav a:hover{background:var(--surface-2)}
.nav a.is-active,.tabbar button.is-active,.auth-tabs button.is-on{background:var(--surface-hi);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,90,115,.55)}
.btn-white{background:var(--surface-2);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
.btn-white:hover{background:var(--surface-hi)}
.close,.chat-back,.mini-btn,.fav,.mc-note{background:var(--surface-2);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
.socials a,.social-card .socials a i,.about-pills span,.bubble,.hero-switch-pill{background:var(--surface-2);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
.item,.product,.bopt,.sheet-foot{background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.bopt.sel{background:var(--surface-hi);border-color:var(--red)}
input,textarea{background:rgba(0,0,0,.25);color:var(--ink);border-color:var(--line)}
input::placeholder,textarea::placeholder{color:var(--muted)}
.file span{background:rgba(0,0,0,.2);border-color:rgba(255,255,255,.22)}
.slot .lbl{background:rgba(10,12,36,.82);color:var(--ink)}
.map-pin em{background:rgba(255,255,255,.95);color:#1f2352;box-shadow:0 4px 10px -4px rgba(0,0,0,.45)}
.map-pin.here em{background:var(--red-2);color:#fff}
.msg,.typing{background:var(--surface-2);color:var(--ink);box-shadow:none}
.ct:hover,.playlist li:hover{background:var(--surface)}
.playlist li.is-on{background:var(--surface-2)}
.chat-lock{background:rgba(12,14,40,.72)}
.badge-count{box-shadow:0 0 0 2px #14163a}
.c-av{box-shadow:0 0 0 2px rgba(255,255,255,.25),0 6px 12px -6px rgba(0,0,0,.6)}
.c-av.on::after{box-shadow:0 0 0 2px #14163a}
.num{box-shadow:0 12px 24px -10px rgba(217,52,76,.9),0 0 0 5px rgba(255,255,255,.08)}
.bdg{background:var(--surface-2);box-shadow:0 6px 14px -6px rgba(0,0,0,.6)}
.bdg.empty{background:transparent;border-color:rgba(255,255,255,.22)}
.bdg[data-tip]:hover::after{background:#fff;color:#14163a;z-index:5}
.sheet-backdrop{}
body.sheet-open .sheet-backdrop{background:radial-gradient(ellipse at center, rgba(6,6,24,.25), rgba(6,6,24,.65))}
@media (max-width:900px){
  body.scrolled .topbar{background:rgba(16,18,46,.82)}
  .isle-chips button{background:var(--surface-2)!important;color:var(--ink)!important}
  .tabbar{background:rgba(16,18,46,.86)!important}
}
.vinyl-hole{background:#1b1e48}
.sheet a:not(.btn){color:var(--red);font-weight:700}
.dlg{color:var(--ink)}
.dlg::backdrop{background:rgba(6,6,24,.6)}

/* ---------- 1 · 2 : messagerie compacte + montgolfière ---------- */
.chat-card.chat-mini{padding:12px 12px 10px}
.chat-mini .chat-head{margin-bottom:4px}
.chat-mini .ct{padding:6px}
.chat-mini .c-av{width:32px;height:32px;font-size:16px}
.chat-mini .c-top b{font-size:12.5px}
.chat-mini .c-last{font-size:11.5px}
.chat-mini .chat-empty{font-size:12px;color:var(--muted);font-weight:600;padding:6px 4px}
.mini-link{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:800;color:var(--red);padding:4px 8px;border-radius:9px}
.mini-link:hover{background:var(--surface-2)}
.mini-link svg{width:13px;height:13px}
.mini-link.danger{color:var(--muted)}
.mini-link.danger:hover{color:var(--red)}
.balloon-tip{background:rgba(16,18,46,.8);box-shadow:inset 0 0 0 1px var(--line)}
.balloon-tip small{color:var(--ink-2)}
.balloon-dot{position:absolute;z-index:6;top:6%;right:12%;width:16px;height:16px;border-radius:50%;background:var(--red);
  box-shadow:0 0 0 3px rgba(16,18,46,.9),0 0 14px rgba(255,90,115,.9);animation:dotPulse 1.8s ease-in-out infinite}
@keyframes dotPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.18)}}
.nav-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--red);box-shadow:0 0 8px rgba(255,90,115,.9)}
.nav-dot[hidden],.balloon-dot[hidden]{display:none!important}

/* ---------- 4 : page messagerie ---------- */
.msgr{position:relative;display:grid;grid-template-columns:minmax(230px,300px) 1fr;gap:18px;min-height:440px}
.msgr-side,.msgr-main{border-radius:20px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);padding:16px;min-width:0}
.msgr-side{display:flex;flex-direction:column;gap:10px}
.add-friend{display:flex;gap:8px}
.add-friend input{flex:1;min-width:0;padding:10px 12px;font-size:13px}
.friend-list{list-style:none;display:flex;flex-direction:column;gap:4px}
.friend-list .ct.is-open{background:var(--surface-2)}
.friend-list .empty{font-size:12.5px;color:var(--muted);font-weight:600;padding:4px}
.sugg .ct{opacity:.85}
.add-btn{flex:none;font-size:11.5px;font-weight:800;color:#fff;background:var(--red-2);padding:5px 10px;border-radius:9px}
.msgr-main{display:flex;flex-direction:column;min-height:440px}
.msgr-head{display:flex;align-items:center;gap:10px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.msgr-head .c-av:empty{display:none}
.msgr-who{flex:1;min-width:0;display:flex;flex-direction:column}
.msgr-who small{font-size:11px;font-weight:700;color:#3ccf86}
.msgr-thread{flex:1;overflow:auto;display:flex;flex-direction:column;gap:6px;padding:14px 2px;max-height:52vh;scrollbar-width:thin}
.msgr-thread .hint{margin:auto;text-align:center;color:var(--muted);font-weight:600;font-size:13.5px;max-width:280px;line-height:1.5}
.msgr-form{display:flex!important;padding-top:10px;border-top:1px solid var(--line)}
.msgr:not(.has-open) .msgr-form{opacity:.4;pointer-events:none}
.msgr .chat-back{display:none}
.msgr .chat-lock{border-radius:20px;z-index:3}
.demo-note{margin-top:14px}
@media (max-width:760px){
  .msgr{grid-template-columns:1fr}
  .msgr.has-open .msgr-side{display:none}
  .msgr:not(.has-open) .msgr-main{display:none}
  .msgr .chat-back{display:grid}
}

/* ---------- Badges (images) ---------- */
.bdg img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.bdg:has(img){background:none}
.badges{gap:8px;flex-wrap:wrap}
.pc-badges .badges .bdg{width:38px;height:38px;font-size:17px}
.badges.big{margin:14px 0 18px}
.badges.big .bdg{width:58px;height:58px;font-size:24px}
.badge-list{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.bopt .bdg{width:46px;height:46px}
.bopt.lock{opacity:.55}
.bopt.lock .bdg img{filter:grayscale(1) brightness(.6)}
.bopt .tick{margin-left:auto;font-size:12px;color:var(--red);font-weight:900}

/* ---------- 12 : profil empilé ---------- */
.profile-stack{display:flex;flex-direction:column;gap:22px}
.prof-form,.prof-badges{background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.prof-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0}
.prof-fields .span2{grid-column:1/-1}
.prof-id{flex:1;min-width:0}
.prof-level{display:flex;align-items:center;gap:10px;margin-top:12px;max-width:420px;font-size:13px}
.prof-level .bar{flex:1}
.prof-level b:last-child{color:var(--red)}
.prof-badges h3 small{font-size:12px;font-weight:700;margin-left:6px}
@media (max-width:640px){.prof-fields{grid-template-columns:1fr}}

/* ---------- 7 : boutique ---------- */
.sheet-head .cart-pill{margin-left:auto;align-self:center;gap:8px}
.cart-pill b{min-width:20px;height:20px;border-radius:10px;background:var(--red);color:#fff;font-size:11px;display:inline-grid;place-items:center;padding:0 6px}
.shop-filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
.shop-filters button{padding:8px 14px;border-radius:999px;font-weight:800;font-size:12.5px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink-2)}
.shop-filters button.is-on{background:var(--red-2);color:#fff;box-shadow:none}
.shop-feature:empty{display:none}
.shop-feature{display:grid;grid-template-columns:minmax(180px,260px) 1fr;gap:24px;align-items:center;padding:18px;border-radius:22px;margin-bottom:22px;
  background:linear-gradient(135deg,rgba(255,90,115,.14),rgba(120,110,255,.12));box-shadow:inset 0 0 0 1px var(--line)}
.shop-feature img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:16px;box-shadow:0 20px 40px -18px rgba(0,0,0,.8)}
.shop-feature .tag{position:static;display:inline-block;margin-bottom:10px}
.shop-feature h3{font-size:24px!important;margin-bottom:6px}
.shop-feature p{color:var(--ink-2);font-weight:600;line-height:1.5;margin-bottom:16px;max-width:46ch}
.shop{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:18px}
.product{padding:10px}
.product .pimg{background:radial-gradient(circle at 50% 40%,#2c2f6e 0%,#15173d 70%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.product .pimg img:not(.cover){filter:drop-shadow(0 10px 14px rgba(0,0,0,.55))}
.product .buy{margin:12px 4px 4px}
.product .buy .btn,.shop-feature .btn{width:100%;justify-content:center}
.btn-soon,.btn-soon:hover{background:var(--surface-2);color:var(--muted);box-shadow:inset 0 0 0 1px var(--line);cursor:default;transform:none}
.sticker-bg{background:radial-gradient(circle at 50% 40%,#2c2f6e 0%,#15173d 70%)}
@media (max-width:640px){.shop-feature{grid-template-columns:1fr}.shop-feature img{max-width:220px;margin:auto}}

/* ---------- 8 : collection ---------- */
.slot.locked{background:#14163a center/cover no-repeat;border-radius:14px;box-shadow:0 14px 26px -12px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.12)}
.slot.locked::before{content:"";position:absolute;inset:8px;border-radius:10px;border:1px dashed rgba(255,255,255,.28);pointer-events:none}
.slot.locked img{display:none}

/* ---------- Mail club ---------- */
.mc-reserve{display:flex;flex-direction:column;align-items:center;gap:8px;margin:26px 0 8px}
.mc-price{font-weight:800;color:var(--ink-2);font-size:14px}
.mc-price:empty{display:none}
.howto{margin-top:20px}
.howto-lead{font-size:16px;line-height:1.6;font-weight:600;color:var(--ink);max-width:70ch;margin-bottom:20px}
.howto-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}
.step{position:relative;padding:20px 18px 18px;border-radius:20px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);display:flex;flex-direction:column;gap:8px}
.step b{font-size:15.5px}
.step p{font-size:13.5px;line-height:1.55;color:var(--ink-2);font-weight:600}
.step-n{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-weight:900;font-size:14px;color:#fff;background:linear-gradient(145deg,#ff6b81,var(--red-2))}
.howto-ex{list-style:none;display:flex;flex-direction:column;gap:8px;margin-top:4px}
.howto-ex li{display:grid;grid-template-columns:1fr auto;gap:2px 8px;padding:10px 12px;border-radius:12px;background:rgba(0,0,0,.22);font-size:12.5px;font-weight:600;color:var(--ink-2)}
.howto-ex li i{font-style:normal;color:var(--red);font-weight:900;grid-row:1/3;grid-column:2;align-self:center}
.howto-ex li b{font-size:12.5px;color:var(--ink)}

/* ---------- 13 : portfolio ---------- */
.portfolio{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px}
.pf{position:relative;border-radius:16px;overflow:hidden;aspect-ratio:4/5;cursor:zoom-in;background:#15173d;box-shadow:inset 0 0 0 1px var(--line)}
.pf img{width:100%;height:100%;object-fit:cover;transition:transform .6s var(--spring)}
.pf img.contain{object-fit:contain;padding:10px}
.pf:hover img{transform:scale(1.05)}
.pf figcaption{position:absolute;left:0;right:0;bottom:0;padding:24px 12px 10px;font-size:12.5px;font-weight:800;background:linear-gradient(transparent,rgba(8,8,28,.85))}
.pf figcaption small{display:block;font-weight:600;color:var(--ink-2)}
.legal-link{margin-top:26px;font-size:13px;text-align:center}
.lightbox{width:min(900px,calc(100vw - 32px));padding:20px}
.lightbox img{width:100%;max-height:75vh;object-fit:contain;border-radius:14px}
.lb-cap{margin-top:10px;font-weight:700;text-align:center}

/* ---------- 14 : paiement ---------- */
.pay-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:22px;align-items:start}
.pay-main{display:flex;flex-direction:column;gap:22px}
.pay-box{border-radius:22px;padding:22px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.pay-box h3{margin-bottom:12px}
.pay-box h3:not(:first-child){margin-top:20px}
.cart{list-style:none;display:flex;flex-direction:column;gap:10px}
.cart li{display:flex;align-items:center;gap:12px;padding:8px;border-radius:14px;background:rgba(0,0,0,.2)}
.cart img{width:46px;height:46px;border-radius:10px;object-fit:cover;background:#15173d}
.cart .ci{flex:1;min-width:0;display:flex;flex-direction:column}
.cart .ci small{color:var(--muted);font-weight:600;font-size:12px}
.cart .cp{font-weight:800;font-size:13px}
.cart .rm{width:28px;height:28px;border-radius:8px;color:var(--muted);font-size:18px}
.cart .rm:hover{color:var(--red);background:var(--surface-2)}
.cart .empty{background:none;color:var(--muted);font-weight:600;font-size:13.5px}
.cart-total{display:flex;justify-content:space-between;margin-top:14px;padding-top:12px;border-top:1px solid var(--line);font-weight:800}
.cart-total b{color:var(--red);font-size:17px}
.pay-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.pay-fields .span2{grid-column:1/-1}
.pay-provider{padding:14px 16px;border-radius:14px;background:rgba(0,0,0,.22);box-shadow:inset 0 0 0 1px var(--line);font-size:13px;line-height:1.5;color:var(--ink-2);font-weight:600}
.pay-provider b{color:var(--ink);display:block;margin-bottom:2px}
.check{flex-direction:row!important;align-items:flex-start;gap:10px!important;margin:16px 0 12px;font-size:13px;font-weight:600;line-height:1.45}
.check input{width:18px;height:18px;flex:none;margin-top:1px;accent-color:var(--red)}
#payForm .btn-lg{width:100%;justify-content:center;margin-bottom:8px}
.pay-err{margin-bottom:10px}
.legal{position:sticky;top:0;font-size:13px;line-height:1.55}
.legal-dl{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin-bottom:14px}
.legal-dl dt{color:var(--muted);font-weight:700}
.legal-dl dd{font-weight:700}
.legal details{border-top:1px solid var(--line);padding:10px 0}
.legal summary{cursor:pointer;font-weight:800;list-style:none;display:flex;justify-content:space-between}
.legal summary::after{content:"+";color:var(--red);font-weight:900}
.legal details[open] summary::after{content:"–"}
.legal details p{margin-top:8px;color:var(--ink-2);font-weight:600}
.todo{color:#ffcf6b;font-weight:700}
@media (max-width:860px){.pay-grid{grid-template-columns:1fr}.legal{position:static}}
@media (max-width:520px){.pay-fields{grid-template-columns:1fr}}

/* Encadré Mail club de l'accueil : version sombre */
.card.glass.promo{background:linear-gradient(135deg,rgba(28,30,72,.88),rgba(58,28,64,.82));border-color:rgba(255,255,255,.14)}
.promo-tag{background:rgba(255,90,115,.18);color:#ff8095}
.promo-title{color:#fff}
.promo-list{color:var(--ink-2)}
.promo-list em,.promo-price{color:#fff}

/* Page Messagerie : occupe toute la hauteur du panneau */
.sheet[data-page="messagerie"]{display:flex;flex-direction:column}
.sheet[data-page="messagerie"] .sheet-head{margin-bottom:20px}
.msgr{flex:1;min-height:420px}
.msgr-main{min-height:0}
.msgr-side{min-height:0;overflow:auto}
.msgr-thread{max-height:none;min-height:0}
.demo-note{margin-top:10px}
/* Aperçu messagerie de l'accueil : moins large que l'encadré Mail club */
.chat-card.chat-mini{height:auto}

/* Salon commun */
.salon-list .ct{background:linear-gradient(135deg,rgba(255,180,110,.12),rgba(255,90,115,.12));box-shadow:inset 0 0 0 1px rgba(255,160,120,.25)}
.salon-list .ct.is-open{background:linear-gradient(135deg,rgba(255,180,110,.22),rgba(255,90,115,.22))}
.msg .who{display:block;font-size:11px;font-weight:800;color:#ffb08a;margin-bottom:2px}
#msgrStatus.muted{color:var(--muted)}

/* Derniers éléments clairs */
.toast{background:rgba(22,24,60,.95);color:var(--ink);box-shadow:0 14px 34px -12px rgba(0,0,0,.8),inset 0 0 0 1px rgba(255,255,255,.14)}
.teaser-art{background:radial-gradient(circle at 50% 40%,#2c2f6e,#15173d 70%)}
.t-frame{border-color:rgba(255,90,115,.35)}
.auth-tabs{background:rgba(0,0,0,.25)}
.soon-big{background:rgba(255,90,115,.16)}

/* Enveloppe du Mail club : voir mailclub.css */
.lightbox{text-align:center}
.lb-flip{margin-top:10px}

/* Créations : images entières, sans zoom */
.product .pimg{aspect-ratio:4/5}
.product .pimg img,.product .pimg img.cover,.product .pimg img:not(.cover){object-fit:contain;transform:none;padding:14px}
.product .pimg img.cover{padding:12px;filter:drop-shadow(0 10px 14px rgba(0,0,0,.5))}
.product:hover .pimg img,.product:hover .pimg img:not(.cover){transform:scale(1.04) rotate(-1.5deg)}
.shop-feature img{object-fit:contain;background:none;box-shadow:none;filter:drop-shadow(0 20px 30px rgba(0,0,0,.6))}
.product .pimg .tag{z-index:2}

/* Croix de fermeture bien visible sur tous les fonds */
.close{background:rgba(14,16,42,.9);color:#fff;box-shadow:0 6px 16px -6px rgba(0,0,0,.7),inset 0 0 0 1.5px rgba(255,255,255,.35)}
.close:hover{background:var(--red-2);box-shadow:0 6px 16px -6px rgba(217,52,76,.8)}
/* Listes de la messagerie : rien ne dépasse de la colonne */
.msgr-side>*{min-width:0;max-width:100%}
.friend-list .ct{min-width:0;max-width:100%;overflow:hidden}
.friend-list .ct:hover{transform:none}
.friend-list .c-last{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* À propos : voir apropos.css */
.sheet[data-page="apropos"] .about{grid-template-columns:1fr;max-width:560px;margin:0 auto 10px}
/* Panneaux : flou plus léger pour un défilement fluide */
.sheet.glass-strong{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);background:rgba(16,18,46,.92)}

/* Recette : on montre le verso, flouté */
.product .pimg img.blurred{filter:blur(5px) brightness(.85)}
.product:hover .pimg img.blurred{filter:blur(4px) brightness(.9)}
.peek{position:absolute;left:50%;top:50%;translate:-50% -50%;z-index:2;white-space:nowrap;padding:8px 14px;border-radius:999px;
  background:rgba(14,16,42,.85);color:#fff;font-size:12px;font-weight:800;box-shadow:0 8px 20px -8px rgba(0,0,0,.8),inset 0 0 0 1px rgba(255,255,255,.2)}

/* Logo du salon */
.c-av.c-logo{background:none;box-shadow:none;overflow:visible}
.c-av.c-logo img{width:118%;height:118%;max-width:none;object-fit:contain;filter:drop-shadow(0 4px 8px rgba(0,0,0,.5))}

/* ---------- Fluidité ----------
   1) Quand une page est ouverte, le décor derrière est figé (il est flouté et masqué) :
      plus de flou recalculé à chaque image.
   2) La page elle-même est presque opaque : pas besoin de backdrop-filter.
   3) Flou des encadrés « verre » allégé (il est recalculé à chaque flocon qui passe). */
body.sheet-open .scene,body.sheet-open .scene *,body.sheet-open .spots *,body.sheet-open .balloon,body.sheet-open .balloon *,body.sheet-open .home *{animation-play-state:paused!important}
.sheet.glass-strong{-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(16,18,46,.96)}
.glass{-webkit-backdrop-filter:blur(10px) saturate(1.3);backdrop-filter:blur(10px) saturate(1.3)}
.glass-strong:not(.sheet){-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4)}
.sheet{contain:layout paint}
