/* Intégration harmonieuse avec le design existant (admin.css) */

.client-main {
    height: 100vh;
    width: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.booking-page {
    width: 100%;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.booking-container {
    width: 100%;
    max-width: 750px;
}

.booking-header {
    text-align: center;
    margin-bottom: 40px;
}

.booking-header h1 {
    color: var(--theme-primary-dark);
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    animation: fadeInDown 0.8s ease-out;
}

.booking-header p {
    color: var(--theme-text-muted);
    font-size: 1.15rem;
    margin: 0;
    animation: fadeInDown 1s ease-out;
}

.booking-card {
    background: var(--theme-surface);
    border-radius: var(--border-radius, 16px);
    box-shadow: var(--shadow-premium, 0 10px 30px rgba(0,0,0,0.1));
    padding: 45px 50px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    animation: fadeInUp 0.6s ease-out;
}

.form-row {
    display: flex;
    gap: 25px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border-radius: 14px;
    border: 1.5px solid var(--theme-secondary);
    background: rgba(255, 255, 255, 0.6);
    color: var(--theme-text);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: var(--transition-smooth, all 0.3s ease);
    outline: none;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 4px var(--theme-secondary);
}

/* Select element styling */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d2620' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-primary-dark);
    margin: 40px 0 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-secondary);
}

.btn-submit-booking {
    width: 100%;
    padding: 18px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
    color: white;
    border: none;
    font-weight: 700;
    font-size: 1.15rem;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth, all 0.3s ease);
    margin-top: 25px;
}

.btn-submit-booking:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, var(--theme-primary-dark), var(--theme-primary));
}

.alert {
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
    animation: fadeInDown 0.5s ease-out;
}

.alert-success {
    background: rgba(74, 124, 89, 0.15);
    color: #3b6347;
    border: 1px solid rgba(74, 124, 89, 0.3);
}

.alert-error {
    background: rgba(217, 83, 79, 0.15);
    color: #b52b27;
    border: 1px solid rgba(217, 83, 79, 0.3);
}

.form-error {
    color: #d9534f;
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
}

/* Calendar Styles */
#booking-calendar {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* La grille "semaine" de FullCalendar (7 colonnes) devient illisible si on
       la force à tenir dans une largeur de téléphone : on la laisse défiler
       horizontalement plutôt que de compresser chaque colonne. */
    overflow-x: auto;
}

@media (max-width: 700px) {
    #booking-calendar .fc {
        min-width: 640px;
    }
}

/* Griser tous les créneaux par défaut */
.fc .fc-timegrid-slot {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* Rendre les plages horaires disponibles bien visibles */
.fc .fc-bg-event.fc-bg-available {
    background-color: var(--theme-secondary) !important;
    opacity: 0.8 !important;
    z-index: 2 !important;
}

/* Événements normaux (indisponibles) */
.fc .fc-event {
    border-radius: 4px;
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Boutons de navigation du calendrier (Aujourd'hui, flèches) */
.fc .fc-button-primary {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary-dark) !important;
    color: white !important;
    transition: var(--transition-smooth, all 0.3s ease) !important;
    text-transform: capitalize;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:hover {
    background-color: var(--theme-primary-dark) !important;
    border-color: var(--theme-primary-dark) !important;
}

.fc .fc-button-primary:focus {
    box-shadow: 0 0 0 0.2rem var(--theme-secondary) !important;
}

.fc .fc-button-primary:disabled {
    background-color: var(--theme-primary-light) !important;
    border-color: var(--theme-primary-light) !important;
    opacity: 0.7 !important;
}

/* Légende du calendrier */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--theme-text);
}

.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legend-available {
    background-color: var(--theme-secondary);
    border: 1px solid var(--theme-primary-light);
}

.legend-unavailable {
    background-color: #bdc3c7;
    border: 1px solid #95a5a6;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(0,0,0,0.05) 4px, rgba(0,0,0,0.05) 8px);
}

.legend-out-of-hours {
    background-color: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-selected {
    background-color: var(--theme-primary);
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 650px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .booking-card {
        padding: 35px 25px;
    }
    .booking-header h1 {
        font-size: 2.2rem;
    }
}
