/* ============================================================
   L'Infiltré — Spy / Detective Theme CSS
   ============================================================ */

/* ─── Base & Variables ──────────────────────────────── */
:root {
    --inf-bg:       #0a0e17;
    --inf-card:     #111827;
    --inf-surface:  #1a2332;
    --inf-accent:   #10b981;
    --inf-accent2:  #06d6a0;
    --inf-danger:   #ef4444;
    --inf-warning:  #f59e0b;
    --inf-gold:     #f5c518;
    --inf-spy:      #8b5cf6;
    --inf-glow:     0 0 20px rgba(16, 185, 129, 0.3);
    --inf-glow-danger: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* ─── Scan Lines Overlay (désactivé — causait du flou mobile) ─── */
.inf-scanlines {
    position: relative;
    z-index: 0;
}

/* ─── Mission Card ──────────────────────────────────── */
.inf-mission-card {
    background: linear-gradient(135deg, var(--inf-surface), var(--inf-card));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.inf-mission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--inf-accent), transparent);
    animation: inf-scan 3s linear infinite;
}
@keyframes inf-scan {
    0%   { left: -100%; }
    100% { left: 100%; }
}

.inf-mission-card.inf-mission-photo {
    border-color: rgba(139, 92, 246, 0.3);
}
.inf-mission-card.inf-mission-photo::before {
    background: linear-gradient(90deg, transparent, var(--inf-spy), transparent);
}

/* ─── Mission Type Badge ────────────────────────────── */
.inf-badge-social {
    background: rgba(16, 185, 129, 0.15);
    color: var(--inf-accent);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.inf-badge-photo {
    background: rgba(139, 92, 246, 0.15);
    color: var(--inf-spy);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Timer Ring ────────────────────────────────────── */
.inf-timer {
    position: relative;
    width: 80px;
    height: 80px;
}
.inf-timer-ring {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}
.inf-timer-ring circle {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
}
.inf-timer-ring .inf-ring-bg {
    stroke: rgba(255,255,255,0.05);
}
.inf-timer-ring .inf-ring-fill {
    stroke: var(--inf-accent);
    transition: stroke-dashoffset 1s linear, stroke 0.5s ease;
}
.inf-timer-ring .inf-ring-fill.inf-timer-warning {
    stroke: var(--inf-warning);
}
.inf-timer-ring .inf-ring-fill.inf-timer-danger {
    stroke: var(--inf-danger);
    animation: inf-pulse-ring 1s ease-in-out infinite;
}
.inf-timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: white;
}
@keyframes inf-pulse-ring {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* ─── BUZZ Button ───────────────────────────────────── */
.inf-buzz-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 2rem;
    border-radius: 1rem;
    border: 2px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.3),
                inset 0 1px 0 rgba(255,255,255,0.15);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.inf-buzz-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}
.inf-buzz-btn:hover::after {
    opacity: 1;
}
.inf-buzz-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.5),
                inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ─── Player Cards (Lobby & Buzz Target) ────────────── */
.inf-player-card {
    background: var(--inf-surface);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}
.inf-player-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}
.inf-player-card.inf-player-host {
    border-color: rgba(245, 197, 24, 0.3);
}
.inf-player-card.inf-player-demasked {
    opacity: 0.4;
    border-color: rgba(239, 68, 68, 0.2);
}

