/* Système de réservation manucure - Version améliorée avec calendrier */

#manucure-reservation {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.manucure-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.manucure-step h3 {
    color: #d4af37;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === SÉLECTION DES SERVICES === */

.service-selection {
    max-width: 600px;
}

.service-category-selector,
.service-detail-selector {
    margin-bottom: 25px;
}

.service-category-selector label,
.service-detail-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.service-info-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.service-info-display div {
    margin-bottom: 8px;
    color: #495057;
}

/* === CALENDRIER VISUEL === */

.calendar-section {
    max-width: 700px;
}

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

.calendar-header h4 {
    margin: 0;
    font-size: 20px;
    color: #495057;
    font-weight: 600;
}

.calendar-nav {
    background: #d4af37;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.calendar-nav:hover {
    background: #b8941f;
}

.visual-calendar {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
}

.weekday {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #6c757d;
    border-right: 1px solid #dee2e6;
    font-size: 14px;
}

.weekday:last-child {
    border-right: none;
}

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

.calendar-day {
    padding: 15px;
    text-align: center;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day.prev-month,
.calendar-day.next-month {
    color: #adb5bd;
    background: #f8f9fa;
    cursor: default;
}

.calendar-day.past {
    color: #adb5bd;
    background: #f8f9fa;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day.closed {
    background: #ffeaa7;
    color: #fdcb6e;
    cursor: not-allowed;
    position: relative;
}

.calendar-day.closed::after {
    content: "Fermé";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 400;
}

.calendar-day.available {
    background: #d1ecf1;
    color: #0c5460;
    cursor: pointer;
}

.calendar-day.available:hover {
    background: #bee5eb;
    transform: scale(1.05);
}

.calendar-day.selected {
    background: #d4af37;
    color: white;
    font-weight: bold;
    transform: scale(1.05);
}

.calendar-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.legend-color.available {
    background: #d1ecf1;
}

.legend-color.closed {
    background: #ffeaa7;
}

.legend-color.selected {
    background: #d4af37;
}

/* === SÉLECTION D'HORAIRE === */

.selected-date-info {
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.selected-date-info p {
    margin: 5px 0;
    color: #155724;
}

.time-selection h4 {
    color: #495057;
    margin-bottom: 15px;
}

.time-slots-container {
    min-height: 60px;
}

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

.time-slot {
    padding: 12px 16px;
    border: 2px solid #d4af37;
    border-radius: 8px;
    background: white;
    color: #d4af37;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

.time-slot.available:hover {
    background: #d4af37;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.time-slot.selected {
    background: #d4af37;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* === FORMULAIRE CLIENT === */

.booking-summary-top {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.booking-summary-top h4 {
    margin-top: 0;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.summary-item {
    margin-bottom: 8px;
    padding: 5px 0;
    color: #495057;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.btn-primary {
    background: #d4af37;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #b8941f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* === MESSAGES ET ERREURS === */

.loading {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
}

.no-slots {
    text-align: center;
    padding: 30px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

.field-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.reservation-success {
    text-align: center;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 40px;
    margin: 20px 0;
}

.success-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.reservation-success h2 {
    color: #155724;
    margin-bottom: 30px;
}

.success-details {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin: 20px auto;
    text-align: left;
    display: inline-block;
    min-width: 350px;
    border: 1px solid #c3e6cb;
}

.success-details p {
    margin-bottom: 10px;
    font-size: 16px;
}

.success-message {
    margin-top: 20px;
    color: #155724;
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    #manucure-reservation {
        padding: 10px;
    }
    
    .manucure-form {
        padding: 20px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-nav {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .calendar-day {
        padding: 10px;
        min-height: 40px;
        font-size: 14px;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 10px;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .time-slot {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .success-details {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .calendar-days {
        font-size: 14px;
    }
    
    .calendar-day {
        padding: 8px;
        min-height: 35px;
    }
    
    .calendar-day.closed::after {
        font-size: 9px;
    }
}