/**
 * Styles CSS pour l'interface publique
 *
 * @package PCorp_Reservation
 */

.pcorp-reservation-widget {
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.pcorp-reservation-widget * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* Layout responsive */
.pcorp-reservation-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 960px) {
    .pcorp-reservation-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Panneau gauche (calendrier + créneaux) */
.pcorp-reservation-left-panel {
    flex-shrink: 0;
}

@media (min-width: 960px) {
    .pcorp-reservation-left-panel {
        max-width: 500px;
    }
}

/* Calendrier */
.pcorp-reservation-calendar-container {
    margin-bottom: 30px;
}

#pcorp-reservation-calendar {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

.pcorp-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.pcorp-calendar-header button {
    background: #1a2f4c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.pcorp-calendar-header button:hover {
    background: #005a87;
}

.pcorp-calendar-month {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.pcorp-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.pcorp-calendar-weekday {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    color: #666;
    font-size: 13px;
}

/* Affichage responsive des jours de la semaine */
.pcorp-weekday-full {
    display: none;
}

.pcorp-weekday-short {
    display: inline;
}

@media (min-width: 500px) {
    .pcorp-weekday-full {
        display: inline;
    }
    
    .pcorp-weekday-short {
        display: none;
    }
}

.pcorp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.pcorp-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: default;
    background: #f9f9f9;
    font-size: 14px;
}

.pcorp-calendar-day.empty {
    border: none;
    background: transparent;
}

.pcorp-calendar-day.past {
    opacity: 0.5;
    cursor: not-allowed;
}

.pcorp-calendar-day.clickable {
    cursor: pointer;
    background: #fff;
}

.pcorp-calendar-day.clickable:hover {
    background: #e8f4f8;
}

.pcorp-calendar-day.today {
    background: #fff3cd;
    font-weight: bold;
}

.pcorp-calendar-day.selected {
    background: #1a2f4c;
    color: white;
}

/* Panneau droit */
.pcorp-reservation-right-panel {
    flex: 1;
    min-width: 0;
}

#pcorp-reservation-message {
    width: 100%;
}

/* Créneaux */
.pcorp-reservation-slots-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.pcorp-reservation-slots-container h3 {
    margin-top: 0;
    font-size: 16px;
}

.pcorp-slots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pcorp-slot-item {
    padding: 10px 20px;
    background: white;
    border: 2px solid #1a2f4c;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.pcorp-slot-item:hover {
    background: #e8f4f8;
}

.pcorp-slot-item.selected {
    background: #1a2f4c;
    color: white;
}

/* Formulaire */
.pcorp-reservation-form-container {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.pcorp-reservation-form-container h3 {
    margin-top: 0;
    font-size: 24px;
}

.pcorp-reservation-form-container form p {
    margin-bottom: 15px;
}

.pcorp-reservation-form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.pcorp-reservation-form-container input[type="text"],
.pcorp-reservation-form-container input[type="email"],
.pcorp-reservation-form-container input[type="tel"],
.pcorp-reservation-form-container textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.pcorp-reservation-form-container textarea {
    resize: vertical;
    min-height: 80px;
}

.pcorp-reservation-form-container .description {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Conditions générales */
.pcorp-reservation-terms {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px !important;
}

.pcorp-reservation-terms label {
    display: flex !important;
    align-items: flex-start;
    font-weight: normal !important;
    cursor: pointer;
    line-height: 1.5;
    gap: 3px;
    font-size: 14px !important;
}

.pcorp-reservation-terms input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: auto !important;
    flex-shrink: 0;
    cursor: pointer;
}

.pcorp-reservation-terms a {
    color: #1a2f4c;
    text-decoration: underline;
    font-weight: 500;
}

.pcorp-reservation-terms a:hover {
    color: #005a87;
}

.pcorp-reservation-submit-btn {
    background: #1a2f4c;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.pcorp-reservation-submit-btn:hover {
    background: #005a87;
}

/* Messages */
.pcorp-message {
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 14px;
}

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

.pcorp-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Message de confirmation après réservation */
.pcorp-confirmation-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border: 2px solid #0ea5e9;
    margin: 20px auto 0;
    max-width: 600px;
}

.pcorp-confirmation-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #0ea5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pcorp-scale-in 0.5s ease-out;
}

.pcorp-confirmation-icon svg {
    width: 50px;
    height: 50px;
    color: white;
    stroke-width: 3;
}

@keyframes pcorp-scale-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pcorp-confirmation-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: bold;
    color: #0c4a6e;
}

.pcorp-confirmation-text {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #0c4a6e;
    font-weight: 500;
}

.pcorp-confirmation-email {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #0369a1;
    line-height: 1.6;
}

.pcorp-confirmation-note {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    line-height: 1.5;
}
