/*
Theme Name: Cinema Theme
Author: Thibault Delgrande
Version: 2.1
*/
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');

/* --- 1. BASES & RESET --- */
body {
    margin: 0;
    font-family: 'Titillium Web', sans-serif;
    overflow-x: hidden;
    background-color: #fff;
    color: #333;
}
* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }

/* --- 2. HEADER (Original - Menu à gauche) --- */
header.site-header {
    background-color: #001c24;
    color: #FFF;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 30px;
}       

header.site-header img {
    width: 64px;
    margin: 16px 0;
}

#menu-menu-principal {
    display: flex;
    gap: 30px;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.menu-item > a {
    color: white;
    font-size: 16pt;
    font-weight: 600;
}
.menu-item > a:hover { color: #C00; }

/* --- 3. SLIDESHOW --- */
.slideshow-container {
    height: 70vh;
    position: relative;
    margin: auto;
    width: 100vw;
    overflow: hidden;
    background: #000;
}
.mySlides { display: none; height: 100%; width: 100%; }
.mySlides > a { display: block; height: 100%; width: 100%; position: relative; }
.mySlides img { width: 100%; height: 100%; object-fit: cover; }
.text {
    color: #f2f2f2; font-size: 32pt; font-weight: bolder;
    padding: 8px 12px; position: absolute; bottom: 40px; width: 100%;
    text-align: center; text-shadow: 2px 2px 4px #000;
}
.prev, .next {
    cursor: pointer; position: absolute; top: 50%; width: auto; margin-top: -22px; padding: 16px;
    color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease;
    border-radius: 0 3px 3px 0; user-select: none; background-color: rgba(0,0,0,0.3);
}
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); }

/* --- 4. TITRES GLOBAUX --- */
h1, h2, h3, h4, .page-title, .archive-title, .entry-title, .film-title {
    color: #001c24; 
}

/* --- 5. PAGES STANDARDS & ARCHIVES --- */
.site-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-header, .archive-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #001c24;
    padding-bottom: 15px;
}

.page-title, .archive-title {
    font-size: 3em;
    margin: 0;
}

/* Grille pour les archives d'actualités */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.archive-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
}

.archive-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.archive-thumb {
    height: 200px;
    overflow: hidden;
}

.archive-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.archive-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.archive-item-title {
    font-size: 1.4em;
    margin: 0 0 10px 0;
}

.archive-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.archive-excerpt {
    margin-bottom: 20px;
    line-height: 1.5;
}

.archive-readmore {
    margin-top: auto;
    color: #C00;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.archive-pagination {
    margin-top: 40px;
    text-align: center;
}
.nav-links a, .nav-links span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    margin: 0 5px;
    border-radius: 4px;
}
.nav-links .current {
    background-color: #001c24;
    color: white;
    border-color: #001c24;
}

.page-content .entry-content {
    line-height: 1.6;
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto;
}

/* --- 6. LISTE DES FILMS (Ajustements Grille) --- */
.films-controls-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.film-search-form .search-field {
    padding: 10px;
    width: 300px;
    border: 2px solid #001c24;
    border-radius: 5px;
}

/* GRILLE FILMS MODIFIÉE POUR 4 COLONNES ET CENTRAGE */
.films-grid {
    display: grid;
    /* Réduction de 280px à 220px pour permettre 4 films sur 1200px de large */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    justify-content: center; /* Centre les éléments si la ligne n'est pas pleine */
}

/* Centrage spécifique pour la page d'accueil si utilisé */
.films h3 {
    text-align: center; /* Centre les titres de section (Actuellement, etc.) */
}

.film, .film-item {
    /* Assure que le contenu interne est centré */
    text-align: center;
    margin: 0 auto; /* Centre la carte elle-même si nécessaire */
    width: 100%;
}

.film-card-complete {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: transform 0.2s;
    text-align: left; /* Remet le texte à gauche pour les détails internes */
}

.film-card-complete:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.film-poster-wrapper img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 0;
}

