/* Style bouton Déconnexion (logout-btn) identique à search.php */
.logout-btn {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: #fff !important;
    font-size: 16px !important;
    cursor: pointer !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    transition: all 0.3s !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.logout-btn:hover {
    background: rgba(255,255,255,0.18) !important;
    border-color: #fff !important;
    color: #fff !important;
    box-shadow: none !important;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: white;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100vw;
    background: linear-gradient(225deg, rgba(0,0,0,0.1), rgba(0,0,0,0.9) 100%),
                url('');
    background-size: cover;
    /*background-position: center;*/
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 50px;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #000000);
    z-index: 1;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0,0,0,0.95);
}

.logo {
    height: 40px;
    width: auto;
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: none;
    border-color: #fff;
}

.search-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: #fff;
}

.account-btn {
    background: linear-gradient(45deg, #212BFF, #4A90E2);
    border: 1px solid #212BFF;
}

.account-btn:hover {
    background: linear-gradient(45deg, #1a1fcc, #3a7bc8);
    transform: translateY(-2px);
    box-shadow: none;
}

/* Hero Content */
.hero-content {
    max-width: 600px;
    z-index: 2;
    margin-top: 80px;
}

.hero-title {
    max-width: inherit;
    width: auto;
    max-height: 200px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.8));
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    font-size: 14px;
    color: #cbd5e1;
}

.quality-badge {
    background: linear-gradient(45deg, #FF6B35, #FF8E53);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.score-badge {
    background: linear-gradient(45deg, #8f7900, #b87e00);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-description {
    font-size: 16px;
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.btn-primary {
    background: #212BFF;
    color: white;
    padding: 15px 30px;
}

.btn-primary:hover {
    background: #1A22CC;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(33, 43, 255, 0.4);
}

.btn-primary:disabled {
    background: rgba(33, 43, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

.btn-primary:disabled:hover {
    background: rgba(33, 43, 255, 0.3);
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.btn-secondary:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
}

.btn-secondary:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

/* Section générique pour les listes de films scrollables */
.films-section {
    margin: 60px 0 40px 0;
    padding: 0 50px;
}
.films-section h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: #fff;
    letter-spacing: 1px;
}

/* Section des genres */
.genres-section {
    margin: 80px 0 60px 0;
    text-align: center;
}

.genres-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.genres-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    justify-content: center;
}

.genre-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 16px 20px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 60px;
    flex: 0 0 auto;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.genre-btn::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: left 0.5s;
}

.genre-btn:hover::before {
    left: 100%;
}

.genre-btn:hover {
    background: rgba(33, 43, 255, 0.2);
    border-color: #212BFF;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 43, 255, 0.3);
}

.genre-btn:active {
    transform: translateY(-1px);
}

.genre-btn i {
    font-size: 18px;
    opacity: 0.9;
}
/* Wrapper pour scroll + flèches + fondu */
.films-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.films-scroll-list {
    display: flex;
    flex-direction: row;
    gap: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
    flex-wrap: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    min-width: 0;
}
.films-scroll-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.fade-left, .fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scroll-arrow {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: none;
    color: #fff;
    border: none;
    font-size: 3.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 3;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}
.scroll-arrow.right {
    left: auto;
    right: 0;
}
.scroll-arrow:hover {
    opacity: 1;
}
.fade-left {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    width: 60px;
}
.fade-right {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    width: 60px;
}
.card-film {
    background: none;
    border-radius: 18px;
    box-shadow: none;
    width: 180px;
    height: 260px;
    min-width: 180px;
    max-width: 180px;
    min-height: 260px;
    max-height: 260px;
    text-align: center;
    padding: 0;
    border: 2px solid rgba(255,255,255,0.18);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: box-shadow 0.2s, border-color 0.2s;
}

/* Indicateur d'expiration */
.expiration-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.expiration-indicator i {
    font-size: 11px;
    color: #FFA500;
}

.expiration-indicator span {
    font-weight: 700;
}

/* Classes pour les couleurs d'expiration */
.expiration-indicator.safe span {
    color: #fff;
}

.expiration-indicator.warning span {
    color: #FFA500;
}

.expiration-indicator.danger span {
    color: #FF4444;
}
.card-film:hover {
    border: 2px solid #fff;
    box-shadow: 0 0 24px 8px rgba(255,255,255,0.18);
}
.card-film img {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
    display: block;
    border: none;
    transition: none;
}
@media (max-width: 768px) {
    .films-section {
        padding: 0 20px;
    }
    .films-scroll-list {
        gap: 16px;
    }
    .card-film {
        width: 120px;
        height: 180px;
        min-width: 120px;
        max-width: 120px;
        min-height: 180px;
        max-height: 180px;
    }
    .card-film img {
        height: 100%;
    }
    .films-scroll-list {
        margin: 0 20px;
    }
    .fade-left, .fade-right, .scroll-arrow {
        width: 30px;
    }
    .scroll-arrow {
        font-size: 2.2rem;
    }

    /* Responsive pour les genres */
    .genres-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .genre-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 50px;
    }
    
    .genre-btn i {
        font-size: 16px;
    }

    /* Responsive pour l'indicateur d'expiration */
    .expiration-indicator {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 10px;
        border-radius: 8px;
    }
    
    .expiration-indicator i {
        font-size: 9px;
    }
}

/* Suppression des anciennes classes spécifiques */
.tendances, .ma-liste, .tendances-list, .ma-liste-list,
.tendance-item, .ma-liste-item,
.tendance-item img, .ma-liste-item img,
.tendance-item:hover, .ma-liste-item:hover {
    all: unset;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }
    
    .hero {
        padding: 0 20px;
        height: 100vh;
    }
    
    .hero-title {
        width: 300px;
    }
}

