/* Réinitialisation des styles pour le conteneur principal */
#reservetoi-form.reservetoi-container,
#reservetoi-form.reservetoi-container * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.reservetoi-container h2{
    margin-bottom: 40px;
    text-align: center;
}



#reservetoi-form.reservetoi-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Barre de progression */
#reservetoi-form .progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    padding: 0;
    background: none;
}

#reservetoi-form .progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

#reservetoi-form .progress-bar .step {
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    color: #666;
    position: relative;
    z-index: 2;
    margin: 0;
    height: auto;
    width: auto;
    text-align: center;
    border : 1px solid black;
}

#reservetoi-form .progress-bar .step.active {
    background: #FFDD00;
    color: BLACK;
  
}


#reservetoi-form .progress-bar .step.completed {
    background: #FFDD00;
    color: BLACK;
}

/* Étapes */
#reservetoi-form .step-content {
    display: none;
    margin: 0;
    padding: 0;
}

#reservetoi-form .step-content.active {
    display: block;
}

/* Étape 1 : Sélection des services */
#reservetoi-form .car-diagram {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0;
    aspect-ratio: auto;
    display: flex;
    justify-content: center;
}

#reservetoi-form .car-diagram img {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 300px;
}

#reservetoi-form .car-diagram .base-car {
    position: relative;
    z-index: 1;
}

#reservetoi-form .car-diagram .overlay {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 2;
}

#reservetoi-form .car-diagram .overlay.active {
    opacity: 1;
}

#reservetoi-form .services-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    padding: 0;
    width: 100%;
}

#reservetoi-form .services-selection label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid black;
    border-radius: 5px;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    width: 100%;
    transition: background-color 0.3s;
    color: black;
    text-align: center;
}

#reservetoi-form .services-selection label:hover {
    background: #FFDD00;
    transition: all 0.3s ease;
}

#reservetoi-form .services-selection label.selected {
    background-color: #FFDD00;  
    border-radius: 5px;
    transition: all 0.3s ease;

}

#reservetoi-form .services-selection label:active {
    background-color: #FFDD00;
    transition: background-color 0.3s ease;
}

#reservetoi-form .services-selection input[type="radio"] {
    margin-right: 10px;
    display: none;
}

/* Étape 2 : Calendrier */
#reservetoi-form .calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
    gap: 10px;
}

#reservetoi-form .calendar-navigation button {
    background-color: transparent;
    color: black;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px;
    border-radius: 3px;
    border: 1px solid #000;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 100px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 5px;
}



#reservetoi-form .calendar-navigation button:hover,
#reservetoi-form .calendar-navigation button:active,
#reservetoi-form .calendar-navigation button:focus {
    background-color: black;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: white;
    outline: none;
}

.calendar-navigation button.loading {
    position: relative;
    cursor: wait;
    pointer-events: none;
}

.calendar-navigation button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid black;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}



@media (max-width: 768px) {
    #reservetoi-form .calendar-navigation {
        flex-direction: column;
        gap: 0px;
        margin-top: 10px;
    }

    #reservetoi-form .calendar-navigation button {
        width: 100%;
        padding: 10px;
        font-size: 14px;
        margin-top: 5px;
        margin-bottom: 0px;
    }

    #reservetoi-form .calendar-navigation button:hover,
#reservetoi-form .calendar-navigation button:focus {
    background-color: transparent;
    color: black;
    box-shadow: 0 0px 0px rgba(0,0,0,00);
}


#reservetoi-form .calendar-navigation button:active {
    background-color: black;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: white;
    outline: none;
}
}


#reservetoi-form .calendar-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    perspective: 1000px;
}

#reservetoi-form .calendar-day {
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

#reservetoi-form .calendar-day:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

#reservetoi-form .day-header {
    background: #FFDD00;
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #000;
}

#reservetoi-form .day-name {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
    display: block;
    margin: 0;
    padding: 0;
}

#reservetoi-form .time-slots {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

#reservetoi-form .time-slot {
    padding: 8px;
    border: 1px solid #000;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    color: black;
    position: relative;
    overflow: hidden;
}

#reservetoi-form .time-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,215,0,0.3), transparent);
    transition: all 0.5s;
}

#reservetoi-form .time-slot:hover::before {
    left: 100%;
}

#reservetoi-form .time-slot:hover {
    background: #FFDD00;
    border-color: #000;
    transform: scale(1.05);
}

#reservetoi-form .time-slot.selected {
    background: #000;
    color: #FFDD00;
    border-color: #000;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
/* Étape 3 : Formulaire */
#reservetoi-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

#reservetoi-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

#reservetoi-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333333;
}

#reservetoi-form .form-group input,
#reservetoi-form .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #ffffff;
    color: #333333;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

#reservetoi-form .form-group textarea {
    height: 100px;
    resize: vertical;
}

#reservetoi-form .radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
}

#reservetoi-form .radio-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

/* Boutons */
#reservetoi-form .step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    width: 100%;
}

#reservetoi-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    margin: 0;
}

#reservetoi-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#reservetoi-form .prev-step {
    background: #7d7c6c;
    color: white;
}

#reservetoi-form .next-step,
#reservetoi-form .submit-booking {
    padding: 8px 12px;
    border-radius: 3px;
    border: 1px solid #000;
    background: #FFDD00;
    color: black;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    padding: 8px 30px; 
}

#reservetoi-form .next-step::before,
#reservetoi-form .submit-booking::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: -1;
    
}

#reservetoi-form .next-step:hover,
#reservetoi-form .submit-booking:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#reservetoi-form .next-step:hover::before,
#reservetoi-form .submit-booking:hover::before {
    left: 0;
}

#reservetoi-form .prev-step:hover,
#reservetoi-form .next-step:hover,
#reservetoi-form .submit-booking:hover {
    filter: brightness(110%);
}

/* Responsive */
@media (max-width: 768px) {

    #reservetoi-form.reservetoi-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 15px;
        background: #ffffff;
        border-radius: 10px;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
    }
    #reservetoi-form .progress-bar .step {
        padding: 8px 12px;
        font-size: 14px;
    }

    #reservetoi-form .form-row {
        grid-template-columns: 1fr;
    }



    #reservetoi-form .submit-booking {
      margin-left: 5px;
}

}

/* Style pour la section "Comment nous avez-vous connu" */
#reservetoi-form .form-group select#source_contact {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M1 4l5 5 5-5z' fill='%23999999'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 20px;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
}

#reservetoi-form .form-group select#source_contact:focus {
    outline: none;
    border-color: #FFDD00;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.1);
}

/* Style pour le groupe de documents */
#reservetoi-form #documents-group {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

#reservetoi-form #documents-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

#reservetoi-form #documents-group small {
    color: #666666;
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

#reservetoi-form #documents_reservation {
    border: 2px dashed #FFDD00;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

#reservetoi-form #documents_reservation:hover {
    background-color: rgba(218, 226, 74, 0.05);
}

/* Style pour la section des conditions */
#reservetoi-form .terms-section {
    background-color: #f0f0f0;
    border-left: 4px solid #FFDD00;
    padding: 15px;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
    border-radius: 0 4px 4px 0;
}

#reservetoi-form .terms-section p {
    margin: 0;
}

#booking-form div[style*="display:none"] {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: -9999px;
}