/**
 * Styles publics - Formulaire de réservation
 */

:root {
    /* Palette École de la Santé du Dos */
    --res-primary: #004594;
    --res-primary-hover: #003570;
    --res-primary-light: #dfeffc;
    --res-accent: #f4a499;
    --res-accent-hover: #e8897c;
    --res-accent-light: #fdf0ee;
    --res-secondary: #21528a;
    --res-success: #10b981;
    --res-success-light: #d1fae5;
    --res-error: #dd3333;
    --res-error-light: #fee2e2;
    --res-warning: #f4a499;
    --res-warning-light: #fdf0ee;
    --res-text: #004594;
    --res-text-light: #21528a;
    --res-border: #dfeffc;
    --res-bg: #f7f7f7;
    --res-white: #ffffff;
    --res-radius: 12px;
    --res-radius-sm: 8px;
    --res-shadow: 0 4px 6px -1px rgb(0 69 148 / 0.1), 0 2px 4px -2px rgb(0 69 148 / 0.1);
    --res-shadow-lg: 0 10px 15px -3px rgb(0 69 148 / 0.1), 0 4px 6px -4px rgb(0 69 148 / 0.1);
    --res-transition: all 0.2s ease;
}

/* ==========================================================================
   Container principal
   ========================================================================== */

.res-wc-booking-form-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.res-wc-form-messages,
.res-wc-bookings-messages {
    margin-bottom: 24px;
}

.res-wc-message {
    padding: 16px 20px;
    border-radius: var(--res-radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.res-wc-message::before {
    font-size: 18px;
    flex-shrink: 0;
}

.res-wc-message-success {
    background: var(--res-success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.res-wc-message-success::before {
    content: "✓";
}

.res-wc-message-error {
    background: var(--res-error-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.res-wc-message-error::before {
    content: "✕";
}

.res-wc-message-info {
    background: var(--res-primary-light);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.res-wc-message-info::before {
    content: "ℹ";
}

/* ==========================================================================
   Étapes du formulaire
   ========================================================================== */

.res-wc-step {
    background: var(--res-white);
    border-radius: var(--res-radius);
    padding: 32px;
    box-shadow: var(--res-shadow);
    border: 1px solid var(--res-border);
    display: none;
}

.res-wc-step.res-wc-step-active {
    display: block;
    animation: res-wc-fade-in 0.25s ease-out;
}

@keyframes res-wc-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.res-wc-step h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--res-text);
    margin: 0 0 24px 0;
    text-align: center;
    line-height: 1.3;
}

/* ==========================================================================
   Étape 1 - Boutons Oui/Non
   ========================================================================== */

.res-wc-step-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.res-wc-btn-existing-patient,
.res-wc-btn-new-patient {
    flex: 1;
    max-width: 180px;
    padding: 20px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--res-radius-sm);
    cursor: pointer;
    transition: var(--res-transition);
    border: 2px solid var(--res-border);
    background: var(--res-white);
    color: var(--res-text);
}

.res-wc-btn-existing-patient:hover,
.res-wc-btn-new-patient:hover {
    border-color: var(--res-accent);
    background: var(--res-accent-light);
    color: var(--res-primary);
    transform: translateY(-2px);
    box-shadow: var(--res-shadow);
}

/* Prompt de connexion */
.res-wc-login-prompt {
    background: var(--res-bg);
    border-radius: var(--res-radius-sm);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--res-border);
    margin-top: 24px;
}

.res-wc-login-prompt p {
    margin: 0 0 16px 0;
    color: var(--res-text-light);
    font-size: 15px;
}

.res-wc-login-prompt .button-primary {
    background: var(--res-accent);
    color: var(--res-white);
    padding: 12px 28px;
    border-radius: var(--res-radius-sm);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--res-transition);
    border: none;
}

.res-wc-login-prompt .button-primary:hover {
    background: var(--res-accent-hover);
    transform: translateY(-1px);
}

/* Formulaire de connexion AJAX */
.res-wc-login-form {
    text-align: left;
    margin-top: 20px;
}

.res-wc-login-form .res-wc-form-group {
    margin-bottom: 16px;
}

.res-wc-login-form .res-wc-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--res-text);
}

.res-wc-login-form .res-wc-form-group input {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--res-border);
    border-radius: var(--res-radius-sm);
    font-size: 15px;
    transition: var(--res-transition);
    box-sizing: border-box;
}

.res-wc-login-form .res-wc-form-group input:focus {
    outline: none;
    border-color: var(--res-accent);
    box-shadow: 0 0 0 3px var(--res-accent-light);
}

