/**
 * UNDERCOVER GAME - Gaming Theme
 * Charte graphique unifiée pour toutes les pages
 * Version: 1.0
 */

:root {
    /* Couleurs primaires gaming */
    --bg-dark-1: #0f0c29;
    --bg-dark-2: #302b63;
    --bg-dark-3: #24243e;

    --primary-blue: #3498db;
    --primary-purple: #9b59b6;
    --primary-red: #e74c3c;
    --primary-green: #2ecc71;
    --primary-orange: #e67e22;

    --text-white: #ecf0f1;
    --text-muted: #bdc3c7;
    --text-dark: #2c3e50;

    /* Espacements responsive */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Polices responsive */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 3rem;
    --font-size-4xl: 4rem;
}

/* Reset global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark-1) 0%, var(--bg-dark-2) 50%, var(--bg-dark-3) 100%);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-white);
    line-height: 1.6;
}

/* Container responsive */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm);
}

@media (min-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: var(--spacing-lg);
    }
}

/* ============================================
   NAVBAR GAMING
   ============================================ */
nav {
    background: rgba(0, 0, 0, 0.75) !important; /* Optimisé Firefox : rgba au lieu de backdrop-filter */
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
    padding: var(--spacing-sm) var(--spacing-md) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-md) !important;
    margin: 0 !important;
    padding: 0 !important;
}

nav ul:first-child {
    flex: 1;
}

nav li {
    list-style: none !important;
    margin: 0 !important;
}

nav a {
    color: var(--text-white) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 0.5rem;
}

nav a:hover {
    background: rgba(52, 152, 219, 0.2);
    color: var(--primary-blue) !important;
}

nav strong {
    font-size: var(--font-size-lg);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 1024px) {
    nav {
        padding: var(--spacing-sm) var(--spacing-lg) !important;
    }

    nav strong {
        font-size: var(--font-size-xl);
    }
}

/* ============================================
   BOUTONS GAMING
   ============================================ */
.btn-gaming {
    position: relative;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-base);
    font-weight: 700;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-gaming:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-gaming:active {
    transform: translateY(-1px);
}

