/* PARALIB BOUTIQUE 3D — Interface */
:root {
  --glass: rgba(28, 24, 21, 0.62);
  --glass-strong: rgba(28, 24, 21, 0.86);
  --line: rgba(240, 220, 180, 0.28);
  --gold: #d9b46a;
  --gold-dark: #9a7330;
  --cream: #f7f0e4;
  --ink: #2a211b;
  --muted: #7d6e5f;
  --panel: #fbf7f0;
  --wine: #6b1d24;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #f4e8d2; color: var(--ink);
  font-family: Lato, "Segoe UI", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
#scene:active { cursor: grabbing; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  color: #fff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
}

/* ---------- barre du haut */
#brand {
  position: fixed; top: max(14px, env(safe-area-inset-top)); left: 16px;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 22px 9px 12px; border-radius: 999px;
  font-family: Lato, sans-serif; font-weight: 700; letter-spacing: 0.04em; font-size: 16px;
  user-select: none; pointer-events: none;
}
.lotus { width: 34px; height: 34px; color: var(--gold); }
.lotus.big { width: 76px; height: 76px; }
/* (v0.7) vrai logo PARALIB : on ne montre que l'icône ronde (mains et croix) du fichier logo */
.brand-icon {
  display: inline-block; flex: none; border-radius: 50%; background-color: #fff;
  background-image: url("../assets/paralib/logo.jpg"); background-repeat: no-repeat;
  background-size: 443.7% auto; background-position: 5.87% 46.3%;
  box-shadow: 0 0 0 2px rgba(217, 180, 106, .85);
}
/* (v4.5) légende des chapeaux, sous le logo ; repliée = petit bouton rond */
#hat-legend { position: fixed; top: calc(max(14px, env(safe-area-inset-top)) + 66px); left: 16px; z-index: 5; color: #fff; font-size: 13px; }
#hat-legend .hl-toggle {
  width: 38px; height: 38px; border-radius: 50%; padding: 0; font-size: 18px; line-height: 1;
  background: var(--glass); border: 1px solid var(--line); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
#hat-legend .hl-body {
  display: none; position: relative; flex-direction: column; gap: 6px; padding: 10px 34px 11px 13px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
}
#hat-legend.open .hl-toggle { display: none; }
#hat-legend.open .hl-body { display: flex; }
#hat-legend b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
#hat-legend span { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
#hat-legend i { width: 14px; height: 9px; border-radius: 7px 7px 2px 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.45); flex: none; }
#hat-legend .hl-close {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: transparent; color: #fff; font-size: 18px; line-height: 1; padding: 0;
}
#hat-legend .hl-mine { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--line); }
#hat-legend .hl-mine[hidden], #hat-legend .hl-count[hidden] { display: none; }
#hat-legend .hl-mine em { font-style: normal; color: var(--cream); }
#hat-legend .hl-mine button {
  display: flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: #fff; font-size: 12px;
}
#hat-legend .hl-mine button[aria-pressed="true"] { background: rgba(217, 180, 106, .28); border-color: var(--gold); }
#hat-legend .hl-count { color: var(--cream); opacity: .85; font-size: 11.5px; }
#hat-legend .hl-close:hover { background: rgba(255,255,255,.12); }
#hat-legend button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 600px) { #hat-legend { font-size: 12px; top: calc(max(14px, env(safe-area-inset-top)) + 58px); } }

#actions { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 16px; display: flex; gap: 12px; }
.round {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; position: relative; padding: 0;
}
.round svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.round:hover { background: var(--glass-strong); }
.round:focus-visible, .panel button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#cart-count {
  position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 999px; background: #b3122e; color: #fff; font-size: 12px; line-height: 21px; text-align: center;
}

#stand-label {
  position: fixed; top: max(80px, calc(env(safe-area-inset-top) + 66px)); left: 50%;
  transform: translate(-50%, -10px); opacity: 0; transition: opacity .35s, transform .35s;
  padding: 8px 18px; border-radius: 999px; font-family: Cinzel, serif; font-weight: 700; font-size: 15px;
  white-space: nowrap; pointer-events: none; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
