/* Définition des variables de couleurs */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f4f7f6;
    --card-bg-color: #ffffff;
    --text-color: #333;
    --shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* ---------------------------------- */
/* Styles de la navigation par étapes */
/* ---------------------------------- */

.booking-container {
    max-width: 600px;
    margin: 40px auto;
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    padding: 10px;
    border-radius: 12px;
    /* Clé pour contenir les étapes en position absolue */
    position: relative;
    /* Hauteur minimale pour éviter le saut au changement d'étape */
    min-height: 500px;
    overflow: hidden; /* Cache les étapes en transition hors champ */
}

.booking-step {
    /* Cache l'étape et la positionne hors écran à droite */
    display: none;
    opacity: 0;
    transform: translateX(100%); /* Initialement à droite */
    position: absolute; /* Permet aux étapes de se chevaucher pendant la transition */
    top: 0;
    left: 0;
    width: 100%;
    padding: inherit; /* Pour maintenir le padding du conteneur parent */
    box-sizing: border-box;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.booking-step.active {
    /* Montre l'étape et la ramène à sa position normale */
    display: block;
    opacity: 1;
    transform: translateX(0); /* Ramené au centre */
    position: relative; /* L'étape active prend son flux normal */
}

.step-title {
    font-size: 1.8em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* ---------------------------------- */
/* Styles des boutons de sélection (Services et Options) */
/* ---------------------------------- */

.choice-btn, .service-btn {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.choice-btn:hover, .service-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.service-btn span {
    display: block;
    width: 100%;
}

.service-btn .price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2em;
    margin-top: 8px;
}

/* ---------------------------------- */
/* Boutons de navigation (Retour) */
/* ---------------------------------- */

.btn-back {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1em;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: left;
    padding: 0;
    display: block;
}

/* ---------------------------------- */
/* Calendrier */
/* ---------------------------------- */

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 6px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
}

#calendar-month-year {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--text-color);
    text-align: center;
    flex-grow: 1;
    text-transform: capitalize;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-grid div {
    text-align: center;
    padding: 12px 5px;
    border-radius: 5px;
}

.day-name {
    font-weight: bold;
    color: var(--secondary-color);
}

/* Styles pour les jours du calendrier */
.day {
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    /* Styles appliqués par JS, ceci est la base */
}

/* Style de survol pour les jours cliquables */
.day[data-date]:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

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

/* ---------------------------------- */
/* Grille des heures */
/* ---------------------------------- */

#hours-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.hour-btn {
    background-color: #fff;
    color: var(--text-color);
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    padding: 10px 5px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: background-color 0.15s, color 0.15s, transform 0.15s;
    text-align: center;
}

/* Styles spécifiques aux états de disponibilité */
.hour-btn.available {
    background-color: #28a745; /* Vert */
    color: white;
    border-color: #28a745;
}

.hour-btn.available:hover {
    background-color: #1e7e34; /* Vert foncé au survol */
    transform: scale(1.05);
}

.hour-btn.unavailable {
    background-color: #dc3545; /* Rouge */
    color: white;
    border-color: #dc3545;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ---------------------------------- */
/* Navigation Jours Heures */
/* ---------------------------------- */

.calendar-nav-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.calendar-nav-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.calendar-nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.rgpd-note {
    text-align: center;
    font-size: 0.9em;
    margin-top: 20px;
    color: var(--secondary-color);
}
.rgpd-note a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}
.rgpd-note a:hover {
    text-decoration: underline;
}