.inf-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--inf-accent), #059669);
    color: white;
    flex-shrink: 0;
}
.inf-avatar-demasked {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* ─── Suspect Target (Buzz page) ────────────────────── */
.inf-suspect-card {
    background: var(--inf-surface);
    border: 2px solid rgba(255,255,255,0.05);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.inf-suspect-card:hover {
    border-color: var(--inf-danger);
    background: rgba(239, 68, 68, 0.05);
    box-shadow: var(--inf-glow-danger);
}
.inf-suspect-card.selected {
    border-color: var(--inf-danger);
    background: rgba(239, 68, 68, 0.1);
    box-shadow: var(--inf-glow-danger);
    transform: scale(1.02);
}

/* ─── Buzz Notification Overlay ─────────────────────── */
.inf-buzz-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    animation: inf-overlay-in 0.3s ease;
}
.inf-buzz-overlay.visible {
    display: flex;
}
@keyframes inf-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.inf-buzz-result {
    text-align: center;
    padding: 2rem;
    max-width: 340px;
    width: 90%;
    animation: inf-result-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes inf-result-pop {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.inf-buzz-success {
    color: var(--inf-accent2);
}
.inf-buzz-fail {
    color: var(--inf-danger);
}
.inf-buzz-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: inf-bounce 0.6s ease;
}
@keyframes inf-bounce {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ─── QR Code Container ────────────────────────────── */
.inf-qr-box {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    display: inline-block;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

/* ─── Score Pill ────────────────────────────────────── */
.inf-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(16, 185, 129, 0.12);
    color: var(--inf-accent2);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ─── Leaderboard ───────────────────────────────────── */
.inf-lb-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--inf-surface);
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.03);
    transition: background 0.2s;
}
.inf-lb-row:first-child {
    background: linear-gradient(135deg, rgba(245, 197, 24, 0.1), var(--inf-surface));
    border-color: rgba(245, 197, 24, 0.2);
}
.inf-lb-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.inf-lb-row:nth-child(1) .inf-lb-rank { background: rgba(245, 197, 24, 0.2); color: #f5c518; }
.inf-lb-row:nth-child(2) .inf-lb-rank { background: rgba(192, 192, 192, 0.15); color: #c0c0c0; }
.inf-lb-row:nth-child(3) .inf-lb-rank { background: rgba(205, 127, 50, 0.15); color: #cd7f32; }

/* ─── Photo Gallery ─────────────────────────────────── */
.inf-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.inf-photo-item {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,0.05);
}
.inf-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.inf-photo-item:hover img {
    transform: scale(1.05);
}
.inf-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.4rem 0.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    font-size: 0.65rem;
    color: white;
    font-weight: 600;
}

/* ─── Log / Event Feed ──────────────────────────────── */
.inf-log-entry {
    padding: 0.5rem 0.75rem;
    border-left: 2px solid rgba(255,255,255,0.05);
    font-size: 0.8rem;
    color: #9ca3af;
}
.inf-log-entry.inf-log-buzz    { border-color: var(--inf-danger); }
.inf-log-entry.inf-log-mission { border-color: var(--inf-accent); }
.inf-log-entry.inf-log-system  { border-color: var(--inf-spy); }

/* ─── Animations ────────────────────────────────────── */
.inf-fade-in {
    animation: inf-fi 0.5s ease both;
}
@keyframes inf-fi {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.inf-pulse {
    animation: inf-pulse-a 2s ease-in-out infinite;
}
@keyframes inf-pulse-a {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

/* Slide in from right for new missions */
.inf-slide-in {
    animation: inf-slide 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes inf-slide {
    from { transform: translateX(30px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* Shake for buzz */
.inf-shake {
    animation: inf-shake-a 0.5s ease;
}
@keyframes inf-shake-a {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* ─── Upload Zone ───────────────────────────────────── */
.inf-upload-zone {
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(139, 92, 246, 0.03);
}
.inf-upload-zone:hover,
.inf-upload-zone.drag-over {
    border-color: var(--inf-spy);
    background: rgba(139, 92, 246, 0.08);
}
.inf-upload-zone img {
    max-height: 160px;
    border-radius: 0.5rem;
    margin: 0.5rem auto;
}

/* ─── HUD Bar ───────────────────────────────────────── */
.inf-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--inf-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.75rem;
    font-size: 0.75rem;
}
.inf-hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}
.inf-hud-value {
    font-weight: 800;
    font-size: 1rem;
    color: white;
}
.inf-hud-label {
    color: #6b7280;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Complete Button ───────────────────────────────── */
.inf-complete-btn {
    background: linear-gradient(135deg, var(--inf-accent), #059669);
    color: white;
    font-weight: 800;
    padding: 0.85rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    width: 100%;
}
.inf-complete-btn:hover {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}
.inf-complete-btn:active {
    transform: scale(0.97);
}
.inf-complete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── Lightbox (photo full-screen) ──────────────────── */
.inf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: inf-overlay-in 0.2s ease;
}
.inf-lightbox.visible {
    display: flex;
}
.inf-lightbox img {
    max-width: 92vw;
    max-height: 85vh;
    border-radius: 0.5rem;
    object-fit: contain;
}
