/* App événement (front invité) */
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 10px; }
.boot-mark { font-family: var(--font-heading); font-size: 2rem; color: var(--accent-deep); }

/* Hero */
.hero { text-align: center; padding: 40px 18px 22px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.hero-eyebrow { letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; color: var(--accent-deep); margin-bottom: 10px; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.2rem); color: var(--accent-deep); }
.welcome { max-width: 560px; margin: 12px auto 0; }

/* Onglets */
.tabs { position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; gap: 4px;
  background: var(--bg); border-bottom: 1px solid var(--border); padding: 6px; }
.tab { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ink-soft);
  padding: 12px 18px; border-radius: 999px; cursor: pointer; }
.tab.active { background: var(--accent); color: #fff; }

.tabpanel { padding: 22px 0 40px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.empty { padding: 30px 0; }

/* Galerie photos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius);
  background: var(--bg-soft); cursor: pointer; border: 1px solid var(--border); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .tile-tag { position: absolute; left: 6px; bottom: 6px; font-size: .68rem; padding: 3px 8px;
  border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; }
.tile .tile-play { position: absolute; inset: 0; display: grid; place-content: center; font-size: 2rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }

/* Messages */
#messages-list, #challenges-list { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 16px 18px; }
.msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.msg-author { font-weight: 600; }
.msg-body { white-space: pre-wrap; }
.msg-tag, .chip { display: inline-block; font-size: .72rem; padding: 2px 9px; border-radius: 999px;
  background: var(--bg-soft); color: var(--accent-deep); border: 1px solid var(--border); }
audio { width: 100%; margin-top: 6px; }

/* Défis */
.challenge { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.challenge .ch-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.challenge-count { font-size: .8rem; color: var(--ink-soft); }
.entry-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 0; }
.entry-strip .tile { flex: 0 0 84px; width: 84px; }

/* Modale */
.modal { position: fixed; inset: 0; background: rgba(20,15,10,.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-card { width: min(520px, 100%); max-height: 92vh; overflow: auto; padding: 24px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--ink-soft); }
.field { margin-bottom: 16px; }
.tag-help { font-size: .82rem; color: var(--ink-soft); margin: 6px 0 10px; }
.preview { margin-top: 10px; border-radius: 10px; overflow: hidden; max-height: 240px; }
.preview img, .preview video { width: 100%; display: block; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 60; padding: 16px; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 86vh; border-radius: 8px; }
.lightbox .lb-actions { position: absolute; bottom: 24px; display: flex; gap: 10px; }

/* Enregistrement vocal */
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #d33; display: inline-block; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; }

.app-footer { text-align: center; padding: 26px 18px 40px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.small { font-size: .8rem; }

/* Toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 80; font-size: .9rem; }
.toast.err { background: #b3261e; }
