/* Momento — le mur vivant */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* l'attribut hidden gagne TOUJOURS, même contre display:flex/grid */
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #17130F;
  color: #FAF7F1;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ---------- page carte ---------- */
#stage { position: fixed; inset: 0; overflow: hidden; }
#stage canvas { display: block; touch-action: none; }

.hud {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 12px;
  background: linear-gradient(180deg, rgba(23,19,15,.94) 55%, rgba(23,19,15,0));
  z-index: 10; pointer-events: none;
}
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.hud-row > *, .hud .chips { pointer-events: auto; }
.brand { font-weight: 700; font-size: 15px; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: #64748b; display: inline-block; }
.live.on { background: #22c55e; box-shadow: 0 0 8px #22c55e88; }
.hud-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.count { color: rgba(250,247,241,.62); font-size: 13px; white-space: nowrap; }
.icon-btn {
  font: inherit; font-size: 16px; color: rgba(250,247,241,.82); cursor: pointer; line-height: 1;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  display: grid; place-items: center;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.on { background: #B0503F; border-color: #B0503F; color: #fff; }

/* ---------- sélecteur de style (disposition + cadre) ---------- */
#style-bar {
  position: fixed; z-index: 25;
  right: calc(14px + env(safe-area-inset-right));
  top: calc(64px + env(safe-area-inset-top));
  width: min(300px, calc(100vw - 28px));
  background: rgba(30, 25, 20, .90);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  padding: 14px;
  display: flex; flex-direction: column; gap: 14px;
  animation: panelIn .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
.style-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: rgba(250,247,241,.82); }
.style-head button {
  font: inherit; font-size: 14px; color: rgba(250,247,241,.62); cursor: pointer;
  background: transparent; border: 0; padding: 2px 4px;
}
.style-head button:hover { color: #fff; }
.style-row { display: flex; flex-direction: column; gap: 8px; }
.style-row.muted { opacity: .5; }
.style-label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: rgba(250,247,241,.55); font-weight: 700; }
.picker { display: flex; align-items: center; gap: 6px; }
.picker-mid { flex: 1; min-width: 0; text-align: center; }
.picker-name { font-size: 15px; font-weight: 700; color: #FAF7F1; margin-top: 6px; }
.picker-hint { font-size: 11.5px; color: rgba(250,247,241,.62); margin-top: 2px; line-height: 1.35; }
.arrow {
  flex: 0 0 auto; width: 34px; height: 44px;
  font: inherit; font-size: 22px; line-height: 1; color: rgba(250,247,241,.82); cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px; transition: background .15s, transform .1s;
}
.arrow:hover { background: rgba(176,80,63,.28); border-color: #B0503F; }
.arrow:active { transform: scale(.92); }

/* aperçus miniatures */
.lay-preview { position: relative; height: 52px; }
.lay-preview .lp {
  position: absolute; inset: 0; display: block;
  opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s;
}
.lay-preview .lp.on { opacity: 1; transform: none; }
.lay-preview i {
  position: absolute; display: block; background: #B0503F; border-radius: 2px;
}
/* éparpillé : petits carrés désordonnés */
.lp[data-mode="eparpille"] i:nth-child(1) { width: 13px; height: 13px; left: 26%; top: 10%; transform: rotate(-8deg); }
.lp[data-mode="eparpille"] i:nth-child(2) { width: 12px; height: 15px; left: 46%; top: 34%; transform: rotate(6deg); background: #C4715F; }
.lp[data-mode="eparpille"] i:nth-child(3) { width: 14px; height: 11px; left: 66%; top: 12%; transform: rotate(11deg); background: #D8988A; }
.lp[data-mode="eparpille"] i:nth-child(4) { width: 11px; height: 13px; left: 30%; top: 58%; transform: rotate(4deg); background: #C4715F; }
.lp[data-mode="eparpille"] i:nth-child(5) { width: 13px; height: 12px; left: 62%; top: 62%; transform: rotate(-6deg); }
/* ruche : amas serré autour du centre */
.lp[data-mode="ruche"] i { width: 13px; height: 13px; border-radius: 3px; }
.lp[data-mode="ruche"] i:nth-child(1) { left: calc(50% - 6px); top: 20px; background: #D8988A; }
.lp[data-mode="ruche"] i:nth-child(2) { left: calc(50% - 20px); top: 20px; }
.lp[data-mode="ruche"] i:nth-child(3) { left: calc(50% + 8px); top: 20px; }
.lp[data-mode="ruche"] i:nth-child(4) { left: calc(50% - 13px); top: 6px; background: #C4715F; }
.lp[data-mode="ruche"] i:nth-child(5) { left: calc(50% + 1px); top: 6px; }
.lp[data-mode="ruche"] i:nth-child(6) { left: calc(50% - 13px); top: 34px; }
.lp[data-mode="ruche"] i:nth-child(7) { left: calc(50% + 1px); top: 34px; background: #C4715F; }
/* collé : grille parfaite */
.lp[data-mode="colle"] i { width: 15px; height: 15px; border-radius: 1px; }
.lp[data-mode="colle"] i:nth-child(1) { left: calc(50% - 24px); top: 3px; }
.lp[data-mode="colle"] i:nth-child(2) { left: calc(50% - 8px); top: 3px; background: #C4715F; }
.lp[data-mode="colle"] i:nth-child(3) { left: calc(50% + 8px); top: 3px; }
.lp[data-mode="colle"] i:nth-child(4) { left: calc(50% - 24px); top: 19px; background: #D8988A; }
.lp[data-mode="colle"] i:nth-child(5) { left: calc(50% - 8px); top: 19px; }
.lp[data-mode="colle"] i:nth-child(6) { left: calc(50% + 8px); top: 19px; background: #C4715F; }
.lp[data-mode="colle"] i:nth-child(7) { left: calc(50% - 24px); top: 35px; }
.lp[data-mode="colle"] i:nth-child(8) { left: calc(50% - 8px); top: 35px; background: #D8988A; }
.lp[data-mode="colle"] i:nth-child(9) { left: calc(50% + 8px); top: 35px; }

.frm-preview {
  width: 46px; height: 52px; margin: 0 auto;
  display: grid; place-items: center;
  transition: all .2s;
}
.frm-preview span {
  display: block; width: 34px; height: 30px;
  background: linear-gradient(135deg, #B0503F, #C97B3F);
}
.frm-preview.f-polaroid { background: #f7f5f0; border-radius: 3px; padding: 4px 4px 12px; box-shadow: 0 3px 10px rgba(0,0,0,.4); align-items: start; }
.frm-preview.f-liosere { background: #fff; border-radius: 2px; padding: 4px; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.frm-preview.f-arrondi span { border-radius: 9px; }
.frm-preview.f-aucun span { border-radius: 0; }
.style-note { font-size: 11px; color: #6f7789; line-height: 1.4; }
#style-bar[hidden] { display: none; }
@media (max-width: 560px) {
  #style-bar {
    right: 10px; left: 10px; width: auto;
    top: auto; bottom: calc(16px + env(safe-area-inset-bottom));
  }
  body.styling .fab, body.styling .hint { opacity: 0; pointer-events: none; }
}
.fab, .hint { transition: opacity .25s ease; }

.chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chips[hidden] { display: none; }
.chips .chip { flex: 0 0 auto; }
.chip {
  --chip: #B0503F;
  font: inherit; font-size: 12.5px; color: rgba(250,247,241,.82);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; padding: 5px 11px; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--chip); }
.chip.on { background: var(--chip); border-color: var(--chip); color: #0b0d12; font-weight: 700; }

.btn {
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 13px;
  border-radius: 999px; padding: 7px 14px; white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.fab {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(54px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #B0503F, #C97B3F);
  color: #fff; display: grid; place-items: center;
  font-size: 24px; text-decoration: none;
  box-shadow: 0 10px 26px rgba(176, 80, 63, .5);
  z-index: 15;
}
.fab:active { transform: scale(.94); }
@media (min-width: 700px) { .fab { display: none; } }
@media (max-width: 699px) { .hud .btn { display: none; } }

.hint {
  position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  font-size: 12px; color: #7d8598; background: rgba(23,19,15,.66);
  padding: 6px 12px; border-radius: 999px; z-index: 10; pointer-events: none;
  white-space: nowrap; max-width: calc(100vw - 120px); overflow: hidden; text-overflow: ellipsis;
  text-align: center; transition: opacity .6s ease;
}
.hint.gone { opacity: 0; }
@media (max-width: 430px) {
  .count { display: none; } /* la place manque : le nombre vit dans l'écran géant */
  .hint { font-size: 11.5px; max-width: calc(100vw - 110px); }
}
.empty {
  position: fixed; inset: 0; display: grid; place-items: center; align-content: center;
  text-align: center; z-index: 5; pointer-events: none; gap: 6px;
}
.empty[hidden] { display: none; }
.empty-art { font-size: 54px; animation: floaty 3.4s ease-in-out infinite; }
.empty-title { font-size: 21px; font-weight: 700; color: #FAF7F1; }
.empty-sub { font-size: 14.5px; color: rgba(250,247,241,.62); line-height: 1.7; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }

/* ---------- écran de démarrage ---------- */
#boot {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #231B13, #17130F 70%);
  transition: opacity .5s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.boot-ring {
  width: 54px; height: 54px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.10); border-top-color: #B0503F; border-right-color: #C97B3F;
  animation: spin 1s cubic-bezier(.5,.15,.5,.85) infinite;
}
.boot-name {
  font-size: 19px; font-weight: 700; letter-spacing: .01em;
  background: linear-gradient(100deg, #fff, #D8988A 55%, #E8C9A8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .65 } 50% { opacity: 1 } }

/* ---------- onboarding première visite ---------- */
#onboard {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center;
  background: rgba(10,8,6,.72); backdrop-filter: blur(6px); padding: 20px;
  animation: fadeIn .3s ease;
}
#onboard[hidden] { display: none; }
#onboard.out { animation: fadeOut .3s ease forwards; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut { to { opacity: 0 } }
.ob-card {
  width: 100%; max-width: 380px;
  background: linear-gradient(160deg, #241E19, #1B1611);
  border: 1px solid rgba(255,255,255,.14); border-radius: 22px;
  padding: 26px 22px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: panelIn .35s cubic-bezier(.2,.9,.3,1.2);
}
.ob-title { font-size: 21px; font-weight: 800; text-align: center; }
.ob-row { display: flex; align-items: center; gap: 14px; font-size: 14.5px; color: rgba(250,247,241,.82); line-height: 1.45; }
.ob-row b { color: #fff; }
.ob-ico {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 21px;
  background: rgba(176,80,63,.16); border: 1px solid rgba(176,80,63,.4);
}
#ob-ok {
  font: inherit; font-size: 16px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #B0503F, #C97B3F);
  border: 0; border-radius: 14px; padding: 14px; margin-top: 4px;
}
#ob-ok:active { transform: scale(.97); }

/* ---------- écran géant de la salle ---------- */
body.wall .hud, body.wall .hint, body.wall .fab { display: none !important; }
#wall-badge {
  position: fixed; right: 26px; bottom: 26px; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  background: rgba(23,19,15,.85); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 16px 22px 16px 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: badgeIn .6s ease .4s both;
}
#wall-badge[hidden] { display: none; }
@keyframes badgeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
#wall-qr { width: 108px; height: 108px; border-radius: 12px; background: #fff; padding: 6px; }
#wall-top {
  position: fixed; top: 26px; left: 0; right: 0; z-index: 20;
  text-align: center; pointer-events: none;
  animation: badgeIn .6s ease .2s both;
}
#wall-top[hidden] { display: none; }
#wall-title {
  font-family: var(--serif);
  font-size: 40px; font-weight: 400; letter-spacing: -.01em;
  color: var(--night-text);
  text-shadow: 0 4px 34px rgba(0,0,0,.55);
}
#wall-count { font-size: 15px; color: rgba(250,247,241,.62); margin-top: 4px; letter-spacing: .04em; }
#wall-flash {
  position: fixed; left: 50%; top: 13%; transform: translateX(-50%);
  z-index: 22; text-align: center; pointer-events: none;
}
#wall-flash[hidden] { display: none; }
#wall-flash.out { animation: fadeOut .45s ease forwards; }
.wf-stamp {
  display: flex; align-items: center; justify-content: center; gap: .25em;
  font-size: min(6.5vw, 76px); white-space: nowrap;
  filter: drop-shadow(0 8px 34px rgba(176, 80, 63, .55));
}
.wf-kind {
  font-weight: 900; letter-spacing: .05em; text-transform: uppercase;
  background: linear-gradient(100deg, #fff, #D8988A 55%, #E8C9A8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#wall-flash.pop .wf-stamp { animation: stampIn .6s cubic-bezier(.2, 1.5, .35, 1) both; }
@keyframes stampIn {
  0% { transform: scale(2.6) rotate(-5deg); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: scale(1) rotate(-1.5deg); opacity: 1; }
}
.wf-name {
  margin-top: 8px; font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: min(3.2vw, 38px); color: #FAF7F1; text-shadow: 0 3px 20px rgba(0, 0, 0, .65);
}
.wf-name[hidden] { display: none; }
#wall-flash.pop .wf-name { animation: nameUp .5s ease .26s both; }
@keyframes nameUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.wb-title { font-size: 21px; font-weight: 800; }
.wb-sub { font-size: 14px; color: rgba(250,247,241,.62); margin-top: 4px; }

/* cœur néon : pop, montée flottante avec dérive, extinction — un par like, même ceux des autres */
.nheart {
  position: fixed; z-index: 30; pointer-events: none;
  width: 34px; height: 34px;
  animation: nheartRise 1.6s cubic-bezier(.2, .7, .4, 1) forwards;
}
.nheart svg {
  width: 100%; height: 100%; fill: #FF2E7E; overflow: visible;
  filter: drop-shadow(0 0 5px #FF2E7E) drop-shadow(0 0 14px #FF2E7E) drop-shadow(0 0 30px rgba(255, 46, 126, .65));
}
body.wall .nheart { width: 54px; height: 54px; }
@keyframes nheartRise {
  0% { transform: translate(-50%, -50%) scale(0) rotate(var(--rot, 0deg)); opacity: 0; }
  12% { transform: translate(-50%, -58%) scale(var(--s, 1)) rotate(var(--rot, 0deg)); opacity: 1; }
  70% { opacity: .95; }
  100% { transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% - var(--rise, 180px))) scale(calc(var(--s, 1) * .7)) rotate(var(--rot2, 0deg)); opacity: 0; }
}

#lightbox { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; }
#lightbox[hidden] { display: none; }
.lb-back { position: absolute; inset: 0; background: rgba(10,8,6,.82); backdrop-filter: blur(4px); }
#lightbox figure {
  position: relative; z-index: 1; max-width: min(92vw, 900px); max-height: 92vh;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
#lb-img {
  max-width: 100%; max-height: 74vh; border-radius: 10px;
  background: #fff; padding: 8px; box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
.lb-note {
  max-width: min(86vw, 620px);
  background: #fff3a3; color: #2b2b33;
  border-radius: 6px; padding: 28px 26px;
  font-family: "Marker Felt", "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: 22px; line-height: 1.5; text-align: center;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
.lb-note[hidden], #lb-img[hidden] { display: none; }
#lightbox figcaption { color: rgba(250,247,241,.82); font-size: 14px; }
.lb-actions { display: flex; gap: 10px; }
.lb-actions button {
  font: inherit; font-size: 13px; color: #FAF7F1; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px; padding: 7px 13px;
}
.lb-actions button.danger { background: #b91c1c; border-color: #b91c1c; }
.lb-actions a {
  font: inherit; font-size: 13px; color: #FAF7F1; text-decoration: none; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px; padding: 7px 13px;
}
.lb-actions a[hidden] { display: none; }
#lb-like.on { background: rgba(176,80,63,.22); border-color: #C97B3F; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 76px; font-size: 32px; line-height: 1; color: #FAF7F1; cursor: pointer;
  background: rgba(30,25,20,.6); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; backdrop-filter: blur(8px);
  transition: background .15s;
}
.lb-nav:hover { background: rgba(176,80,63,.4); }
#lb-prev { left: 14px; }
#lb-next { right: 14px; }
@media (max-width: 620px) { .lb-nav { display: none; } }

/* ---------- page post (mobile) — identité Momento, papier crème ---------- */
body.post {
  overflow: auto; display: grid; place-items: center; min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
}
body.post .card {
  width: 100%; max-width: 440px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 24px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-card);
}
.post-head { display: flex; flex-direction: column; gap: 8px; }
.post-head h1 { font-size: clamp(26px, 7vw, 34px); margin: 2px 0 0; line-height: 1.05; }
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.head-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.head-titles .mo-kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* la puce identité : petite, en haut à droite, un tap = changer photo / prénom */
.me-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; max-width: 46%;
  background: var(--paper-tint); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px 4px 4px; cursor: pointer; font-family: var(--sans); color: var(--ink);
}
.me-chip .avatar-bubble { width: 32px; height: 32px; flex: 0 0 32px; font-size: 16px; }
.me-chip .avatar-bubble.is-empty { border-width: 1.5px; font-size: 14px; }
.me-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip.is-anon .me-name { color: var(--accent); }
.me-chip:hover { border-color: var(--accent); }

/* ---------- la grille : des carrés de même taille, un tap = l'action ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tiles.two { grid-template-columns: repeat(2, 1fr); }
.tile {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--sans); color: var(--ink); cursor: pointer; padding: 8px 6px;
  background: var(--paper-tint); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: transform .12s ease, border-color .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.tile[hidden] { display: none; }
.tile:hover { border-color: var(--accent); }
.tile:active { transform: scale(.95); background: var(--accent-soft); }
.tile .t-ico { font-size: clamp(28px, 8vw, 36px); line-height: 1; }
.tile .t-lab { font-size: 15px; font-weight: 700; line-height: 1.1; }
.tile .t-sub { font-size: 11px; color: var(--ink-mute); font-weight: 600; line-height: 1.1; text-align: center; }
/* les deux premières (Photo, Vidéo) sont les stars : accent plein */
.tiles #photo-btn, .tiles #video-btn { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(176, 80, 63, .22); }
.tiles #photo-btn:active, .tiles #video-btn:active { filter: brightness(1.08); }
.tile-wide {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  font-family: var(--sans); color: var(--ink);
  background: transparent; border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 12px 14px;
}
.tile-wide .t-ico { font-size: 24px; line-height: 1; }
.tile-wide > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.tile-wide b { font-size: 15px; }
.tile-wide small { font-size: 12px; color: var(--ink-mute); font-weight: 600; }
.tile-wide:hover { border-color: var(--accent); }
.tile-wide:active { transform: scale(.98); }

/* bas de page : où aller ensuite */
.spacer { flex: 1; min-height: 6px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px;
  background: var(--paper-card); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 14px 10px;
}
.nav-btn .n-ico { font-size: 16px; }
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-btn:active { transform: scale(.97); }
.nav-count {
  font-size: 12px; font-weight: 700; color: #fff; background: var(--accent);
  border-radius: 999px; padding: 2px 8px; line-height: 1.3;
}
.nav-count[hidden] { display: none; }
.edit-me {
  align-self: center; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink-mute); padding: 2px 6px;
}
.edit-me:hover { color: var(--accent); text-decoration: underline; }

/* feuille générique par-dessus la page (mot, vocal) */
.sheet {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(23, 19, 15, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  overflow: auto;
}
.sheet[hidden] { display: none; }
.sheet .sheet-card textarea {
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 13px 15px; resize: none; outline: none;
}
.sheet .sheet-card textarea:focus { border-color: var(--accent); }
.sheet #rec-sheet .row2 { width: 100%; }

/* téléphone : la page prend tout l'écran, pas de carte flottante ni de vide au-dessus/en dessous */
@media (max-width: 520px) {
  body.post { padding: 0; place-items: stretch; }
  body.post .card {
    max-width: none; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none;
    padding: calc(16px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom));
    gap: 16px;
  }
}

.field { display: flex; flex-direction: column; gap: 9px; }
.field > span { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); }
.cats { display: flex; gap: 8px; flex-wrap: wrap; }
.cats .chip {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); padding: 9px 15px; transition: all .18s ease;
}
.cats .chip:hover { border-color: var(--accent); color: var(--accent); }
.cats .chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2.solo { grid-template-columns: 1fr; }

.action {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 17px; font-weight: 700;
  border: none; border-radius: var(--r-md); padding: 18px 16px; cursor: pointer;
  transition: transform .12s ease, filter .2s ease, border-color .18s ease;
}
.action .ico { font-size: 22px; }
.action:active { transform: scale(.97); }
.action.primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(176, 80, 63, .22); }
.action.primary:hover { filter: brightness(1.06); }
.action.secondary { background: var(--paper-tint); color: var(--ink); border: 1px solid var(--line-strong); }
.action.secondary:hover { border-color: var(--accent); }
.action.tertiary {
  background: transparent; color: var(--ink-soft); font-size: 15.5px; font-weight: 600;
  border: 1px dashed var(--line-strong); padding: 15px 12px;
}
.action.tertiary:hover { border-color: var(--accent); color: var(--accent); }
.action.small { padding: 13px 16px; font-size: 15.5px; }
.action[disabled] { opacity: .45; cursor: not-allowed; }

.rec-live {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 18px; font-weight: 700; color: var(--ink);
  background: var(--accent-soft); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 13px;
}
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); animation: recPulse 1.1s ease-in-out infinite; }
.rec-max { color: var(--ink-mute); font-size: 13px; font-weight: 600; }
@keyframes recPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.78); } }

.name-line input {
  width: 100%; font-family: var(--sans); font-size: 15.5px; color: var(--ink); text-align: center;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  padding: 10px 2px; outline: none;
}
.name-line input:focus { border-bottom-color: var(--accent); }
.name-line input::placeholder { color: var(--ink-mute); }

.status { border-radius: var(--r-sm); padding: 15px; font-size: 15.5px; line-height: 1.55; text-align: center; background: var(--paper-tint); color: var(--ink); }
.status.ok { background: #EDF6EE; border: 1px solid #BEDCC2; }
.status.err { background: #FBEDEA; border: 1px solid #F0C4BB; }
.status.warn { background: #FDF3E3; border: 1px solid #EBD9B4; }
.status .dim { color: var(--ink-soft); font-size: 14px; }

.spin {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 7px;
  border: 2px solid var(--accent); border-top-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.maplink { color: var(--accent); text-decoration: none; font-size: 15px; text-align: center; font-weight: 600; }
.maplink:hover { text-decoration: underline; }

#busy { position: fixed; inset: 0; background: rgba(23, 19, 15, .55); display: grid; place-items: center; z-index: 50; backdrop-filter: blur(3px); }
#busy[hidden] { display: none; }
.busy-box {
  background: var(--paper-card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 26px; font-size: 16.5px; font-weight: 600;
  box-shadow: var(--shadow-deep);
}
/* ---------- pages organisateur (réglages, studio QR) — identité Momento ---------- */
body.admin {
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}
.admin-wrap {
  max-width: 760px; margin: 0 auto;
  padding: calc(26px + env(safe-area-inset-top)) 18px calc(34px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
}
.admin-wrap h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5vw, 40px); }
.admin .card {
  max-width: none;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-card);
}
.admin h2 {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.admin .sub { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }

/* bulles d'aide « ? » : discrètes, ouvertes au clic ou au survol */
.help {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; vertical-align: middle;
  border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-mute);
  font: 700 11px/1 var(--sans); letter-spacing: 0; text-transform: none; cursor: help; position: relative; padding: 0;
}
.help:hover { border-color: var(--accent); color: var(--accent); }
.help::after {
  content: attr(data-help); position: absolute; z-index: 30; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  width: min(320px, 78vw); padding: 10px 12px; border-radius: 10px; text-align: left;
  background: var(--ink); color: var(--paper); font: 500 12.5px/1.5 var(--sans); letter-spacing: 0; text-transform: none;
  box-shadow: var(--shadow-deep); display: none; white-space: normal;
}
.help.open::after, .help:hover::after { display: block; }
.admin h2 .help { margin-left: 8px; }
.save-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px;
  margin: 0 -8px; padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px -14px rgba(23, 19, 15, .25);
}
.save-ok { font-size: 13.5px; color: #25743F; font-weight: 600; }
.banner { border-radius: var(--r-md); padding: 12px 16px; font-size: 14.5px; line-height: 1.5; margin-bottom: 14px; }
.banner.warn { background: #FDF3E3; border: 1px solid #EBD9B4; color: #6b4a00; }
.banner.danger { background: #FBEDEA; border: 1px solid #F0C4BB; color: #8a1f17; }
.banner[hidden] { display: none; }
.ret-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ret-row input[type=date] { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.save-ok[hidden] { display: none; }
.tag-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 8px; font-size: 14px; }
.tag-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-row span { color: var(--ink-soft); font-size: 13px; }
.tag-row em { font-style: normal; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.tag-row .tag-on { background: #EDF6EE; color: #25743F; }
.tag-row .tag-past { background: var(--paper-tint); color: var(--ink-mute); }
.tag-row .cat-del { margin-left: auto; }
.tag-add { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; }
.tag-add input[type=date] { font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
@media (max-width: 560px) { .tag-add { grid-template-columns: 1fr 1fr; } .tag-add input[type=text] { grid-column: 1 / -1; } }
.tools-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.admin a.action { text-decoration: none; }
.qr-box > div { display: flex; flex-direction: column; gap: 6px; }
.switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.switch {
  display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px; transition: border-color .18s ease;
}
.switch:hover { border-color: var(--accent); }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

.admin select, .admin input[type="text"], .admin input[type="password"], .admin textarea {
  font-family: var(--sans); font-size: 15.5px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 12px 14px; outline: none;
}
.admin select:focus, .admin input:focus { border-color: var(--accent); }
.admin input[type="range"] { width: 100%; accent-color: var(--accent); }

.cat-row { display: flex; gap: 9px; align-items: center; margin-bottom: 9px; }
.cat-row input[type="color"] {
  width: 40px; height: 40px; padding: 2px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: transparent; cursor: pointer;
}
.cat-row input[type="text"] { flex: 1; }
.cat-del {
  font: inherit; color: var(--ink-mute); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 10px;
  width: 38px; height: 38px; cursor: pointer; transition: all .18s ease;
}
.cat-del:hover { color: #B3261E; border-color: #B3261E; }
.cat-add { display: flex; gap: 9px; margin-top: 4px; }
.cat-add input { flex: 1; }

.hint-inline { font-size: 12.5px; color: var(--ink-mute); line-height: 1.5; margin-top: 3px; }
.stats { font-size: 15.5px; color: var(--ink-soft); }

.q-badge {
  font-size: 12px; font-weight: 800; color: #fff; background: var(--accent);
  border-radius: var(--r-pill); padding: 3px 10px; margin-left: 8px;
}
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
.mod-item {
  position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden;
  background: var(--paper); border: 1px solid var(--line);
}
.mod-item img { width: 100%; height: 100%; object-fit: cover; }
.mod-note { width: 100%; height: 100%; padding: 10px; font-size: 12px; line-height: 1.4; color: var(--ink-soft); overflow: hidden; }
.mod-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 21px; text-shadow: 0 2px 8px rgba(0,0,0,.7); pointer-events: none; }
.mod-author {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 7px;
  font-size: 11px; color: #fff; background: linear-gradient(0deg, rgba(23,19,15,.8), transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.mod-del {
  position: absolute; top: 5px; right: 5px; width: 27px; height: 27px;
  font-size: 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(23,19,15,.72); color: #fff;
}
.mod-del:hover { background: #B3261E; }
.q-item { border-color: var(--accent); }
.q-actions { position: absolute; inset: auto 0 0 0; display: flex; }
.q-actions button { flex: 1; border: 0; cursor: pointer; font-size: 14px; font-weight: 800; padding: 8px 0; color: #fff; }
.q-ok { background: rgba(37,116,63,.94); }
.q-ok:hover { background: #25743F; }
.q-no { background: rgba(179,38,30,.94); }
.q-no:hover { background: #B3261E; }
.q-item .mod-author { bottom: 32px; }
.q-see {
  position: absolute; top: 6px; left: 6px; border: 0; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 700; padding: 5px 8px;
  background: rgba(23,19,15,.74); color: #fff;
}
.q-see:hover { background: var(--accent); }
.q-item img { cursor: zoom-in; }

/* fond du mur (admin) */
.bg-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bg-color { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.bg-color input[type=color] { width: 44px; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; }
.linkish[hidden] { display: none; }
.danger-link { color: #B3261E; align-self: flex-start; }
.bg-up { align-self: center; }
#bg-preview-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
#bg-preview-wrap[hidden] { display: none; }
.bg-preview {
  position: relative; width: 100%; aspect-ratio: 16 / 7; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line-strong); display: grid; place-items: center;
}
.bg-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg-preview-note { position: relative; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.75); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.bg-mode { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-soft); }
.bg-mode .radio { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bg-mode input { accent-color: var(--accent); }
.bg-logo-opts { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; background: var(--paper-tint); border-radius: var(--r-sm); }
.bg-logo-opts[hidden] { display: none; }
.bg-preview.is-logo img { cursor: grab; touch-action: none; }
.bg-preview.is-logo img:active { cursor: grabbing; }
.bg-handle {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; z-index: 2;
  background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
  cursor: nwse-resize; touch-action: none;
}
.bg-handle[hidden] { display: none; }
.bg-guide { position: absolute; z-index: 1; background: #FF2E7E; pointer-events: none; box-shadow: 0 0 6px rgba(255,46,126,.7); }
.bg-guide[hidden] { display: none; }
.bg-guide-v { top: 0; bottom: 0; width: 1px; }
.bg-guide-h { left: 0; right: 0; height: 1px; }
.bg-opacity { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.bg-opacity input[type=range] { flex: 1; accent-color: var(--accent); }
.bg-opacity b { min-width: 44px; text-align: right; color: var(--ink); }

/* ══════════════ revue d'une photo : flou des visages ══════════════ */
#review {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(23, 19, 15, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
}
#review[hidden] { display: none; }
.rv-card {
  width: 100%; max-width: 760px; max-height: 100%; overflow: auto;
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-deep); padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 12px;
}
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rv-head b { font-size: 17px; }
.rv-sub { display: block; font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; }
#rv-close { background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; color: var(--ink-soft); }
.rv-stage { position: relative; width: 100%; height: min(62vh, 640px); background: #17130F; border-radius: var(--r-md); overflow: hidden; }
#rv-img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-select: none; }
#rv-canvas { position: absolute; left: 0; top: 0; touch-action: none; cursor: crosshair; }
.rv-hint { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.rv-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-count { font-size: 13px; font-weight: 700; color: var(--accent); margin-right: auto; }
.rv-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
@media (max-width: 520px) { .rv-actions { grid-template-columns: 1fr; } }

.action.danger { background: #FBEDEA; color: #B3261E; border: 1px solid #E8BFB7; }
.action.danger:hover { background: #B3261E; color: #fff; }

.qr-box { display: flex; gap: 16px; align-items: center; }
.qr-box img { width: 132px; height: 132px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); }
.qr-err {
  width: 132px; height: 132px; flex: none; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; text-align: center; font-size: 12.5px; color: #B3261E;
  background: #FBEDEA; border: 1px solid #F0C4BB; border-radius: var(--r-sm); padding: 8px;
}
.qr-err[hidden] { display: none; }
.nfc-row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.nfc-row code {
  font-size: 13px; color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; overflow-wrap: anywhere;
}
#login input { font-size: 16px; width: 100%; }

/* ---------- studio QR ---------- */
.qrs-grid { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .qrs-grid { grid-template-columns: 1fr; } }
.qrs-preview-card { align-items: center; text-align: center; }
#qrs-canvas { width: 100%; max-width: 380px; height: auto; border-radius: var(--r-md); box-shadow: var(--shadow-card); }
.qrs-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.qrs-colors { display: flex; gap: 18px; flex-wrap: wrap; }
.qrs-colors label { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); }
.qrs-colors input[type="color"] {
  width: 46px; height: 38px; border-radius: 10px; padding: 2px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent;
}
.qrs-var-title { margin-top: 4px; }
#qrs-variants { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }
.qrs-thumb {
  width: 92px; height: 115px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s ease, border-color .12s ease;
  box-shadow: 0 5px 16px rgba(23,19,15,.14);
}
.qrs-thumb:hover { border-color: var(--accent); transform: translateY(-3px) scale(1.03); }
.logo-row { display: flex; gap: 9px; flex-wrap: wrap; }
/* ---------- flux d'activité façon live (bas gauche) ---------- */
#feed {
  position: fixed;
  left: calc(14px + env(safe-area-inset-left));
  bottom: calc(58px + env(safe-area-inset-bottom));
  z-index: 14;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 7px;
  width: min(330px, 74vw);
  pointer-events: none;
}
body.wall #feed { left: 30px; bottom: 30px; width: min(580px, 38vw); gap: 10px; }
.feed-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(23, 19, 15, .55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(250, 247, 241, .10);
  border-radius: 18px; padding: 10px 16px 10px 10px;
  color: rgba(250, 247, 241, .94); font-size: 15px; line-height: 1.4;
  pointer-events: auto; cursor: pointer;
  animation: feedIn .32s cubic-bezier(.2, .9, .3, 1.18);
  transition: opacity .5s ease, transform .5s ease;
}
body.wall .feed-item { font-size: 21px; border-radius: 26px; padding: 13px 22px 13px 13px; gap: 14px; }
.feed-item.out { opacity: 0 !important; transform: translateY(-8px); }
.feed-ava {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700; color: #FAF7F1;
  background: var(--accent);
}
body.wall .feed-ava { width: 50px; height: 50px; font-size: 21px; }
.feed-body { min-width: 0; }
.feed-body b { color: #fff; }
.feed-quote {
  display: block; color: rgba(250, 247, 241, .72);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@keyframes feedIn { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }

/* ---------- commentaires dans la lightbox ---------- */
#lb-comments { width: min(86vw, 560px); display: flex; flex-direction: column; gap: 8px; }
#lb-comments[hidden] { display: none; }
#lb-clist { max-height: 26vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
#lb-clist:empty::after {
  content: 'Sois le premier à commenter 👇';
  color: rgba(250, 247, 241, .5); font-size: 13px; text-align: center; padding: 4px;
}
.lb-c {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px; padding: 7px 12px;
  font-size: 13.5px; color: rgba(250, 247, 241, .92); text-align: left; line-height: 1.4;
}
.lb-c b { color: #fff; margin-right: 6px; }
#lb-cform { display: flex; gap: 8px; }
#lb-ctext {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; color: #fff;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 11px 16px; outline: none;
}
#lb-ctext::placeholder { color: rgba(250, 247, 241, .45); }
#lb-ctext:focus { border-color: var(--accent); }
#lb-csend {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; font-size: 16px; cursor: pointer;
}
#lb-csend:active { transform: scale(.94); }

/* ---------- aperçu de la disposition « frise » (file chronologique) ---------- */
.lp[data-mode="frise"] i { width: 12px; height: 12px; border-radius: 2px; }
.lp[data-mode="frise"] i:nth-child(1) { left: 8%; top: 12px; }
.lp[data-mode="frise"] i:nth-child(2) { left: 8%; top: 28px; background: #C4715F; }
.lp[data-mode="frise"] i:nth-child(3) { left: 40%; top: 6px; background: #D8988A; }
.lp[data-mode="frise"] i:nth-child(4) { left: 40%; top: 22px; }
.lp[data-mode="frise"] i:nth-child(5) { left: 72%; top: 16px; background: #C4715F; }
.lp[data-mode="frise"] i:nth-child(6) { left: 5%; top: 44px; width: 90%; height: 2px; border-radius: 1px; background: rgba(250, 247, 241, .35); }

/* ---------- thème « papier » du mur (hall d'accueil, frise annuelle) ---------- */
body.papier { color: var(--ink); }
body.papier .hud { background: linear-gradient(180deg, rgba(250, 247, 241, .95) 55%, rgba(250, 247, 241, 0)); }
body.papier .count { color: var(--ink-mute); }
body.papier .icon-btn { color: var(--ink-soft); background: rgba(32, 27, 22, .05); border-color: rgba(32, 27, 22, .16); }
body.papier .hint { background: rgba(255, 253, 248, .92); color: var(--ink-soft); border: 1px solid var(--line-strong); }
body.papier .empty-title { color: var(--ink); }
body.papier .empty-sub { color: var(--ink-soft); }
body.papier #wall-title { color: var(--ink); text-shadow: none; }
body.papier #wall-count { color: var(--ink-mute); }
body.papier .wf-name { color: var(--ink); text-shadow: none; }
body.papier .wf-kind { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--accent); }
body.papier #wall-badge {
  background: rgba(255, 253, 248, .94); border-color: var(--line-strong);
  box-shadow: var(--shadow-card); color: var(--ink);
}
body.papier .wb-sub { color: var(--ink-mute); }

body.papier .chip { color: var(--ink-soft); background: rgba(32, 27, 22, .05); border-color: rgba(32, 27, 22, .16); }
body.papier .chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Sur les pages organisateur (fond papier), les chips passent en encre — quelle que
   soit leur position dans la page. Répare le blanc-sur-blanc des boutons du studio. */
body.admin .chip {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
}
body.admin .chip:hover { border-color: var(--accent); color: var(--accent); }
body.admin .chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ══════════════ pages légales (confidentialité, mentions) ══════════════ */
.legal { max-width: 720px; }
.legal .sub { color: var(--ink-soft); margin-top: -8px; }
.legal-body { gap: 6px; font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.legal-body h2 {
  font-family: var(--serif); font-weight: 400; font-size: 24px;
  color: var(--ink); margin: 18px 0 2px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 6px; }
.legal-body ul { margin: 0 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal-body strong { color: var(--ink); }
/* balise « à compléter » : impossible à rater tant que ce n'est pas renseigné */
.todo { background: #FDF3E3; color: #8A5A00; border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.legal-line {
  text-align: center; font-size: 13px; color: var(--ink-mute); padding: 4px 0 2px;
}
.legal-line a { color: var(--ink-mute); text-decoration: none; font-weight: 600; }
.legal-line a:hover { color: var(--accent); text-decoration: underline; }

/* ══════════════ écran de consentement (première visite invité) ══════════════ */
#consent {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(23, 19, 15, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  overflow: auto;
}
#consent[hidden] { display: none; }
.consent-card {
  width: 100%; max-width: 430px; max-height: 100%; overflow: auto;
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-deep);
  padding: 26px 22px; display: flex; flex-direction: column; gap: 13px;
  font-size: 14.5px; line-height: 1.55; color: var(--ink-soft);
}
.consent-card h2 {
  font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.1;
  color: var(--ink); margin: 0;
}
.consent-card p { margin: 0; }
.consent-card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.consent-card strong { color: var(--ink); }
.consent-links { font-size: 12.5px; color: var(--ink-mute); }
.consent-links a { color: var(--accent); font-weight: 600; }
.consent-exit { font-size: 12.5px; color: var(--ink-mute); text-align: center; }

/* badge « signalé » dans la file À vérifier (le souvenir reste visible sur le mur) */
.mod-flag {
  position: absolute; top: 5px; left: 5px;
  font-size: 10.5px; font-weight: 700; color: #8A5A00;
  background: #FDF3E3; border-radius: 999px; padding: 3px 8px;
  pointer-events: none;
}

/* ══════════════ identité : bulle d'avatar + panneau de choix ══════════════ */
.name-line { display: flex; align-items: center; gap: 10px; }
.avatar-bubble {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--paper-tint);
  font-size: 22px; line-height: 1; cursor: pointer; overflow: hidden; padding: 0;
  display: grid; place-items: center;
}
.avatar-bubble img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-bubble:hover { border-color: var(--accent); }
#avatar-sheet {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(23, 19, 15, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  overflow: auto;
}
#avatar-sheet[hidden] { display: none; }
.sheet-card {
  width: 100%; max-width: 400px; max-height: 100%; overflow: auto;
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-deep);
  padding: 24px 20px; display: flex; flex-direction: column; gap: 14px;
}
.sheet-card h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0; color: var(--ink); }
.sheet-sub { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
#avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.avatar-pick {
  aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--line);
  font-size: 26px; cursor: pointer; padding: 0;
  display: grid; place-items: center;
}
.avatar-pick:hover { border-color: var(--accent); transform: scale(1.06); }

/* avatars dans le flux et les commentaires */
.feed-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lb-c { display: flex; align-items: baseline; gap: 6px; }
.lb-c-ava {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 12px; overflow: hidden;
  align-self: center;
}
.lb-c-ava img { width: 100%; height: 100%; object-fit: cover; }

/* ══════════════ classement de la soirée (🏆) ══════════════ */
#board {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(10, 8, 6, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 18px;
}
#board[hidden] { display: none; }
.board-card {
  width: 100%; max-width: 680px; max-height: 88vh; overflow: auto;
  background: var(--night-soft); border: 1px solid var(--night-line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-deep);
  padding: 22px 22px 26px; color: var(--night-text);
}
.board-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.board-title { font-family: var(--serif); font-size: clamp(22px, 4vw, 30px); }
#board-close {
  background: transparent; border: 1px solid var(--night-line); color: var(--night-mute);
  border-radius: 999px; width: 34px; height: 34px; font-size: 15px; cursor: pointer;
}
#board-close:hover { color: var(--night-text); border-color: var(--night-text); }
.board-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .board-cols { grid-template-columns: 1fr; } }
.board-cols h3 {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--night-mute); margin: 0 0 10px;
}
.b-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 0; color: inherit; font: inherit; text-align: left;
  padding: 7px 6px; border-radius: var(--r-sm); cursor: default;
}
button.b-row { cursor: pointer; }
button.b-row:hover { background: rgba(250, 247, 241, .07); }
.b-rank { flex: 0 0 26px; font-size: 17px; text-align: center; }
.b-thumb {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; object-fit: cover;
  background: #241E19; border: 2px solid #FFFDF8;
}
.b-thumb-txt { display: grid; place-items: center; font-size: 20px; border: 0; }
.b-ava {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 17px; font-weight: 700; color: #fff;
}
.b-ava img { width: 100%; height: 100%; object-fit: cover; }
.b-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.b-meta b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-meta span { font-size: 12px; color: var(--night-mute); }
.board-empty { text-align: center; color: var(--night-mute); font-size: 14px; padding: 18px 0 6px; }

/* ══════════════ bulle d'avatar vide (« ajoute ta photo ») ══════════════ */
.avatar-bubble.is-empty {
  border-style: dashed; border-width: 2px; border-color: var(--line-strong);
  background: var(--paper-tint); color: var(--ink-mute);
}
.avatar-hint {
  background: none; border: 0; padding: 2px 4px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--accent);
}
.avatar-hint:hover { text-decoration: underline; }

/* ══════════════ mini-classement posé en bas à droite ══════════════ */
#miniboard {
  position: fixed; z-index: 14;
  right: calc(14px + env(safe-area-inset-right));
  bottom: calc(58px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(23, 19, 15, .55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(250, 247, 241, .10);
  border-radius: 20px; padding: 13px 15px 15px;
  color: rgba(250, 247, 241, .94); font: inherit; text-align: left; cursor: pointer;
}
#miniboard[hidden] { display: none; }
#miniboard:hover { border-color: rgba(250, 247, 241, .3); }
.mb-title { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(250, 247, 241, .6); }
#mb-top { display: flex; gap: 8px; }
.mb-cell { position: relative; width: 68px; height: 68px; }
.mb-cell img, .mb-emo {
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
  border: 2px solid #FFFDF8; display: grid; place-items: center; font-size: 22px;
  background: #241E19;
}
.mb-medal { position: absolute; top: -8px; left: -8px; font-size: 18px; z-index: 1; }
.mb-likes {
  position: absolute; right: -5px; bottom: -5px;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 2px 6px;
}
#mb-guests { display: flex; flex-direction: column; gap: 4px; }
.mb-guest { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.mb-guest .b-ava { flex: 0 0 28px; width: 28px; height: 28px; font-size: 13px; }
.mb-guest b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

/* écran géant : le classement se pose AU-DESSUS du badge QR, en plus grand et lisible de loin */
body.wall #miniboard { right: 26px; bottom: 196px; padding: 14px 16px 16px; gap: 10px; border-radius: 22px; }
body.wall .mb-title { font-size: 15px; }
body.wall .mb-cell { width: 74px; height: 74px; }
body.wall .mb-medal { font-size: 20px; top: -9px; left: -9px; }
body.wall .mb-likes { font-size: 13px; padding: 3px 8px; }
body.wall .mb-guest { font-size: 18px; gap: 9px; }
body.wall .mb-guest .b-ava { flex: 0 0 32px; width: 32px; height: 32px; font-size: 15px; }
body.wall .mb-guest b { max-width: 190px; }

/* ══════════════ flux d'activité : lisible depuis le canapé sur la TV ══════════════ */
body.wall #feed { width: min(760px, 44vw); gap: 12px; }
body.wall .feed-item { font-size: 27px; border-radius: 32px; padding: 16px 26px 16px 16px; gap: 18px; }
body.wall .feed-ava { width: 64px; height: 64px; font-size: 27px; }
body.wall .feed-quote { font-size: 23px; }

/* ══════════════ filtres photo (un écran, un tap, envoyé) ══════════════ */
#filter-sheet {
  position: fixed; inset: 0; z-index: 56;
  background: rgba(23, 19, 15, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
}
#filter-sheet[hidden] { display: none; }
.fsheet-card {
  width: 100%; max-width: 430px; max-height: 100%; overflow: auto;
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-deep);
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
}
#filter-preview {
  width: 100%; max-height: 46vh; object-fit: contain;
  border-radius: var(--r-md); background: #17130F;
}
#filter-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
}
.fchip {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: var(--ink-mute);
}
.fchip img {
  width: 62px; height: 62px; object-fit: cover; border-radius: 12px;
  border: 2.5px solid transparent;
}
.fchip.on { color: var(--accent); }
.fchip.on img { border-color: var(--accent); }

/* ══════════════ étape profil (entre le consentement et la page d'envoi) ══════════════ */
#profile-step {
  position: fixed; inset: 0; z-index: 54; /* sous le panneau d'avatars (55) qui s'ouvre par-dessus */
  background: rgba(23, 19, 15, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  overflow: auto;
}
#profile-step[hidden] { display: none; }
#profile-step .consent-card { align-items: center; text-align: center; }
.pstep-bubble { flex: none; width: 88px; height: 88px; font-size: 34px; align-self: center; }
#pstep-skip { align-self: center; }

/* ══════════════ néon écrit au doigt : atelier (page invité) ══════════════ */
.row-auto { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
#neon-sheet {
  position: fixed; inset: 0; z-index: 57;
  background: rgba(10, 8, 6, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
}
#neon-sheet[hidden] { display: none; }
.neon-card {
  width: 100%; max-width: 470px; max-height: 100%; overflow: auto;
  background: #201A15; border: 1px solid rgba(250, 247, 241, .14);
  border-radius: var(--r-lg); box-shadow: var(--shadow-deep);
  padding: 14px; display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.neon-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  color: #FAF7F1; font-weight: 700; font-size: 15px;
}
#neon-close {
  background: transparent; border: 1px solid rgba(250, 247, 241, .2); color: rgba(250, 247, 241, .7);
  border-radius: 999px; width: 32px; height: 32px; font-size: 14px; cursor: pointer;
}
#neon-canvas {
  border-radius: var(--r-md); background: #17130F; border: 1px solid rgba(250, 247, 241, .1);
  cursor: crosshair;
}
.neon-tools { width: 100%; display: flex; align-items: center; gap: 10px; }
#neon-colors { display: flex; gap: 9px; flex: 1; }
.neon-dot {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2.5px solid transparent;
}
.neon-dot.on { border-color: #FAF7F1; }
#neon-undo, #neon-clear {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: rgba(250, 247, 241, .8); background: transparent;
  border: 1px solid rgba(250, 247, 241, .2); border-radius: 999px; padding: 7px 13px;
}
.neon-card .action.primary { width: 100%; }

/* ══════════════ replay néon sur l'écran géant ══════════════ */
#neon-replay {
  position: fixed; inset: 0; z-index: 26;
  background: rgba(8, 6, 5, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  animation: neonIn .5s ease both;
  transition: opacity .7s ease;
}
#neon-replay.out { opacity: 0; }
@keyframes neonIn { from { opacity: 0; } to { opacity: 1; } }
.neon-sig {
  font-family: var(--hand); font-size: clamp(26px, 4vw, 44px); color: #FAF7F1;
  text-shadow: 0 0 18px rgba(250, 247, 241, .5);
}

/* Téléphone : le classement se replie en pastille 🏆 (les réactions gardent la gauche,
   le podium complet s'ouvre au tap). Le panneau étalé reste pour grand écran et TV.
   Les trois actions (classement / flux / poster) forment une barre du bas répartie
   sur toute la largeur : plus rien de collé dans le coin. */
#dock { display: contents; }
@media (max-width: 699px) {
  #dock {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: fixed; z-index: 15;
    left: calc(14px + env(safe-area-inset-left)); right: calc(14px + env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
  #dock > * { position: static !important; }
  #miniboard, .fab-feed { flex: 1 1 0; height: 50px; justify-content: center; align-items: center; margin: 0; }
  #miniboard { display: flex; padding: 0 12px; border-radius: 999px; gap: 0; }
  #miniboard[hidden] { display: none; }
  #miniboard #mb-top, #miniboard #mb-guests { display: none; }
  #miniboard .mb-title { font-size: 14px; letter-spacing: .05em; color: rgba(250, 247, 241, .94); }
  .fab-feed { padding: 0 12px; }
  .fab { flex: none; width: 54px; height: 54px; }
  /* les réactions (bas gauche) et l'aide remontent au-dessus de la barre */
  #feed { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .hint { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ══════════════ Live : 3 secondes filmées dans la page ══════════════ */
#live-sheet {
  position: fixed; inset: 0; z-index: 58;
  background: rgba(10, 8, 6, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
}
#live-sheet[hidden] { display: none; }
.live-card { width: 100%; max-width: 470px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.live-stage {
  position: relative; width: 100%; aspect-ratio: 1;
  border-radius: var(--r-lg); overflow: hidden; background: #17130F;
  border: 1px solid rgba(250, 247, 241, .14);
}
#live-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
#live-countdown {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 96px; color: #fff;
  text-shadow: 0 0 30px rgba(0, 0, 0, .6);
  background: rgba(23, 19, 15, .18);
}
#live-countdown[hidden] { display: none; }
.live-hint { color: rgba(250, 247, 241, .8); font-size: 14px; text-align: center; margin: 0; }
.live-tools { display: flex; align-items: center; justify-content: center; gap: 26px; }
#live-flip, #live-close {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 18px;
  background: rgba(250, 247, 241, .1); border: 1px solid rgba(250, 247, 241, .2); color: #FAF7F1;
}
#live-go {
  width: 78px; height: 78px; border-radius: 50%; cursor: pointer; padding: 0;
  background: transparent; border: 4px solid #FAF7F1;
  display: grid; place-items: center;
}
#live-go span {
  width: 58px; height: 58px; border-radius: 50%;
  background: #FF2E7E; box-shadow: 0 0 18px rgba(255, 46, 126, .7);
  transition: border-radius .2s ease, transform .2s ease;
}
#live-go.rec span { border-radius: 12px; transform: scale(.62); }

/* la promesse qualité, affichée à l'invité (photos jamais réduites) */
.quality-note { font-size: 13px; color: var(--ink-mute); }
/* barre de progression d'envoi : on VOIT que ça avance */
.busy-bar { width: 190px; height: 6px; border-radius: 999px; background: rgba(250,247,241,.18); overflow: hidden; margin-top: 10px; }
.busy-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .25s ease; }

/* ══════════════════════════════════════════════════════════════════════
   LE FLUX (téléphone) — un souvenir par écran, façon TikTok
   ══════════════════════════════════════════════════════════════════════ */
body.feed { background: #17130F; color: #FAF7F1; overflow: hidden; height: 100dvh; font-family: var(--sans); }
#fd-scroll {
  position: fixed; inset: 0;
  overflow-y: auto; overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#fd-scroll::-webkit-scrollbar { display: none; }
.fd-card {
  position: relative; height: 100dvh; width: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; overflow: hidden;
  background: #17130F;
}
.fd-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.fd-media { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; display: block; }
.fd-neon { object-fit: contain; }
.fd-shade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%; pointer-events: none;
  background: linear-gradient(180deg, rgba(23,19,15,0), rgba(23,19,15,.72));
}
/* mots et vocaux : contenu clair et centré, le voile les ternirait */
.fd-note-card .fd-shade, .fd-audio-card .fd-shade { height: 22%; background: linear-gradient(180deg, rgba(23,19,15,0), rgba(23,19,15,.5)); }
.fd-note { position: relative; z-index: 1; }
/* petit mot : plein écran façon post-it géant */
.fd-note {
  width: min(84vw, 460px); aspect-ratio: 1; border-radius: 22px; padding: 30px 26px;
  display: grid; place-items: center; text-align: center;
  font-family: var(--hand); font-size: clamp(26px, 6.5vw, 40px); line-height: 1.25; color: #2b2b33;
  box-shadow: 0 30px 80px rgba(0,0,0,.55); transform: rotate(-1.5deg);
}
/* vocal */
.fd-audio { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; width: min(84vw, 420px); }
.fd-audio-mic { font-size: 84px; }
.fd-audio-lbl { color: rgba(250,247,241,.75); font-size: 15px; }
.fd-audio audio { width: 100%; }
/* chip LIVE sur les Live */
.fd-livechip {
  position: absolute; top: calc(78px + env(safe-area-inset-top)); left: 16px;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(20,16,12,.6); backdrop-filter: blur(6px); border-radius: 999px; padding: 6px 12px 6px 9px;
  font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #fff;
}
.fd-livechip i { width: 8px; height: 8px; border-radius: 50%; background: #FF2E7E; box-shadow: 0 0 10px #FF2E7E; animation: recPulse 1.4s ease-in-out infinite; }

/* méta bas-gauche : avatar + prénom */
.fd-meta {
  position: absolute; z-index: 2; left: 16px; right: 92px; bottom: calc(96px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.fd-who { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.fd-who b { text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.fd-kind { font-size: 15px; opacity: .8; }
.fd-ava {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  display: inline-grid; place-items: center; font-size: 17px; font-weight: 700; color: #fff;
  border: 2px solid rgba(250,247,241,.85);
}
.fd-ava img { width: 100%; height: 100%; object-fit: cover; }

/* colonne d'actions à droite, comme TikTok */
.fd-actions {
  position: absolute; z-index: 2; right: 12px; bottom: calc(96px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.fd-act {
  background: none; border: 0; padding: 0; cursor: pointer; color: #FAF7F1;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit;
}
.fd-act-ico {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 26px;
  background: rgba(23,19,15,.45); backdrop-filter: blur(8px); border: 1px solid rgba(250,247,241,.14);
  transition: transform .15s ease;
}
.fd-act:active .fd-act-ico { transform: scale(.9); }
.fd-act.on .fd-act-ico { background: rgba(255,46,126,.28); border-color: rgba(255,46,126,.5); }
.fd-act-n { font-size: 12.5px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.6); }

/* cœur qui explose au double-tap */
.fd-heart-burst { position: absolute; left: 50%; top: 50%; font-size: 110px; opacity: 0; pointer-events: none; transform: translate(-50%,-50%) scale(.3); }
.fd-heart-burst.go { animation: fdBurst .8s cubic-bezier(.2,.9,.3,1.2) forwards; }
@keyframes fdBurst {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
  25% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
  60% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-70%) scale(.9); }
}

/* haut : marque + compteur + accès au mur */
.fd-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  padding: calc(12px + env(safe-area-inset-top)) 14px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(180deg, rgba(23,19,15,.85), rgba(23,19,15,0)); pointer-events: none;
}
.fd-top > * { pointer-events: auto; }
.fd-brand { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.fd-top-right { display: flex; align-items: center; gap: 10px; }
.fd-count { font-size: 12.5px; color: rgba(250,247,241,.65); white-space: nowrap; }
.fd-wall-btn {
  font-size: 13px; font-weight: 700; color: #FAF7F1; text-decoration: none; white-space: nowrap;
  background: rgba(250,247,241,.12); border: 1px solid rgba(250,247,241,.22); border-radius: 999px; padding: 8px 13px;
}
/* bouton Poster : toujours sous le pouce */
.fd-post {
  position: fixed; z-index: 10; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #B0503F, #C97B3F); border-radius: 999px; padding: 13px 22px;
  font-weight: 800; font-size: 16px; box-shadow: 0 12px 30px rgba(176,80,63,.5);
}
.fd-post:active { transform: translateX(-50%) scale(.96); }
/* indice de geste, disparaît au premier swipe */
.fd-hint {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 9; font-size: 12.5px; color: rgba(250,247,241,.7); background: rgba(23,19,15,.5);
  border-radius: 999px; padding: 6px 12px; pointer-events: none; transition: opacity .5s ease;
}
.fd-hint.off { opacity: 0; }
.fd-hint.fd-hint-ok { color: #FAF7F1; background: rgba(176, 80, 63, .82); font-weight: 700; font-size: 13px; }
/* état vide */
.fd-empty { height: 100dvh; display: grid; place-content: center; text-align: center; gap: 8px; padding: 24px; }
.fd-empty-art { font-size: 64px; }
.fd-empty-title { font-family: var(--serif); font-size: 26px; }
.fd-empty-sub { color: rgba(250,247,241,.7); }

/* tiroir commentaires */
#fd-cmts { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
#fd-cmts[hidden] { display: none; }
.fd-cmts-card {
  width: 100%; max-height: 72dvh; background: #241E19; border-radius: 22px 22px 0 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px;
  animation: fdUp .28s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes fdUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.fd-cmts-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; }
#fd-cmts-close { background: none; border: 0; color: rgba(250,247,241,.7); font-size: 18px; cursor: pointer; padding: 4px 8px; }
#fd-cmts-list { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; min-height: 90px; padding: 4px 0; }
.fd-c { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; }
.fd-c .fd-ava { flex: 0 0 30px; width: 30px; height: 30px; font-size: 13px; border-width: 1px; }
.fd-c b { margin-right: 4px; }
.fd-c-empty { color: rgba(250,247,241,.55); font-size: 14px; text-align: center; padding: 18px 0; }
#fd-cmts-form { display: flex; gap: 8px; }
#fd-cmts-text {
  flex: 1; font: inherit; font-size: 15px; color: #FAF7F1; background: rgba(250,247,241,.08);
  border: 1px solid rgba(250,247,241,.16); border-radius: 999px; padding: 11px 16px; outline: none;
}
#fd-cmts-send { font: inherit; font-size: 18px; color: #fff; background: var(--accent); border: 0; border-radius: 50%; width: 44px; height: 44px; cursor: pointer; }
/* bouton Flux dans le HUD du mur : visible sur téléphone seulement */
/* bouton « ▶ Flux » : retour au défilement façon TikTok, posé à gauche du ➕ (téléphone seulement) */
.fab-feed {
  display: none; position: fixed; z-index: 15;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(124px + env(safe-area-inset-bottom));
  align-items: center; gap: 6px; text-decoration: none; color: #FAF7F1;
  font-size: 14px; font-weight: 800; letter-spacing: .02em;
  background: rgba(23,19,15,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(250,247,241,.22); border-radius: 999px; padding: 12px 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
.fab-feed:active { transform: scale(.95); }
@media (max-width: 699px) { .fab-feed { display: inline-flex; } }
body.wall .fab-feed { display: none !important; }
body.styling .fab-feed { opacity: 0; pointer-events: none; }
/* haut du flux sur petit écran : le compteur passe sous la marque, le bouton mur reste dans l'écran */
@media (max-width: 420px) {
  .fd-brand { font-size: 14px; }
  .fd-count { display: none; }
  .fd-wall-btn { font-size: 12.5px; padding: 7px 11px; }
}

/* ══════════════ rapport de l'événement (/rapport) ══════════════ */
.rp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.rp-head h1 { margin: 2px 0 4px; }
.rp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.rp-kpi { background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 16px 14px; }
.rp-kpi .v { font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--ink); }
.rp-kpi .l { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; }
.rp-kpi .s { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.rp-h3 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); margin: 14px 0 8px; }
.rp-bars { display: flex; flex-direction: column; gap: 8px; }
.rp-bar-row { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 10px; font-size: 14px; }
.rp-bar-label { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-bar-track { height: 10px; background: var(--paper-tint); border-radius: 999px; overflow: hidden; }
.rp-bar-fill { display: block; height: 100%; border-radius: 999px; }
.rp-bar-val { text-align: right; font-weight: 700; color: var(--ink); }
.rp-chart svg { width: 100%; height: auto; display: block; }
.rp-tl-axis { stroke: var(--line-strong); stroke-width: 1; }
.rp-tl-tick { font: 500 11px var(--sans); fill: var(--ink-mute); }
.rp-tl-bar rect { transition: opacity .15s; }
.rp-tl-bar:hover rect { opacity: .82; }
.rp-top { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.rp-item { margin: 0; }
.rp-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--paper-tint); }
.rp-note { width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); border: 1px solid var(--line); background: #FFF6C4; padding: 10px; font-family: var(--hand); font-size: 15px; line-height: 1.3; color: #3b2f1a; overflow: hidden; display: flex; align-items: center; }
.rp-item figcaption { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.4; }
.rp-item figcaption b { color: var(--ink); }
.rp-item figcaption span { display: block; color: var(--ink-mute); }
.rp-guests { display: flex; flex-direction: column; gap: 6px; }
.rp-guest { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: var(--r-sm); font-size: 14.5px; }
.rp-guest:nth-child(odd) { background: var(--paper-tint); }
.rp-rank { width: 22px; text-align: center; font-weight: 700; color: var(--ink-mute); }
.rp-guest .b-ava { flex: 0 0 30px; width: 30px; height: 30px; font-size: 14px; color: #fff; }
.rp-guest b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-guest-stats { margin-left: auto; color: var(--ink-soft); font-size: 12.5px; text-align: right; }
.rp-meta { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: var(--ink-soft); }
.rp-meta b { color: var(--ink); }
.rp-foot { text-align: center; font-size: 12.5px; color: var(--ink-mute); padding: 10px 0 20px; }
@media print {
  .no-print, .legal-line { display: none !important; }
  body.report { background: #fff; padding: 0; }
  .admin .card, .rp-kpi { box-shadow: none; break-inside: avoid; border-color: #ddd; }
  .rp-guest:nth-child(odd) { background: #f4f1eb; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-bar-fill, .rp-tl-bar rect { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ══════════════ /embed : le mur en lecture seule sur le site de l'organisateur ══════════════ */
body.embed .hud .btn, body.embed #fab, body.embed #dock, body.embed #style-btn, body.embed #onboard,
body.embed #lb-like, body.embed #lb-cmt-toggle, body.embed #lb-report, body.embed #lb-del, body.embed #lb-comments,
body.embed #wall-badge, body.embed #hint { display: none !important; }
body.embed .hud { pointer-events: none; }
body.embed .hud #fs { pointer-events: auto; }

.embed-code { width: 100%; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); background: var(--paper-tint); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; resize: vertical; }

.lk-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.lk-row .lk-label { font-weight: 700; color: var(--ink); }
.lk-row a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); }
.lk-row .ev-sub { grid-column: 2 / -1; }
@media (max-width: 640px) { .lk-row { grid-template-columns: 1fr auto; } .lk-row .lk-label { grid-column: 1 / -1; } }
