/* CSS pour la page Réservation - Jardin d'Asie */
/* assets/css/reservation.css */

/* ==================== HEADER DE LA PAGE RESERVATION ==================== */
.reservation-header {
    background: linear-gradient(135deg, #E3F2FD 0%, #fff 100%);
    border-bottom: 1px solid rgba(4,187,255,0.1);
    position: relative;
    overflow: hidden;
    padding: 3rem 0 2rem;
}

.reservation-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #04BBFF, #00E5FF, #FF4081);
    opacity: 0.6;
}

.reservation-header h1 {
    color: #04BBFF;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.reservation-header h1::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #FF4081;
}

.reservation-header .lead {
    color: #6C757D;
    font-size: 1.1rem;
}

/* ==================== CARTE DE RESERVATION ==================== */
.reservation-form {
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(4,187,255,0.08);
    border: none;
    overflow: hidden;
    margin-top: 2rem;
}

.reservation-form .card-header {
    background: linear-gradient(135deg, #04BBFF 0%, #00A8D3 100%);
    border-bottom: none;
    padding: 1.75rem;
    text-align: center;
}

.reservation-form .card-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* ==================== INDICATEUR D'ETAPES ==================== */
.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 40px;
    max-width: 400px;
    margin: 2rem auto;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background-color: #E3F2FD;
    z-index: 1;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid #E3F2FD;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #adb5bd;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.step.active {
    background-color: #04BBFF;
    border-color: #04BBFF;
    color: #fff;
    box-shadow: 0 0 0 6px rgba(4,187,255,0.1);
}

.step.completed {
    background-color: #00C853;
    border-color: #00C853;
    color: #fff;
}

.step.completed::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 600;
}

/* ==================== ETAPES DE RESERVATION ==================== */
.reservation-step {
    padding: 2rem;
    min-height: 400px;
}

.reservation-step h3 {
    color: #212529;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ==================== FORMULAIRE ==================== */
.form-control,
.form-select {
    border-radius: 12px;
    border: 2px solid #E3F2FD;
    padding: 0.875rem 1.25rem;
    transition: all 0.3s ease;
    background-color: #fff;
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #04BBFF;
    box-shadow: 0 0 0 0.5rem rgba(4, 187, 255, 0.1);
    background-color: #fff;
}

.form-label {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ==================== SLOTS DE TEMPS SIMPLIFIES ==================== */
#timeslots-container {
    margin-top: 1.5rem;
}

/* Section de service */
.service-section {
    margin-bottom: 2rem;
}

.service-header {
    color: #04BBFF;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E3F2FD;
    display: flex;
    align-items: center;
}

.service-header::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #04BBFF;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Styles pour les badges de service */
.service-header .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    vertical-align: middle;
}

/* Container des créneaux en ligne */
.timeslots-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Créneau individuel simplifié */
.time-slot {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border: 2px solid #E3F2FD;
    background-color: #fff;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.time-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(4,187,255,0.05), transparent);
    transition: width 0.5s ease;
}

.time-slot:hover::before {
    width: 100%;
}

.time-slot:hover:not(.unavailable) {
    border-color: #04BBFF;
    background-color: rgba(4,187,255,0.03);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4,187,255,0.1);
}

.time-slot.selected {
    background-color: #04BBFF;
    border-color: #04BBFF;
    color: #fff;
    box-shadow: 0 4px 15px rgba(4,187,255,0.25);
}

/* Créneau complet (style général) */
.time-slot.unavailable {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    position: relative;
}

/* Créneau complet (variantes selon le type) */
.time-slot.unavailable .status {
    color: #dc3545;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Service complet */
.time-slot.unavailable[title*="service"] {
    border-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.05);
}

.time-slot.unavailable[title*="service"] .status {
    color: #856404;
}

