/* SuperView - Styles personnalisés */

/* Variables CSS */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

/* Styles généraux */
html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* Navbar - Correction alignement vertical */
.navbar {
    min-height: 60px;
    padding: 0.5rem 0;
}

.navbar .container {
    align-items: center !important;
    display: flex !important;
}

.navbar-brand {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 1.25rem !important;
    height: auto !important;
}

.navbar-nav {
    align-items: center !important;
}

.navbar-nav .nav-item {
    display: flex !important;
    align-items: center !important;
}

.navbar-nav .nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 0.5rem 1rem !important;
    line-height: 1 !important;
    height: auto !important;
    margin: 0 !important;
}

.navbar-nav .dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem !important;
    margin: 0 !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none !important;
}

.stat-card {
    padding: 1rem;
}

.stat-card h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Section de recherche */
.search-section {
    border: 1px solid #dee2e6;
}

.search-section h3 {
    color: var(--dark-color);
}

/* Cards des films */
.movie-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-card:hover .card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.movie-poster {
    overflow: hidden;
    border-radius: 0.375rem 0.375rem 0 0;
    position: relative;
    height: 300px;
}

.movie-poster img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-poster .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

/* Overlay de lecture */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.375rem 0.375rem 0 0;
}

.movie-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay .btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Cards d'information */
.card {
    border-radius: 0.5rem;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Boutons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Footer */
footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Harmonisation des cartes films/séries */
.movie-card,
.movie-card .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.movie-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.card-title {
    min-height: 2.5em;
    max-height: 2.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.5em;
}
.card-bottom {
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem !important;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 2rem 1rem !important;
    }
    
    .movie-card .card-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .movie-poster,
    .movie-poster img,
    .movie-poster .card-img-top {
        height: 250px !important;
    }
    
    .play-overlay .btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card {
    animation: fadeIn 0.6s ease-out;
}

/* Loading spinner */
.fa-spinner {
    color: var(--primary-color);
}

/* Alertes personnalisées */
.alert {
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: #0c5460;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
}

/* Utilitaires */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hover effects pour les liens */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* Ombres personnalisées */
.shadow-sm-custom {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.shadow-custom {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
}
