/* ============================================
   MURDER PARTY — Dark Murder Mystery UI
   ============================================ */

:root {
    /* Palette — scène de crime nocturne */
    --bg:           #07070f;
    --surface:      #0d0d1a;
    --surface-2:    #141424;
    --surface-3:    #1c1c2e;
    --border:       #252538;
    --border-lit:   #3d1a1a;

    /* Accent — rouge sang */
    --accent:       #c0392b;
    --accent-dim:   #7b241c;
    --accent-glow:  rgba(192,57,43,0.22);
    --accent-soft:  rgba(192,57,43,0.08);

    /* Texte */
    --text:         #eae5dc;
    --text-dim:     #9e9890;
    --muted:        #52526a;

    /* Sémantique */
    --green:        #27ae60;
    --green-soft:   rgba(39,174,96,0.12);

    /* Typographie */
    --font-body:    'Inter', system-ui, sans-serif;
    --font-serif:   'Crimson Text', Georgia, serif;
    --font-display: 'Special Elite', 'Crimson Text', serif;

    /* Layout */
    --nav-h:        64px;
    --safe-bottom:  env(safe-area-inset-bottom, 0px);

    /* Rayons */
    --r-sm:  8px;
    --r-md:  14px;
    --r-lg:  20px;

    /* Courbes d'accélération */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out:    cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overscroll-behavior: none;
    background-image:
        radial-gradient(ellipse 70% 40% at 50% -5%, rgba(192,57,43,.07) 0%, transparent 65%),
        radial-gradient(ellipse 50% 35% at 80% 110%, rgba(20,10,30,.9) 0%, transparent 70%);
}

/* Grain cinématographique */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.022;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================
   KEYFRAMES — animations d'enquête
   ============================================ */

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes progressFill {
    from { width: 0; }
}
@keyframes dotPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50%       { transform: translateX(-50%) scale(1.7); opacity: 0.6; }
}
@keyframes revealBadge {
    from { opacity: 0; transform: scale(0.75) translateY(-6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}
@keyframes scannerLaserScan {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(220px); }
    100% { transform: translateY(0); }
}

/* ============================================
   PLAY SHELL
   ============================================ */

.play-body { background: var(--bg); }

.play-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.play-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 0.5rem);
}

/* ============================================
   FLASH MESSAGES
   ============================================ */

.play-flash {
    margin: 0.75rem 1rem 0;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}
.play-flash--success { background: rgba(39,174,96,.15); border: 1px solid rgba(39,174,96,.3); color: #2ecc71; }
.play-flash--error   { background: rgba(192,57,43,.15); border: 1px solid rgba(192,57,43,.3); color: #e74c3c; }
.play-flash--info    { background: rgba(52,152,219,.15); border: 1px solid rgba(52,152,219,.3); color: #3498db; }

/* ============================================
   BOTTOM NAV
   ============================================ */

.play-nav {
    position: fixed;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(10,10,20,0.93);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -1px 0 rgba(192,57,43,.12), 0 -24px 48px rgba(0,0,0,.6);
    display: flex;
    z-index: 100;
}

.play-nav-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--muted);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-body);
    min-height: 44px;
}
.play-nav-item:hover { color: var(--text-dim); text-decoration: none; }
.play-nav-item.active { color: var(--accent); }

/* Point indicateur glow sur item actif */
.play-nav-item.active::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 7px var(--accent), 0 0 14px var(--accent-glow);
    animation: dotPulse 2.5s ease-in-out infinite;
}

