/* ==================== SCROLLBAR CACHÉE ==================== */
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -moz-user-select: none; 
    -ms-user-select: none; 
    -khtml-user-select: none; 
    -webkit-user-select: none; 
    -webkit-touch-callout: none; 
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --accent: #60a5fa;
    --bg-dark: #0f1114;
    --bg-card: #1b1d22f8;
    --bg-elevated: #141719;
    --text-primary: #ffffff;
    --text-secondary: #9ab;
    --text-muted: #667;
    --border: #445566;
    --shadow: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #60a5fa;
    --bg-dark: #f5f7fb;
    --bg-card: #ffffff;
    --bg-elevated: #eef2ff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --shadow: rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0; 
    padding: 0; 
    min-height: 100vh; 
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 13px;
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

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




/*bar de recherche*/
.search-section {
    padding: 40px 0 28px;
    text-align: center;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, transparent 100%);
    animation: fadeIn 0.6s ease;
}

/* Quand la search section est dans le wrapper carousel, le CSS hero-carousel.css prend le relais */

.search-section h2 {
    color: var(--text-primary);
    margin-bottom: 32px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box {
    display: flex;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 18px 24px;
    border: 2px solid rgba(68, 85, 102, 0.3);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

.movies-section,
.profile-section {
    padding: 20px 0;
    animation: fadeIn 0.8s ease;
}

.section-title {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
}


.loading {
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.2));
    color: #fca5a5;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid rgba(220, 38, 38, 0.3);
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}



/* Auth */
/* Animation shake pour les erreurs de connexion */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    animation-iteration-count: 1;
}

/* Variante alternative avec rotation légère */
@keyframes shakeRotate {
    0%, 100% {
        transform: translateX(0) rotate(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px) rotate(-1deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px) rotate(1deg);
    }
}

.shake-rotate {
    animation: shakeRotate 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    animation-iteration-count: 1;
}

/* Animation pulse pour mettre en évidence l'erreur */
@keyframes errorPulse {
    0% {
        border-color: rgba(239, 68, 68, 0.3);
    }
    50% {
        border-color: rgba(239, 68, 68, 0.8);
    }
    100% {
        border-color: rgba(239, 68, 68, 0.3);
    }
}

.error-pulse {
    animation: errorPulse 0.5s ease-in-out;
    border-color: rgba(239, 68, 68, 0.5) !important;
}