/* Wrapper mot de passe avec toggle */
.res-wc-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.res-wc-password-wrapper input {
    padding-right: 44px;
}

.res-wc-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--res-text-light);
    font-size: 16px;
    transition: var(--res-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.res-wc-toggle-password:hover {
    color: var(--res-primary);
}

.res-wc-toggle-password:focus {
    outline: none;
}

.res-wc-login-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.res-wc-login-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    background: var(--res-accent);
    color: var(--res-white);
    border: none;
    border-radius: var(--res-radius-sm);
    cursor: pointer;
    transition: var(--res-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.res-wc-login-button:hover {
    background: var(--res-accent-hover);
}

.res-wc-login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.res-wc-forgot-password {
    font-size: 13px;
    color: var(--res-text-light);
    text-decoration: none;
    transition: var(--res-transition);
}

.res-wc-forgot-password:hover {
    color: var(--res-primary);
    text-decoration: underline;
}

.res-wc-login-messages {
    margin-bottom: 16px;
}

.res-wc-login-messages .res-wc-message {
    padding: 12px 16px;
    font-size: 13px;
}

/* ==========================================================================
   Étape 2 - Types de RDV
   ========================================================================== */

.res-wc-booking-types {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.res-wc-booking-type-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--res-white);
    border: 2px solid var(--res-border);
    border-radius: var(--res-radius-sm);
    cursor: pointer;
    transition: var(--res-transition);
    text-align: left;
    width: 100%;
}

.res-wc-booking-type-btn:hover {
    border-color: var(--res-accent);
    background: var(--res-accent-light);
    transform: translateX(4px);
}

.res-wc-booking-type-btn:hover .res-wc-type-name {
    color: var(--res-primary);
}

.res-wc-type-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--res-text);
}

.res-wc-type-duration {
    font-size: 14px;
    color: var(--res-text-light);
    background: var(--res-bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* ==========================================================================
   Étape 3 - Formulaire
   ========================================================================== */

.res-wc-booking-form {
    margin-top: 0;
}

/* Groupe de champs */
.res-wc-form-group {
    margin-bottom: 24px;
}

.res-wc-form-group > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--res-text);
}

.res-wc-form-group .required {
    color: var(--res-error);
    margin-left: 2px;
}

.res-wc-help-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--res-text-light);
}

/* Champs de formulaire */
.res-wc-form-group input[type="date"],
.res-wc-form-group input[type="time"],
.res-wc-form-group input[type="text"],
.res-wc-form-group input[type="email"],
.res-wc-form-group input[type="tel"],
.res-wc-form-group select,
.res-wc-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--res-border);
    border-radius: var(--res-radius-sm);
    font-size: 16px;
    color: var(--res-text);
    background: var(--res-white);
    transition: var(--res-transition);
    -webkit-appearance: none;
    appearance: none;
}

.res-wc-form-group input:focus,
.res-wc-form-group select:focus,
.res-wc-form-group textarea:focus {
    outline: none;
    border-color: var(--res-accent);
    box-shadow: 0 0 0 3px var(--res-accent-light);
}

.res-wc-form-group textarea {
    resize: vertical;
    min-height: 100px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ligne de formulaire (2 colonnes) */
.res-wc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 100%;
}

.res-wc-form-group-half {
    margin-bottom: 0;
    min-width: 0; /* Fix overflow on grid items */
}

.res-wc-form-group-half input[type="date"],
.res-wc-form-group-half input[type="time"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   Créneaux horaires (Time Slots)
   ========================================================================== */

.res-wc-time-slots-group {
    margin-top: 20px;
}

.res-wc-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.res-wc-time-slot-option {
    display: block;
    cursor: pointer;
}

.res-wc-time-slot-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.res-wc-time-slot-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: var(--res-white);
    border: 2px solid var(--res-border);
    border-radius: var(--res-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--res-text);
    transition: var(--res-transition);
    text-align: center;
}

.res-wc-time-slot-option:hover .res-wc-time-slot-label {
    border-color: var(--res-accent);
    background: var(--res-accent-light);
}

.res-wc-time-slot-option input[type="radio"]:checked + .res-wc-time-slot-label {
    border-color: var(--res-accent);
    background: var(--res-accent);
    color: var(--res-white);
    box-shadow: var(--res-shadow);
}

.res-wc-time-slot-option input[type="radio"]:focus + .res-wc-time-slot-label {
    box-shadow: 0 0 0 3px var(--res-accent-light);
}

/* Créneaux désactivés (dans la zone tampon) */
.res-wc-time-slot-option.res-wc-time-slot-disabled {
    cursor: not-allowed;
}