/* Créneau spécifique complet */
.time-slot.unavailable[title*="créneau"] {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Animation pour les créneaux complets */
.time-slot.unavailable {
    position: relative;
    overflow: hidden;
}

.time-slot.unavailable::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(0, 0, 0, 0.03), 
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Amélioration du contraste pour l'accessibilité */
.time-slot.unavailable .time {
    color: #495057;
}

/* Ajout d'une icône pour les créneaux complets */
.time-slot.unavailable .time::after {
    content: '🔒';
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.time-slot .time {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.time-slot .status {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Message si aucun créneau ou restaurant fermé */
.no-timeslots {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Styles pour le message de fermeture */
.alert {
    border-radius: 12px;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.alert-warning .alert-heading {
    color: #856404;
    font-weight: 600;
}

.text-warning {
    color: #ffc107 !important;
}

/* ==================== LOADING ANIMATION ==================== */
#timeslots-loading {
    padding: 3rem 0;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* ==================== BOUTONS ==================== */
.btn {
    border-radius: 12px;
    padding: 0.875rem 1.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: #04BBFF;
    border-color: #04BBFF;
    color: #fff;
    box-shadow: 0 4px 15px rgba(4,187,255,0.3);
}

.btn-primary:hover {
    background-color: #029AE0;
    border-color: #029AE0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(4,187,255,0.4);
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
    border-width: 2px;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
    transform: translateY(-2px);
}

/* ==================== CHECKBOX STYLE ==================== */
.form-check-input {
    border-radius: 4px;
    border: 2px solid #E3F2FD;
    margin-top: 0.25rem;
}

.form-check-input:checked {
    background-color: #04BBFF;
    border-color: #04BBFF;
}

.form-check-label {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-check-label a {
    color: #04BBFF;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.form-check-label a:hover {
    border-bottom-color: #04BBFF;
}

/* ==================== MESSAGE SI DESACTIVE ==================== */
.booking-disabled {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.booking-disabled .alert {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 16px;
    background-color: rgba(255, 193, 7, 0.05);
    border-color: rgba(255, 193, 7, 0.2);
    
    /* Force l'affichage de l'alerte */
    position: relative !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Force l'affichage même avec la classe fade */
.booking-disabled .alert.fade {
    opacity: 1 !important;
}

/* Empêche Bootstrap de masquer l'alerte */
.booking-disabled .alert:not(.show) {
    display: block !important;
}

/* Assure que l'alerte reste visible */
.booking-disabled .alert,
.booking-disabled .alert.fade,
.booking-disabled .alert.fade:not(.show) {
    opacity: 1 !important;
    display: block !important;
}

/* ==================== INFORMATIONS UTILES ==================== */
#permanent-reservation-info {
    margin-top: 3rem !important;
    padding: 0 15px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#permanent-reservation-info .alert {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-radius: 16px;
    padding: 1.75rem;
    border: none;
    background-color: rgba(4, 187, 255, 0.05);
}

#permanent-reservation-info .alert-heading {
    color: #04BBFF;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

#permanent-reservation-info ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

#permanent-reservation-info li {
    color: #495057;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Protection contre Bootstrap */
#permanent-reservation-info.d-none,
#permanent-reservation-info.hidden,
#permanent-reservation-info.invisible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ==================== LEGENDE POUR LES STATUTS ==================== */
.slot-legend {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
}

.slot-legend h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.slot-legend ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.slot-legend li {
    margin-bottom: 0.25rem;
    color: #6c757d;
    line-height: 1.5;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .reservation-header {
        padding: 2rem 0 1.5rem;
    }
    
    .reservation-header h1 {
        font-size: 2rem;
    }
    
    .reservation-form .card-header {
        padding: 1.25rem;
    }
    
    .reservation-form .card-header h2 {
        font-size: 1.25rem;
    }
    
    .step-indicator {
        padding: 0 20px;
        max-width: 300px;
    }
    
    .step {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .step-indicator::before {
        left: 50px;
        right: 50px;
    }
    
    .reservation-step {
        padding: 1.5rem 1rem;
        min-height: auto;
    }
    
    .reservation-step h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .timeslots-row {
        gap: 0.5rem;
    }
    
    .time-slot {
        min-width: 100px;
        padding: 0.5rem 1rem;
    }
    
    .time-slot .time {
        font-size: 1rem;
    }
    
    .time-slot .status {
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .slot-legend {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .reservation-header h1 {
        font-size: 1.75rem;
    }
    
    .step-indicator {
        max-width: 250px;
    }
    
    .step {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .step-indicator::before {
        left: 40px;
        right: 40px;
    }
    
    .timeslots-row {
        justify-content: center;
    }
    
    .time-slot {
        min-width: 90px;
        padding: 0.5rem 0.75rem;
    }
    
    .time-slot .time {
        font-size: 0.95rem;
    }
    
    .booking-disabled .alert {
        padding: 1.25rem;
    }
    
    .time-slot.unavailable {
        min-width: 85px;
    }
    
    .time-slot.unavailable .status {
        font-size: 0.75rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Effet de pulse pour le créneau sélectionné */
@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(4,187,255,0.4); 
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(4,187,255,0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(4,187,255,0); 
    }
}

.time-slot.selected {
    animation: pulse 2s infinite;
}

/* Style pour un meilleur scrolling */
html {
    scroll-behavior: smooth;
}

/* Force le scrolling avec JavaScript */
.scroll-target {
    padding-top: 50px;
    margin-top: -50px;
}

/* Assure que le bouton est visible après le scroll */
#continue-to-step-3 {
    position: relative;
    z-index: 10;
}

/* Animation debug pour vérifier le défilement */
.debug-scroll {
    border: 2px solid red !important;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5) !important;
}

/* Effet de surbrillance pour le bouton continuer */
.pulse-highlight {
    animation: pulse-highlight 1s ease-out;
}

@keyframes pulse-highlight {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(4, 187, 255, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(4, 187, 255, 0);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(4, 187, 255, 0);
    }
}