.nav-icon {
    font-size: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    transition: transform 0.2s var(--ease-spring);
}
.play-nav-item.active .nav-icon,
.play-nav-item:active .nav-icon { transform: scale(1.1); }
.nav-label { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* ============================================
   PLAY PAGE STRUCTURE
   ============================================ */

.play-page {
    padding: 1.25rem 1rem 0.5rem;
}

/* Animations d'entrée échalônnées */
.play-page > * {
    animation: fadeSlideUp 0.4s ease-out backwards;
}
.play-page > *:nth-child(1) { animation-delay: 0.04s; }
.play-page > *:nth-child(2) { animation-delay: 0.09s; }
.play-page > *:nth-child(3) { animation-delay: 0.14s; }
.play-page > *:nth-child(4) { animation-delay: 0.19s; }
.play-page > *:nth-child(5) { animation-delay: 0.23s; }
.play-page > *:nth-child(6) { animation-delay: 0.27s; }

.play-page-header {
    margin-bottom: 1.5rem;
}

.play-page-title {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.play-page-subtitle {
    color: var(--text-dim);
    font-size: 0.875rem;
    margin-top: 0.35rem;
    font-family: var(--font-serif);
    font-style: italic;
}

/* ============================================
   CARDS
   ============================================ */

.play-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1rem 1.125rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.play-card:hover { border-color: rgba(255,255,255,0.1); }

.play-card--accent {
    border-color: var(--border-lit);
    background: var(--accent-soft);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ============================================
   HOME PAGE
   ============================================ */

.play-home {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.play-home::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 55% at 50% -5%, rgba(192,57,43,.18) 0%, transparent 65%),
        radial-gradient(ellipse 60% 40% at 50% 105%, rgba(0,0,0,.85) 0%, transparent 70%);
    pointer-events: none;
}

.play-home > * { position: relative; z-index: 1; }

.play-home-hero {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeSlideUp 0.6s ease-out both;
}

.play-home-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 28px rgba(192,57,43,.55)) drop-shadow(0 4px 12px rgba(0,0,0,.7));
    animation: fadeIn 0.8s ease-out 0.1s both;
}

.play-home-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text);
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0,0,0,.8);
    animation: fadeSlideUp 0.6s ease-out 0.15s both;
}

.play-home-sub {
    color: var(--text-dim);
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-family: var(--font-serif);
    font-style: italic;
    animation: fadeIn 0.6s ease-out 0.3s both;
}

/* Carte de rejoindre */
.join-card {
    width: 100%;
    background: rgba(13,13,26,0.82);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    animation: fadeSlideUp 0.5s ease-out 0.2s both;
    box-shadow: 0 24px 64px rgba(0,0,0,.55);
    backdrop-filter: blur(8px);
}

.join-form { width: 100%; }

.join-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.join-input-wrapper { margin-bottom: 1.25rem; }

.join-input {
    width: 100%;
    padding: 1rem 0.75rem;
    background: var(--surface-2);
    border: 2px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-size: 1.9rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 0.5em;
    text-align: center;
    text-transform: uppercase;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    /* Diviseurs visuels entre les 6 cases */
    background-image:
        repeating-linear-gradient(
            to right,
            transparent,
            transparent calc(16.6% - 1px),
            rgba(255,255,255,0.06) calc(16.6% - 1px),
            rgba(255,255,255,0.06) 16.6%
        ),
        linear-gradient(var(--surface-2), var(--surface-2));
}
.join-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.join-input::placeholder { color: var(--muted); letter-spacing: 0.4em; }

.join-hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.74rem;
    margin-top: 0.5rem;
}

.join-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #9b1f15 100%);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    cursor: pointer;
    min-height: 54px;
    box-shadow: 0 4px 22px rgba(192,57,43,.4);
    transition: transform 0.15s var(--ease-spring), box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.join-btn:hover { box-shadow: 0 6px 28px rgba(192,57,43,.55); }
.join-btn:active { transform: scale(0.97); box-shadow: 0 2px 10px rgba(192,57,43,.3); }

.play-admin-link {
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.8rem;
    text-decoration: none;
    animation: fadeIn 0.6s ease-out 0.5s both;
    transition: color 0.2s;
}
.play-admin-link:hover { color: var(--text-dim); }

/* ============================================
   DASHBOARD STATS
   ============================================ */

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.stat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat-value { font-family: var(--font-display); font-size: 1.1rem; font-weight: 400; }

.progress-bar {
    height: 4px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--accent-dim), var(--accent));
    border-radius: 99px;
    animation: progressFill 0.8s ease-out 0.3s both;
    transition: width 0.4s ease;
}