.res-wc-time-slot-option.res-wc-time-slot-disabled .res-wc-time-slot-label {
    background: var(--res-bg);
    color: #bbb;
    border-color: var(--res-border);
    cursor: not-allowed;
}

.res-wc-time-slot-option.res-wc-time-slot-disabled:hover .res-wc-time-slot-label {
    background: var(--res-bg);
    border-color: var(--res-border);
}

@media screen and (max-width: 480px) {
    .res-wc-time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Modalités (Visio / Présentiel)
   ========================================================================== */

.res-wc-modality-group {
    background: var(--res-bg);
    border-radius: var(--res-radius-sm);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--res-border);
}

.res-wc-modality-group > label {
    display: block;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 15px;
    color: var(--res-text);
}

.res-wc-modality-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.res-wc-modality-option {
    position: relative;
    cursor: pointer;
}

.res-wc-modality-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.res-wc-modality-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--res-white);
    border: 2px solid var(--res-border);
    border-radius: var(--res-radius-sm);
    transition: var(--res-transition);
    font-weight: 600;
    font-size: 15px;
    color: var(--res-text);
}

.res-wc-modality-icon {
    font-size: 28px;
    line-height: 1;
}

.res-wc-modality-option input[type="radio"]:checked + .res-wc-modality-label {
    border-color: var(--res-accent);
    background: var(--res-accent-light);
    color: var(--res-primary);
}

.res-wc-modality-option:hover .res-wc-modality-label {
    border-color: var(--res-accent);
}

/* ==========================================================================
   Slots (RDV 1 et RDV 2)
   ========================================================================== */

.res-wc-slot {
    margin-bottom: 24px;
}

.res-wc-slot-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--res-text);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--res-border);
}

.res-wc-slot-2 {
    background: var(--res-warning-light);
    border-radius: var(--res-radius-sm);
    padding: 20px;
    border: 1px solid #fcd34d;
}

.res-wc-slot-2 .res-wc-slot-title {
    border-bottom-color: #fcd34d;
    color: #92400e;
}

.res-wc-second-date-display {
    padding: 14px 16px;
    background: var(--res-white);
    border: 2px solid var(--res-border);
    border-radius: var(--res-radius-sm);
}

.res-wc-date-value {
    font-weight: 600;
    font-size: 16px;
    color: var(--res-text);
}

/* ==========================================================================
   Actions du formulaire
   ========================================================================== */

.res-wc-form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--res-border);
}

/* Bouton retour */
.res-wc-btn-back {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid var(--res-border);
    border-radius: var(--res-radius-sm);
    background: var(--res-white);
    color: var(--res-text-light);
    cursor: pointer;
    transition: var(--res-transition);
}

.res-wc-btn-back:hover {
    border-color: var(--res-secondary);
    color: var(--res-text);
    background: var(--res-bg);
}

/* Bouton submit */
.res-wc-submit-button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background: var(--res-accent);
    color: var(--res-white);
    border: none;
    border-radius: var(--res-radius-sm);
    cursor: pointer;
    transition: var(--res-transition);
    flex-grow: 1;
    max-width: 200px;
}

.res-wc-submit-button:hover {
    background: var(--res-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--res-shadow);
}

.res-wc-submit-button:disabled {
    background: var(--res-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Récapitulatif de sélection
   ========================================================================== */

.res-wc-selection-summary {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--res-accent-light);
    border-radius: var(--res-radius-sm);
    border: 1px solid var(--res-accent);
}

.res-wc-summary-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--res-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.res-wc-summary-item::before {
    content: "✓";
    width: 20px;
    height: 20px;
    background: var(--res-accent);
    color: var(--res-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* ==========================================================================
   Liste des réservations utilisateur
   ========================================================================== */

.res-wc-user-bookings {
    margin: 24px 0;
}

.res-wc-user-bookings h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--res-text);
    margin-bottom: 24px;
}

.res-wc-no-bookings {
    text-align: center;
    padding: 48px 24px;
    background: var(--res-bg);
    border-radius: var(--res-radius);
    color: var(--res-text-light);
    border: 2px dashed var(--res-border);
}

.res-wc-no-bookings p {
    margin: 0;
    font-size: 16px;
}

.res-wc-bookings-table-wrapper {
    overflow-x: auto;
    border-radius: var(--res-radius);
    box-shadow: var(--res-shadow);
}

.res-wc-bookings-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--res-white);
}

.res-wc-bookings-table thead {
    background: var(--res-text);
}

.res-wc-bookings-table th {
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--res-white);
    text-align: left;
}

.res-wc-bookings-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--res-text);
    border-bottom: 1px solid var(--res-border);
}

.res-wc-bookings-table tbody tr:hover {
    background: var(--res-bg);
}

