.programmation-page {
    margin-top: 100px;
    padding: 40px 0;
    background-color: #F5F5F5;
    color: #333333;
    font-family: 'Roboto', sans-serif;
}

.programmation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Titre principal */
.programmation-page h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1F286B;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    font-family: 'Roboto', sans-serif;
}

.programmation-page h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #1F286B;
    margin: 10px auto 0;
}

/* Header avec boutons */
.programmation-header {
    text-align: center;
    margin-bottom: 40px;
}

.initial-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    min-width: 180px;
    text-align: center;
}

.btn-download {
    background: #1F286B;
    color: white;
    text-decoration: none;
}

.btn-download:hover {
    background: #2A3A9C;
}

.btn-choose {
    background: #FFFFFF;
    border: 2px solid #1F286B;
    color: #1F286B;
}

.btn-choose:hover {
    background: #1F286B;
    color: #FFFFFF;
}

.btn-toggle {
    background: #FFFFFF;
    border: 2px solid #1F286B;
    color: #1F286B;
    padding: 10px 20px;
    min-width: 220px;
}

.btn-toggle:hover {
    background: #1F286B;
    color: #FFFFFF;
}

/* Conteneur principal */
.main-content {
    display: flex;
    gap: 30px;
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Filtres à gauche */
.filters-sidebar {
    flex: 0 0 250px;
    padding: 20px;
}

.filters-sidebar h2 {
    font-family: 'Caveat', cursive;
    font-size: 22px;
    font-weight: 700;
    color: #1F286B;
    margin-bottom: 15px;
    border-left: 4px solid #1F286B;
    padding-left: 10px;
    text-align: left;
}

.filter-group {
    margin-bottom: 25px;
    padding: 10px;
    border-radius: 5px;
    background-color: #F5F5F5;
}

.filter-group h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1F286B;
    margin-bottom: 15px;
}

.filter-options label {
    display: flex;
    align-items: center;
    margin: 10px 0;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #333;
    transition: color 0.3s ease;
}

.filter-options label:hover {
    color: #1F286B;
}

.filter-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #1F286B;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.filter-checkbox:checked {
    background: #1F286B;
    border-color: #1F286B;
}

.filter-checkbox:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
}

/* Grille des spectacles */
.spectacles-container {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.spectacle-card {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 250px;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.spectacle-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
}

.spectacle-info {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.spectacle-info h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2em; /* Réduit légèrement pour éviter débordements */
    color: #1F286B;
    margin: 0 10px 5px 10px; /* Marges latérales pour équilibre */
    font-weight: 700;
    text-align: center; /* Centrer le texte */
    overflow-wrap: break-word; /* Permettre retour à la ligne pour mots longs */
}

.spectacle-link {
    display: inline-block;
    width: 100%;
    text-align: center;
    color: #1F286B;
    text-decoration: none;
    transition: color 0.3s ease;
}

.spectacle-link:hover {
    color: #2A3A9C;
    text-decoration: underline;
}

.compagnie {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em;
    color: #666;
    margin: 0 0 10px 0;
}

.horaires {
    flex-grow: 1;
    overflow-y: auto;
}

.horaire {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em;
    color: #666;
    margin: 5px 0;
}

/* Vue par jour et heure */
.spectacles-list {
    flex: 1;
    padding: 20px;
}

.day-section {
    margin-bottom: 20px;
}

.day-title {
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1F286B;
    margin-bottom: 10px;
    border-left: 4px solid #1F286B;
    padding-left: 10px;
    cursor: pointer;
    position: relative;
}

.day-title::after {
    content: '\25BC'; /* Flèche vers le bas */
    position: absolute;
    right: 10px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.day-title.today::after {
    transform: rotate(180deg); /* Flèche vers le haut pour aujourd'hui */
}

.spectacles-day-list.collapsed + .day-title::after {
    transform: rotate(0deg); /* Flèche vers le bas si replié */
}

.spectacles-day-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}

.spectacles-day-list:not(.collapsed) {
    height: auto; /* Hauteur dynamique */
}

.spectacle-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    background-color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.2s ease;
}

.spectacle-item:hover {
    transform: translateX(5px);
}

.spectacle-item.finished-spectacle {
    background-color: #E0E0E0;
    opacity: 0.8;
}

.spectacle-item.future-spectacle {
    background-color: #F5F5F5;
}

.spectacle-item.running-spectacle {
    background-color: #FFD8A8;
}

.spectacle-item.soon-spectacle {
    background-color: #D4F4DD; /* Fond vert clair pour toute la ligne */
}

.status-band {
    width: 30px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    border-radius: 5px 0 0 5px;
    text-transform: uppercase;
}

.spectacle-item.running-spectacle .status-band {
    background-color: #FF6F00;
}

.spectacle-item.finished-spectacle .status-band {
    background-color: #A0A0A0;
}

.spectacle-item.future-spectacle .status-band {
    background-color: #1F286B;
}

