#apogee-reservation-plugin {
    font-family: Arial, sans-serif;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

#apogee-form-wrap {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    display: none;
}

#apogee-left-column {
    display: block;
    flex-direction: column;
    flex: 1 1 58%;
    gap: 20px;
    background-color: none;
    border: none;
}

#apogee-left-column.active {
    display: flex;
}

#apogee-calendar-wrap {
    flex: 1 1 40%;
    width: 40%;
    flex-shrink: 0;
}

#calendar {
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    margin-bottom: 20px;
    box-sizing: border-box;
}

#calendar .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000022;
    color: #fff;
    padding: 10px;
}

#calendar .header .title {
    font-size: 1.2em;
}

#calendar .header a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

#calendar ul.label {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #f3f3f3;
}

#calendar ul.label li.title {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

.journee .creneau.dispo.selected {
    background-color: #000022;
    color: white;
}

#calendar .case-calendrier.selected {
    background-color: #000022;
    color: white;
}

#calendar ul.dates {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

#calendar ul.dates li.case-calendrier {
    width: 20%;
    text-align: center;
    padding: 12px 0;
    border: 1px solid #eee;
    cursor: pointer;
    box-sizing: border-box;
}

#calendar ul.dates li.case-calendrier:hover {
    background: #f6f6f6;
}

#calendar ul.dates li.mask {
    color: #ccc;
    cursor: default;
    background: #fafafa;
}

.journee {
    padding: 10px;
    text-align: center;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.journee p {
    margin-top: 0;
    margin-bottom: 10px;
}

.creneau {
    display: inline-block;
    margin: 4px;
    padding: 6px 6px;
    border: 1px solid #ccc;
}

.creneau.dispo {
    background: #ffffff;
    cursor: pointer;
}

.creneau:hover {
    background: #f6f6f6;
}

.creneau.occupe {
    background: #f8d7da;
    color: #999;
}

.button {
    background-color: #000022;
    padding: 0.8em;
    text-decoration: none;
    color: white;
}

.apogee-form input,
.apogee-form textarea {
    width: 100%;
    padding: 8px;
    margin: 4px 0;
    box-sizing: border-box;
}

.apogee-form textarea {
    min-height: 80px;
}

/* Correction des erreurs pour éviter le décalage */
.apogee-errors {
    display: block;
    width: 100%;
    margin-top: 4px;
    font-size: 12px;
    color: #8d1d1f;
}

/* Champ caché */
#apogee_form input[type="hidden"] {
    display: none !important;
    margin: 0;
    padding: 0;
    width: 0;
    height: 0;
}

/* --- Responsive pour tablettes et mobiles --- */
@media (max-width: 1000px) {
    #apogee-reservation-plugin {
        flex-direction: column;
    }

    #apogee-left-column,
    #apogee-calendar-wrap {
        width: 100%;
    }

    #calendar ul.dates li.case-calendrier {
        width: 14.28%; /* 7 jours / ligne */
    }
}

@media (max-width: 600px) {
    #calendar .header .title {
        font-size: 1em;
    }

    #calendar ul.dates li.case-calendrier {
        width: 14.28%; /* 7 jours / ligne */
        padding: 8px 0;
    }

    .creneau {
        padding: 4px 4px;
        margin: 2px;
        font-size: 0.9em;
    }

    .button {
        padding: 0.6em;
        font-size: 0.9em;
    }

    #apogee-left-column,
    #apogee-calendar-wrap {
        padding: 5px;
    }
}
