/* --- Styles Généraux --- */
body {
    font-family: system-ui, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    line-height: 1.4;
    padding-bottom: 80px; /* Espace pour la barre de navigation fixe */
    font-size: clamp(1rem, 2vw, 1.25rem);
}

h1,
h2 {
    color: #2c3e50;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main {
    max-width: 1200px;
    margin: 10px auto;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: #777;
}

/* --- Mise en Page de l'Administration --- */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

header h1 {
    margin: 0;
    color: #fff;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 1rem 0 0 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

nav a {
    color: #fff;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover,
nav a.active {
    background-color: #3498db;
    text-decoration: none;
}

/* --- Tableaux de Données --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

th,
td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

thead {
    background-color: #ecf0f1;
    color: #2c3e50;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

tbody tr:hover {
    background-color: #e8f4f8;
}

/* --- Styles pour les productions en cours --- */
tbody tr.ongoing-production {
    font-weight: bold;
}

/* --- Styles pour les formulaires de production --- */
.form-group {
    margin-bottom: 15px;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="time"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

/* Styles spéciaux pour les champs multiples */
.form-group select[multiple] {
    height: 120px;
    padding: 5px;
}

/* Style pour les checkbox */
.form-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.form-group label input[type="checkbox"] {
    display: inline;
    margin-bottom: 0;
}

/* Style pour les nouveaux champs série */
.form-group input[type="text"]#nouvelle_serie {
    margin-top: 5px;
    background-color: #f8f9fa;
    border-style: dashed;
}

.form-group input[type="text"]#nouvelle_serie:focus {
    background-color: #ffffff;
    border-style: solid;
}

/* Messages d'aide */
.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
    line-height: 1.3;
}

/* Conteneur de formulaire */
.form-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}

