/* =========================================
   1. TYPOGRAPHIE GLOBALE
   ========================================= */
body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* =========================================
   2. BANNIÈRE ET TITRE (L'ancien CSS conservé)
   ========================================= */
.home-page-banner {
    /* Filtre sombre superposé à votre image */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('./images/Gemini_Generated_Image_gk70tcgk70tcgk70.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 300px;
    /* Plus besoin d'opacité ou de position absolue ici */
}

.home-page-banner h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px; 
    letter-spacing: 3px; 
    text-shadow: 2px 2px 8px rgba(0,0,0, 0.5);
}

/* =========================================
   3. BOUTONS STYLE iOS (Le nouveau CSS)
   ========================================= */

/* Sécurité pour le script jQuery */
.action-card {
    position: relative; 
}

/* Style de base des boutons */
.ios-btn {
    border: none;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff !important;
    text-transform: none;
    letter-spacing: -0.5px;
    
    /* Effet Glassmorphism */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease-in-out;
}

/* Style de la boîte d'icône intégrée au bouton */
.icon-box {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    font-size: 1.5rem;
}

/* --- Couleurs Spécifiques --- */

/* Bleu */
.ios-blue {
    background-color: rgba(0, 122, 255, 0.9);
}
.ios-blue:hover {
    background-color: rgba(0, 122, 255, 1);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3);
    transform: translateY(-2px);
}

/* Vert */
.ios-green {
    background-color: rgba(52, 199, 89, 0.9);
}
.ios-green:hover {
    background-color: rgba(52, 199, 89, 1);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.3);
    transform: translateY(-2px);
}

/* Violet */
.ios-purple {
    background-color: rgba(175, 82, 222, 0.9);
}
.ios-purple:hover {
    background-color: rgba(175, 82, 222, 1);
    box-shadow: 0 6px 20px rgba(175, 82, 222, 0.3);
    transform: translateY(-2px);
}

/* =====================================================
                    HEADER RULES
========================================================*/
.ios-header {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(249, 249, 249, 0.8); /* Fond blanc cassé typique iOS */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.15);
    padding: 12px 20px;
    z-index: 1000;
}

.header-logo {
    width: 50px;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.nav-link-ios {
    text-decoration: none;
    color: #007AFF; /* Bleu système iOS */
    font-size: 14px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-link-ios:hover {
    color: #005bb5;
}

/* =========================================
   4. LISTING DES FILMS (STYLE iOS)
   ========================================= */

/* Titre de section façon Apple */
.ios-section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #1c1c1e; /* Noir doux d'iOS */
    letter-spacing: -0.5px;
}

/* La carte globale du film */
.ios-movie-card {
    background-color: #fbfafa;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Ombre très douce */
    overflow: hidden; /* Pour que l'image respecte les bords arrondis */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* Effet au survol (surtout pour le PC) */
.ios-movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Conteneur de l'image pour forcer un ratio homogène */
.ios-poster-container {
    width: 100%;
    aspect-ratio: 2 / 3; /* Ratio standard des affiches de cinéma */
    background-color: #f2f2f7; /* Gris clair de chargement typique iOS */
    overflow: hidden;
}

/* L'image de l'affiche */
.ios-movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre l'image sans l'écraser */
    transition: transform 0.5s ease;
}

/* Effet zoom léger de l'image au survol de la carte */
.ios-movie-card:hover .ios-movie-poster {
    transform: scale(1.03);
}

/* Zone de texte sous l'affiche */
.ios-movie-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Titre du film */
.ios-movie-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 8px;
    /* Coupe le titre long avec des points de suspension s'il dépasse une ligne */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Synopsis */
.ios-movie-synopsis {
    font-size: 0.9rem;
    color: #8e8e93; /* Gris secondaire iOS */
    line-height: 1.4;
    margin-bottom: 0;
    
    /* Magie CSS : Coupe le texte après exactement 3 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Style de l'état vide (Aucun film) */
.ios-empty-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #f2f2f7;
    border-radius: 20px;
    color: #8e8e93;
    font-weight: 500;
}

/* Style de l'alerte d'erreur */
.ios-alert {
    border-radius: 16px;
    border: none;
    background-color: rgba(255, 59, 48, 0.1); /* Rouge iOS transparent */
    color: #ff3b30; /* Rouge iOS */
    font-weight: 500;
}

.search-thumbnail:hover {
    cursor: pointer;
}

/* ============================= */
/*         ADD MOVIE             */
/* ============================= */
/* --- Personnalisation de la carte --- */
.movie-search-card {
    border-radius: 12px; /* Coins bien arrondis */
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Léger effet de soulèvement au survol pour dynamiser la page */
.movie-search-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

/* --- Personnalisation du bouton --- */
.movie-btn {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 12px;
    /* Remplace cette couleur par la couleur principale de ton site si ce n'est pas le bleu Bootstrap */
    /* background-color: #E50914;  <-- Ex: Rouge façon Netflix */
    /* border-color: #E50914; */
}

/* --- Focus sur l'input (couleur de la bordure quand on clique) --- */
.form-control:focus {
    /* Aligne cette couleur avec celle de ton bouton */
    border-color: #0d6efd; 
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Style de base des cartes pour la transition */
.movie-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent; /* Prépare la bordure */
}

/* Effet au survol léger */
.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
}

/* L'état "Sélectionné" (Highlight) */
.movie-card.selected {
    border-color: #0d6efd; /* Bleu primary de Bootstrap */
    background-color: #f8fbff;
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.2) !important;
}

footer {
    margin-top: auto;
}