/**
 * Disney Queue App — Styles principaux
 * Thème : Ambiance Disney (bleu/violet, féerique)
 */

/* ============================================================
   CSS VARIABLES — Thème Disney
   ============================================================ */
:root {
    /* Couleurs principales */
    --color-bg-dark: #0d0520;
    --color-bg: #1a0a3e;
    --color-bg-light: #2a1555;
    --color-primary: #7b5ea7;
    --color-primary-light: #a78bda;
    --color-accent: #f0c27a;
    --color-accent-light: #ffecd2;
    --color-magic: #c084fc;
    --color-magic-glow: rgba(192, 132, 252, 0.4);

    /* Texte */
    --color-text: #f0e6ff;
    --color-text-muted: #9b8fbf;
    --color-text-dark: #1a0a3e;

    /* Statuts */
    --color-success: #4ade80;
    --color-error: #f87171;
    --color-warning: #fbbf24;

    /* Joueurs */
    --color-player-1: #60a5fa;
    --color-player-2: #f472b6;
    --color-player-3: #4ade80;
    --color-player-4: #fbbf24;

    /* Espacements */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Bordures */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;

    /* Ombres */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px var(--color-magic-glow);

    /* Typographie */
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Segoe UI', system-ui, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg-dark);
    color: var(--color-text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

a { color: var(--color-accent); text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--color-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-back {
    font-size: 1.4rem;
    color: var(--color-text);
    padding: var(--spacing-xs) var(--spacing-sm);
}

.header-score {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 0.9rem;
}

.player-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.player-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-magic {
    background: linear-gradient(135deg, var(--color-primary), var(--color-magic));
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-magic:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: var(--color-bg-light);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-add {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: var(--color-text-dark);
    border: none;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-md);
}

.modal-content {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-card);
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-bg-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 1rem;
    font-family: var(--font-main);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-magic);
    box-shadow: 0 0 0 2px var(--color-magic-glow);
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }

.error-message {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
}

.state-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-muted);
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    padding: var(--spacing-xs);
}

.notif-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-error);
    color: white;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.notifications-panel {
    position: fixed;
    top: 60px;
    right: var(--spacing-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    max-height: 300px;
    overflow-y: auto;
    width: 280px;
    z-index: 200;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================
   PAUSE OVERLAY
   ============================================================ */
.pause-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 5, 32, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pause-content {
    text-align: center;
}

.pause-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    animation: pulse 2s infinite;
}

/* ============================================================
   STREAK INDICATOR
   ============================================================ */
.streak-indicator {
    position: fixed;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    background: linear-gradient(135deg, #ff6b35, #fbbf24);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    z-index: 50;
}

/* ============================================================
   RÉACTIONS
   ============================================================ */
.reactions-bar {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    margin-top: var(--spacing-sm);
}

.reaction-btn {
    background: var(--color-bg-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.reaction-btn.active {
    border-color: var(--color-magic);
    background: rgba(192, 132, 252, 0.2);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}
