/* 
 * Disney Weekend App - CSS Global
 * Thème féerique et magique inspiré de Disneyland
 */

:root {
    --primary: #6C63FF;
    --primary-light: #8B85FF;
    --primary-dark: #5046E5;
    --secondary: #FF6B9D;
    --accent-gold: #FFD700;
    --accent-purple: #9D4EDD;
    --accent-blue: #00D9FF;
    --bg-dark: #0D0D1A;
    --bg-primary: #1A1A2E;
    --bg-secondary: #16213E;
    --bg-card: #242444;
    --bg-card-hover: #2D2D5A;
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8D1;
    --text-muted: #6B6B8C;
    --success: #00C853;
    --warning: #FFB300;
    --danger: #FF5252;
    --gradient-magic: linear-gradient(135deg, #6C63FF 0%, #FF6B9D 50%, #FFD700 100%);
    --gradient-fairy: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 8px rgba(108, 99, 255, 0.15);
    --shadow-md: 0 4px 16px rgba(108, 99, 255, 0.2);
    --shadow-lg: 0 8px 32px rgba(108, 99, 255, 0.25);
    --shadow-glow: 0 0 20px rgba(108, 99, 255, 0.4);
    --shadow-gold: 0 0 20px rgba(255, 215, 0, 0.4);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --border-radius-full: 9999px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --nav-height: 70px;
    --header-height: 60px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
    font-family: 'Quicksand', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    padding-top: var(--header-height);
    padding-bottom: calc(var(--nav-height) + 20px);
    line-height: 1.5;
}

#particles-js {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.magic-sparkles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 6px; height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: sparkle 3s infinite;
    box-shadow: 0 0 10px var(--accent-gold);
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0) translateY(0); }
    50% { opacity: 1; transform: scale(1) translateY(-20px); }
}

.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: linear-gradient(180deg, var(--bg-dark) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    z-index: var(--z-sticky);
}

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

.user-avatar-small {
    width: 40px; height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-gold);
    cursor: pointer;
    transition: var(--transition-normal);
}
.user-avatar-small:hover { transform: scale(1.1); box-shadow: var(--shadow-gold); }
.user-avatar-small img { width: 100%; height: 100%; object-fit: cover; }

.user-greeting { display: flex; flex-direction: column; line-height: 1.2; }
.greeting-text { font-size: 0.75rem; color: var(--text-muted); }
.user-name { font-size: 0.9rem; font-weight: 600; }

.header-center { position: absolute; left: 50%; transform: translateX(-50%); }
.logo-text {
    font-family: 'Pacifico', cursive;
    font-size: 1rem;
    background: var(--gradient-magic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right { display: flex; align-items: center; }

.notification-btn {
    position: relative;
    width: 44px; height: 44px;
    border: none;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-normal);
}
.notification-btn:hover { background: var(--bg-card-hover); transform: scale(1.05); }

.notification-badge {
    position: absolute;
    top: 0; right: 0;
    min-width: 18px; height: 18px;
    background: var(--danger);
    border-radius: var(--border-radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--bg-dark);
    border-top: 1px solid rgba(108, 99, 255, 0.2);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: var(--z-sticky);
    backdrop-filter: blur(20px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: var(--spacing-sm);
    transition: var(--transition-normal);
    position: relative;
    min-width: 60px;
}
.nav-item i { font-size: 1.4rem; margin-bottom: 2px; transition: var(--transition-normal); }
.nav-item span { font-size: 0.65rem; font-weight: 500; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: scale(1.2); filter: drop-shadow(0 0 8px var(--primary)); }
.nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 3px;
    background: var(--gradient-magic);
    border-radius: 0 0 4px 4px;
}
.nav-admin { color: var(--accent-gold); }
.nav-admin.active { color: var(--accent-gold); }
.nav-admin.active i { filter: drop-shadow(0 0 8px var(--accent-gold)); }

.main-content {
    position: relative;
    z-index: var(--z-base);
    padding: var(--spacing-md);
    max-width: 100%;
    min-height: calc(100vh - var(--header-height) - var(--nav-height));
}

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid rgba(108, 99, 255, 0.1);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: var(--transition-slow);
}
.card:hover::before { left: 100%; }

.card-magic {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
}
.card-magic::after {
    content: '✨';
    position: absolute;
    top: var(--spacing-md); right: var(--spacing-md);
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius-full);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}
.btn-primary {
    background: var(--gradient-magic);
    color: white;
    box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(108, 99, 255, 0.3);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: rgba(108, 99, 255, 0.1); color: var(--primary); }
.btn-text { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; padding: var(--spacing-xs) var(--spacing-sm); }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.btn-sm { padding: var(--spacing-sm) var(--spacing-md); font-size: 0.85rem; }
.btn-lg { padding: var(--spacing-lg) var(--spacing-xl); font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.bottom-sheet {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: var(--z-modal);
    pointer-events: none;
}
.bottom-sheet.active { pointer-events: all; }
.bottom-sheet-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: var(--transition-normal);
}
.bottom-sheet.active .bottom-sheet-backdrop { opacity: 1; }
.bottom-sheet-container {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
}
.bottom-sheet.active .bottom-sheet-container { transform: translateY(0); }
.bottom-sheet-handle { padding: var(--spacing-sm); display: flex; justify-content: center; }
.bottom-sheet-handle span { width: 40px; height: 4px; background: var(--text-muted); border-radius: var(--border-radius-full); }
.bottom-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--spacing-lg) var(--spacing-md); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.bottom-sheet-title { font-size: 1.2rem; font-weight: 600; }
.bottom-sheet-close { width: 36px; height: 36px; border: none; background: var(--bg-card); border-radius: 50%; color: var(--text-primary); cursor: pointer; }
.bottom-sheet-content { flex: 1; overflow-y: auto; padding: var(--spacing-lg); }
.bottom-sheet-footer { padding: var(--spacing-md) var(--spacing-lg); padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; gap: var(--spacing-sm); }
.bottom-sheet-footer .btn { flex: 1; }
.bottom-sheet[data-level="2"] .bottom-sheet-container { max-height: 80vh; }
.bottom-sheet[data-level="3"] .bottom-sheet-container { max-height: 70vh; }