.res-wc-bookings-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   Badges de statut
   ========================================================================== */

.res-wc-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.res-wc-status-pending {
    background: var(--res-warning-light);
    color: #92400e;
}

.res-wc-status-confirmed {
    background: var(--res-success-light);
    color: #065f46;
}

.res-wc-status-cancelled {
    background: var(--res-error-light);
    color: #991b1b;
}

.res-wc-status-completed {
    background: var(--res-primary-light);
    color: #1e40af;
}

/* Bouton annuler */
.res-wc-cancel-booking {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: var(--res-white);
    color: var(--res-error);
    border: 1px solid var(--res-error);
    border-radius: var(--res-radius-sm);
    cursor: pointer;
    transition: var(--res-transition);
}

.res-wc-cancel-booking:hover {
    background: var(--res-error);
    color: var(--res-white);
}

.res-wc-cancel-booking:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bouton préparer RDV */
.res-wc-btn-preparation {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: var(--res-primary);
    color: var(--res-white) !important;
    border: 1px solid var(--res-primary);
    border-radius: var(--res-radius-sm);
    cursor: pointer;
    transition: var(--res-transition);
    text-decoration: none !important;
    margin-right: 8px;
}

.res-wc-btn-preparation:hover {
    background: var(--res-primary-hover);
    border-color: var(--res-primary-hover);
    color: var(--res-white) !important;
}

/* ==========================================================================
   Loading state
   ========================================================================== */

.res-wc-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.res-wc-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--res-border);
    border-top-color: var(--res-primary);
    border-radius: 50%;
    animation: res-wc-spin 0.8s linear infinite;
}

@keyframes res-wc-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 640px) {
    .res-wc-booking-form-wrapper {
        padding: 16px;
    }

    .res-wc-step {
        padding: 24px 20px;
    }

    .res-wc-step h3 {
        font-size: 18px;
    }

    .res-wc-step-buttons {
        flex-direction: column;
    }

    .res-wc-btn-existing-patient,
    .res-wc-btn-new-patient {
        max-width: 100%;
    }

    .res-wc-form-row {
        grid-template-columns: 1fr;
    }

    .res-wc-modality-options {
        grid-template-columns: 1fr;
    }

    .res-wc-form-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .res-wc-btn-back,
    .res-wc-submit-button {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    /* Table responsive */
    .res-wc-bookings-table thead {
        display: none;
    }

    .res-wc-bookings-table,
    .res-wc-bookings-table tbody,
    .res-wc-bookings-table tr,
    .res-wc-bookings-table td {
        display: block;
        width: 100%;
    }

    .res-wc-bookings-table tr {
        margin-bottom: 16px;
        border: 1px solid var(--res-border);
        border-radius: var(--res-radius-sm);
        overflow: hidden;
    }

    .res-wc-bookings-table td {
        text-align: right;
        padding: 12px 16px;
        position: relative;
        padding-left: 45%;
        border-bottom: 1px solid var(--res-border);
    }

    .res-wc-bookings-table td:last-child {
        border-bottom: none;
    }

    .res-wc-bookings-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        font-weight: 600;
        font-size: 12px;
        text-transform: uppercase;
        color: var(--res-text-light);
    }
}

/* ==========================================================================
   Champ date - Flatpickr personnalisé
   ========================================================================== */

.res-wc-form-group input[type="date"],
.res-wc-form-group input[type="text"].flatpickr-input {
    max-width: 100%;
    box-sizing: border-box;
}

/* Style du champ date avec Flatpickr */
.res-wc-form-group .flatpickr-input {
    cursor: pointer;
    background-color: var(--res-white);
}

.res-wc-form-group .flatpickr-input + .flatpickr-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%23004594'%3E%3Cpath d='M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 44px;
}

/* Personnalisation Flatpickr */
.flatpickr-calendar {
    border-radius: var(--res-radius);
    box-shadow: var(--res-shadow-lg);
    border: 1px solid var(--res-border);
    font-family: inherit;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: var(--res-primary);
}

.flatpickr-months {
    background: var(--res-primary);
    border-radius: var(--res-radius) var(--res-radius) 0 0;
    padding: 8px 0;
}

.flatpickr-months .flatpickr-month {
    color: var(--res-white);
    fill: var(--res-white);
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--res-white);
    fill: var(--res-white);
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: var(--res-accent);
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--res-accent);
}

.flatpickr-current-month {
    font-weight: 600;
    font-size: 15px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent;
    color: var(--res-white);
    font-weight: 600;
}

.flatpickr-weekdays {
    background: var(--res-primary-light);
}

