/* ============================================
   Styles pour le module de prise de rendez-vous
   ============================================ */

.appointment-section {
    min-height: 600px;
}

.appointment-form-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

.appointment-form .form-step {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.appointment-form .required {
    color: #dc3545;
}

/* Amélioration des champs de formulaire */
.appointment-form .form_group {
    margin-bottom: 25px;
}

.appointment-form .form_group label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #0F0F2D;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.appointment-form .form_control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    color: #0F0F2D;
    background-color: #fff;
    transition: all 0.3s ease;
    font-family: "DM Sans", sans-serif;
    box-sizing: border-box;
}

.appointment-form .form_control::placeholder {
    color: #999;
    opacity: 1;
}

.appointment-form .form_control:focus {
    outline: none;
    border-color: #064232;
    box-shadow: 0 0 0 3px rgba(6, 66, 50, 0.1);
    background-color: #fff;
}

.appointment-form .form_control:hover:not(:focus) {
    border-color: #c7aa69;
}

.appointment-form .form_control:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.appointment-form .form_control:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

/* Textarea spécifique */
.appointment-form textarea.form_control {
    min-height: 100px;
    resize: vertical;
    padding-top: 14px;
    line-height: 1.6;
}

/* Amélioration visuelle des labels avec astérisque */
.appointment-form .form_group label .required {
    margin-left: 3px;
    font-size: 18px;
    vertical-align: middle;
}

/* Calendrier */
.calendar-container {
    margin: 20px 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.calendar-nav-btn {
    background: #064232;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-nav-btn:hover {
    background: #c7aa69;
}

.calendar-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.calendar-month-year {
    font-size: 18px;
    font-weight: 600;
    color: #0F0F2D;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-day-header {
    text-align: center;
    padding: 10px;
    font-weight: 600;
    color: #064232;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 12px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    font-weight: 500;
    position: relative;
}

.calendar-day:hover:not(.disabled):not(.selected) {
    background: #f8f9fa;
    border-color: #064232;
}

.calendar-day.disabled {
    background: #f0f0f0;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.past {
    background: #f8f9fa;
    color: #999;
}

.calendar-day.blocked {
    background: #ffe6e6;
    color: #cc0000;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: #064232;
    color: white;
    border-color: #064232;
    font-weight: 700;
}

.calendar-day.today {
    border-color: #c7aa69;
    font-weight: 700;
}

.calendar-day.today:not(.selected) {
    background: #fff9e6;
}

/* Créneaux horaires */
.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    min-height: 100px;
    
}

.time-slot {
    padding: 12px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: #0F0F2D;
}

.time-slot:hover:not(.disabled) {
    background: #064232;
    color: white;
    border-color: #064232;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.time-slot.selected {
    background: #064232;
    color: white;
    border-color: #064232;
    font-weight: 700;
}

.time-slot.disabled {
    background: #f0f0f0;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.time-slots-loading {
    text-align: center;
    padding: 40px;
    color: #174e28;
}

.time-slots-empty {
    text-align: center !important;
    /* padding: 40px; */
    color: #999;
    font-style: italic;
}

/* Récapitulatif */
.appointment-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #c7aa69;
    margin-top: 20px;
}

.appointment-summary h4 {
    color: #064232;
    margin-bottom: 15px;
    font-size: 20px;
}

.summary-box p {
    margin: 8px 0;
    color: #0F0F2D;
}

.summary-box strong {
    color: #064232;
    margin-right: 10px;
}

/* Messages */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Amélioration de l'espacement entre les champs */
.appointment-form .row {
    margin-bottom: 0;
}

.appointment-form .row .col-md-6 {
    padding-left: 10px;
    padding-right: 10px;
}

.appointment-form .row .col-md-6:first-child {
    padding-left: 0;
}

.appointment-form .row .col-md-6:last-child {
    padding-right: 0;
}

/* Amélioration visuelle pour les champs en erreur */
.appointment-form .form_group.error .form_control {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.appointment-form .form_group.error label {
    color: #dc3545;
}

.appointment-form .form_group.error .error-message {
    display: block;
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

/* Amélioration pour les champs valides */
.appointment-form .form_group.success .form_control {
    border-color: #28a745;
}

/* Responsive */
@media (max-width: 768px) {
    .appointment-form-wrapper {
        padding: 20px;
    }
    
    .calendar-grid {
        gap: 3px;
    }
    
    .calendar-day {
        font-size: 12px;
        padding: 5px;
    }
    
    .time-slots-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 15px;
    }
    
    .time-slot {
        padding: 10px;
        font-size: 14px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .form_group.d-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .form_group.d-flex button {
        width: 100%;
    }
    
    .appointment-form .form_control {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .appointment-form .form_group label {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .appointment-form .row .col-md-6 {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