.btn-gaming-primary {
    background: linear-gradient(135deg, var(--primary-red), #c0392b);
    color: white !important;
}

.btn-gaming-secondary {
    background: linear-gradient(135deg, var(--primary-blue), #2980b9);
    color: white !important;
}

.btn-gaming-success {
    background: linear-gradient(135deg, var(--primary-green), #27ae60);
    color: white !important;
}

.btn-gaming-warning {
    background: linear-gradient(135deg, var(--primary-orange), #d35400);
    color: white !important;
}

.btn-gaming-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue) !important;
}

.btn-gaming-outline:hover {
    background: var(--primary-blue);
    color: white !important;
}

.btn-gaming-small {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

.btn-gaming-large {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

/* ============================================
   CARDS GAMING
   ============================================ */
.card-gaming {
    background: rgba(0, 0, 0, 0.65); /* Optimisé Firefox : rgba au lieu de backdrop-filter */
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 1rem;
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card-gaming:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 152, 219, 0.6);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.card-gaming-no-hover {
    background: rgba(0, 0, 0, 0.65); /* Optimisé Firefox : rgba au lieu de backdrop-filter */
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 1rem;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ============================================
   INPUTS GAMING
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 0.5rem;
    color: var(--text-white);
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   HERO GAMING
   ============================================ */
.hero-gaming {
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-sm);
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    /* Fond moderne statique : Nébuleuse fixe (Blue/Purple) sur base sombre */
    background: 
        radial-gradient(circle at 0% 0%, rgba(52, 152, 219, 0.15) 0%, transparent 50%), 
        radial-gradient(circle at 100% 100%, rgba(155, 89, 182, 0.15) 0%, transparent 50%),
        #0b0c10; 
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--spacing-md);
    z-index: 0;
}

/* Animation Nébuleuse Rotative */
.hero-gaming > * {
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .hero-gaming {
        padding: var(--spacing-md) var(--spacing-md); /* Tablette */
    }
}

@media (min-width: 1024px) {
    .hero-gaming {
        border-radius: 1.5rem;
        margin-bottom: var(--spacing-lg);
    }
}

.hero-gaming h1 {
    font-size: 1.75rem; /* Mobile - compact */
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 50%, var(--primary-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-gaming p {
    font-size: var(--font-size-sm); /* Mobile - compact */
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

@media (min-width: 768px) {
    .hero-gaming h1 {
        font-size: 2.25rem; /* Tablette */
        margin-bottom: var(--spacing-md);
    }

    .hero-gaming p {
        font-size: var(--font-size-base); /* Tablette */
        margin-bottom: var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    .hero-gaming h1 {
        font-size: 2.75rem; /* Desktop - réduit de 4rem à 2.75rem */
    }

    .hero-gaming p {
        font-size: var(--font-size-lg); /* Desktop */
    }
}

/* ============================================
   PLAYER CARDS (pour lobby/game)
   ============================================ */
.player-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-sm);
}

.player-card:hover {
    border-color: rgba(52, 152, 219, 0.6);
    transform: translateX(5px);
}

.player-card img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(52, 152, 219, 0.5);
}

.player-card-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-white);
}

.player-card-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.badge-host {
    background: linear-gradient(135deg, var(--primary-orange), #d35400);
    color: white;
}

.badge-local {
    background: linear-gradient(135deg, var(--primary-green), #27ae60);
    color: white;
}

.badge-remote {
    background: linear-gradient(135deg, var(--primary-blue), #2980b9);
    color: white;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }

.w-full { width: 100%; }

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    border: 3px solid rgba(52, 152, 219, 0.3);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: var(--spacing-md) auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE GRID
   ============================================ */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.badge-blue {
    background: rgba(52, 152, 219, 0.3);
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.badge-green {
    background: rgba(46, 204, 113, 0.3);
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
}

.badge-red {
    background: rgba(231, 76, 60, 0.3);
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

.badge-purple {
    background: rgba(155, 89, 182, 0.3);
    color: var(--primary-purple);
    border: 1px solid var(--primary-purple);
}

/* ============================================
   MODALS
   ============================================ */
.modal-pass-device-avatar {
    width: 120px;
    height: 120px;
    border-radius: 8px; /* Square with rounded corners */
    object-fit: cover;
    border: 3px solid var(--primary-blue);
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

/* ============================================
   RANGE INPUTS (Sliders/Curseurs)
   ============================================ */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 90%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    outline: none;
    margin: 0.5rem auto;
    display: block;
}

/* Track (la barre) */
input[type="range"]::-webkit-slider-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
}

input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
}

/* Thumb (le curseur) - TRÈS VISIBLE */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ffff 0%, #00ccff 100%);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 255, 255, 0.4);
    transition: all 0.2s ease;
    margin-top: -10px;
}

input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ffff 0%, #00ccff 100%);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 255, 255, 0.4);
    transition: all 0.2s ease;
}

/* Focus state - encore plus visible */
input[type="range"]:focus::-webkit-slider-thumb {
    background: linear-gradient(135deg, #33ffff 0%, #33ddff 100%);
    box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.3), 0 3px 12px rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

input[type="range"]:focus::-moz-range-thumb {
    background: linear-gradient(135deg, #33ffff 0%, #33ddff 100%);
    box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.3), 0 3px 12px rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Hover state - effet de glow */
input[type="range"]:hover::-webkit-slider-thumb {
    background: linear-gradient(135deg, #33ffff 0%, #33ddff 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 255, 255, 0.6);
    transform: scale(1.05);
}

input[type="range"]:hover::-moz-range-thumb {
    background: linear-gradient(135deg, #33ffff 0%, #33ddff 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 255, 255, 0.6);
    transform: scale(1.05);
}