.suspect-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-dim);
}
.suspect-avatar-emoji { font-size: 2.5rem; }

.plan-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.quick-action-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1rem 0.75rem;
    color: var(--text);
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: border-color 0.2s, background 0.2s, transform 0.15s var(--ease-spring);
    min-height: 72px;
}
.quick-action-btn:hover {
    border-color: var(--accent-dim);
    background: var(--accent-soft);
    text-decoration: none;
    transform: translateY(-2px);
}
.quick-action-btn:active { transform: scale(0.97); }

.leave-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.6rem 1.5rem;
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: color 0.15s, border-color 0.15s;
    min-height: 44px;
}
.leave-btn:hover { color: #f27469; border-color: rgba(231,76,60,.4); }

/* ============================================
   CLUE REVEAL
   ============================================ */

.clue-reveal {
    padding: 0.5rem 0 1.5rem;
}

.clue-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    border-radius: 99px;
    padding: 0.3rem 0.9rem;
    margin-bottom: 1.25rem;
    animation: revealBadge 0.4s var(--ease-spring) 0.1s both;
    background: var(--accent-soft);
}
.clue-badge::before { content: '●'; font-size: 0.55rem; animation: blink 1.5s ease-in-out infinite; }

.clue-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeSlideUp 0.5s ease-out 0.15s both;
}

.clue-text-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 1.25rem 1.5rem;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text);
    animation: fadeSlideUp 0.5s ease-out 0.25s both;
}

.clue-image-wrap {
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    animation: fadeSlideUp 0.5s ease-out 0.2s both;
    box-shadow: 0 4px 30px rgba(0,0,0,.5);
}
.clue-image { width: 100%; display: block; }

.clue-video-wrap {
    position: relative;
    padding-top: 56.25%;
    border-radius: var(--r-md);
    overflow: hidden;
    animation: fadeSlideUp 0.5s ease-out 0.2s both;
}
.clue-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ============================================
   SUSPECTS
   ============================================ */

.suspects-grid {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.suspect-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-spring);
}
.suspect-card:hover {
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.suspect-card--accused {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 22px var(--accent-glow);
}
    gap: 1rem;
    align-items: flex-start;
    transition: border-color 0.15s;
}

.suspect-card--accused {
    border-color: var(--accent);
    background: rgba(192,57,43,.06);
}

.suspect-photo-wrap { position: relative; flex-shrink: 0; width: 84px; }

.suspect-photo {
    width: 84px;
    height: 100px;
    object-fit: cover;
    display: block;
    border-right: 1px solid var(--border);
}
.suspect-photo--placeholder {
    width: 84px;
    height: 100px;
    background: var(--surface-2);
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.suspect-accused-badge {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: var(--accent);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 99px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 0 8px var(--accent-glow);
}

.suspect-info { flex: 1; padding: 0.875rem 1rem; display: flex; flex-direction: column; justify-content: center; }

.suspect-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.suspect-desc {
    color: var(--text-dim);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    font-family: var(--font-serif);
    font-style: italic;
}

.accuse-btn {
    background: rgba(192,57,43,.1);
    border: 1px solid var(--accent-dim);
    color: var(--text);
    padding: 0.45rem 0.9rem;
    border-radius: var(--r-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.15s, transform 0.15s var(--ease-spring);
    width: 100%;
    min-height: 44px;
}
.accuse-btn:hover { background: rgba(192,57,43,.2); }
.accuse-btn:active { transform: scale(0.97); }

/* ============================================
   NOTES
   ============================================ */

.note-form-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.note-textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font-body);
    padding: 0.7rem 0.9rem;
    resize: none;
    line-height: 1.5;
}
.note-textarea:focus { outline: none; border-color: var(--accent); }

.photo-capture-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.875rem;
    cursor: pointer;
    min-height: 48px;
    transition: border-color 0.15s, color 0.15s;
}
.photo-capture-label:hover { border-color: var(--accent); color: var(--text); }

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.note-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.2s;
}
.note-item:hover { border-color: rgba(255,255,255,0.1); }