.fade-left, .fade-right {
    z-index: 6;
    pointer-events: none;
}
.scroll-arrow {
    z-index: 7;
    pointer-events: auto;
}

/* Section sans scroll horizontal, grille responsive */
.no-scroll-section .films-grid-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: flex-start;
    /* Pas de overflow-x */
}

.no-scroll-section .card-film {
    margin-bottom: 0;
}

/* Responsive pour la grille */
@media (max-width: 1200px) {
    .no-scroll-section .films-grid-list {
        gap: 20px;
    }
}
@media (max-width: 900px) {
    .no-scroll-section .films-grid-list {
        gap: 14px;
    }
}
@media (max-width: 768px) {
    .no-scroll-section .films-grid-list {
        gap: 10px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 480px;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #212BFF;
    box-shadow: 0 0 0 3px rgba(33, 43, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-select option {
    background: #2d2d2d;
    color: #fff;
    padding: 8px;
}

.modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 10px 20px;
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px 20px 12px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 12px 20px 20px 20px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Responsive pour la section des genres */
@media screen and (max-width: 768px) {
    .genres-container {
        padding: 0 20px;
    }
    
    .genres-grid {
        gap: 15px;
        max-width: 100%;
    }
    
    .genre-btn {
        padding: 12px 16px;
        font-size: 14px;
        height: 50px;
        min-width: 140px;
        gap: 8px;
    }
    
    .genre-btn i {
        font-size: 16px;
    }
}

/* Blueflix AI Section */
.ai-section {
    /* Removed background and border */
    padding: 20px 50px;
    margin: 40px 0;
}

.ai-container {
    /*max-width: 1000px;*/
    margin: 0 auto;
}

.ai-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.ai-logo {
    height: 80px; /* Increased size since it has text */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(33, 43, 255, 0.3));
}

.ai-subtitle {
    color: #a0a0a0;
    font-size: 1.1rem;
    max-width: 600px;
}

.ai-input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.ai-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.ai-input:focus {
    outline: none;
    border-color: #212BFF;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(33, 43, 255, 0.1);
}

.ai-btn {
    padding: 0 30px;
    font-size: 16px;
    white-space: nowrap;
}

.ai-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    animation: fadeIn 0.5s ease;
    padding: 0;
    margin-top: 20px;
}

.ai-message-text {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #fff;
    text-align: center;
    max-width: 800px;
    margin-bottom: 40px;
    font-weight: 500;
}

.ai-movies-container {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

/* Removed primary movie highlight to keep all cards consistent */

.ai-separator {
    width: 1px;
    height: 160px;
    background: rgba(255,255,255,0.15);
    margin: 0 10px;
}

.ai-alternatives-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Responsive AI Section */
@media (max-width: 768px) {
    .ai-section {
        padding: 0 20px;
        margin: 40px 0;
    }
    
    .ai-input-group {
        flex-direction: column;
    }
    
    .ai-movies-container {
        flex-direction: column;
    }

    .ai-separator {
        width: 100%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
        margin: 20px 0;
    }

    .ai-message-text {
        text-align: center;
        font-size: 1.1rem;
        max-width: 100%;
    }
}

/* =========================
   LOGIN PAGE STYLES
   ========================= */

/* Body for login page */
body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
}

.logo-section {
    text-align: center;
    margin-bottom: 60px;
}

.logo-section .logo {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 8px 25px rgba(33, 43, 255, 0.4));
}

/* Form Input Wrapper */
.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: #888;
}

.form-input:focus {
    border-color: #212BFF;
    box-shadow: 0 0 0 3px rgba(33, 43, 255, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #ffffff;
}

.login-btn {
    width: 100%;
    padding: 15px 30px;
    background: #212BFF;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    background: #1A22CC;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(33, 43, 255, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    background: rgba(33, 43, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

/* Login page animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login responsive */
@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 0 20px;
    }

    .logo-section .logo {
        width: 150px;
    }
}