.confirm-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: calc(var(--z-modal) + 10);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}
.confirm-modal-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); }
.confirm-modal-container {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.confirm-modal-icon {
    width: 64px; height: 64px;
    margin: 0 auto var(--spacing-md);
    background: rgba(108, 99, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirm-modal-icon i { font-size: 2rem; color: var(--primary); }
.confirm-modal-icon.success { background: rgba(0, 200, 83, 0.2); }
.confirm-modal-icon.success i { color: var(--success); }
.confirm-modal-icon.danger { background: rgba(255, 82, 82, 0.2); }
.confirm-modal-icon.danger i { color: var(--danger); }
.confirm-modal-title { font-size: 1.3rem; font-weight: 700; margin-bottom: var(--spacing-sm); }
.confirm-modal-message { color: var(--text-secondary); margin-bottom: var(--spacing-lg); }
.confirm-modal-actions { display: flex; gap: var(--spacing-sm); }
.confirm-modal-actions .btn { flex: 1; }

.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--spacing-md));
    right: var(--spacing-md);
    left: var(--spacing-md);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}
.toast {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    pointer-events: all;
    border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.success .toast-icon i { color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }
.toast-icon { font-size: 1.3rem; color: var(--primary); }
.toast-content { flex: 1; }
.toast-message { font-weight: 500; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: var(--spacing-xs); }

.notifications-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 100%;
    max-width: 360px;
    max-height: calc(100vh - var(--header-height) - var(--nav-height));
    background: var(--bg-secondary);
    border-radius: 0 0 0 var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    transform: translateX(100%);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}
.notifications-panel.active { transform: translateX(0); }
.notifications-header { display: flex; justify-content: space-between; align-items: center; padding: var(--spacing-md) var(--spacing-lg); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.notifications-header h3 { font-size: 1rem; font-weight: 600; }
.notifications-list { flex: 1; overflow-y: auto; }
.notification-item { display: flex; gap: var(--spacing-md); padding: var(--spacing-md) var(--spacing-lg); border-bottom: 1px solid rgba(255, 255, 255, 0.05); transition: var(--transition-fast); }
.notification-item:hover { background: var(--bg-card); }
.notification-item.unread { background: rgba(108, 99, 255, 0.1); }
.notification-icon { width: 40px; height: 40px; background: var(--bg-card); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.notification-content { flex: 1; min-width: 0; }
.notification-message { font-size: 0.9rem; line-height: 1.4; }
.notification-time { font-size: 0.75rem; color: var(--text-muted); margin-top: var(--spacing-xs); }

.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
}
.overlay.active { opacity: 1; pointer-events: all; }

.form-group { margin-bottom: var(--spacing-md); }
.form-label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); margin-bottom: var(--spacing-xs); }
.form-input {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-normal);
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2); }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { min-height: 100px; resize: vertical; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-card);
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-primary { background: rgba(108, 99, 255, 0.2); color: var(--primary-light); }
.badge-gold { background: rgba(255, 215, 0, 0.2); color: var(--accent-gold); }
.badge-success { background: rgba(0, 200, 83, 0.2); color: var(--success); }
.badge-danger { background: rgba(255, 82, 82, 0.2); color: var(--danger); }

.points-display { display: flex; align-items: center; gap: var(--spacing-xs); font-weight: 700; color: var(--accent-gold); }
.points-display i { font-size: 1.2em; }
.points-large { font-size: 2rem; }
.points-gain { color: var(--success); font-size: 0.9rem; animation: pointsGain 0.5s ease-out; }
@keyframes pointsGain { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }

.avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; border: 2px solid var(--primary); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; border-width: 3px; }
.avatar-gold { border-color: var(--accent-gold); box-shadow: var(--shadow-gold); }

.list-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-sm);
    transition: var(--transition-normal);
}
.list-item:hover { background: var(--bg-card-hover); }
.list-item-content { flex: 1; min-width: 0; }
.list-item-title { font-weight: 600; margin-bottom: var(--spacing-xs); }
.list-item-subtitle { font-size: 0.85rem; color: var(--text-secondary); }
.list-item-action { flex-shrink: 0; }

.progress-bar { height: 8px; background: var(--bg-card); border-radius: var(--border-radius-full); overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--gradient-magic); border-radius: var(--border-radius-full); transition: width var(--transition-slow); }

.empty-state { text-align: center; padding: var(--spacing-2xl); }
.empty-state-icon { font-size: 4rem; margin-bottom: var(--spacing-md); opacity: 0.5; }
.empty-state-title { font-size: 1.2rem; font-weight: 600; margin-bottom: var(--spacing-sm); }
.empty-state-text { color: var(--text-secondary); margin-bottom: var(--spacing-lg); }

.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--bg-card); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(13, 13, 26, 0.9); display: flex; align-items: center; justify-content: center; z-index: var(--z-modal); }

.animate-pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-bounce { animation: bounce 1s ease infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.animate-shake { animation: shake 0.5s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent-gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.hidden { display: none !important; }
.visible { display: block !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: var(--border-radius-full); }
::selection { background: var(--primary); color: white; }
