/* Concierge 2.0 : une scène de 1080 × 1920 mise à l'échelle (--s), reprise des maquettes SAX 1, 4, 5, 5d, 7b, 8.
   Le thème (--bg, --fg, --accent, police de titre) vient du fichier du lieu, sites/<lieu>.json. */
:root { --s: 0.4; --bg: #0C0C0C; --fg: #F8F5F1; --accent: #FF614B; --fg-rgb: 248,245,241; --bg-rgb: 12,12,12;
  --display: 'Cormorant Garamond', Georgia, serif; --display-w: 400; --display-ls: -0.01em; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; }
body { font-family: Montserrat, 'Helvetica Neue', Arial, sans-serif; color: var(--fg); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 4px solid var(--accent); outline-offset: 6px; }

#stage { position: absolute; left: 50%; top: 50%; width: 1080px; height: 1920px; overflow: hidden; background: var(--bg);
  transform: translate(-50%, -50%) scale(var(--s)); transform-origin: center; }
#load { position: fixed; inset: 0; display: grid; place-items: center; background: #0C0C0C; color: rgba(248,245,241,.6); font-size: 18px; letter-spacing: .04em; transition: opacity .5s; }
body:not([data-screen="load"]) #load { opacity: 0; pointer-events: none; }

/* ---- Fonds ---- */
#bgs, .bg, #shade { position: absolute; inset: 0; }
.bg { background-size: cover; background-position: 55% 40%; opacity: 0; transition: opacity 1.1s ease; }
.bg.on { opacity: 1; }
#shade { background: linear-gradient(180deg, rgba(var(--bg-rgb),.35) 0%, rgba(var(--bg-rgb),0) 30%, rgba(var(--bg-rgb),0) 50%, rgba(var(--bg-rgb),.9) 100%); transition: background .6s; }
body[data-screen="accueil"] .bg.on, body[data-screen="mots"] .bg.on { opacity: .12; }
body[data-screen="conv"] .bg.on { opacity: .42; filter: saturate(.8); }
body[data-screen="fiche"] .bg.on { opacity: .5; filter: saturate(.85); }
body[data-screen="conv"] #shade, body[data-screen="fiche"] #shade { background: linear-gradient(180deg, rgba(var(--bg-rgb),.3) 0%, rgba(var(--bg-rgb),.6) 40%, rgba(var(--bg-rgb),.96) 100%); }

/* ---- En-tête ---- */
header { position: absolute; left: 56px; right: 56px; top: 64px; height: 104px; display: flex; align-items: flex-start; justify-content: space-between; z-index: 5; }
#brand { display: flex; align-items: center; height: 104px; }
#logo { height: 96px; width: auto; opacity: .9; }
#logo[hidden] { display: none; }
#wordmark { font-size: 44px; font-weight: 600; letter-spacing: .22em; }
#clock { margin-left: auto; }
#clock, #homeBtn { font-size: 34px; letter-spacing: .04em; color: rgba(var(--fg-rgb),.75); margin-top: 14px; }
#homeBtn { display: none; padding: 14px 30px; margin-top: 2px; border-radius: 999px; border: 1px solid rgba(var(--fg-rgb),.35); font-size: 30px; }
body[data-screen="conv"] #homeBtn, body[data-screen="fiche"] #homeBtn, body[data-screen="mots"] #homeBtn { display: block; }
body[data-screen="conv"] #clock, body[data-screen="fiche"] #clock, body[data-screen="mots"] #clock { display: none; }
body[data-screen="veille"] #brand { position: absolute; left: 50%; transform: translateX(-50%) scale(1.45); transform-origin: top center; }

section { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
body[data-screen="veille"] #veille, body[data-screen="accueil"] #accueil, body[data-screen="conv"] #conv,
body[data-screen="fiche"] #fiche, body[data-screen="mots"] #mots { opacity: 1; pointer-events: auto; transition-delay: .12s; }

.kicker { display: block; font-size: 30px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
h1, h2, p { margin: 0; }
.bell { width: 96px; height: 96px; flex: none; }

/* ---- Veille ---- */
#bars { position: absolute; left: 56px; right: 56px; top: 28px; display: flex; gap: 10px; }
#bars i { flex: 1; height: 5px; border-radius: 3px; background: rgba(var(--fg-rgb),.28); overflow: hidden; }
#bars i::after { content: ''; display: block; height: 100%; width: 0; background: var(--fg); }
#bars i.done::after { width: 100%; }
#bars i.now::after { animation: bar var(--story, 7s) linear forwards; }
@keyframes bar { to { width: 100%; } }
.story { position: absolute; left: 64px; right: 64px; bottom: 300px; display: flex; flex-direction: column; gap: 28px; transition: opacity .45s, transform .45s; }
.story.out { opacity: 0; transform: translateY(18px); }
#stTitle { font-size: 108px; font-weight: 300; line-height: 1.02; letter-spacing: -.02em; white-space: pre-line; }
#stSub { font-size: 40px; line-height: 1.3; color: rgba(var(--fg-rgb),.85); }
.hint { position: absolute; left: 64px; right: 64px; bottom: 96px; display: flex; align-items: center; gap: 28px; padding-top: 36px; border-top: 1px solid rgba(var(--fg-rgb),.22); font-size: 36px; font-weight: 300; color: rgba(var(--fg-rgb),.85); }
.hint .bell { width: 84px; height: 84px; animation: ring 3.2s ease-in-out infinite; }
@keyframes ring { 0%, 78%, 100% { transform: rotate(0); } 82% { transform: rotate(-9deg); } 88% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }

/* ---- Accueil (SAX 8) ---- */
#accueil .bell { position: absolute; left: 96px; top: 560px; }
#hi { position: absolute; left: 96px; top: 692px; font-family: var(--display); font-weight: var(--display-w); font-size: 140px; line-height: 1; letter-spacing: var(--display-ls); }
#hello { position: absolute; left: 96px; top: 868px; font-size: 54px; font-weight: 300; line-height: 1.25; color: rgba(var(--fg-rgb),.75); white-space: pre-line; }
#homeNav { position: absolute; left: 96px; right: 96px; top: 1100px; display: flex; flex-direction: column; }
#homeNav button { display: flex; align-items: center; justify-content: space-between; text-align: left; font-size: 40px; font-weight: 300; padding: 26px 0; border-bottom: 1px solid rgba(var(--fg-rgb),.14); transition: padding .2s, color .2s; }
#homeNav button:active { padding-left: 14px; }
#homeNav button.inspire { border-bottom: 0; font-weight: 400; color: var(--accent); }
#askBar { position: absolute; left: 96px; right: 96px; bottom: 96px; display: flex; align-items: center; gap: 24px; padding: 26px 36px; border-radius: 999px; background: rgba(var(--fg-rgb),.08); border: 1px solid rgba(var(--fg-rgb),.16); font-size: 36px; font-weight: 300; color: rgba(var(--fg-rgb),.6); transition: background .2s; }
#askBar:active { background: rgba(var(--fg-rgb),.16); }
#askBar svg { fill: none; }

/* ---- Orbe ---- */
#orbBox { position: absolute; left: 20px; top: 190px; width: 380px; height: 380px; opacity: 0; pointer-events: none; z-index: 4;
  transition: left .5s cubic-bezier(.3,.8,.3,1), top .5s cubic-bezier(.3,.8,.3,1), width .5s cubic-bezier(.3,.8,.3,1), height .5s cubic-bezier(.3,.8,.3,1), opacity .35s; }
#orb { width: 100%; height: 100%; display: block; }
body[data-screen="conv"] #orbBox { opacity: 1; }
body[data-voice]:not([data-voice=""])[data-screen="fiche"] #orbBox,
body[data-voice]:not([data-voice=""])[data-screen="mots"] #orbBox { opacity: 1; left: 50px; top: 1696px; width: 180px; height: 180px; }

/* ---- Conversation (SAX 4) ---- */
#who { position: absolute; left: 390px; right: 64px; top: 300px; display: flex; flex-direction: column; gap: 18px; }
#whoState { font-family: var(--display); font-weight: var(--display-w); font-size: 84px; line-height: 1; letter-spacing: var(--display-ls); }
#thread { position: absolute; left: 64px; right: 64px; top: 610px; bottom: 470px; display: flex; flex-direction: column; gap: 20px; overflow: hidden; }
#said { align-self: flex-end; max-width: 820px; padding: 28px 36px; border-radius: 36px 36px 8px 36px; background: var(--fg); color: var(--bg); font-size: 38px; line-height: 1.3; }
#reply { align-self: flex-start; max-width: 900px; padding: 32px 36px; border-radius: 36px 36px 36px 8px; background: rgba(var(--fg-rgb),.1); border: 1px solid rgba(var(--fg-rgb),.18); font-size: 38px; font-weight: 300; line-height: 1.35; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#said:empty, #reply:empty, #actions:empty, #list:empty, #chips:empty { display: none; }
#actions { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 18px; font-size: 32px; font-weight: 400; padding: 18px 30px; border-radius: 999px; border: 1px solid rgba(var(--fg-rgb),.5); white-space: nowrap; transition: transform .12s, opacity .2s; }
.pill:active { transform: scale(.97); }
.pill.main { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 500; }
.pill.light { background: var(--fg); border-color: var(--fg); color: var(--bg); font-weight: 500; }
.pill[disabled] { opacity: .35; pointer-events: none; }
.link { font-size: 32px; font-weight: 300; color: rgba(var(--fg-rgb),.65); padding: 18px 6px; white-space: nowrap; }
#list { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: none; -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent); mask-image: linear-gradient(180deg, #000 86%, transparent); padding-bottom: 60px; }
#list::-webkit-scrollbar { display: none; }
#list button { display: flex; align-items: baseline; gap: 20px; text-align: left; padding: 24px 0; border-bottom: 1px solid rgba(var(--fg-rgb),.14); font-size: 40px; font-weight: 300; flex: none; }
#list button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list button small { font-size: 28px; color: rgba(var(--fg-rgb),.55); white-space: nowrap; }
#list button small.open { color: var(--accent); }
#chips { position: absolute; left: 64px; right: 64px; bottom: 220px; display: flex; gap: 14px; flex-wrap: wrap; max-height: 230px; overflow: hidden; }
#chips button { font-size: 32px; padding: 16px 26px; border-radius: 999px; border: 1px solid rgba(var(--fg-rgb),.3); color: rgba(var(--fg-rgb),.85); }
#chips small { width: 100%; font-size: 26px; letter-spacing: .2em; text-transform: uppercase; color: rgba(var(--fg-rgb),.5); }

/* ---- Barre du bas ---- */
#bar, #voice { position: absolute; left: 64px; right: 64px; bottom: 80px; height: 104px; border-radius: 999px; display: none; align-items: center; z-index: 6; }
#bar { gap: 20px; padding: 0 28px; background: var(--fg); color: var(--bg); }
body[data-screen="conv"][data-voice=""] #bar { display: flex; }
#bar svg { fill: none; display: block; }
#q { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 36px; color: var(--bg); user-select: text; -webkit-user-select: text; }
#q::placeholder { color: rgba(var(--bg-rgb),.55); }
#q:focus { outline: none; }
body:not(.voice) #mic { display: none; }
#voice { gap: 26px; padding: 0 26px 0 190px; background: rgba(var(--fg-rgb),.1); border: 1px solid rgba(var(--fg-rgb),.2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body[data-voice]:not([data-voice=""]) #voice { display: flex; }
body[data-screen="conv"] #voice { padding-left: 44px; }
#voiceWord { font-size: 36px; font-weight: 400; white-space: nowrap; }
.wave { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 9px; height: 80px; }
.wave i { width: 7px; height: 12px; border-radius: 4px; background: var(--accent); transition: height .08s; }
#voiceStop { width: 76px; height: 76px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--fg-rgb),.14); }

/* ---- Fiche (SAX 5d) ---- */
#ficheBody { position: absolute; left: 96px; right: 96px; top: 250px; bottom: 250px; display: flex; flex-direction: column; justify-content: flex-end; gap: 30px; overflow: hidden; }
body[data-voice]:not([data-voice=""]) #ficheBody { bottom: 520px; }
#fLead { font-family: var(--display); font-style: italic; font-size: 50px; line-height: 1.12; color: rgba(var(--fg-rgb),.85); }
:root[data-display="sans"] #fLead { font-style: normal; font-weight: 300; font-size: 40px; }
#fName { font-family: var(--display); font-weight: var(--display-w); font-size: 124px; line-height: .98; letter-spacing: var(--display-ls); }
#fName.long { font-size: 96px; }
#fiche.booking #fName { font-size: 92px; }
#fText { font-size: 42px; font-weight: 300; line-height: 1.35; color: rgba(var(--fg-rgb),.88); }
#fiche.booking #fText { font-size: 36px; }
#fText:empty, #fLead:empty, #fNote:empty, #fMeta:empty, #caption:empty { display: none; }
#fMeta { display: flex; gap: 44px; flex-wrap: wrap; padding-top: 6px; }
#fMeta div { display: flex; flex-direction: column; gap: 6px; max-width: 440px; }
#fMeta small { font-size: 26px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
#fMeta span { font-size: 36px; font-weight: 300; line-height: 1.2; }
#fMeta .open { color: var(--accent); }
#fBook { display: none; flex-direction: column; gap: 24px; padding-top: 30px; border-top: 1px solid rgba(var(--fg-rgb),.2); }
#fiche.booking #fBook { display: flex; }
#fiche.done #fBook { display: none; }
#fParty { display: flex; align-items: center; gap: 26px; font-size: 36px; font-weight: 300; }
#fParty[hidden] { display: none; }
#fParty button { width: 72px; height: 72px; border-radius: 50%; border: 1px solid rgba(var(--fg-rgb),.4); font-size: 40px; line-height: 1; }
#fParty b { min-width: 44px; text-align: center; font-size: 46px; font-weight: 400; }
#fSlots { display: flex; gap: 14px; flex-wrap: wrap; }
#fSlots button { font-size: 34px; padding: 18px 28px; border-radius: 999px; border: 1px solid rgba(var(--fg-rgb),.4); }
#fSlots button.on { background: var(--fg); border-color: var(--fg); color: var(--bg); font-weight: 500; }
#fNote { font-size: 28px; color: rgba(var(--fg-rgb),.55); }
#caption { position: absolute; left: 96px; right: 96px; bottom: 356px; max-height: 140px; overflow: hidden; display: none; font-family: var(--display); font-style: italic; font-size: 40px; line-height: 1.15; color: rgba(var(--fg-rgb),.9); }
body[data-voice]:not([data-voice=""]) #caption { display: block; }
#fFoot { position: absolute; left: 96px; right: 96px; bottom: 96px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
body[data-voice]:not([data-voice=""]) #fFoot { bottom: 226px; }
#fFoot .pill { font-size: 34px; padding: 22px 34px; }
#fFoot [hidden] { display: none; }
#fBack { margin-left: auto; }

/* ---- Inspirez-moi : trois mots (SAX 5) ---- */
#mKicker { position: absolute; left: 64px; top: 320px; }
#mTitle { position: absolute; left: 64px; right: 64px; top: 380px; font-family: var(--display); font-weight: var(--display-w); font-size: 120px; line-height: 1; letter-spacing: var(--display-ls); white-space: pre-line; }
#words { position: absolute; left: 64px; right: 64px; top: 720px; display: flex; gap: 18px; flex-wrap: wrap; }
#words button { font-size: 44px; padding: 24px 40px; border-radius: 999px; border: 2px solid rgba(var(--fg-rgb),.75); transition: background .18s, color .18s, transform .12s; }
#words button:active { transform: scale(.96); }
#words button.on { background: var(--fg); color: var(--bg); font-weight: 500; }
#words button.on.third { background: var(--accent); border-color: var(--accent); }
#mFoot { position: absolute; left: 64px; right: 64px; bottom: 96px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
body[data-voice]:not([data-voice=""]) #mFoot { bottom: 226px; }
#mHint { font-size: 32px; color: rgba(var(--fg-rgb),.6); }
#mGo { font-size: 36px; padding: 22px 40px; }

/* ---- Sur mon téléphone ---- */
#phone { position: absolute; inset: 0; z-index: 10; display: grid; place-items: end center; background: rgba(var(--bg-rgb),.78); opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body[data-phone="1"] #phone { opacity: 1; pointer-events: auto; }
.sheet { width: 100%; padding: 80px 96px 96px; border-radius: 64px 64px 0 0; background: var(--fg); color: var(--bg); display: flex; flex-direction: column; align-items: center; gap: 34px; text-align: center; transform: translateY(60px); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
body[data-phone="1"] .sheet { transform: none; }
#phTitle { font-family: var(--display); font-weight: var(--display-w); font-size: 84px; line-height: 1; letter-spacing: var(--display-ls); }
#phQr { display: block; width: 520px; height: 520px; }
#phQr svg { width: 100%; height: 100%; display: block; }
#phText { font-size: 36px; font-weight: 300; line-height: 1.3; }
#phNote { font-size: 26px; color: rgba(var(--bg-rgb),.55); }
#phNote:empty { display: none; }
.sheet .pill.main { font-size: 36px; padding: 24px 56px; color: var(--bg); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } #bars i.now::after { animation-duration: var(--story, 7s) !important; } }