.flatpickr-weekday {
    color: var(--res-primary);
    font-weight: 600;
    font-size: 12px;
}

.flatpickr-day {
    color: var(--res-text);
    border-radius: var(--res-radius-sm);
    font-weight: 500;
}

.flatpickr-day:hover {
    background: var(--res-accent-light);
    border-color: var(--res-accent-light);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--res-accent);
    border-color: var(--res-accent);
    color: var(--res-white);
}

.flatpickr-day.today {
    border-color: var(--res-primary);
}

.flatpickr-day.today:hover {
    background: var(--res-primary-light);
    border-color: var(--res-primary);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #ccc;
    background: transparent;
}

/* Calendrier 2 mois côte à côte */
.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
    border-top: 1px solid var(--res-border);
}

.flatpickr-innerContainer {
    padding: 8px;
}

/* Responsive: empiler les 2 mois sur mobile */
@media screen and (max-width: 640px) {
    .flatpickr-calendar {
        width: auto !important;
    }

    .flatpickr-months .flatpickr-month {
        height: 40px;
    }

    .flatpickr-rContainer {
        display: block;
    }

    .flatpickr-days {
        width: 100% !important;
    }

    .dayContainer {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
}

/* ==========================================================================
   Page de remerciement - Questionnaires
   ========================================================================== */

.res-wc-thankyou-questionnaires {
    background: var(--res-white);
    border: 2px solid var(--res-accent);
    border-radius: var(--res-radius);
    padding: 24px 28px;
    margin: 24px 0;
    box-shadow: var(--res-shadow);
}

.res-wc-thankyou-questionnaires h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--res-primary);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.res-wc-thankyou-questionnaires h2 i {
    color: var(--res-accent);
    font-size: 24px;
}

.res-wc-questionnaires-intro {
    color: var(--res-text-light);
    font-size: 15px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.res-wc-questionnaires-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.res-wc-questionnaires-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--res-accent-light);
    border-radius: var(--res-radius-sm);
    transition: var(--res-transition);
}

.res-wc-questionnaires-list li:hover {
    background: var(--res-primary-light);
}

.res-wc-questionnaires-list li i {
    color: var(--res-accent);
    font-size: 18px;
    flex-shrink: 0;
}

.res-wc-questionnaire-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--res-primary);
}

.res-wc-questionnaire-link {
    margin-left: auto;
    padding: 6px 12px;
    background: var(--res-accent);
    color: var(--res-white);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--res-transition);
}

.res-wc-questionnaire-link:hover {
    background: var(--res-accent-hover);
    color: var(--res-white);
}

@media screen and (max-width: 640px) {
    .res-wc-thankyou-questionnaires {
        padding: 20px;
    }

    .res-wc-questionnaires-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Page de remerciement - Préparation RDV
   ========================================================================== */

.res-wc-thankyou-preparation {
    background: var(--res-white);
    border-radius: var(--res-radius);
    box-shadow: var(--res-shadow);
    padding: 32px;
    margin: 24px 0;
    text-align: center;
    border: 2px solid var(--res-primary-light);
}

.res-wc-thankyou-icon {
    width: 64px;
    height: 64px;
    background: var(--res-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.res-wc-thankyou-icon i {
    font-size: 28px;
    color: var(--res-primary);
}

.res-wc-thankyou-preparation h2 {
    margin: 0 0 24px 0;
    font-size: 22px;
    color: var(--res-primary);
}

.res-wc-thankyou-booking-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    background: var(--res-primary-light);
    border-radius: var(--res-radius-sm);
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.res-wc-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.res-wc-detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--res-text-light);
}

.res-wc-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--res-primary);
}

.res-wc-thankyou-text {
    margin: 0 0 24px 0;
    font-size: 15px;
    color: var(--res-text-light);
    line-height: 1.6;
}

.res-wc-thankyou-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--res-accent);
    color: var(--res-white);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--res-radius-sm);
    transition: var(--res-transition);
}

.res-wc-thankyou-button:hover {
    background: var(--res-accent-hover);
    color: var(--res-white);
    transform: translateY(-2px);
    box-shadow: var(--res-shadow);
}

.res-wc-thankyou-button i {
    font-size: 18px;
}

.res-wc-thankyou-email-notice {
    margin: 20px 0 0 0;
    font-size: 13px;
    color: var(--res-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.res-wc-thankyou-email-notice i {
    color: var(--res-primary);
}

@media screen and (max-width: 640px) {
    .res-wc-thankyou-preparation {
        padding: 24px 20px;
    }

    .res-wc-thankyou-booking-details {
        grid-template-columns: 1fr;
    }

    .res-wc-thankyou-button {
        width: 100%;
    }
}