#stand-label.show { opacity: 1; transform: translate(-50%, 0); }
#hint {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 14px; font-size: 14px; text-align: center;
  opacity: 0; transition: opacity .6s; pointer-events: none; max-width: min(560px, calc(100vw - 260px));
}
#hint.show { opacity: 1; }

/* ---------- joystick et bouton avancer */
#joystick {
  position: fixed; left: 28px; bottom: max(28px, env(safe-area-inset-bottom));
  width: 160px; height: 160px; border-radius: 50%;
  touch-action: none; user-select: none;
  background: rgba(40, 36, 32, 0.38);
}
.joy-arrows { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#joy-knob {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4f1ec, #bdb7ae);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); pointer-events: none;
}
.big-round { position: fixed; right: 28px; bottom: max(28px, env(safe-area-inset-bottom)); width: 92px; height: 92px; touch-action: none; user-select: none; }
.big-round svg { width: 44px; height: 44px; stroke-width: 1.6; }

/* ---------- chargement */
/* (v2.8) page d'accueil dans le style du site PARALIB : fond de boutique (image de la galerie 3D),
   carte vert tendre, boutons verts, smartphone en gros plan qui montre l'application */
#loading {
  --p-green: #6b9a2a; --p-green-dark: #557d1f; --p-coral: #ea7a5c; --p-ink: #111827; --p-text: #4b5563; --p-card: #eef4e2; --p-line: #d9e6c5;
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  padding: max(14px, env(safe-area-inset-top)) clamp(16px, 4vw, 56px) max(16px, env(safe-area-inset-bottom));
  background: #f3f5f0 url("../assets/accueil/fond-boutique.jpg") center / cover no-repeat;
  color: var(--p-ink); font-family: Inter, "Segoe UI", Arial, sans-serif; transition: opacity .8s; overflow: hidden;
}
#loading::before {   /* voile clair à gauche pour lire la carte, la boutique reste visible à droite */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(243, 245, 240, .96) 0%, rgba(243, 245, 240, .88) 34%, rgba(243, 245, 240, .35) 58%, rgba(20, 14, 8, .05) 100%);
}
#loading > * { position: relative; }
#loading.done { opacity: 0; pointer-events: none; }
.acc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acc-logo { display: flex; align-items: center; gap: 10px; }
.acc-logo .brand-icon { width: 46px; height: 46px; box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(0, 0, 0, .12); }
.acc-name { font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: 26px; color: var(--p-green); letter-spacing: .02em; }
.acc-pill { background: var(--p-coral); color: #fff; font-weight: 600; padding: 10px 20px; border-radius: 999px; box-shadow: 0 8px 20px rgba(234, 122, 92, .35); font-size: 15px; }
.acc-main { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: clamp(20px, 5vw, 80px); }
.acc-card {
  width: min(560px, 100%); background: linear-gradient(160deg, #f4f8ec, var(--p-card)); border: 1px solid var(--p-line);
  border-radius: 28px; padding: clamp(22px, 3.4vw, 42px); box-shadow: 0 20px 60px rgba(30, 40, 20, .14);
}
.acc-card { max-height: 100%; overflow-y: auto; }
.acc-cta { font-weight: 700; color: var(--p-green-dark); font-size: clamp(15px, 1.3vw, 18px); margin: 0 0 16px; }
.acc-card h1 { font-weight: 800; font-size: clamp(26px, 3.1vw, 44px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance; }
.acc-card h1 em { font-style: normal; color: var(--p-green); text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.acc-lead { color: var(--p-text); font-size: clamp(14px, 1.15vw, 17px); line-height: 1.5; margin: 0 0 12px; max-width: 36em; }
.acc-box { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 6px 24px rgba(30, 40, 20, .08); }
#loading-text { color: var(--p-text); margin: 2px 4px 12px; font-size: 15px; }
#loading .bar { width: 100%; height: 6px; margin: 0; background: #e5ecd9; overflow: hidden; border-radius: 6px; }
#loading .bar span { display: block; width: 40%; height: 100%; background: var(--p-green); border-radius: 6px; animation: load 1.2s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
#enter { display: grid; gap: 10px; }
.acc-btn { width: 100%; border: 0; border-radius: 12px; padding: 15px 18px; background: var(--p-green); color: #fff; font-weight: 600; font-size: 17px; transition: background .2s; }
.acc-btn:hover { background: var(--p-green-dark); }
.acc-btn.ghost { background: #fff; color: var(--p-green); box-shadow: inset 0 0 0 2px var(--p-green); }
.acc-btn.ghost:hover { background: #f4f8ec; }
.acc-btn:focus-visible { outline: 3px solid var(--p-coral); outline-offset: 2px; }
.acc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; }
.acc-chips span { background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 14px; color: #374151; box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
.acc-chips .acc-label { background: none; box-shadow: none; padding: 0 2px 0 0; color: var(--p-text); }
/* (v3.5) smartphone en gros plan, façon iPhone récent : cadre en titane brossé, bords d'écran fins,
   Dynamic Island, barre d'état 9:41, boutons latéraux, barre d'accueil, reflet de la vitre,
   légère perspective. Toutes les tailles en cqw (% de la largeur du téléphone) : net à toutes les tailles. */
.acc-phone {
  /* --pw = largeur du téléphone (ses propres mesures ne peuvent pas utiliser cqw) */
  /* (v4.3) agrandi : presque toute la hauteur disponible (auparavant min(78vh, 760px)) */
  --ph: min(calc(100vh - 110px), 900px); --pw: calc(var(--ph) * 71.6 / 146.6);
  container-type: size; position: relative; flex: none;
  height: var(--ph); width: var(--pw); border-radius: calc(var(--pw) * .17); padding: calc(var(--pw) * .015);
  background: linear-gradient(135deg, #ebe8e2 0%, #a7a49e 16%, #f6f4f0 30%, #8f8c86 50%, #dcd9d3 68%, #7f7c77 86%, #d2cfc9 100%);
  box-shadow: 0 0 0 calc(var(--pw) * .0035) #5f5c57, inset 0 0 calc(var(--pw) * .009) rgba(0, 0, 0, .35), 0 50px 100px rgba(20, 15, 10, .42), 0 16px 34px rgba(20, 15, 10, .28);
  transform: perspective(1500px) rotateY(-10deg) rotateX(3deg) rotateZ(-2deg);
  animation: acc-float 6s ease-in-out infinite; cursor: pointer; z-index: 1; transition: filter .3s;
}
.acc-phone:hover, .acc-phone:focus-visible { filter: brightness(1.06) drop-shadow(0 0 18px rgba(255, 214, 140, .55)); outline: none; }
@keyframes acc-float { 50% { transform: perspective(1500px) rotateY(-10deg) rotateX(3deg) rotateZ(-2deg) translateY(-10px); } }
/* (v4.3) zone du téléphone : halo doux qui attire l'œil, phrase d'invitation manuscrite */
.acc-phonezone { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; margin-right: clamp(0px, 3vw, 60px); }
.acc-phonezone::before {
  content: ""; position: absolute; inset: 6% -14%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 216, 140, .6), rgba(255, 216, 140, 0)); animation: acc-halo 3.4s ease-in-out infinite;
}
@keyframes acc-halo { 0%, 100% { opacity: .35; transform: scale(.94); } 50% { opacity: .85; transform: scale(1.04); } }
.acc-invite {
  position: absolute; right: calc(100% + 14px); top: 9%; width: clamp(150px, 14vw, 290px); margin: 0; z-index: 2;
  font: 400 clamp(24px, 2.3vw, 42px) / 1.12 "Great Vibes", "Brush Script MT", cursive; color: #2a3a14; text-align: right;
  text-shadow: 0 0 10px rgba(255, 255, 255, .95), 0 0 3px #fff; transform: rotate(-4deg);
}
.acc-invite-arrow { display: block; width: 64%; max-width: 120px; margin: 4px 0 0 auto; color: #6b9a2a; filter: drop-shadow(0 0 4px #fff); }
/* écran : aperçu animé de la galerie (fondu enchaîné + lent travelling), titre, invitation à toucher */
.acc-slides { inset: 0; overflow: hidden; }
.acc-slides i { position: absolute; inset: -6%; background: center / cover no-repeat; opacity: 0; animation: acc-slide 15s ease-in-out infinite; will-change: transform, opacity; }
.acc-slides i:nth-child(2) { animation-delay: 5s; } .acc-slides i:nth-child(3) { animation-delay: 10s; }
@keyframes acc-slide { 0% { opacity: 0; transform: scale(1) translateY(0); } 7% { opacity: 1; } 33% { opacity: 1; } 42% { opacity: 0; transform: scale(1.13) translateY(-3%); } 100% { opacity: 0; } }
.acc-title {
  /* (v4.4) sans rectangle de fond : le texte seul, avec une ombre marquée pour rester lisible sur l'image animée */
  left: 50%; top: 45%; transform: translate(-50%, -50%); width: 86cqw; text-align: center; z-index: 1;
  color: #fffaf0; font: 700 10.5cqw/1.08 Cinzel, Georgia, serif; letter-spacing: .03em;
  text-shadow: 0 0 1.2cqw rgba(0, 0, 0, .9), 0 0.6cqw 3cqw rgba(0, 0, 0, .85), 0 0 8cqw rgba(0, 0, 0, .6);
}
.acc-title small { display: block; font: 600 4.2cqw Lato, sans-serif; letter-spacing: .3em; color: #e9cf8c; margin-bottom: 1.6cqw; }
.acc-touch {
  left: 50%; top: 64%; transform: translateX(-50%); white-space: nowrap; z-index: 1; padding: 2.4cqw 5.5cqw; border-radius: 999px;
  background: #e9cf8c; color: #1d1a17; font: 700 4.6cqw Lato, sans-serif; box-shadow: 0 4px 18px rgba(0, 0, 0, .35); animation: acc-pulse 2.2s ease-in-out infinite;
}
@keyframes acc-pulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.07); } }
/* ordinateurs à écran étroit : la phrase passe au-dessus du téléphone (elle ne doit pas recouvrir la carte) */
@media (min-width: 821px) and (max-width: 1240px) {
  .acc-invite { position: static; width: auto; max-width: 16em; transform: none; text-align: center; font-size: clamp(21px, 2.2vw, 26px); margin: 0 0 16px; }
  .acc-invite-arrow { display: none; }
  .acc-phone { --ph: min(calc(100vh - 165px), 900px); }
}
@media (prefers-reduced-motion: reduce) {
  .acc-phone, .acc-phonezone::before, .acc-touch { animation: none; }
  .acc-slides i { animation: none; } .acc-slides i:first-child { opacity: 1; }
}
.acc-side { position: absolute; width: 1.2cqw; border-radius: .7cqw; background: linear-gradient(90deg, #6f6c67, #dad7d1 45%, #8a8782); }
.acc-s1 { left: -1cqw; top: 17%; height: 5%; }     /* bouton Action */
.acc-s2 { left: -1cqw; top: 25.5%; height: 9.5%; } /* volume + */
.acc-s3 { left: -1cqw; top: 37%; height: 9.5%; }   /* volume - */
.acc-s4 { right: -1cqw; top: 29%; height: 14.5%; } /* bouton latéral */
.acc-screen {
  position: relative; height: 100%; border-radius: 15.5cqw; border: 3.3cqw solid #050506; overflow: hidden;
  background: #2a211b url("../assets/accueil/ecran-appli.jpg") center / cover;
  box-shadow: 0 0 0 .25cqw #1d1d20;
}
.acc-screen::after {   /* reflet de la vitre */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, .07) 27%, rgba(255, 255, 255, 0) 41%);
}
.acc-screen span { position: absolute; }
.acc-island { top: 2.6cqw; left: 50%; width: 31cqw; height: 8.8cqw; transform: translateX(-50%); background: #000; border-radius: 5cqw; z-index: 2; }
.acc-time { top: 4.2cqw; left: 9.5cqw; color: #fff; font: 600 4.6cqw -apple-system, "SF Pro Text", Inter, sans-serif; letter-spacing: .02em; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.acc-status { top: 4.9cqw; right: 7.5cqw; display: flex; align-items: center; gap: 1.4cqw; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.acc-status svg { height: 3.3cqw; width: auto; fill: currentColor; }
.acc-home { bottom: 2.2cqw; left: 50%; width: 35cqw; height: 1.4cqw; transform: translateX(-50%); border-radius: 1cqw; background: rgba(255, 255, 255, .88); z-index: 2; }
/* interface de l'application PARALIB Boutique, à l'écran */
.acc-ui-brand { top: 15cqw; left: 4cqw; display: flex; align-items: center; gap: 2cqw; padding: 1.6cqw 3.8cqw 1.6cqw 1.6cqw; border-radius: 999px; background: rgba(28, 24, 21, .66); color: #fff; font: 700 3.7cqw Lato, sans-serif; letter-spacing: .04em; }
.acc-ui-brand .brand-icon { width: 6.6cqw; height: 6.6cqw; position: static; }
.acc-ui-btns { top: 15cqw; right: 4cqw; display: flex; gap: 1.8cqw; }
.acc-ui-btns i { width: 8.8cqw; height: 8.8cqw; border-radius: 50%; background: rgba(28, 24, 21, .66); border: 1px solid rgba(240, 220, 180, .35); }
.acc-ui-stand { top: 28cqw; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 1.6cqw 4.4cqw; border-radius: 999px; background: rgba(28, 24, 21, .66); color: #fff; font: 700 3.6cqw Cinzel, serif; }
.acc-ui-joy { left: 5cqw; bottom: 10cqw; width: 24cqw; height: 24cqw; border-radius: 50%; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .5); }
.acc-ui-joy i { position: absolute; inset: 7cqw; border-radius: 50%; background: rgba(255, 255, 255, .9); }
.acc-ui-go { right: 5cqw; bottom: 11cqw; width: 17cqw; height: 17cqw; border-radius: 50%; display: grid; place-items: center; background: rgba(28, 24, 21, .66); color: #fff; font-size: 8cqw; }
/* téléphone (portrait) : petit smartphone au-dessus, carte en dessous */
@media (max-width: 820px) {
  #loading::before { background: linear-gradient(180deg, rgba(243, 245, 240, .2) 0%, rgba(243, 245, 240, .82) 42%, rgba(243, 245, 240, .97) 60%); }
  .acc-top { background: rgba(255, 255, 255, .92); border-radius: 18px; padding: 8px 10px 8px 8px; box-shadow: 0 4px 16px rgba(0, 0, 0, .1); }
  .acc-main { flex-direction: column-reverse; justify-content: center; gap: 16px; padding-top: 10px; }
  /* (v4.3) téléphone plus grand sur smartphone ; la carte défile dessous si besoin (toucher le téléphone fait entrer) */
  .acc-phonezone { margin: 0; flex-direction: column-reverse; }
  .acc-phone { --ph: 40vh; transform: perspective(900px) rotateY(-8deg) rotateZ(-2deg); animation: none; }
  .acc-ui-btns, .acc-ui-joy, .acc-ui-go, .acc-status, .acc-time { display: none; }
  .acc-invite { position: static; width: auto; max-width: 22em; transform: none; text-align: center; font-size: 22px; margin: 4px 0 10px; }
  .acc-invite-arrow { display: none; }
  .acc-card { padding: 16px; border-radius: 22px; }
  .acc-lead { margin-bottom: 8px; font-size: 13.5px; line-height: 1.4; }
  .acc-card h1 { font-size: 23px; margin-bottom: 8px; }
  .acc-box { padding: 12px; } #loading-text { margin-bottom: 8px; } .acc-btn { padding: 12px 16px; font-size: 16px; }
  .acc-cta { margin-bottom: 12px; font-size: 15px; }
  .acc-chips { display: none; }
  .acc-name { font-size: 21px; } .acc-logo .brand-icon { width: 38px; height: 38px; }
  .acc-pill { padding: 8px 14px; font-size: 13px; }
}
/* (v3.4) écrans d'ordinateur peu hauts : le texte d'accueil tient sans barre de défilement */
@media (min-width: 821px) and (max-height: 880px) {
  .acc-chips { display: none; }
  .acc-card { padding: 26px 30px; }
  .acc-card h1 { font-size: clamp(26px, 2.8vw, 40px); margin-bottom: 10px; }
  .acc-lead { margin-bottom: 10px; }
  .acc-box { padding: 13px; }
}
@media (max-height: 520px) { .acc-phone, .acc-phonezone { display: none; } .acc-lead, .acc-chips { display: none; } .acc-main { justify-content: center; } }

/* ---------- fenêtres */
.overlay {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 14, 10, 0.45); padding: 16px;
  animation: fade .2s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.panel {
  position: relative; background: var(--panel); color: var(--ink);
  border-radius: 18px; padding: 26px 26px 22px; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); border: 1px solid #e8dcc6;
}
.panel h2 { font-family: Cinzel, serif; margin: 0 0 12px; font-size: 22px; color: var(--ink); padding-right: 30px; }
.panel h4 { margin: 18px 0 6px; color: var(--gold-dark); }
.panel ul { padding-left: 20px; line-height: 1.6; }
.panel.wide { width: min(760px, 100%); }
.panel.side { width: min(420px, 100%); }
.close {
  position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: transparent; font-size: 28px; line-height: 1; color: var(--muted);
}
.close:hover { background: #efe5d5; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--gold-dark); margin: 0 0 6px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.note { background: #f3e9d7; border-left: 3px solid var(--gold); padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.primary {
  background: linear-gradient(180deg, #3a2a1e, #22180f); color: #f4dfae; border: 1px solid #8f6a2e;
  padding: 12px 20px; border-radius: 999px; font-weight: 700; letter-spacing: .02em;
}
.primary:hover { filter: brightness(1.15); }
/* (v2.0) vente en ligne : stock, livraison, panier par boutique */
.shop-info { display: grid; gap: 4px; margin: 4px 0 12px; font-size: 14px; }
.shop-info .in { color: #3f7a26; } .shop-info .low { color: #b06a10; } .shop-info .out { color: #b3122e; }
.shop-info a { color: var(--gold-dark); }
.cart-shop { border: 1px solid #ece1cf; border-radius: 14px; padding: 12px 14px; margin: 10px 0; background: #fffdf8; }
.cart-shop h4 { margin: 0 0 6px; font-family: Cinzel, serif; color: var(--ink); }
.cart-ship { display: flex; gap: 8px; align-items: center; margin: 8px 0 4px; font-size: 14px; flex-wrap: wrap; }
.cart-ship select { font: inherit; padding: 6px 10px; border-radius: 10px; border: 1px solid #d9c9ab; background: #fff; color: var(--ink); min-width: 0; max-width: 100%; }
.cart-est { margin: 4px 0; font-size: 14px; }
.cart-pay { width: 100%; margin-top: 6px; }
.cart-pay:disabled { opacity: .5; cursor: not-allowed; }
.cart-warn { display: block; color: #b3122e; font-size: 12px; }
/* (v1.8) pupitre de contact et messagerie instantanée */
.contact-h { margin-top: 20px; }
.coord { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 10px 12px; border: 1px solid #ece1cf; border-radius: 12px; background: #fff; }
.coord b { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; user-select: all; font-variant-numeric: tabular-nums; }
.coord span { color: var(--muted); font-size: 13px; flex-basis: 100%; }
.coord a, .coord button { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid #d9c9ab; background: #fbf6ec; color: var(--ink); text-decoration: none; cursor: pointer; }
#chat-thread { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; padding: 8px; margin-bottom: 8px; background: #faf5ec; border-radius: 12px; min-height: 60px; }
#chat-thread .msg { max-width: 85%; padding: 7px 11px; border-radius: 14px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
#chat-thread .msg.me { align-self: flex-end; background: #3a2a1e; color: #f4dfae; border-bottom-right-radius: 4px; }
#chat-thread .msg.them { align-self: flex-start; background: #fff; border: 1px solid #ece1cf; border-bottom-left-radius: 4px; }
#chat-thread .msg small { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
#chat-thread .empty { color: var(--muted); font-size: 13px; text-align: center; margin: auto; }
#chat-name, #chat-text { display: block; width: 100%; box-sizing: border-box; font: inherit; padding: 9px 12px; margin: 6px 0; border: 1px solid #d9c9ab; border-radius: 12px; background: #fff; color: var(--ink); resize: vertical; }
.primary:disabled { opacity: .45; cursor: default; }
.secondary { background: #efe5d5; color: var(--ink); border: 1px solid #d9c9ab; padding: 11px 18px; border-radius: 999px; }
.link { background: none; border: 0; color: var(--gold); text-decoration: underline; padding: 8px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

/* produit */
.panel.product { width: min(860px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 22px; }
.product-media { position: relative; }
.product-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: zoom-in; display: block; background: #efe5d5; }
.zoom-hint { position: absolute; bottom: 10px; left: 10px; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 4px 10px; font-size: 12px; pointer-events: none; }
.product-info { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.product-info h2 { margin: 0; }
.product-info p { margin: 0; line-height: 1.55; }
.price { font-size: 26px; font-weight: 700; color: var(--wine); }
.qty { display: inline-flex; align-items: center; border: 1px solid #d9c9ab; border-radius: 999px; overflow: hidden; align-self: flex-start; background: #fff; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 22px; color: var(--ink); }
.qty button:hover { background: #f3e9d7; }
.qty span { min-width: 36px; text-align: center; font-weight: 700; font-size: 17px; }
.qty.small button { width: 32px; height: 32px; font-size: 17px; }
.qty.small span { min-width: 26px; font-size: 14px; }
#lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(10, 8, 6, .9); display: grid; place-items: center; cursor: zoom-out; padding: 16px; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* panier */
.cart-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #ece1cf; }
.cart-name { font-size: 14px; }
.cart-name span { display: block; color: var(--muted); font-size: 12px; }
.cart-sub { font-weight: 700; min-width: 70px; text-align: right; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; margin: 16px 0; }
#cart-checkout { width: 100%; }

/* menu */
.menu-item { display: block; width: 100%; text-align: left; padding: 14px 14px; margin: 6px 0; border-radius: 12px; border: 1px solid #ece1cf; background: #fff; color: var(--ink); }
.menu-item:hover { background: #f3e9d7; }

/* plan */
.panel.map { width: min(420px, 100%); }
#map-canvas { width: 100%; height: min(62vh, 560px); display: block; background: #e9dfcd; border-radius: 10px; cursor: pointer; }

/* statistiques */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button { padding: 8px 14px; border-radius: 999px; border: 1px solid #d9c9ab; background: #fff; color: var(--ink); }
.tabs button.active { background: var(--ink); color: #f4dfae; border-color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.kpis div { background: #fff; border: 1px solid #ece1cf; border-radius: 12px; padding: 10px; text-align: center; }
.kpis b { display: block; font-size: 20px; }
.kpis span { font-size: 12px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 6px 8px; text-align: left; border-bottom: 1px solid #ece1cf; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

/* consentement */
#consent {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: max(20px, env(safe-area-inset-bottom)); width: min(620px, calc(100vw - 32px));
  border-radius: 16px; padding: 16px 18px; background: var(--glass-strong);
}
#consent p { margin: 0; line-height: 1.5; font-size: 14px; }
#consent .secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }

#toast {
  position: fixed; z-index: 35; left: 50%; top: max(84px, calc(env(safe-area-inset-top) + 70px)); transform: translateX(-50%);
  padding: 11px 18px; border-radius: 14px; font-size: 14px; max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { animation: fade .25s ease-out; }

/* ---------- entrée, son, bancs, qualité (v0.2) */
#enter { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 8px; }
.primary.big { font-size: 17px; padding: 15px 30px; }
.link.light { color: #d8c7a8; }
#btn-sound .cross { display: none; }
#btn-sound.muted .cross { display: inline; }
#btn-sound.muted .wave { display: none; }
#btn-standup, #btn-lift {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(34px, env(safe-area-inset-bottom));
  z-index: 15; font-size: 16px; padding: 14px 26px; box-shadow: 0 8px 26px rgba(0, 0, 0, .35);
}
/* ascenseur à 3 niveaux (v0.6) */
#lift-panel {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 15; display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 12px 14px; border-radius: 16px; background: rgba(28, 21, 15, .82); box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
  min-width: 210px;
}
#lift-panel[hidden] { display: none; }
#lift-status { color: #e9c987; font-size: 13px; text-align: center; letter-spacing: .06em; text-transform: uppercase; }
#lift-panel button { font-size: 15px; padding: 11px 18px; }
#lift-panel button.current { opacity: .45; }
#lift-panel button:disabled { cursor: default; }
.slider { display: block; margin: 14px 0 18px; font-weight: 700; }
.slider input { display: block; width: 100%; margin-top: 8px; accent-color: var(--gold-dark); }
#sound-toggle { width: 100%; }
.menu-item.quality b { display: block; font-size: 16px; }
.menu-item.quality span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.menu-item.quality.active { border-color: var(--gold-dark); background: #f6eddc; box-shadow: inset 0 0 0 1px var(--gold-dark); }

/* ---------- étage : praticiens, dégustation, rencontres (v0.3) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 10px; }
.card { background: #fff; border: 1px solid #ece1cf; border-radius: 14px; padding: 14px; }
.card h4 { margin: 0 0 6px; color: var(--ink); font-family: Cinzel, serif; }
.card p { margin: 4px 0; font-size: 14px; line-height: 1.45; }
.card .tag { display: inline-block; font-size: 12px; background: #f3e9d7; color: var(--gold-dark); border-radius: 999px; padding: 2px 9px; margin-bottom: 6px; }
.card button { margin-top: 8px; }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.cat-list button { border: 1px solid #d9c9ab; background: #fff; border-radius: 999px; padding: 7px 13px; color: var(--ink); }
.cat-list button.active { background: var(--ink); color: #f4dfae; border-color: var(--ink); }
.steam { font-size: 26px; }

/* ---------- smartphone */
@media (max-width: 720px) {
  #brand { padding: 7px 14px 7px 9px; font-size: 13px; gap: 8px; left: 12px; }
  .lotus { width: 26px; height: 26px; }
  #actions { right: 12px; gap: 8px; }
  .round { width: 44px; height: 44px; }
  .round svg { width: 22px; height: 22px; }
  #joystick { width: 132px; height: 132px; left: 16px; }
  #joy-knob { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
  .big-round { width: 76px; height: 76px; right: 16px; }
  .big-round svg { width: 36px; height: 36px; }
  #hint { bottom: auto; top: 128px; max-width: calc(100vw - 32px); font-size: 13px; }
  .panel { padding: 22px 18px 18px; }
  .panel.product { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .product-media img { aspect-ratio: 4 / 3; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  #stand-label { top: max(68px, calc(env(safe-area-inset-top) + 58px)); font-size: 13px; }
}
@media (max-width: 420px) {
  #brand { font-size: 11px; letter-spacing: 0.01em; padding-right: 12px; max-width: calc(100vw - 238px); }
  #actions { gap: 6px; }
  #actions .round { width: 42px; height: 42px; }
  #brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lotus { width: 22px; height: 22px; }
}
