/* Conteneur global pour le calendrier et l'affichage des événements */
.ticketing-calendar-wrapper {
    display: flex;
    flex-wrap: wrap; /* Permet le passage à la ligne sur petits écrans */
    gap: 30px; /* Espace entre les colonnes */
    font-family: sans-serif;
    max-width: 1200px; /* Limite la largeur maximale */
    margin: 20px auto; /* Centre le wrapper */
}

/* Colonne du calendrier */
.calendar-column {
    flex: 1 1 350px; /* Base de 350px, peut grandir/rétrécir */
    min-width: 300px; /* Largeur minimale */
    background-color: #8B0000; /* Fond bordeaux foncé */
    color: #FFFFFF; /* Texte blanc par défaut */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Colonne d'affichage des événements */
.events-display-column {
    flex: 2 1 500px; /* Base de 500px, prend plus de place */
    min-width: 300px;
}

/* Boutons en haut de la colonne événements */
.events-display-column .all-events-button,
.events-display-column .account-button {
    background-color: #8B0000; /* Bordeaux */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.events-display-column .all-events-button:hover,
.events-display-column .account-button:hover {
    background-color: #A52A2A; /* Bordeaux plus clair */
}


/* Styles internes au calendrier */
.calendar {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px; /* Réduit le padding */
    margin-bottom: 10px;
    /* La couleur de fond est définie en JS */
}

.calendar-header #month-year {
    font-weight: bold;
    font-size: 1.1em;
}

.calendar-nav-button {
    background: none;
    border: 1px solid #FFFFFF; /* Bordure blanche */
    color: #FFFFFF; /* Texte blanc */
    cursor: pointer;
    font-size: 1.2em;
    padding: 2px 8px; /* Ajuste le padding */
    border-radius: 4px;
    line-height: 1; /* Assure un bon alignement vertical */
}
.calendar-nav-button:hover {
     background-color: rgba(255, 255, 255, 0.2);
}


.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    padding: 8px 0;
    margin-bottom: 5px;
    /* La couleur de fond est définie en JS */
    border-radius: 4px; /* Coins arrondis */
}
.calendar-weekdays span {
    padding: 5px;
    font-size: 0.9em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px; /* Espace entre les jours */
}

.calendar-day {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px; /* Hauteur fixe pour les jours */
    border-radius: 50%; /* Rend les jours ronds */
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.9em;
}
.calendar-day:not(.empty):hover {
    background-color: rgba(255, 255, 255, 0.1); /* Léger fond blanc au survol */
}

.calendar-day.empty {
    cursor: default;
    background-color: transparent;
}

.calendar-day .day-number {
    z-index: 1; /* S'assurer que le numéro est au-dessus */
}

/* Jour avec événements */
.calendar-day.has-events {
    /* La couleur de fond est définie en JS (eventBgColor - Or) */
    font-weight: bold;
}
.calendar-day.has-events .day-number {
     /* La couleur du texte est définie en JS (noir) */
}


/* Jour actuel */
.calendar-day.today {
   border: 2px solid #FFB6C1; /* Bordure rose clair pour aujourd'hui */
   /* Le fond reste celui de has-events s'il y a des événements */
}

/* Jour sélectionné */
.calendar-day.selected {
    /* La couleur de fond est définie en JS (selectedBgColor - Rose clair) */
    color: #000000 !important; /* Texte noir pour la sélection */
    font-weight: bold;
}
.calendar-day.selected .day-number {
    color: #000000 !important; /* Assure que le numéro est noir */
}


/* Styles pour l'affichage des événements du jour */
.events-for-day {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Grille responsive */
    gap: 20px;
}

.event-display-item {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.event-display-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.event-display-item h3 {
    font-size: 1.1em;
    margin: 0 0 5px 0;
    color: #333;
    /* Eviter les débordements de texte trop longs */
    overflow-wrap: break-word;
    word-wrap: break-word;
    /* Assurer que le titre n'est affiché qu'une seule fois si trop long */
    white-space: normal;
}

.event-display-item p {
    font-size: 0.9em;
    color: #555;
    margin: 0 0 10px 0;
}

.event-reservation-link {
    display: inline-block;
    background-color: #8B0000; /* Bordeaux */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.event-reservation-link:hover {
    background-color: #A52A2A; /* Bordeaux plus clair */
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .ticketing-calendar-wrapper {
        flex-direction: column; /* Empile les colonnes */
    }
    .calendar-column, .events-display-column {
        flex-basis: auto; /* Permet aux colonnes de prendre toute la largeur */
    }
}