.film-info-overlay {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.film-title-archive {
    font-size: 1.4em;
    margin: 0 0 15px 0;
    text-align: center;
    color: #001c24;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.tab-button {
    background: none; border: none; font-size: 1.2em; font-weight: bold; color: #001c24;
    cursor: pointer; padding: 5px 15px; border-bottom: 3px solid transparent;
}
.tab-button.active { color: #C00; border-bottom: 3px solid #C00; }

.date-navigator {
    display: flex; align-items: center; gap: 15px; margin-top: 20px; font-size: 1.2em; font-weight: bold; color: #001c24;
}
.date-nav-btn {
    background: #001c24; color: white; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
}

/* Styles Horaires Carte */
.film-day-schedules {
    margin-top: auto; 
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.card-schedule-group {
    margin-bottom: 8px;
    display: flex; flex-direction: column; align-items: flex-start;
}
.card-schedule-type {
    font-size: 0.85em; font-weight: bold; color: #666; margin-bottom: 4px; text-transform: uppercase;
}
.card-schedule-times { display: flex; flex-wrap: wrap; gap: 5px; }
.card-time-pill {
    background-color: #001c24; color: white; font-size: 0.9em; padding: 4px 8px;
    border-radius: 4px; font-weight: 600;
}
.no-session { font-style: italic; color: #999; font-size: 0.9em; text-align: center; width: 100%; }

/* --- 7. FICHE FILM UNIQUE --- */
.film-content-wrapper {
    display: grid; grid-template-columns: 350px 1fr; gap: 50px; margin-bottom: 50px;
}
.film-title {
    font-size: 3em; text-align: center; border-bottom: 2px solid #C00; padding-bottom: 10px; margin-bottom: 40px; display: block;
}
.film-jaquette img {
    border-radius: 10px; box-shadow: 0 10px 20px rgba(0,0,0,0.15); width: 100%;
}
.film-details h2, .film-synopsis h2, .film-horaires h2, .film-trailer h2 {
    font-size: 1.5em; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; margin-top: 0;
}
.film-fiche-technique {
    background-color: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 30px;
}
.film-fiche-technique ul { list-style: none; padding: 0; margin: 0; }
.film-fiche-technique li { padding: 8px 0; border-bottom: 1px solid #eee; }
.film-fiche-technique strong { color: #001c24; min-width: 120px; display: inline-block; }

/* Horaires Détail */
.horaires-par-jour { margin-top: 20px; }
.horaires-jour {
    border: 1px solid #ddd; border-radius: 8px; overflow: hidden; margin-bottom: 30px; background-color: #fff;
}
.horaires-jour h3 {
    background-color: #001c24; color: #fff; margin: 0; padding: 15px 20px; font-size: 1.3em;
}
.horaires-content { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.seance-block { display: flex; align-items: center; gap: 20px; padding-bottom: 15px; border-bottom: 1px dashed #eee; }
.seance-block:last-child { border-bottom: none; padding-bottom: 0; }
.seance-type-title { font-weight: bold; color: #001c24; min-width: 120px; font-size: 1.1em; }
.seance-times-list { display: flex; flex-wrap: wrap; gap: 10px; }
.time-pill {
    background-color: #C00; color: white; padding: 8px 15px; border-radius: 20px; font-weight: bold; font-size: 1em; cursor: default; transition: background-color 0.2s;
}
.time-pill:hover { background-color: #a00000; }

.film-trailer iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; border: none; }

/* --- 8. FOOTER & NEWSLETTER (2 Colonnes) --- */
.site-footer {
    background-color: #f0f0f0;
    padding: 0;
    margin-top: 50px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
}

/* Colonne 1: Newsletter */
.newsletter {
    background-color: #C00;
    color: #FFF;
    padding: 32px;
    flex: 2;
}
.newsletter .inscription {
    font-weight: bold; font-size: 24pt; display: block; margin-bottom: 15px;
}
.newsletter > div {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.newsletter input { border-radius: 8px; border: none; padding: 8px; }
.newsletter label { font-weight: bold; }
#submit {
    background-color: #001c24; color: #FFF; cursor: pointer; margin-top: 5px;
}

/* Colonne 2: Info */
.footer-info {
    background-color: #001c24;
    color: #FFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
    flex: 1;
    align-items: flex-start;
}
.footer-info a {
    color: #FFF; font-weight: bold; padding: 5px 0; display: flex; align-items: center; gap: 10px;
}
.footer-info svg { width: 24px; height: 24px; }

/* --- 9. RESPONSIVE --- */
@media (max-width: 900px) {
    .film-content-wrapper { grid-template-columns: 1fr; }
    .seance-block { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 768px) {
    header.site-header { flex-direction: column; text-align: center; }
    .footer-inner { flex-direction: column; }
    .newsletter > div { flex-direction: column; text-align: center; }
    .archive-grid { grid-template-columns: 1fr; }
}