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

:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --accent-color: #f43f5e;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.burger-menu {
    display: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
}

main {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.hero {
    position: relative;
    color: white;
    text-align: center;
    padding: 8rem 2rem;
    margin-bottom: 3rem;
    overflow: hidden;
    min-height: 500px;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.7);
    transform: scale(1.1);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(99, 102, 241, 0.8), 
        rgba(79, 70, 229, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 1rem;
}

.search-form {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8fafc;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background-color: white;
}

.search-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.search-actions {
    text-align: center;
    margin-top: 2rem;
}

.back-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.filters {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-item {
    background: var(--background-color);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-weight: 500;
}

.filter-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
}

.filter-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.filter-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.footer-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
    font-style: italic;
}

.error {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: rgba(244, 63, 94, 0.1);
    border-radius: 8px;
    text-align: center;
}

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

.featured-films, .films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.film-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.film-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.15);
}

.film-image {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background-color: #f8fafc;
    transition: var(--transition);
}

.film-card:hover .film-image {
    transform: scale(1.05);
}

.film-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.film-title {
    width: 100%;
    font-weight: 600;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.4;
    min-height: 2.8em;
    margin-bottom: 0.5rem;
}

.film-meta {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.film-synopsis {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 4.2em;
}

.total-films {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    margin: 1rem;
    font-weight: 500;
}

.film-rating {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.film-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.film-link:hover {
    color: var(--primary-color);
}

.film-image {
    transition: transform 0.3s ease;
}

.film-card:hover .film-image {
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        padding: 1rem;
        border-radius: 0 0 16px 16px;
        backdrop-filter: blur(8px);
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        animation: slideDown 0.3s ease;
    }

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

    .burger-menu {
        display: block;
    }

    main {
        margin-top: 60px;
        padding: 1rem;
    }

    .hero {
        padding: 4rem 1rem;
        margin: 0.5rem;
        min-height: 400px;
        border-radius: 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-form {
        padding: 1.5rem;
    }

    .filters {
        padding: 1.5rem;
    }

    .filter-group {
        gap: 0.8rem;
    }

    .filter-item {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .featured-films, .films-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .film-image {
        height: 200px;
    }

    .film-info {
        padding: 1rem;
    }
}

/* Style de la ligne du film */
.film-row {
    
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Style de la cellule contenant l'affiche */
.poster-cell {
    text-align: center;
    padding: 1rem;
    aspect-ratio: 2/3;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8fafc;
}

/* Effet au survol de l'image */
.movie-poster:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Style des autres cellules */
.film-title, .film-director, .film-year, .film-genre {
    padding: 0.8rem 1.2rem;
    text-align: left;
    vertical-align: middle;
}

/* Limite la largeur du titre et ajoute des "..." si trop long */
.film-title {
    display: flex;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Style spécifique pour chaque colonne (facultatif, mais peut être utile pour la personnalisation) */
.film-director {
    font-weight: 600;
    color: var(--primary-color);
}

.film-year {
    color: #64748b;
    font-size: 0.9rem;
}

.film-genre {
    color: #4f46e5;
    font-weight: 500;
}

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 2rem;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    vertical-align: middle;
}

.results-table th {
    background: var(--background-color);
    font-weight: 600;
    color: var(--text-color);
    padding: 1.5rem 1rem;
}

.film-row {
    background: white;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.poster-cell {
    width: 120px;
    padding: 1rem;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8fafc;
}

.film-title {
    width: 100%;
    font-weight: 600;
}

.film-director {
    width: 25%;
    color: var(--primary-color);
}

.film-year {
    width: 10%;
    color: #64748b;
}

.film-genre {
    width: 20%;
    color: #4f46e5;
}

/* Styles améliorés pour la page de détail du film */
.movie-details {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.movie-header {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 3rem;
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.movie-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.movie-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-poster:hover .movie-image {
    transform: scale(1.05);
}

.movie-info {
    display: flex;
    flex-direction: column;
}

.movie-info h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: #64748b;
    font-size: 1.1rem;
}

.movie-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.movie-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.rating-value {
    font-size: 1.4rem;
    font-weight: 600;
}

.rating-count {
    font-size: 1rem;
    opacity: 0.9;
}

.movie-director {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.movie-synopsis {
    color: var(--text-color);
    background: var(--background-color);
    padding: 2rem;
    border-radius: 12px;
    margin-top: auto;
}

.movie-synopsis h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.movie-synopsis p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #4a5568;
}

/* Section des critiques améliorée */
.movie-reviews {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

.movie-reviews h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.movie-reviews h2::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #e2e8f0, transparent);
}

.reviews-container {
    display: grid;
    gap: 1.5rem;
}

.review-card {
    background: var(--background-color);
    padding: 1.8rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.review-author {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.review-rating {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.review-date {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-date::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 50%;
}

.review-content {
    line-height: 1.8;
    color: #4a5568;
}

.no-reviews {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
    font-size: 1.1rem;
}

.no-reviews p {
    margin-bottom: 1.5rem;
}

.add-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

@media (max-width: 768px) {
    .movie-header {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .movie-poster {
        max-width: 300px;
        margin: 0 auto;
    }

    .movie-info h1 {
        font-size: 2rem;
        text-align: center;
    }

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

    .movie-rating {
        margin: 1.5rem auto;
    }

    .movie-director {
        text-align: center;
    }

    .movie-synopsis {
        text-align: center;
    }
}