/* Actions de formulaire */
.form-actions {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

/* Boutons */
.btn-add {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-add:hover {
    background-color: #218838;
    text-decoration: none;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-cancel:hover {
    background-color: #545b62;
    text-decoration: none;
}

/* Messages de succès et d'erreur */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin: 15px 0;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 15px 0;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

/* Détails de production */
.details-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.details-container h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
}

.details-container p {
    margin: 8px 0;
}

.details-container ul {
    margin: 10px 0;
    padding-left: 20px;
}

.details-container li {
    margin: 5px 0;
}

/* Style responsive pour les tableaux */
@media (max-width: 768px) {
    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 8px 4px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-add,
    .btn-cancel {
        width: 100%;
        text-align: center;
    }
}

/* Styles pour les autres pages existantes */
.fixed-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #007cba;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.navigation {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.navigation li {
    flex: 1;
}

.navigation a {
    display: block;
    padding: 15px 10px;
    text-align: center;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s;
}

.navigation a:hover,
.navigation a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.navigation li:last-child a {
    border-right: none;
}

/* Styles pour la barre d'outils (si présente) */
.toolbar {
    background-color: #34495e;
    padding: 10px;
    text-align: center;
}

.toolbar button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar button:hover {
    background-color: #2980b9;
}

/* Styles pour les éléments spéciaux */
.highlight {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Styles pour les listes d'éléments */
.item-list {
    list-style-type: none;
    padding: 0;
}

.item-list li {
    background-color: #f8f9fa;
    margin: 5px 0;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.item-list li:hover {
    background-color: #e9ecef;
}

/* --- Styles pour l'Agenda et FullCalendar --- */
#calendar {
    margin-top: 0;
}

.fc-header-toolbar {
    margin-bottom: 0.3rem;
}

.fc-toolbar-chunk {
    align-items: center;
}

.fc-toolbar {
    margin-bottom: 0.1rem !important;
    padding: 0 !important;
    height: auto;
    min-height: 2rem;
}

.fc-toolbar-title {
    font-size: 1.2rem;
    margin: 0;
    line-height: 1;
    padding: 0.2rem 0;
}

.fc .fc-toolbar > * > :not(:first-child) {
    margin-left: 0;
}

.fc-direction-ltr .fc-toolbar > * > :not(:first-child) {
    margin-left: 0;
}

.fc-daygrid-header-row {
    height: 1.8em;
}

.fc-scrollgrid {
    border: none;
}

.fc-theme-standard th {
    border: 1px solid #ddd;
    background: #f8f9fa;
}

/* Hauteur des cellules de jour dans la vue mois */
.fc-daygrid-day {
    min-height: 120px;
}

.fc-daygrid-day-frame {
    min-height: 120px;
}

.fc-col-header-cell {
    padding: 0.3rem 0.5rem;
}

.fc-daygrid-day-number {
    padding: 0.15rem;
    margin: 0.05rem;
    font-size: 0.95rem;
    line-height: 1.2;
}

.fc-event {
    cursor: pointer;
    border: 1px solid #fff;
    border-radius: 3px;
    font-weight: 500;
    color: #fff !important;
}

.fc-event-main {
    padding: 4px;
    color: #fff !important;
}

.fc-event-title {
    color: #fff !important;
}

.fc-daygrid-event-dot {
    display: none;
}

.fc-daygrid-body {
    border-top: none;
}

.fc-scrollgrid-section > * {
    border: none;
}

/* --- Barre de Navigation en Bas --- */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #343a40;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 3px;
    margin: 0 auto;
    padding: 0 3px;
    flex-wrap: nowrap;
}

.nav-btn {
    flex: 1;
    background-color: #495057;
    color: #fff;
    border: none;
    padding: 14px 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.nav-btn.nav-arrow {
    flex: 0.5;
    padding: 14px 12px;
    font-size: 20px;
    font-weight: 700;
    background-color: #3498db;
}

.nav-btn.nav-arrow:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

.nav-btn:hover {
    background-color: #3498db;
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}

.nav-btn.active {
    background-color: #3498db;
    color: #fff;
}

/* --- Affichage des Services dans les Vues --- */
.event-details-day-view {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: #333;
    margin-top: 4px;
    white-space: normal;
    line-height: 1.3;
}

.event-details-day-view .event-column {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.event-details-day-view .event-left,
.event-details-day-view .event-right {
    flex: 1;
}

.event-details-day-view .event-left {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    padding-right: 10px;
}

.event-details-day-view .event-right {
    padding-left: 10px;
}

/* --- Clickable Dates --- */
.fc-daygrid-day-number {
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 4px;
    border-radius: 4px;
}

.fc-daygrid-day-number:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

.fc-col-header-cell a {
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}

.fc-col-header-cell a:hover {
    background-color: rgba(52, 152, 219, 0.2);
}

/* --- Styles pour la Fenêtre Modale --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close:hover {
    color: #333;
}

#modalTitle {
    margin-top: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 1rem;
    color: #2c3e50;
}

#modalBody {
    margin-top: 1rem;
}

#modalBody .modal-section {
    margin-bottom: 1.5rem;
}

#modalBody .modal-section h3 {
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 0.8rem;
}

#modalBody ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0.5rem 0;
}

#modalBody li {
    margin-bottom: 0.3rem;
}

#modalBody p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

#modalBody .service-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #3498db;
}

#modalBody .service-info p {
    margin: 0.3rem 0;
}

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

/* --- Styles pour la Vue Publique (index.php) --- */
body.public-view {
    background-color: #f8f9fa;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    color: #212529;
}

.public-header {
    background-color: #343a40;
    color: #fff;
    padding: 0.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.public-header h1 {
    margin: 0;
    font-size: 1.6rem;
    color: #fff;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.back-home-link {
    font-size: 1.5em;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.back-home-link:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

.public-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.public-footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* --- Amélioration de l'affichage des événements dans les différentes vues --- */
.fc-daygrid-event-harness {
    margin-bottom: 2px;
}

.fc-timegrid-event-harness {
    margin-bottom: 1px;
}

.fc-event-title {
    font-weight: 600;
}

/* --- Amélioration de la vue mois avec zones fixes --- */
.fc-daygrid-day-events {
    margin-bottom: 2px;
    min-height: 100px;
    height: 100px;
}

.fc-daygrid-event {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin: 2px 0;
    padding: 4px 8px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

.clickable-event {
    cursor: pointer !important;
}

.clickable-event:hover {
    opacity: 0.9;
}

.event-simple {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    line-height: 1.1;
}

/* Ajustements pour les petits écrans */
@media (max-width: 768px) {
    .fc-daygrid-day {
        min-height: 85px;
    }

    .fc-daygrid-day-frame {
        min-height: 85px;
    }

    .event-simple {
        font-size: 9px;
    }
}

.fc-daygrid-event .fc-event-title {
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.fc-daygrid-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

/* --- Amélioration de la vue semaine --- */
.fc-timegrid-event {
    border-radius: 4px;
    margin: 1px 0;
}

/* --- Amélioration de la vue jour avec texte plus grand --- */
.fc-timegrid-slot {
    height: 2.5em;
}

.fc-timegrid-slot-label {
    vertical-align: middle;
    font-size: 13px;
}

.fc-timegrid-event {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    padding: 4px 6px;
}

.fc-timegrid-event .fc-event-title {
    font-size: 15px;
    font-weight: 600;
}

.event-details-day-view {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.3;
}

.event-details-day-view .event-left,
.event-details-day-view .event-right {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.event-details-day-view .event-left div:first-child {
    font-size: 14px;
    font-weight: 700;
}

/* --- Couleurs par série de production - 9 séries officielles distinctes --- */

/* Opéra et ballet - OKLCH H:345° */
.serie-opera_ballet {
    background-color: #D868AC !important;
    border-color: #B23887 !important;
}
.serie-opera_ballet .fc-event-main {
    background-color: #D868AC !important;
}
.serie-opera_ballet .fc-event-title {
    color: #fff !important;
}

/* Abonnement - OKLCH H:265° */
.serie-abonnement {
    background-color: #6093F2 !important;
    border-color: #326ACE !important;
}
.serie-abonnement .fc-event-main {
    background-color: #6093F2 !important;
}
.serie-abonnement .fc-event-title {
    color: #fff !important;
}

/* Enregistrement - OKLCH H:305° */
.serie-enregistrement {
    background-color: #AC7AE1 !important;
    border-color: #884FBC !important;
}
.serie-enregistrement .fc-event-main {
    background-color: #AC7AE1 !important;
}
.serie-enregistrement .fc-event-title {
    color: #fff !important;
}

/* Cinéconcert - OKLCH H:225° */
.serie-cineconcert {
    background-color: #00A9DC !important;
    border-color: #0082B8 !important;
}
.serie-cineconcert .fc-event-main {
    background-color: #00A9DC !important;
}
.serie-cineconcert .fc-event-title {
    color: #fff !important;
}

/* Déplacement - OKLCH H:105° */
.serie-deplacement {
    background-color: #A59A00 !important;
    border-color: #807300 !important;
}
.serie-deplacement .fc-event-main {
    background-color: #A59A00 !important;
}
.serie-deplacement .fc-event-title {
    color: #fff !important;
}

/* Scolaire et famille - OKLCH H:185° */
.serie-scolaire_famille {
    background-color: #00B4A3 !important;
    border-color: #008E7D !important;
}
.serie-scolaire_famille .fc-event-main {
    background-color: #00B4A3 !important;
}
.serie-scolaire_famille .fc-event-title {
    color: #fff !important;
}

/* L'OSR c'est vous - OKLCH H:145° */
.serie-osr_cest_vous {
    background-color: #47AF4D !important;
    border-color: #008908 !important;
}
.serie-osr_cest_vous .fc-event-main {
    background-color: #47AF4D !important;
}
.serie-osr_cest_vous .fc-event-title {
    color: #fff !important;
}

/* Estival - OKLCH H:25° */
.serie-estival {
    background-color: #E7685E !important;
    border-color: #C1362F !important;
}
.serie-estival .fc-event-main {
    background-color: #E7685E !important;
}
.serie-estival .fc-event-title {
    color: #fff !important;
}

/* Extraordinaire - OKLCH H:65° */
.serie-extraordinaire {
    background-color: #D67E00 !important;
    border-color: #B15200 !important;
}
.serie-extraordinaire .fc-event-main {
    background-color: #D67E00 !important;
}
.serie-extraordinaire .fc-event-title {
    color: #fff !important;
}

/* Couleur par défaut pour les séries non définies */
.fc-event:not([class*="serie-"]),
.fc-daygrid-event:not([class*="serie-"]),
.fc-event-main:not([class*="serie-"]),
.fc-timegrid-event:not([class*="serie-"]),
.fc-timegrid-event .fc-event-main:not([class*="serie-"]) {
    background-color: #95a5a6 !important;
    border-color: #7f8c8d !important;
    color: #fff !important;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    body {
        padding-bottom: 75px;
    }

    .public-header {
        padding: 0.4rem 0.3rem;
    }

    .public-header h1 {
        font-size: 1.3rem;
        margin: 0;
    }

    .public-container {
        margin: 0.1rem auto;
        padding: 0 0.3rem;
    }

    main {
        margin: 2px auto;
        padding: 8px;
    }

    .nav-buttons {
        gap: 3px;
        padding: 0 3px;
    }

    .nav-btn {
        padding: 12px 5px;
        font-size: 14px;
        border-radius: 8px;
        white-space: normal;
    }

    .nav-btn.nav-arrow {
        padding: 10px 8px;
        font-size: 16px;
        border-radius: 8px;
        white-space: nowrap;
    }

    /* Calendrier mobile */
    .fc-toolbar {
        padding: 0 !important;
        margin-bottom: 0 !important;
        min-height: 1.5rem;
    }

    .fc-toolbar-title {
        font-size: 0.95rem;
        margin: 0;
        line-height: 1;
        padding: 0.1rem 0;
    }

    .fc-daygrid-header-row {
        height: 1.5em;
    }

    .fc-col-header-cell {
        padding: 0.2rem 0.3rem;
    }

    .fc-daygrid-day-number {
        padding: 0.1rem;
        margin: 0.05rem;
        font-size: 0.9rem;
    }

    .fc-daygrid-event {
        font-size: 11px;
        padding: 1px 4px;
    }

    .fc-timegrid-event {
        font-size: 13px;
        padding: 3px 5px;
    }

    .event-details-day-view {
        font-size: 16px;
        color: #fff;
    }
    @media (max-width: 768px) {
        .event-details-day-view {
            font-size: 18px;
            color: #fff;
        }
    }

    .event-details-day-view .event-left,
    .event-details-day-view .event-right {
        font-size: 16px;
        color: #fff;
    }
    @media (max-width: 768px) {
        .event-details-day-view .event-left,
        .event-details-day-view .event-right {
            font-size: 18px;
            color: #fff;
        }
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .event-details-day-view .event-column {
        flex-direction: row;
        gap: 10px;
    }
    @media (max-width: 768px) {
        .event-details-day-view .event-column {
            flex-direction: row !important;
            gap: 10px;
        }
    }

    .event-details-day-view .event-left {
        border-right: 1px solid rgba(255, 255, 255, 0.3);
        border-bottom: none;
        padding-right: 10px;
        padding-bottom: 0;
    }
    @media (max-width: 768px) {
        .event-details-day-view .event-left {
            border-right: 1px solid rgba(255, 255, 255, 0.3);
            border-bottom: none;
            padding-right: 10px;
            padding-bottom: 0;
        }
    }

    .event-details-day-view .event-right {
        padding-left: 10px;
        padding-top: 0;
    }
    @media (max-width: 768px) {
        .event-details-day-view .event-right {
            padding-left: 10px;
            padding-top: 0;
        }
    }

    /* Adaptation du calendrier pour mobile */
    .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }

    .fc-button-group .fc-button {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* Réduire la taille des événements en vue mois sur mobile */
    .fc-daygrid-event {
        font-size: 0.8em;
    }

    /* Ajustements pour la vue semaine sur mobile */
    .fc-timegrid-event {
        font-size: 0.75em;
    }

    /* Ajustements pour la vue jour sur mobile */
    .fc-timegrid-slot {
        height: 1.5em;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 80px;
    }

    .nav-buttons {
        gap: 2px;
        padding: 0 2px;
    }

    .nav-btn {
        padding: 10px 3px;
        font-size: 12px;
        border-radius: 6px;
    }

    .nav-btn.nav-arrow {
        padding: 8px 4px;
        font-size: 14px;
        border-radius: 6px;
    }

    .modal-content {
        padding: 1rem;
        width: 98%;
    }

    .public-header {
        padding: 0.3rem 0.2rem;
    }

    .public-header h1 {
        font-size: 1.1rem;
    }

    .public-container {
        margin: 0;
        padding: 0 0.2rem;
    }

    main {
        margin: 0;
        padding: 5px;
    }

    .fc-toolbar-title {
        font-size: 0.85rem;
        line-height: 1;
        padding: 0.05rem 0;
    }

    .fc-daygrid-header-row {
        height: 1.3em;
    }

    .fc-col-header-cell {
        padding: 0.1rem 0.2rem;
    }

    .fc-daygrid-day-number {
        padding: 0.1rem;
        margin: 0;
        font-size: 0.8rem;
    }

    /* Vue très condensée pour les très petits écrans */
    .fc-daygrid-event {
        font-size: 10px;
        padding: 1px 3px;
    }

    .fc-timegrid-event {
        font-size: 12px;
        padding: 3px 4px;
    }

    .event-details-day-view {
        font-size: 11px;
    }

    .event-details-day-view .event-left,
    .event-details-day-view .event-right {
        font-size: 10px;
    }

    .fc-timegrid-slot {
        height: 2em;
    }
}
/* Couleurs par série de production pour FullCalendar 6.x */
.fc-event.serie-abonnement,
.fc-daygrid-event.serie-abonnement,
.fc-event-main.serie-abonnement,
.fc-timegrid-event.serie-abonnement,
.fc-timegrid-event .fc-event-main.serie-abonnement {
    background-color: #3498db !important;
    border-color: #2980b9 !important;
    color: #fff !important;
}
.fc-event.serie-opéra,
.fc-daygrid-event.serie-opéra,
.fc-event-main.serie-opéra,
.fc-timegrid-event.serie-opéra,
.fc-timegrid-event .fc-event-main.serie-opéra {
    background-color: #e74c3c !important;
    border-color: #c0392b !important;
    color: #fff !important;
}
.fc-event.serie-cinéconcert,
.fc-daygrid-event.serie-cinéconcert,
.fc-event-main.serie-cinéconcert,
.fc-timegrid-event.serie-cinéconcert,
.fc-timegrid-event .fc-event-main.serie-cinéconcert {
    background-color: #9b59b6 !important;
    border-color: #8e44ad !important;
    color: #fff !important;
}
.fc-event.serie-déplacement,
.fc-daygrid-event.serie-déplacement,
.fc-event-main.serie-déplacement,
.fc-timegrid-event.serie-déplacement,
.fc-timegrid-event .fc-event-main.serie-déplacement {
    background-color: #f39c12 !important;
    border-color: #e67e22 !important;
    color: #fff !important;
}
.fc-event.serie-enregistrement,
.fc-daygrid-event.serie-enregistrement,
.fc-event-main.serie-enregistrement,
.fc-timegrid-event.serie-enregistrement,
.fc-timegrid-event .fc-event-main.serie-enregistrement {
    background-color: #2ecc71 !important;
    border-color: #27ae60 !important;
    color: #fff !important;
}
.fc-event.serie-extraordinaire,
.fc-daygrid-event.serie-extraordinaire,
.fc-event-main.serie-extraordinaire,
.fc-timegrid-event.serie-extraordinaire,
.fc-timegrid-event .fc-event-main.serie-extraordinaire {
    background-color: #D67E00 !important;
    border-color: #ad1457 !important;
    color: #fff !important;
}
.fc-event.serie-jeune,
.fc-daygrid-event.serie-jeune,
.fc-event-main.serie-jeune,
.fc-timegrid-event.serie-jeune,
.fc-timegrid-event .fc-event-main.serie-jeune {
    background-color: #1abc9c !important;
    border-color: #16a085 !important;
    color: #fff !important;
}
.fc-event.serie-famille,
.fc-daygrid-event.serie-famille,
.fc-event-main.serie-famille,
.fc-timegrid-event.serie-famille,
.fc-timegrid-event .fc-event-main.serie-famille {
    background-color: #ff9800 !important;
    border-color: #f57c00 !important;
    color: #fff !important;
}
/* Couleur par défaut */
.fc-event:not([class*="serie-"]),
.fc-daygrid-event:not([class*="serie-"]),
.fc-event-main:not([class*="serie-"]) {
    background-color: #95a5a6 !important;
    border-color: #7f8c8d !important;
    color: #fff !important;
}
/* Supprimer le fond gris par défaut dans les vues semaine/jour */
.fc-timegrid-event {
    background: none !important;
}

/* Couleurs par série pour le conteneur ET le contenu */
.fc-timegrid-event.serie-abonnement,
.fc-timegrid-event .fc-event-main.serie-abonnement {
    background-color: #3498db !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-opéra,
.fc-timegrid-event .fc-event-main.serie-opéra {
    background-color: #e74c3c !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-cinéconcert,
.fc-timegrid-event .fc-event-main.serie-cinéconcert {
    background-color: #9b59b6 !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-déplacement,
.fc-timegrid-event .fc-event-main.serie-déplacement {
    background-color: #f39c12 !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-enregistrement,
.fc-timegrid-event .fc-event-main.serie-enregistrement {
    background-color: #2ecc71 !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-extraordinaire,
.fc-timegrid-event .fc-event-main.serie-extraordinaire {
    background-color: #D67E00 !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-jeune,
.fc-timegrid-event .fc-event-main.serie-jeune {
    background-color: #1abc9c !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-famille,
.fc-timegrid-event .fc-event-main.serie-famille {
    background-color: #ff9800 !important;
    color: #fff !important;
}

/* Couleur par défaut si aucune série */
.fc-timegrid-event:not([class*="serie-"]),
.fc-timegrid-event .fc-event-main:not([class*="serie-"]) {
    background-color: #95a5a6 !important;
    color: #fff !important;
}
/* Correction prioritaire pour FullCalendar 6.x */
.fc-event-main[class*="serie-"] {
    background-color: inherit !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-abonnement .fc-event-main,
.fc-event-main.serie-abonnement {
    background-color: #3498db !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-opéra .fc-event-main,
.fc-event-main.serie-opéra {
    background-color: #e74c3c !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-cinéconcert .fc-event-main,
.fc-event-main.serie-cinéconcert {
    background-color: #9b59b6 !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-déplacement .fc-event-main,
.fc-event-main.serie-déplacement {
    background-color: #f39c12 !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-enregistrement .fc-event-main,
.fc-event-main.serie-enregistrement {
    background-color: #2ecc71 !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-extraordinaire .fc-event-main,
.fc-event-main.serie-extraordinaire {
    background-color: #D67E00 !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-jeune .fc-event-main,
.fc-event-main.serie-jeune {
    background-color: #1abc9c !important;
    color: #fff !important;
}
.fc-timegrid-event.serie-famille .fc-event-main,
.fc-event-main.serie-famille {
    background-color: #ff9800 !important;
    color: #fff !important;
}
/* Couleur par défaut si aucune série */
.fc-event-main:not([class*="serie-"]) {
    background-color: #95a5a6 !important;
    color: #fff !important;
}

/* --- Statistics Menu --- */
.stats-menu-container {
    padding: 30px 20px;
    background-color: #f8f9fa;
    margin-top: 20px;
    border-radius: 8px;
}

.stats-menu-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.stats-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-menu-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2c3e50;
}

.stats-menu-link:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.stats-icon {
    font-size: 2.5rem;
    text-align: center;
}

.stats-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
}

.stats-desc {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* --- Musician Stats (Legacy) --- */
.musician-stats-container {
    padding: 20px;
    background-color: #f8f9fa;
    margin-top: 20px;
}

.musician-stats-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.musician-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.musician-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.musician-card h3 {
    margin-top: 0;
    color: #3498db;
}

.musician-card p {
    margin: 10px 0 0;
}

.header-subtitle {
    font-size: 1rem;
    font-weight: normal;
    color: #ccc;
    margin-left: 10px;
}

.musician-filter-dropdown {
    font-size: 1rem;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-left: 10px;
}
