/* ===================================================
   BUZZER FORMATION : visite guidée
   Démo simulée, aucun appel au serveur. Mobile d'abord.
   =================================================== */

.vz-launch { margin: -16px 0 28px; }

html.vz-lock, html.vz-lock body { overflow: hidden; height: 100%; }

.vz-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 3000;
    background: #0a0a0a; color: #dddddd;
    display: none; flex-direction: column;
    height: 100vh; height: 100dvh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
.vz-overlay.open { display: flex; }

/* Barre du haut */
.vz-top {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
    border-bottom: 1px solid #2a2a2a; background: #141414;
}
.vz-top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vz-dot { width: 10px; height: 10px; border-radius: 50%; background: #ffffff; flex-shrink: 0; }
.vz-top-title { font-weight: 700; font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; color: #ffffff; white-space: nowrap; }
.vz-count { font-size: 0.82rem; color: #999999; white-space: nowrap; }
.vz-close {
    background: none; border: 1px solid #3a3a3a; color: #ffffff; border-radius: 8px;
    padding: 8px 14px; min-height: 40px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}

/* Choix de l'écran (téléphone uniquement) */
.vz-switch { display: flex; gap: 8px; justify-content: center; padding: 10px 14px 0; }
.vz-switch button {
    flex: 1; max-width: 210px; min-height: 38px; padding: 6px 10px;
    background: none; border: 1px solid #3a3a3a; border-radius: 20px;
    color: #999999; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.vz-switch button.on { background: #ffffff; color: #000000; border-color: #ffffff; }

/* Scène */
.vz-stage {
    flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
    gap: 28px; padding: 12px 14px; overflow: hidden; touch-action: pan-y;
}
.vz-device { display: none; transition: opacity 0.3s, transform 0.3s; }
.vz-device.show { display: flex; }

/* Écran animateur */
.vz-host {
    flex-direction: column; width: 100%; max-width: 560px; height: 100%; max-height: 420px;
    background: #0a0a0a; border: 2px solid #3a3a3a; border-radius: 12px; overflow: hidden;
}
.vz-host-bar {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: #141414; border-bottom: 1px solid #2a2a2a;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #ffffff;
    white-space: nowrap; overflow: hidden;
}
.vz-host-bar .vz-dot { width: 8px; height: 8px; }
.vz-host-body { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 12px; position: relative; font-size: 0.8rem; }
.vz-host-ctrl { display: flex; gap: 6px; padding: 8px; border-top: 1px solid #2a2a2a; background: #141414; }
.vz-host-ctrl.hide { display: none; }
.vz-host-ctrl span {
    flex: 1; text-align: center; padding: 7px 4px; border-radius: 6px;
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
}
.vz-b-primary { background: #ffffff; color: #000000; }
.vz-b-dark { background: #2a2a2a; color: #ffffff; border: 1px solid #555555; }
.vz-b-danger { background: #cc0000; color: #ffffff; }

/* Formulaire simulé */
.vz-field { margin-bottom: 8px; }
.vz-field label {
    display: block; margin-bottom: 3px; font-size: 0.6rem; color: #999999;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.vz-input {
    background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 6px;
    padding: 5px 8px; min-height: 26px; color: #ffffff; font-size: 0.76rem;
}
.vz-chips { display: flex; gap: 6px; }
.vz-chip {
    flex: 1; text-align: center; padding: 4px; border: 1px solid #3a3a3a; border-radius: 6px;
    font-size: 0.66rem; color: #999999;
}
.vz-chip.on { border-color: #ffffff; color: #ffffff; background: #2a2a2a; }
.vz-caret::after {
    content: ''; display: inline-block; width: 1px; height: 0.9em; margin-left: 2px;
    background: #ffffff; vertical-align: -2px; animation: vzBlink 1s steps(1) infinite;
}

.vz-btn {
    display: inline-block; padding: 7px 12px; border-radius: 6px;
    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; text-align: center;
}
.vz-wide { display: block; width: 100%; margin-top: 10px; padding: 9px; }
.vz-btn.ok { background: #00aa44; color: #ffffff; }
.vz-btn.ko { background: #3a3a3a; color: #ffffff; }

/* Lien et QR code */
.vz-link {
    background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 8px; padding: 7px 9px;
    font-size: 0.64rem; color: #bbbbbb; word-break: break-all; margin-bottom: 10px;
}
.vz-link strong { color: #ffffff; }
.vz-qr { background: #ffffff; padding: 6px; border-radius: 8px; width: 46%; max-width: 160px; margin: 0 auto; }
.vz-qr svg { display: block; width: 100%; height: auto; }
.vz-qr-label { text-align: center; color: #999999; font-size: 0.68rem; margin-top: 8px; }

/* Cartes participants */
.vz-empty { color: #777777; font-style: italic; text-align: center; padding: 24px 6px; font-size: 0.75rem; }
.vz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 9px; padding-top: 6px; }
.vz-card {
    position: relative; text-align: center; padding: 8px 4px;
    background: #2a2a2a; border: 1px solid #2a2a2a; border-radius: 10px;
}
.vz-card.new { animation: vzIn 0.35s ease; }
.vz-card.buzzed { border-color: #ffffff; background: #3a3a3a; }
.vz-card .n { font-size: 0.7rem; font-weight: 600; color: #ffffff; }
.vz-card .s { font-size: 0.76rem; font-weight: 700; color: #bbbbbb; }
.vz-av {
    width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 5px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #777777; color: #ffffff; font-weight: 800; font-size: 0.8rem;
}
.vz-order {
    position: absolute; top: -7px; right: -7px; width: 21px; height: 21px; border-radius: 50%;
    background: #ffffff; color: #000000; font-weight: 800; font-size: 0.66rem;
    display: flex; align-items: center; justify-content: center; animation: vzPop 0.3s ease;
}

/* Fenêtres simulées dans l'écran animateur */
.vz-modal {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 12px;
    background: rgba(0,0,0,0.72); display: flex; align-items: center; justify-content: center;
    animation: vzFade 0.25s ease;
}
.vz-modal-box {
    width: 100%; max-width: 300px; padding: 14px; text-align: center;
    background: #1a1a1a; border: 1px solid #3a3a3a; border-radius: 12px;
}
.vz-modal-box h4 { color: #ffffff; font-size: 0.85rem; margin-bottom: 8px; }
.vz-lab { text-align: left; font-size: 0.62rem; color: #999999; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.vz-area {
    min-height: 42px; margin-bottom: 10px; padding: 7px 8px; text-align: left;
    background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 6px; color: #ffffff; font-size: 0.72rem;
}
.vz-row { display: flex; gap: 6px; }
.vz-row .vz-btn { flex: 1; }
.vz-toast {
    position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
    padding: 6px 10px; border-radius: 6px; white-space: nowrap;
    background: #3a3a3a; border: 1px solid #777777; color: #ffffff; font-size: 0.68rem;
    animation: vzFade 0.3s ease;
}
.vz-toast.ok { background: #00aa44; border-color: #00aa44; }

/* Statistiques */
.vz-stats h4 { color: #ffffff; font-size: 0.85rem; margin-bottom: 2px; }
.vz-sub { color: #999999; font-size: 0.66rem; margin-bottom: 10px; }
.vz-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.68rem; color: #bbbbbb; }
.vz-bar > span { width: 64px; flex-shrink: 0; }
.vz-track { flex: 1; height: 18px; background: #2a2a2a; border-radius: 4px; overflow: hidden; }
.vz-fill {
    height: 100%; width: 0; display: flex; align-items: center; justify-content: flex-end;
    padding-right: 6px; font-size: 0.64rem; font-weight: 700; color: #ffffff;
    transition: width 0.8s ease;
}
.vz-fill.good { background: #00aa44; }
.vz-fill.bad { background: #555555; }
.vz-rank { list-style: none; margin-top: 10px; }
.vz-rank li {
    display: flex; align-items: center; gap: 8px; padding: 5px 0;
    border-bottom: 1px solid #2a2a2a; font-size: 0.72rem; color: #ffffff;
}
.vz-rank li b { width: 16px; color: #999999; }
.vz-rank li .vz-av { width: 24px; height: 24px; margin: 0; font-size: 0.62rem; border-width: 1px; }
.vz-rank li em { margin-left: auto; font-style: normal; font-weight: 700; color: #bbbbbb; }

/* Écran de fin */
.vz-end { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.vz-end-logo { width: 54px; height: 54px; border-radius: 50%; background: #ffffff; }
.vz-end-title { font-size: 1.05rem; font-weight: 800; color: #ffffff; letter-spacing: 1px; }
.vz-end .vz-wide { width: auto; padding: 10px 22px; }
.vz-pulse { animation: vzGlow 1.6s ease-in-out infinite; }

/* Téléphone participant */
.vz-phone {
    flex-direction: column; width: 220px; max-width: 64vw; height: 100%; max-height: 440px;
    padding: 8px; background: #111111; border: 2px solid #3a3a3a; border-radius: 28px;
}
.vz-phone-screen {
    flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative;
    background: #1a1a1a; border-radius: 20px; overflow: hidden;
}
.vz-phone-head {
    display: flex; align-items: center; gap: 6px; padding: 9px 10px;
    background: #141414; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; color: #ffffff; white-space: nowrap; overflow: hidden;
}
.vz-phone-head .vz-dot { width: 7px; height: 7px; }
.vz-phone-body {
    flex: 1; min-height: 0; position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 10px; text-align: center; font-size: 0.72rem; color: #bbbbbb;
}
.vz-ph-big { font-size: 0.86rem; font-weight: 700; color: #ffffff; }
.vz-phone-score { text-align: center; padding: 6px; background: #141414; border-top: 1px solid #2a2a2a; }
.vz-phone-score.hide { display: none; }
.vz-phone-score .l { font-size: 0.54rem; color: #777777; text-transform: uppercase; letter-spacing: 1px; }
.vz-phone-score .v { font-size: 1.15rem; font-weight: 800; color: #ffffff; }

.vz-cam {
    position: relative; width: 82%; aspect-ratio: 1 / 1; border-radius: 12px; background: #2a2a2a;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.vz-cam .vz-qr { width: 58%; }
.vz-cam i { position: absolute; width: 18px; height: 18px; border-color: #ffffff; border-style: solid; border-width: 0; }
.vz-cam i:nth-child(1) { top: 8px; left: 8px; border-top-width: 2px; border-left-width: 2px; }
.vz-cam i:nth-child(2) { top: 8px; right: 8px; border-top-width: 2px; border-right-width: 2px; }
.vz-cam i:nth-child(3) { bottom: 8px; left: 8px; border-bottom-width: 2px; border-left-width: 2px; }
.vz-cam i:nth-child(4) { bottom: 8px; right: 8px; border-bottom-width: 2px; border-right-width: 2px; }
.vz-scan { position: absolute; left: 10%; right: 10%; height: 2px; background: rgba(255,255,255,0.7); animation: vzScan 1.4s ease-in-out infinite; }
.vz-notif {
    position: absolute; top: 8px; left: 8px; right: 8px; padding: 8px 10px; text-align: left;
    background: #ffffff; color: #000000; border-radius: 10px; font-size: 0.66rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5); animation: vzDrop 0.35s ease;
}
.vz-notif b { display: block; font-size: 0.7rem; }

.vz-join { width: 100%; text-align: left; }
.vz-join .vz-ph-big { text-align: center; margin-bottom: 8px; }
.vz-avatars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 4px 0 10px; }
.vz-avatars span { aspect-ratio: 1 / 1; border-radius: 50%; border: 2px solid transparent; }
.vz-avatars span.on { border-color: #ffffff; }

.vz-spinner {
    width: 26px; height: 26px; border-radius: 50%;
    border: 3px solid #3a3a3a; border-top-color: #ffffff; animation: vzSpin 0.9s linear infinite;
}
.vz-qdisp { width: 100%; padding: 7px 8px; background: #2a2a2a; border: 1px solid #3a3a3a; border-radius: 10px; }
.vz-qdisp h5 { font-size: 0.56rem; color: #999999; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.vz-qdisp p { font-size: 0.7rem; color: #ffffff; }

.vz-buzz {
    width: 116px; height: 116px; border-radius: 50%; border: none; cursor: pointer; margin: 8px 0 4px;
    background: radial-gradient(circle at 40% 35%, #ff4444, #cc0000 50%, #880000);
    box-shadow: 0 6px 0 #550000, 0 0 0 10px #222222, 0 10px 22px rgba(0,0,0,0.6);
    -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 0.1s;
}
.vz-buzz:active { transform: translateY(3px); }
.vz-buzz.off { background: radial-gradient(circle at 40% 35%, #555555, #333333 50%, #222222); box-shadow: 0 6px 0 #111111, 0 0 0 10px #222222; cursor: default; }
.vz-buzz.done { background: radial-gradient(circle at 40% 35%, #eeeeee, #bbbbbb 50%, #888888); box-shadow: 0 6px 0 #555555, 0 0 0 10px #222222; transform: scale(0.95); }
.vz-buzz.hint { animation: vzHint 1.2s ease-in-out infinite; }
.vz-status { font-size: 0.78rem; font-weight: 600; color: #999999; }

/* Appui simulé */
.vz-press { animation: vzPress 0.5s ease; }

/* Feuille d'explication */
.vz-sheet {
    background: #1a1a1a; border-top: 1px solid #2a2a2a;
    padding: 14px 16px; padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
.vz-sheet-inner { max-width: 660px; margin: 0 auto; }
.vz-dots { display: flex; gap: 5px; margin-bottom: 10px; }
.vz-dots span { flex: 1; max-width: 34px; height: 4px; border-radius: 2px; background: #3a3a3a; }
.vz-dots span.on { background: #ffffff; }
.vz-step-title { font-size: 1.1rem; font-weight: 800; color: #ffffff; margin-bottom: 6px; }
.vz-step-text { font-size: 0.93rem; line-height: 1.55; color: #bbbbbb; margin-bottom: 12px; max-height: 26vh; overflow-y: auto; }
.vz-nav { display: flex; gap: 10px; }
.vz-nav button {
    flex: 1; min-height: 48px; border-radius: 8px; cursor: pointer;
    font-size: 0.88rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.vz-prev { background: #2a2a2a; color: #ffffff; border: 1px solid #555555; }
.vz-prev[disabled] { opacity: 0.35; cursor: default; }
.vz-next { background: #ffffff; color: #000000; border: 1px solid #ffffff; }

/* Animations */
@keyframes vzBlink { 50% { opacity: 0; } }
@keyframes vzIn { from { opacity: 0; transform: translateY(8px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes vzPop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes vzFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vzDrop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes vzSpin { to { transform: rotate(360deg); } }
@keyframes vzScan { 0%, 100% { top: 14%; } 50% { top: 84%; } }
@keyframes vzPress { 0% { transform: scale(1); } 40% { transform: scale(0.92); box-shadow: 0 0 0 4px rgba(255,255,255,0.35); } 100% { transform: scale(1); } }
@keyframes vzHint { 50% { box-shadow: 0 6px 0 #550000, 0 0 0 10px #222222, 0 0 0 20px rgba(255,68,68,0.25); } }
@keyframes vzGlow { 50% { box-shadow: 0 0 0 6px rgba(255,255,255,0.18); } }

/* Ordinateur et tablette : les deux écrans côte à côte */
@media (min-width: 860px) {
    .vz-switch { display: none; }
    .vz-device { display: flex; }
    .vz-device:not(.show) { opacity: 0.6; transform: scale(0.97); }
    .vz-stage { padding: 20px 28px; gap: 36px; }
    .vz-host { max-width: 660px; max-height: 480px; }
    .vz-phone { width: 240px; max-height: 480px; }
    .vz-step-title { font-size: 1.2rem; }
    .vz-step-text { font-size: 1rem; }
}

/* Petits téléphones en hauteur */
@media (max-height: 640px) {
    .vz-step-text { font-size: 0.86rem; max-height: 22vh; }
    .vz-sheet { padding-top: 10px; }
    .vz-buzz { width: 96px; height: 96px; }
    .vz-sub { margin-bottom: 6px; }
    .vz-bar { margin-bottom: 4px; }
    .vz-rank { margin-top: 6px; }
    .vz-rank li { padding: 3px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .vz-overlay *, .vz-overlay *::before, .vz-overlay *::after { animation: none !important; transition: none !important; }
}