.note-photo {
    width: 100%;
    display: block;
    max-height: 280px;
    object-fit: cover;
}

.note-content {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-top: 1px solid var(--border);
}

.note-date { font-size: 0.75rem; color: var(--muted); }

.note-delete-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    min-height: 32px; min-width: 32px;
}
.note-delete-btn:hover { color: #e74c3c; background: rgba(231,76,60,.1); }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}
.empty-state-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }

/* ============================================
   BUTTONS
   ============================================ */

.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.25rem;
    border-radius: var(--r-md);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    border: none;
    cursor: pointer;
    min-height: 50px;
    transition: transform 0.15s var(--ease-spring), box-shadow 0.2s, opacity 0.15s;
    letter-spacing: 0.02em;
}
.play-btn--primary {
    background: linear-gradient(135deg, var(--accent) 0%, #9b1f15 100%);
    color: #fff;
    box-shadow: 0 3px 15px var(--accent-glow);
}
.play-btn--primary:hover { box-shadow: 0 5px 22px rgba(192,57,43,.5); text-decoration: none; color: #fff; }
.play-btn--secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.play-btn--secondary:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.play-btn:active { transform: scale(0.97); }

/* ============================================
   SCANNER OVERLAY
   ============================================ */

.scanner-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.scanner-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: #fff;
    font-size: 0.9rem;
    background: rgba(0,0,0,.6);
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}

.scanner-close {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    min-width: 38px;
}
.scanner-close:hover { background: rgba(255,255,255,.2); }

.scanner-viewfinder {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.scanner-viewfinder video {
    width: 100%; height: 100%;
    object-fit: cover;
}

.scanner-frame {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 230px; height: 230px;
    border: none;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
}

/* Coins d'encadrement */
.scanner-frame::before,
.scanner-frame::after {
    content: '';
    position: absolute;
    width: 36px; height: 36px;
    border-color: var(--accent);
    border-style: solid;
}
.scanner-frame::before {
    top: -2px; left: -2px;
    border-width: 3px 0 0 3px;
    border-radius: 4px 0 0 0;
}
.scanner-frame::after {
    bottom: -2px; right: -2px;
    border-width: 0 3px 3px 0;
    border-radius: 0 0 4px 0;
}

/* Ligne laser animée */
.scanner-laser {
    position: absolute;
    top: calc(50% - 113px);
    left: 50%;
    margin-left: -113px;
    width: 226px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
    box-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-glow);
    animation: scannerLaserScan 2.5s ease-in-out infinite;
}

.scanner-hint {
    padding: 1rem;
    text-align: center;
    color: rgba(255,255,255,.5);
    font-size: 0.82rem;
    background: rgba(0,0,0,.6);
    font-family: var(--font-serif);
    font-style: italic;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 481px) {
    .play-shell { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
    .play-nav { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ============================================
   CLUES LIST — timeline d’enquête
   ============================================ */

.clues-list { position: relative; padding-left: 0; }

/* Fil vertical de la timeline */
.clues-list::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0.8rem;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent-dim) 0%, transparent 100%);
    pointer-events: none;
}

.clue-card {
    position: relative;
    margin-left: 40px;
    margin-bottom: 1rem;
}

/* Point sur la timeline */
.clue-card::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
    box-shadow: 0 0 6px var(--accent-glow);
}

.clue-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.clue-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.3;
    flex: 1;
    letter-spacing: 0.01em;
}

.clue-type-badge {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.clue-found-at {
    color: var(--muted);
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.04em;
    white-space: nowrap;
    margin-top: 0.1rem;
}

.clue-content-text {
    color: var(--text-dim);
    font-size: 0.875rem;
    line-height: 1.6;
    font-family: var(--font-serif);
    font-style: italic;
    margin-top: 0.4rem;
}

.clue-type-text  { color: var(--muted); }
.clue-type-image { color: #a78bfa; }
.clue-type-video { color: #f87171; }

/* ============================================
   ACCESSIBILITÉ — reduced motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
