:root { color-scheme: light; --patient-ink: #172f63; --patient-text: #263345; --patient-muted: #566579; --patient-border: #dce3eb; }
* { box-sizing: border-box; }
body { margin: 0; background: #f6f8fb; color: var(--patient-text); font-family: Arial, sans-serif; font-size: 16px; line-height: 1.6; }
a { color: var(--patient-ink); text-underline-offset: 3px; }
button, input, select { font: inherit; }
button, summary, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #315ca3; outline-offset: 4px; }
.patient-page { max-width: 960px; margin: 0 auto; padding: 8px 24px 48px; }
.patient-nav, .session-info, .section-heading, .appointment-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.patient-nav { padding: 14px 0; border-bottom: 1px solid var(--patient-border); font-size: 14px; }
.patient-nav form { margin: 0; }
.page-heading { padding: 32px 0 24px; }
.eyebrow, .step-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--patient-muted); }
h1, h2, h3 { color: var(--patient-ink); line-height: 1.25; }
h1 { margin: 10px 0 14px; font-family: Georgia, serif; font-size: clamp(32px, 5vw, 46px); font-weight: 400; }
h2 { margin: 8px 0 16px; font-size: 24px; }
h3 { margin: 12px 0 4px; font-size: 20px; }
p { margin: 0 0 16px; }
.page-heading > p:last-child { margin: 0; color: var(--patient-muted); }
.login-card, .edit-card { padding: 32px; background: white; border: 1px solid var(--patient-border); border-radius: 10px; }
.login-card { max-width: 560px; margin: 0 auto; }
.login-card h2 { font-size: 28px; }
.login-card .step-label { margin-bottom: 12px; }
.patient-form { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 16px; }
.patient-form label { font-weight: 600; font-size: 15px; }
.patient-form input:not([type="hidden"]):not([type="checkbox"]), .patient-form select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #9eacbf; border-radius: 5px; background: white; color: var(--patient-text); }
.patient-form .code-input { font-size: 28px; letter-spacing: .18em; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 20px; border: 1px solid var(--patient-ink); border-radius: 5px; background: var(--patient-ink); color: white; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; text-align: center; }
.button:hover { background: #23467d; }
.button:disabled { opacity: .6; cursor: not-allowed; }
.button-secondary { background: white; color: var(--patient-ink); }
.button-secondary:hover { background: #edf2f9; }
.button-danger { background: #9d2929; border-color: #9d2929; }
.button-danger:hover { background: #7e2020; }
.text-button { border: 0; background: transparent; padding: 10px 0; color: var(--patient-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.resend-form { margin: 0; }
.field-help, .privacy-note, .patient-footnote { font-size: 14px; color: var(--patient-muted); }
.field-help { margin: 0; }
.privacy-note { padding-top: 20px; margin: 20px 0 0; border-top: 1px solid var(--patient-border); }
.patient-footnote { margin: 24px auto 0; max-width: 620px; text-align: center; }
.notice { padding: 16px 20px; background: #e9f5ed; border: 1px solid #9fc4ad; border-radius: 6px; margin-bottom: 24px; color: #235339; }
.notice-error { background: #fff1ee; border-color: #dfb3a8; color: #8b2c20; }
.session-info { padding: 16px 0 24px; font-size: 14px; color: var(--patient-muted); overflow-wrap: anywhere; }
.appointments { margin-top: 24px; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.section-heading > span { font-size: 14px; color: var(--patient-muted); }
.appointment-card { margin-bottom: 16px; padding: 24px; background: white; border: 1px solid var(--patient-border); border-radius: 8px; }
.appointment-date { margin: 0; color: var(--patient-ink); font-weight: 600; }
.appointment-date span { white-space: nowrap; }
.status { padding: 4px 10px; background: #eaf4ef; color: #24513b; border: 1px solid #bdd8c9; border-radius: 4px; font-size: 13px; }
.status-muted { color: #665023; background: #fbf4e7; border-color: #e1cfaa; }
.patient-name { font-size: 17px; margin-bottom: 12px; }
.muted { color: var(--patient-muted); font-size: 14px; }
.appointment-actions { border-top: 1px solid var(--patient-border); margin-top: 20px; padding-top: 8px; }
summary { cursor: pointer; min-height: 44px; padding: 10px 0; color: var(--patient-ink); font-weight: 600; }
.compact-form { max-width: 480px; margin-top: 12px; }
.cancel-details summary { color: #912c2c; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-label input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--patient-ink); }
/* Paiement : le même vert que les boutons de paiement des e-mails, au même endroit que le déplacement et l'annulation. */
.payment-panel { margin: 20px 0; padding: 20px; background: #f3f7f4; border: 1px solid #cfe0d5; border-left: 4px solid #1f7a4d; border-radius: 6px; }
.payment-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 12px; }
.payment-head h4 { margin: 0; color: #174f34; font-size: 18px; line-height: 1.3; }
.payment-amount { margin: 0; color: #174f34; font-family: Georgia, serif; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.payment-deadline { padding: 10px 12px; margin-bottom: 12px; background: #fbf4e7; border: 1px solid #e1cfaa; border-radius: 4px; color: #5c4719; font-size: 15px; }
.payment-steps { list-style: none; counter-reset: payment-step; margin: 20px 0 0; padding: 0; }
.payment-steps > li { counter-increment: payment-step; position: relative; margin-bottom: 20px; padding-left: 44px; }
.payment-steps > li::before { content: counter(payment-step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1f7a4d; color: white; font-weight: 700; font-size: 15px; }
.step-title { margin: 2px 0 10px; color: #174f34; font-weight: 700; }
.bank-details { margin: 0 0 10px; background: white; border: 1px solid #cfe0d5; border-radius: 4px; }
.bank-details > div { display: grid; grid-template-columns: 10em 1fr; gap: 2px 12px; padding: 10px 12px; border-top: 1px solid #e3ece6; }
.bank-details > div:first-child { border-top: 0; }
.bank-details dt { color: var(--patient-muted); font-size: 14px; }
.bank-details dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-weight: 600; }
.bank-value { letter-spacing: .04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copy-button { min-height: 32px; padding: 2px 12px; border: 1px solid #1f7a4d; border-radius: 4px; background: white; color: #174f34; font-size: 13px; font-weight: 600; cursor: pointer; }
.copy-button:hover { background: #e6f1ea; }
.payment-form { margin: 12px 0 0; }
.button-pay { background: #1f7a4d; border-color: #1f7a4d; }
.button-pay:hover { background: #17603c; }
.payment-panel .payment-last { margin-bottom: 0; }
.payment-steps + .field-help { margin-top: -4px; }
.payment-expire { background: #fff6f3; border-color: #e7c3b9; border-left-color: #9d2929; }
.payment-expire .payment-head h4 { color: #8b2c20; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.edit-card { border-color: #8099bc; margin-bottom: 24px; }
.empty-state { padding: 24px; border: 1px dashed #a8b7c9; border-radius: 8px; }
.empty-state p { margin-bottom: 8px; }
.skip-link { position: absolute; left: 12px; top: -100px; background: white; padding: 12px; z-index: 10; }
.skip-link:focus { top: 12px; }
footer { padding: 24px; font-size: 13px; }
@media (max-width: 600px) {
    .patient-page { padding: 8px 16px 32px; }
    .page-heading { padding: 24px 0; }
    .login-card, .edit-card, .appointment-card { padding: 20px; }
    .login-card h2 { font-size: 24px; }
    .appointment-top { align-items: flex-start; flex-direction: column; gap: 8px; }
    .patient-page .button { width: 100%; }
    .login-card strong { overflow-wrap: anywhere; }
    .payment-panel { padding: 16px; }
    .payment-amount { font-size: 24px; }
    .payment-steps > li { padding-left: 40px; }
    .bank-details > div { grid-template-columns: 1fr; }
}

/* Le même calendrier que la réservation, avec les disponibilités réelles. */
.move-form .flatpickr-calendar.inline { width: 100%; max-width: 340px; box-shadow: none; border: 1px solid var(--patient-border); border-radius: 8px; margin: 4px 0; padding: 8px; }
.move-form .flatpickr-rContainer, .move-form .flatpickr-days, .move-form .dayContainer { width: 100%; min-width: 0; max-width: none; }
.move-form .flatpickr-rContainer { display: block; }
.move-form .flatpickr-day { max-width: none; flex-basis: 14.2857%; height: 40px; line-height: 40px; border-radius: 5px; }
.move-form .flatpickr-day:not(.flatpickr-disabled):not(.prevMonthDay):not(.nextMonthDay) { background: #edf3fc; color: var(--patient-ink); font-weight: 600; }
.move-form .flatpickr-day.selected { background: var(--patient-ink) !important; border-color: var(--patient-ink); color: white !important; }
.move-form .flatpickr-day.flatpickr-disabled { color: #697586; }
.move-form .flatpickr-months { margin-bottom: 8px; }
.move-form .flatpickr-monthDropdown-months, .move-form .numInput.cur-year { min-height: 0 !important; padding: 0 !important; border: 0 !important; width: auto !important; }
.patient-times { display: block; margin: 8px 0; padding: 0; border: 0; }
.patient-times legend { width: 100%; margin-bottom: 10px; color: var(--patient-ink); font-weight: 600; font-size: 15px; }
.patient-times label { display: inline-flex; position: relative; cursor: pointer; margin: 0 8px 8px 0; }
.patient-form .patient-times input[type="radio"] { position: absolute; opacity: 0; width: 1px; min-height: 0; height: 1px; padding: 0; }
.patient-times label span { display: block; padding: 8px 14px; border: 1px solid #9eacbf; border-radius: 5px; color: var(--patient-ink); }
.patient-times input:checked + span { background: var(--patient-ink); border-color: var(--patient-ink); color: white; }
.patient-times input:focus-visible + span { outline: 3px solid #315ca3; outline-offset: 3px; }
.move-form [hidden] { display: none !important; }

.move-form .flatpickr-weekday { color: var(--patient-muted); }