/* Règle plus spécifique pour soon-spectacle */
.spectacle-item.future-spectacle.soon-spectacle .status-band,
.spectacle-item.soon-spectacle .status-band {
    background-color: #00CC66; /* Bande verte pour BIENTÔT */
}

.spectacle-content {
    display: flex;
    align-items: center;
    width: 100%;
    padding-left: 35px;
}

.spectacle-time-wrapper {
    position: relative;
    min-width: 60px;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.spectacle-time {
    font-weight: bold;
    color: #1F286B;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.spectacle-info {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.spectacle-name {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1F286B;
}

.spectacle-details {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #666;
}

/* Style des pastilles de statut */
.status-dot {
    display: inline-block;
    margin-left: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.status-dot.running {
    background-color: #FF6F00;
    animation: spin 1s linear infinite;
}

.status-dot.running::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #FF6F00;
    border-radius: 50%;
    opacity: 0.5;
}

.status-dot.soon {
    background-color: #00CC66;
    animation: spin 1s linear infinite;
}

.status-dot.soon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #00CC66;
    border-radius: 50%;
    opacity: 0.5;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style de la flèche pour le prochain spectacle */
.next-arrow {
    position: absolute;
    left: -75px;
    width: 15px;
    height: 15px;
    border-top: 4px solid #1F286B;
    border-right: 4px solid #1F286B;
    transform: rotate(45deg);
}

/* Responsive */
@media (max-width: 768px) {
    .programmation-page {
        padding: 20px 0;
    }
    .programmation-page h1 {
        font-size: 28px;
    }
    .main-content {
        flex-direction: column;
    }
    .filters-sidebar {
        flex: none;
        width: 100%;
    }
    .spectacles-container {
        grid-template-columns: 1fr;
    }
    .spectacle-card {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    .spectacle-info h2 {
        font-size: 1.1em; /* Ajustement pour petits écrans */
    }
    .day-title {
        font-size: 20px;
    }
    .spectacle-item {
        padding: 10px;
        flex-direction: column;
        align-items: stretch; /* Étend les éléments pour éviter superposition */
        position: relative;
    }
    .spectacle-content {
        padding-left: 0;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .status-band {
        width: 100%;
        height: 30px; /* Hauteur augmentée pour clarté */
        writing-mode: horizontal-tb;
        text-orientation: upright;
        border-radius: 5px 5px 0 0;
        padding: 5px;
        font-size: 14px;
        text-align: center;
        position: static; /* Plus absolu pour éviter chevauchement */
    }
    .spectacle-time-wrapper {
        margin: 10px 0 5px 0; /* Espacement clair sous le statut */
        padding-left: 0;
        width: 100%;
        position: relative;
    }
    .spectacle-time {
        font-size: 22px; /* Plus grand pour mise en avant */
        font-weight: 900; /* Très gras */
        color: #1F286B;
        justify-content: center; /* Centré pour visibilité */
    }
    .status-dot {
        margin-left: 10px;
        width: 14px;
        height: 14px;
    }
    .spectacle-info {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        text-align: center; /* Centré pour clarté */
    }
    .spectacle-name {
        font-size: 18px; /* Légèrement plus grand */
        margin-bottom: 8px;
    }
    .spectacle-details {
        font-size: 14px;
        line-height: 1.5;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .spectacle-details::before {
        content: ""; /* Réinitialise pour éviter interférences */
    }
    .spectacle-details span {
        display: inline-block;
    }
    .spectacle-details .lieu {
        font-weight: 700; /* Lieu en gras */
        color: #2A3A9C; /* Couleur distincte */
        font-size: 16px; /* Plus grand */
    }
    .next-arrow {
        left: 10px;
        top: 45px; /* Ajusté pour être sous le statut et près de l'heure */
    }
    .initial-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .btn, .btn-toggle {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .programmation-page h1 {
        font-size: 24px;
    }
    .main-content {
        padding: 15px;
    }
    .filters-sidebar h2,
    .day-title {
        font-size: 18px;
    }
    .btn, .btn-toggle {
        font-size: 14px;
        padding: 8px;
    }
    .spectacle-time {
        font-size: 20px; /* Légère réduction pour petits écrans */
    }
    .spectacle-name {
        font-size: 16px;
    }
    .spectacle-details {
        font-size: 13px;
    }
    .spectacle-details .lieu {
        font-size: 14px;
    }
    .spectacle-info h2 {
        font-size: 1em; /* Ajustement pour très petits écrans */
    }
}

/* Style général pour les titres h2 dans .spectacle-info (pour programmation.php) */
.spectacle-info h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.3em; /* Taille ajustée */
    color: #1F286B;
    margin: 0 10px 5px 10px;
    font-weight: 700;
    text-align: center;
    overflow-wrap: break-word;
}

/* Réduction de la taille pour programmationhph.php */
.spectacles-list .spectacle-info h2 {
    font-size: 16px; /* Taille d'origine de .spectacle-name */
}

/* Conserver .spectacle-name au cas où il est utilisé ailleurs */
.spectacle-name {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1F286B;
}