body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #9FAECB;
	background-color: #345089;
}

.filtres {
    background-color: #345089;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.filtres select, .filtres input {
    padding: 8px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filtres button {
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filtres button:hover {
    background-color: #45a049;
}

.calendrier {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-top: 20px;
    width: 80%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
}

.jour {
    border: 1px solid #ddd;
    padding: 1%;
    position: relative;
    transition: all 0.3s ease;
    background-color: white;
    color: #9FAECB;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    aspect-ratio: 1;
    margin-bottom: 3px;
}

.jour div[style*="font-size: 0.9em"] {
    color: #345089;
}

.jour-nom {
    font-weight: bold;
    margin-bottom: 2px;
    text-align: center;
    width: 100%;
    font-size: 0.8em;
}

.jour-numero {
    position: absolute;
    top: 2%;
    right: 2%;
    font-size: 0.7em;
    color: #666;
}

.disponible {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.non-disponible {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.samedi-transition-dispo-non {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #d4edda 50%, #f8d7da 50%);
}

.samedi-transition-dispo-non::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d4edda 50%, #f8d7da 50%);
    z-index: -1;
}

.samedi-transition-non-dispo {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8d7da 50%, #d4edda 50%);
}

.samedi-transition-non-dispo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8d7da 50%, #d4edda 50%);
    z-index: -1;
}

.vide {
    background-color: white;
}

.loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #9FAECB;
}

.legende {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legende-couleur {
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
}

.jour.highlight {
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transform: scale(1.02);
    z-index: 1;
}

.jour.in-period {
    border: 2px solid #F072DB;
    z-index: 0;
}

.samedi-transition {
    position: relative;
    overflow: hidden;
}

.samedi-transition::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8d7da 50%, #d4edda 50%);
    z-index: -1;
}

.legende-samedi {
    background: linear-gradient(135deg, #f8d7da 50%, #d4edda 50%);
}

#titre-mois {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    font-size: 1.5em;
    color: #9FAECB;
    background-color: #345089;
    padding: 10px;
    border-radius: 5px;
    font-weight: 900;
}

#titre-mois button {
    background: none;
    border: none;
    color: #9FAECB;
    font-size: 1.5em;
    cursor: pointer;
}

/* Styles pour les petits écrans */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .filtres {
        padding: 10px;
        margin-bottom: 10px;
    }

    .filtres select, .filtres input {
        padding: 6px;
        margin-right: 5px;
        font-size: 0.9em;
    }

    .filtres button {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .calendrier {
        gap: 3px;
        margin-top: 10px;
    }

    .jour {
        padding: 1%;
        font-size: 0.8em;
    }

    .jour-nom {
        font-size: 0.8em;
        margin-bottom: 2px;
    }

    .jour-numero {
        font-size: 0.7em;
    }

    .legende {
        flex-wrap: wrap;
        gap: 10px;
        margin: 10px 0;
        padding: 10px;
    }

    .legende-item {
        font-size: 0.8em;
    }

    .legende-couleur {
        width: 15px;
        height: 15px;
    }

    #titre-mois {
        margin: 10px 0;
        font-size: 1.2em;
        padding: 8px;
    }

    #titre-mois button {
        font-size: 1.2em;
    }

    /* Ajustement pour les informations de prix et disponibilité */
    .jour div[style*="font-size: 0.9em"] {
        font-size: 0.7em !important;
        line-height: 1.2;
        padding: 0 5%;
        color: #345089;
    }

    .samedi-transition-dispo-non,
    .samedi-transition-non-dispo {
        position: relative;
        background: linear-gradient(135deg, #d4edda 50%, #f8d7da 50%);
        border: 2px solid #666;
    }
    
    .samedi-transition-dispo-non::before,
    .samedi-transition-non-dispo::before {
        display: none;
    }
    
    .samedi-transition-dispo-non {
        background: linear-gradient(135deg, #d4edda 50%, #f8d7da 50%);
        border-color: #d4edda;
    }
    
    .samedi-transition-non-dispo {
        background: linear-gradient(135deg, #f8d7da 50%, #d4edda 50%);
        border-color: #f8d7da;
    }
}

/* Styles pour les très petits écrans */
@media screen and (max-width: 480px) {
    .filtres {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .filtres select, .filtres input {
        width: 100%;
        margin-right: 0;
    }

    .filtres button {
        width: 100%;
    }

    .jour {
        font-size: 0.7em;
    }

    .jour-nom {
        font-size: 0.7em;
    }

    .jour-numero {
        font-size: 0.6em;
    }

    #titre-mois {
        font-size: 1em;
    }

    #titre-mois button {
        font-size: 1em;
    }

    .samedi-transition-dispo-non,
    .samedi-transition-non-dispo {
        border-width: 1px;
    }
    
    .samedi-transition-dispo-non::before,
    .samedi-transition-non-dispo::before {
        opacity: 0.8;
    }

    .jour div[style*="font-size: 0.9em"] {
        font-size: 0.6em !important;
        line-height: 1.1;
        color: #345089;
    }
}

#info-reservation {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    max-width: 800px;
    background-color: #345089;
    border-radius: 5px;
    color: #9FAECB;
    display: block;
}

#info-reservation.visible {
    display: block;
}

#info-reservation:not(.visible) {
    display: block;
}

#info-reservation .bouton-reserver {
    margin-left: 10px;
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#info-reservation .bouton-reserver:hover {
    background-color: #45a049;
}
