/**
 * 📅 CALENDRIER DE RÉSERVATION - Styles CSS
 * Design moderne et responsive pour le planning
 */

/* ==============================================
   🏗️ STRUCTURE PRINCIPALE
   ============================================== */

.planning-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
}

.planning-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #4e342e, #eca766);
    color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.planning-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.calendar-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.calendar-wrapper {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.booking-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: fit-content;
}

/* ==============================================
   📅 CALENDRIER
   ============================================== */

.simple-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin: 20px 0;
}

.calendar-header {
    background: #4e342e;
    color: white;
    padding: 15px 0;
    text-align: center;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    grid-column: 1 / -1;
    margin-bottom: 10px;
}

.calendar-day-header {
    background: #eca766;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
}

.calendar-day {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    position: relative;
    min-height: 80px;
}

.calendar-day:hover:not(.disabled):not(.past) {
    border-color: #eca766;
    background: #fdf8f3;
    transform: scale(1.05);
    z-index: 10;
}

.calendar-day.today {
    background: rgba(236, 167, 102, 0.2);
    border-color: #eca766;
    font-weight: bold;
}

.calendar-day.past {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.calendar-day.past:hover {
    transform: none;
    border-color: #e0e0e0;
    background: #f8f9fa;
}

.calendar-day.sunday {
    background: #ffe6e6;
    color: #dc3545;
}

.calendar-day.disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.calendar-day.disabled:hover {
    transform: none;
    border-color: #e0e0e0;
    background: #f8f9fa;
}

.calendar-day.selected {
    background: linear-gradient(135deg, #eca766, #d49650);
    color: white;
    border-color: #4e342e;
}

.day-number {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.day-availability {
    display: flex;
    gap: 3px;
    font-size: 12px;
}

.availability-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.morning-available {
    background: #28a745;
}

.afternoon-available {
    background: #17a2b8;
}

.occupied {
    background: #dc3545;
}

/* ==============================================
   🧭 NAVIGATION DU CALENDRIER
   ============================================== */

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

.nav-btn {
    background: #4e342e;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #eca766;
}

.current-month {
    font-size: 1.3em;
    font-weight: bold;
    color: #4e342e;
}

/* ==============================================
   ⏳ INDICATEUR DE CHARGEMENT
   ============================================== */

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #eca766;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==============================================
   📝 FORMULAIRE DE RÉSERVATION
   ============================================== */

.form-section h3 {
    color: #4e342e;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #eca766;
    padding-bottom: 5px;
}

.selected-slot {
    background: linear-gradient(135deg, #eca766, #d49650);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.time-slots {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.time-slot {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.time-slot:hover {
    border-color: #eca766;
    background: #fdf8f3;
    transform: translateX(5px);
}

.time-slot.selected {
    border-color: #4e342e;
    background: linear-gradient(135deg, #eca766, #d49650);
    color: white;
}

.slot-icon {
    font-size: 2em;
    margin-right: 15px;
}

.slot-info {
    flex: 1;
}

.slot-status {
    font-size: 0.9em;
    margin-top: 5px;
    opacity: 0.8;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #4e342e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #eca766;
}

.submit-btn {
    background: linear-gradient(135deg, #4e342e, #6d4c41);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==============================================
   🗺️ LÉGENDE
   ============================================== */

.calendar-legend {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
}

/* ==============================================
   🚨 ALERTES ET MESSAGES
   ============================================== */

.alert {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ==============================================
   📱 RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
    .calendar-section {
        grid-template-columns: 1fr;
    }
    
    .planning-header h1 {
        font-size: 2em;
    }
    
    .simple-calendar {
        font-size: 0.9em;
    }
    
    .calendar-day {
        min-height: 60px;
    }
    
    .day-number {
        font-size: 1em;
    }
    
    .planning-container {
        padding: 10px;
    }
    
    .calendar-wrapper,
    .booking-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .planning-header {
        padding: 20px;
    }
    
    .planning-header h1 {
        font-size: 1.5em;
    }
    
    .calendar-day {
        min-height: 50px;
    }
    
    .availability-indicator {
        width: 6px;
        height: 6px;
    }
    
    .time-slot {
        padding: 10px;
    }
    
    .slot-icon {
        font-size: 1.5em;
        margin-right: 10px;
    }
}