@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap");

@media (max-width: 768px) {
  .public-page.hospitals-page:has(.mobile-bottom-nav) { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .public-page.hospitals-page .app-screen { min-height: 0; padding-block: 0.6rem; }
  .hospitals-page .app-screen .directory-home-button { margin-bottom: 0.5rem; }
  .hospitals-page .app-screen > .badge { display: block; width: fit-content; font-size: 0.65rem; padding: 0.3rem 0.6rem; }
  .hospitals-page .app-screen > h1 { font-size: 1.35rem; margin: 0.4rem 0; }
  .hospitals-page .app-screen > .app-intro { font-size: 0.8rem; line-height: 1.4; margin: 0.4rem 0 0.6rem; }
  .hospitals-page .app-screen .panel { padding: 1rem; margin: 0; }
  .hospitals-page .panel h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
  .hospitals-page .panel p { font-size: 0.8rem; line-height: 1.45; margin: 0.5rem 0; }
}

:root {
  --bg: #f3f7fb;
  --panel: #ffffff;
  --panel-soft: #edf7f5;
  --primary: #0f9d8a;
  --primary-dark: #0a766d;
  --secondary: #1d5fb9;
  --text: #14213d;
  --muted: #5f6f87;
  --border: #dfeaf4;
  --success: #1da97c;
  --warning: #f4b942;
  --danger: #d95f5f;
  --shadow: 0 24px 70px rgba(20, 33, 61, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(180deg, #f1faf8 0%, #f7f8fc 100%);
  color: var(--text);
  font-family: "Lato", Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar nav a {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #f3f7fb;
  color: var(--text);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.topbar nav a:hover {
  background: var(--panel-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.brand-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
}

.brand-logo {
  width: 10.5rem;
  height: 2.75rem;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 800;
}

.brand-name {
  font-size: 1.15rem;
}

.main-nav {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.nav-actions,
.cta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 18px 30px rgba(17, 134, 114, 0.25);
}

.btn-secondary {
  background: rgba(29, 95, 185, 0.08);
  color: var(--secondary);
  border-color: rgba(29, 95, 185, 0.12);
}

.btn-light {
  background: white;
  color: var(--text);
  border-color: var(--border);
}

.btn-small { padding: 0.65rem 1rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 3.5rem 0 2rem;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0.75rem 0 1rem;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.05;
}

.hero-copy p {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 650px;
}

.badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge {
  background: rgba(15, 157, 138, 0.1);
  color: var(--primary-dark);
}

.eyebrow {
  background: rgba(29, 95, 185, 0.08);
  color: var(--secondary);
  margin: 0 0 0.75rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-box {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  box-shadow: var(--shadow);
}

.stat-box strong {
  font-size: 1.5rem;
}

.stat-box span {
  color: var(--muted);
}

.hero-panel {
  background: linear-gradient(135deg, #0f9d8a 0%, #1d5fb9 100%);
  color: white;
  border-radius: 2rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.big-number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.time-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.9rem;
}

.time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
}

.time-row strong,
.time-row span {
  display: block;
}

.available {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-top: 4rem;
  margin-bottom: 1.2rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.doctor-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.doctor-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.doctor-body {
  padding: 1.2rem;
}

.doctor-body h3 {
  margin: 0 0 0.4rem;
}

.doctor-body p {
  margin: 0 0 0.6rem;
  color: var(--muted);
}

.meta-row,
.slot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.slot-row {
  margin: 1rem 0;
  color: var(--text);
}

.booking-panel {
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.booking-form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--border);
  background: #fbfdff;
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
  color: var(--text);
}

.professional-suggestions {
  display: grid;
  gap: 0.25rem;
  align-content: start;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  padding: 0.35rem;
}

.professional-suggestions[hidden] {
  display: none;
}

.professional-suggestion {
  width: 100%;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.professional-suggestion:hover,
.professional-suggestion:focus-visible {
  background: #eef8f6;
}

.professional-suggestions-empty {
  margin: 0;
  padding: 0.7rem 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

textarea {
  resize: vertical;
  min-height: 128px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 3rem 0 5rem;
}

.process-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.process-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(15, 157, 138, 0.12);
  color: var(--primary-dark);
  font-weight: 800;
}

.process-item p {
  margin: 1rem 0 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #eefaf7 0%, #f5f7fb 100%);
}

.register-page {
  padding: 2rem 0;
  background-image:
    linear-gradient(rgba(243, 249, 251, 0.62), rgba(243, 247, 251, 0.78)),
    url("accueil3.png");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

.auth-shell {
  width: min(540px, calc(100% - 2rem));
}

.auth-shell.register-shell {
  width: min(760px, calc(100% - 2rem));
}

.auth-card {
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--border);
  border-radius: 2rem;
  box-shadow: var(--shadow);
  padding: 1.8rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.2rem;
}

.auth-header h1 {
  margin: 0.75rem 0 0.2rem;
}

.auth-header p {
  margin: 0;
  color: var(--muted);
}

.auth-card form {
  display: grid;
  gap: 0.95rem;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 3.5rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: rgba(29, 95, 185, 0.08);
  color: var(--secondary);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.password-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .password-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .password-eye-off {
  display: block;
}

.form-grid.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-width { grid-column: 1 / -1; }

.flash-message {
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  margin: 1rem 0 0;
  font-weight: 700;
}

.flash-success {
  background: rgba(29, 169, 124, 0.1);
  color: var(--success);
}

.flash-error {
  background: rgba(217, 95, 95, 0.1);
  color: var(--danger);
}

.auth-link {
  margin-top: 1rem;
  text-align: center;
  color: var(--muted);
}

.auth-link a {
  color: var(--secondary);
  font-weight: 700;
}

.page-content {
  padding: 2rem 0 4rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-head h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.panel {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: 1.6rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-top: 1.6rem;
}

.panel h2 {
  margin-top: 0;
}

.appointment-list {
  display: grid;
  gap: 1rem;
}

.appointment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: #fbfdff;
}

.appointment-row p,
.appointment-row small {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-confirmed { background: rgba(29, 169, 124, 0.12); color: var(--success); }
.status-pending { background: rgba(244, 185, 66, 0.12); color: #9d6b00; }
.status-cancelled { background: rgba(217, 95, 95, 0.12); color: var(--danger); }
.status-rescheduled { background: rgba(29, 95, 185, 0.12); color: var(--secondary); }
.status-approved { background: rgba(29, 169, 124, 0.12); color: var(--success); }
.status-rejected,
.status-suspended { background: rgba(217, 95, 95, 0.12); color: var(--danger); }

.confirmation-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #eefaf7 0%, #f7f8fc 100%);
  padding: 2rem 1rem;
}

.confirmation-card {
  width: min(720px, 100%);
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--border);
  border-radius: 2rem;
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
}

.confirmation-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(29, 169, 124, 0.12);
  font-size: 2rem;
  color: var(--success);
}

.confirmation-detail-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  text-align: left;
}

.confirmation-detail-grid div {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}

.confirmation-detail-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

@media (max-width: 860px) {
  .hero-grid,
  .doctor-grid,
  .process-grid,
  .two-columns,
  .form-grid.two-cols,
  .confirmation-detail-grid {
    grid-template-columns: 1fr;
  }

  .nav-wrap,
  .section-head,
  .page-head,
  .footer-wrap,
  .appointment-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    display: none;
  }
}

.admin-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.admin-report-grid .panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.admin-report-grid strong {
  font-size: 1.75rem;
}

.admin-professional-filter,
.admin-professional-actions {
  display: grid;
  gap: 0.8rem;
}

.admin-professional-filter {
  grid-template-columns: 2fr 1fr 1fr auto;
  align-items: end;
}

.admin-professional-actions {
  width: min(100%, 360px);
  flex: 0 0 360px;
}

.admin-professional-actions textarea {
  min-height: 72px;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.patient-dialog {
  width: min(680px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
}

.patient-dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
}

#patient-dialog {
  font-size: 0.85rem;
}

#patient-dialog h2 {
  font-size: 1.15rem;
}

#patient-dialog input,
#patient-dialog select,
#patient-dialog textarea,
#patient-dialog .btn {
  font-size: 0.85rem;
}

.patient-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem;
}

.patient-association-details {
  display: block;
  margin: 0.5rem 0;
}

.professional-patient-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

#professional-patient-dialog {
  width: min(780px, calc(100% - 2rem));
  background: #f8fafc;
  color: #1e293b;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
}

.ounono-patient-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #dce7ec;
}

.ounono-patient-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, #087f72, #1d5fb9);
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
}

.ounono-patient-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.ounono-patient-heading {
  min-width: 0;
  flex: 1;
}

.ounono-patient-eyebrow {
  color: #087f72;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ounono-patient-heading h2 {
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
}

.ounono-patient-heading p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.ounono-test-badge {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #854d0e;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

#professional-patient-note {
  padding: 0.8rem 1rem;
  border-left: 3px solid #1d5fb9;
  border-radius: 0.5rem;
  background: #edf4fc;
  color: #334155;
  font-size: 0.85rem;
}

#professional-patient-details {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.ounono-patient-section {
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: white;
}

.ounono-patient-section h3 {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  color: #087f72;
}

.ounono-patient-section dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.2rem;
  margin: 0;
}

.ounono-patient-section dt {
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  color: #64748b;
}

.ounono-patient-section dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ounono-patient-section .ounono-field-empty {
  color: #64748b;
  font-weight: 400;
}

.ounono-patient-section:first-child dl {
  grid-template-columns: 1fr;
}

.professional-patient-actions .btn {
  text-align: center;
}

#professional-connect,
#professional-read,
#professional-disconnect,
#cabinet-acts {
  color: white;
  box-shadow: none;
}

#professional-connect {
  background: #1d5fb9;
}

#professional-read {
  background: #087f72;
}

#professional-disconnect {
  background: #b42338;
}

#cabinet-acts {
  background: #6d28d9;
}

#nfc-connect,
#nfc-read,
#nfc-disconnect {
  color: white;
  box-shadow: none;
}

#nfc-connect {
  background: #2563eb;
}

#nfc-read {
  background: #00845a;
}

#nfc-disconnect {
  background: #dc2626;
}

#nfc-connect:disabled,
#nfc-read:disabled,
#nfc-disconnect:disabled {
  background: #e2e8f0;
  color: #334155;
  border-color: #94a3b8;
  opacity: 1;
  cursor: not-allowed;
  transform: none;
}

#professional-connect:disabled,
#professional-read:disabled,
#professional-disconnect:disabled {
  opacity: 1;
  background: #e2e8f0;
  color: #334155;
  border-color: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

#patient-bill {
  background: #087f72;
  color: white;
  box-shadow: none;
}

#patient-history-open {
  background: #1d5fb9;
  color: white;
}

#professional-patient-close {
  background: #475569;
  color: white;
}

@media (max-width: 540px) {
  .ounono-patient-header {
    flex-wrap: wrap;
  }

  .ounono-patient-section dl {
    grid-template-columns: 1fr;
  }

  .professional-patient-actions {
    grid-template-columns: 1fr;
  }
}

.ounono-table-wrap {
  overflow-x: auto;
}

.navette-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
  font-size: 0.85rem;
}

#claims-open {
  background: #6d28d9;
  color: white;
  gap: 0.6rem;
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.2);
}

#claims-count {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

#claims-dialog {
  width: min(1200px, calc(100% - 2rem));
}

#patients-open {
  background: #1d5fb9;
  color: white;
  gap: 0.6rem;
}

#patients-dialog {
  width: min(1200px, calc(100% - 2rem));
}

#patients-dialog td {
  overflow-wrap: anywhere;
}

#patients-dialog label {
  display: block;
  margin-top: 1rem;
}

#cabinet-patient-editor {
  font-size: 0.85rem;
}

#navette-send-form[hidden],
#navette-reply-form[hidden],
#claim-response-form[hidden] {
  display: none;
}

.navette-panel dl,
#claim-details dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0.5rem 1rem;
}

.navette-panel dd,
#claim-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.navette-timeline {
  padding-left: 1.3rem;
}

.navette-timeline li {
  margin: 0.6rem 0;
  overflow-wrap: anywhere;
}

@media print {
  #invoice-navette {
    display: none;
  }
}

.ounono-act-choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.7rem 0;
}

.ounono-act-choice input[type="checkbox"] {
  width: auto;
}

.ounono-history {
  width: 100%;
  border-collapse: collapse;
}

.ounono-history th,
.ounono-history td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid var(--border);
}

@media print {
  body:has(#invoice-dialog[open]) > :not(#invoice-dialog) {
    display: none !important;
  }

  #invoice-dialog[open] {
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    margin: 0;
    border: 0;
  }

  #invoice-dialog::backdrop,
  #invoice-dialog .patient-dialog-actions {
    display: none;
  }
}

@media (max-width: 860px) {
  .admin-report-grid,
  .admin-professional-filter {
    grid-template-columns: 1fr;
  }

  .admin-professional-actions {
    width: 100%;
    flex-basis: auto;
  }
}

.app-home {
  padding: 2.5rem 0 1rem;
}

.app-home h1 {
  max-width: 22ch;
  margin: 0.8rem 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.12;
}

.app-intro,
.space-banner p {
  color: var(--muted);
  max-width: 65ch;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.8rem 0;
}

.app-tile {
  --tile-color: #08796b;
  --tile-bg: #e3f6f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: 190px;
  padding: 1.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1.7rem;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(20, 33, 61, 0.04);
  text-align: center;
  overflow-wrap: anywhere;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile-blue { --tile-color: #1d5fb9; --tile-bg: #e9f1ff; }
.tile-purple { --tile-color: #7646a4; --tile-bg: #f3ebff; }
.tile-orange { --tile-color: #94500c; --tile-bg: #fff1dc; }
.tile-rose { --tile-color: #ab3355; --tile-bg: #ffeaf0; }
.tile-navy { --tile-color: #253f67; --tile-bg: #e8eef7; }
.specialties-page .app-tile { --tile-color: hsl(var(--specialty-hue, 160), 65%, 32%); --tile-bg: hsl(var(--specialty-hue, 160), 60%, 94%); }
.specialties-page .app-tile:nth-child(1) { --specialty-hue: 210; }
.specialties-page .app-tile:nth-child(2) { --specialty-hue: 165; }
.specialties-page .app-tile:nth-child(3) { --specialty-hue: 25; }
.specialties-page .app-tile:nth-child(4) { --specialty-hue: 270; }
.specialties-page .app-tile:nth-child(5) { --specialty-hue: 340; }
.specialties-page .app-tile:nth-child(6) { --specialty-hue: 185; }
.specialties-page .app-tile:nth-child(7) { --specialty-hue: 235; }
.specialties-page .app-tile:nth-child(8) { --specialty-hue: 315; }
.specialties-page .app-tile:nth-child(9) { --specialty-hue: 40; }
.specialties-page .app-tile:nth-child(10) { --specialty-hue: 145; }
.specialties-page .app-tile:nth-child(11) { --specialty-hue: 255; }
.specialties-page .app-tile:nth-child(12) { --specialty-hue: 200; }
.specialties-page .app-tile:nth-child(13) { --specialty-hue: 90; }
.specialties-page .app-tile:nth-child(14) { --specialty-hue: 15; }
.specialties-page .app-tile:nth-child(15) { --specialty-hue: 175; }
.specialties-page .app-tile:nth-child(16) { --specialty-hue: 290; }
.specialties-page .app-tile:nth-child(17) { --specialty-hue: 220; }
.specialties-page .app-tile:nth-child(18) { --specialty-hue: 125; }
.specialties-page .app-tile:nth-child(19) { --specialty-hue: 55; }
.specialties-page .app-tile:nth-child(20) { --specialty-hue: 105; }
.specialties-page .app-tile:nth-child(21) { --specialty-hue: 300; }
.specialties-page .app-tile:nth-child(22) { --specialty-hue: 195; }
.specialties-page .app-tile:nth-child(23) { --specialty-hue: 355; }
.specialties-page .app-tile:nth-child(24) { --specialty-hue: 35; }
.specialties-page .app-tile:nth-child(25) { --specialty-hue: 260; }

.app-tile-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 23px;
  background: var(--tile-bg);
  color: var(--tile-color);
}

.app-tile-icon svg { width: 36px; height: 36px; }
.app-tile strong { font-size: 1.1rem; }
.app-tile-description { color: var(--muted); font-size: 0.9rem; }

.app-tile:hover {
  transform: translateY(-4px);
  border-color: var(--tile-color);
  box-shadow: 0 16px 28px rgba(20, 33, 61, 0.1);
}

:is(.app-tile, .btn, .topbar a, .auth-link a):focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 4px;
}

.topbar nav a[aria-current] {
  background: var(--panel-soft);
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.space-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 1.3rem;
  background: #e9f0fa;
  border-radius: 1.3rem;
}

.space-banner p { margin: 0.3rem 0 0; }
.professional-page { background: linear-gradient(180deg, #edf2fb, #f7f8fc); }
.professional-home-page .logout-action svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.professional-home-page .logout-action { color: #b42332; border-color: #f0cdd1; background: #fff5f5; }
.professional-home-page .logout-action[hidden] { display: none; }
.professional-home-page .directory-home-button { margin-bottom: 0.4rem; }
.professional-home-page .professional-grid .app-tile {
  background: linear-gradient(145deg, #fff 0%, var(--tile-bg) 100%);
  border: 1px solid var(--tile-bg);
  box-shadow: 0 5px 16px rgba(20, 33, 61, 0.06);
  color: var(--tile-color);
}
.professional-home-page .professional-grid .app-tile-icon {
  background: var(--tile-bg);
  border: 1px solid currentColor;
  border-radius: 16px;
}
.professional-home-page .professional-grid .app-tile strong { color: var(--tile-color); }
.professional-home-page .cta-row .btn-primary {
  background: linear-gradient(135deg, #125d99, #264fa0);
  border-color: #125d99;
  box-shadow: 0 4px 12px rgba(38, 79, 160, 0.15);
}
.professional-home-page .cta-row .btn-light {
  color: #075f55;
  background: #e6f5ef;
  border-color: #b6dacb;
}
@media (max-width: 768px) {
  .public-page.professional-home-page:has(.mobile-bottom-nav) { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .professional-home-page .page-content { padding-block: 0.6rem; }
  .professional-home-page .app-home { padding: 0; }
  .professional-home-page .app-home > .badge { display: none; }
  .public-page.professional-home-page .app-home h1 { font-size: 1.25rem; margin: 0 0 0.4rem; }
  .public-page.professional-home-page .app-intro { font-size: 0.8rem; line-height: 1.4; margin: 0.4rem 0; }
  .professional-home-page .cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.75rem 0; }
  .professional-home-page .cta-row .btn { min-width: 0; min-height: 44px; padding: 0.5rem; font-size: 0.75rem; line-height: 1.3; text-align: center; }
  .public-page.professional-home-page .professional-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin: 0.75rem 0; }
  .professional-home-page .professional-grid .app-tile { min-height: 100px; padding: 0.6rem 0.4rem; gap: 0.3rem; }
  .professional-home-page .professional-grid .app-tile > span:last-child { display: none; }
}
@media (max-width: 768px) and (max-height: 700px) {
  .professional-home-page .page-content { padding-block: 0.3rem; }
  .public-page.professional-home-page .professional-grid { margin-block: 0.4rem; }
  .professional-home-page .professional-grid .app-tile { min-height: 80px; padding-block: 0.3rem; }
  .professional-home-page .professional-grid .app-tile-icon { width: 40px; height: 40px; }
  .professional-home-page .professional-grid .app-tile-icon svg { width: 28px; height: 28px; }
}
.professional-page .badge { background: #e3ebfa; color: #253f67; }
.auth-header .brand-logo { margin: 0 auto 1rem; }
:is(#mes-services, #professionnels, #rendez-vous, #mes-rendez-vous, #agenda, #disponibilites) {
  scroll-margin-top: 12rem;
}

@media (max-width: 600px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .app-tile { min-height: 172px; padding: 1rem 0.6rem; border-radius: 1.3rem; }
  .app-tile-icon { width: 60px; height: 60px; border-radius: 20px; }
  .app-tile strong { font-size: 1rem; }
  .app-tile-description { font-size: 0.85rem; }
  #mes-services .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  #mes-services .app-tile { min-height: 140px; padding: 0.8rem 0.3rem; gap: 0.6rem; border-radius: 1.1rem; }
  #mes-services .app-tile-icon { width: 52px; height: 52px; border-radius: 17px; }
  #mes-services .app-tile-icon svg { width: 30px; height: 30px; }
  #mes-services .app-tile strong { font-size: 0.85rem; line-height: 1.3; hyphens: auto; }
  #mes-services .app-tile-description { display: none; }
  .space-banner { flex-direction: column; align-items: stretch; }
  .topbar .nav-actions { width: 100%; }
  .topbar .nav-actions .btn { flex: 1; }
  .public-page .nav-wrap { gap: 0.65rem; padding: 0.8rem 0; }
  .public-page .brand-logo { width: 9rem; height: 2.2rem; }
  .public-page .main-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 0.5rem; }
  .public-page .main-nav a { padding: 0.6rem 0.4rem; text-align: center; font-size: 0.82rem; }
  .public-page .nav-actions .btn { padding: 0.65rem 0.5rem; font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-tile, .btn { transition: none; }
  .app-tile:hover, .btn:hover { transform: none; }
}

.app-screen {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  min-height: calc(100vh - 100px);
}

.app-screen > h1 {
  margin: 0.8rem 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.back-link {
  display: block;
  width: fit-content;
  min-height: 44px;
  padding: 0.65rem 0;
  margin-bottom: 0.7rem;
  color: var(--secondary);
  font-weight: 700;
}

.quick-links,
.search-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quick-links { justify-content: center; }
.directory-home-button {
  gap: 0.55rem;
  min-height: 44px;
  margin-bottom: 1rem;
  padding: 0.6rem 1rem;
  border: 1px solid #0b6256;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b6256, #128573);
  color: #fff;
  box-shadow: 0 4px 12px rgba(11, 98, 86, 0.14);
  font-size: 0.875rem;
}
.directory-home-button svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.directory-home-button:hover { background: #07574f; }
.professional-dashboard-page .topbar nav .directory-home-button {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  background: linear-gradient(135deg, #0b6256, #128573);
  border-color: #0b6256;
  color: #fff;
}
.professional-dashboard-page .topbar nav .directory-home-button:hover { background: #07574f; }
.directory-search { margin: 1.5rem 0; max-width: 680px; }
.home-search-accordion { max-width: 680px; }
.home-search-actions { display: flex; align-items: flex-start; gap: 1rem; }
.home-search-actions .home-search-accordion { flex: 1; min-width: 0; }
.home-card-request { align-self: center; min-height: 44px; background: #be185d; color: #fff; }
.home-card-request:hover { background: #9d174d; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "badge avatar"
    "title title"
    "action action"
    "inu inu";
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 0 1.5rem;
  padding: 1.5rem;
  border-radius: 1.75rem;
  background: linear-gradient(110deg, #0f9d8a, #1d5fb9);
  color: #fff;
  box-shadow: 0 12px 30px rgba(13, 61, 93, 0.16);
}
.home-hero-badge {
  grid-area: badge;
  width: fit-content;
  max-width: 100%;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.home-hero-avatar {
  grid-area: avatar;
  display: block;
  width: 50px;
  height: 62px;
  justify-self: end;
  border: 0;
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}
.home-hero-title {
  grid-area: title;
  margin: 0;
  color: #fff;
  font-size: 1.375rem;
  font-weight: 900;
  line-height: 1.15;
}
.home-hero .home-card-request {
  grid-area: action;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  align-self: center;
  gap: 0.55rem;
  min-height: 44px;
  margin: 0;
  padding: 0.65rem 1.25rem;
  border: 1px solid rgba(255, 216, 138, 0.95);
  border-radius: 999px;
  background: #fff;
  color: #0a766d;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 193, 92, 0.35);
}
.home-hero .home-card-request::after {
  content: "→";
  font-size: 1rem;
}
.home-hero .home-card-request:hover {
  transform: translateY(-1px);
  background: #fff;
  color: #07574f;
  box-shadow: 0 6px 16px rgba(255, 193, 92, 0.42);
}
.home-hero .home-card-request:focus-visible {
  outline: 3px solid rgba(255, 216, 138, 0.8);
  outline-offset: 3px;
}
.home-hero-inu {
  grid-area: inu;
  margin: -0.25rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}
.contact-dialog.card-request-dialog { width: min(480px, calc(100% - 1.5rem)); padding: 1rem; }
.card-request-dialog h2 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.card-request-dialog > p { margin: 0 0 0.75rem; font-size: 0.85rem; }
.card-request-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem; text-align: left; }
.card-request-form label { display: grid; gap: 0.2rem; min-width: 0; font-size: 0.8rem; }
.card-request-form input, .card-request-form select, .card-request-form textarea { width: 100%; min-width: 0; min-height: 44px; padding: 0.4rem 0.5rem; font-size: 1rem; }
.card-request-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; }
.card-request-row label { display: grid; gap: 0.2rem; min-width: 0; font-size: 0.8rem; }

/* Menu déroulant premium (select personnalisé) */
.premium-select { position: relative; }
.premium-select-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.premium-select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; min-height: 44px; padding: 0.4rem 0.65rem;
  font: inherit; font-size: 1rem; text-align: left; color: var(--text);
  background: #fbfdff; border: 1px solid var(--border); border-radius: 1rem;
  cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.premium-select-trigger:hover { border-color: #c4d8ec; }
.premium-select-trigger:focus-visible,
.premium-select.open .premium-select-trigger {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 157, 138, 0.15);
}
.premium-select-label { display: flex; align-items: center; gap: 0.55rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.premium-select-label.placeholder { color: var(--muted); }
.premium-select-label .icon { flex: none; font-size: 1.15rem; line-height: 1; }
.premium-select-chevron { flex: none; color: var(--muted); transition: transform 0.2s ease; }
.premium-select.open .premium-select-chevron { transform: rotate(180deg); }
.premium-select-options {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0;
  margin: 0; padding: 0.4rem; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: 1rem;
  box-shadow: 0 24px 70px rgba(20, 33, 61, 0.18);
  max-height: 264px; overflow: auto;
  animation: premium-select-in 0.16s ease;
}
@keyframes premium-select-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.premium-select-option {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.7rem; border-radius: 0.7rem;
  font-weight: 600; color: var(--text); cursor: pointer;
}
.premium-select-option:hover,
.premium-select-option.active { background: var(--panel-soft); color: var(--primary-dark); }
.premium-select-option[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(15, 157, 138, 0.12), rgba(29, 95, 185, 0.1));
  color: var(--primary-dark);
}
.premium-select-option .icon { flex: none; font-size: 1.15rem; line-height: 1; }
.premium-select-option .check { flex: none; margin-left: auto; color: var(--primary); opacity: 0; transition: opacity 0.12s ease; }
.premium-select-option[aria-selected="true"] .check { opacity: 1; }

/* Back office cartes OUNONO */
.card-status-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.card-status-pending { background: #fff3d6; color: #9d6b00; }
.card-status-issued { background: var(--panel-soft, #edf7f5); color: var(--secondary, #1d5fb9); }
.card-status-delivered { background: #e3f6f0; color: var(--success, #1da97c); }
.card-status-cancelled { background: #fbe9e9; color: var(--danger, #d95f5f); }
.card-request-message, .card-request-note { grid-column: 1 / -1; }
.card-request-note { margin: 0; font-size: 0.75rem; }
.card-request-form .btn { min-height: 44px; padding: 0.5rem; font-size: 0.8rem; }
.card-request-actions { display: flex; gap: 0.5rem; }
.card-request-actions .btn { flex: 1; }
@media (min-width: 601px) {
  .home-search-actions { column-gap: 4rem; }
  .home-card-request { margin-left: auto; }
}
@media (max-width: 600px) {
  .home-search-actions { flex-direction: column; gap: 0.5rem; }
  .home-search-actions .home-search-accordion { width: 100%; flex: auto; }
  .home-card-request { align-self: center; min-height: 32px; padding: 0.25rem 0.75rem; font-size: 0.75rem; }
}
.logout-action svg { display: none; }
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: calc(90px + env(safe-area-inset-bottom));
  z-index: 1090;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #0b6256;
  border-radius: 14px;
  background: #0b6256;
  color: #fff;
  box-shadow: 0 4px 14px rgba(11, 98, 86, 0.2);
  cursor: pointer;
}
.back-to-top[hidden] { display: none; }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back-to-top:hover { background: #07574f; }
.back-to-top:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }
@media print { .back-to-top { display: none; } }
.home-search-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
}
.home-search-accordion > summary::-webkit-details-marker { display: none; }
.home-search-accordion > summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--primary-dark);
}
.home-search-accordion[open] > summary::after { content: "\2212"; }
.home-search-accordion > summary:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; border-radius: 0.5rem; }
@media (min-width: 601px) {
  .home-search-accordion > summary::after {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--primary-dark);
    border-radius: 50%;
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(11, 98, 86, 0.08);
    font-size: 2.25rem;
    line-height: 1;
  }
  .home-search-accordion > summary:hover::after { background: #07574f; border-color: #07574f; }
}
.search-controls { margin-top: 0.5rem; }
.search-controls input { flex: 1; min-width: 160px; }
.search-field { flex: 1 1 200px; min-width: 0; text-align: left; }
.search-field input { width: 100%; min-width: 0; }
.directory-search .search-controls { align-items: end; }
.practitioner-grid .app-tile strong { overflow-wrap: anywhere; }
.practitioner-profile { max-width: 680px; margin: 1.5rem auto; text-align: center; }
.practitioner-profile .btn { white-space: normal; }
.profile-avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 28px;
  background: #e9f1ff;
  color: var(--secondary);
}
.profile-avatar svg { width: 44px; height: 44px; }
.booking-screen { max-width: 850px; }
.booking-form #slot-status { margin: 0; color: var(--muted); }
.booking-form [hidden] { display: none; }
.back-link:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }
.patient-dashboard .stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0;
}
.patient-dashboard .stat-box {
  flex-direction: row;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 0.7rem;
  box-shadow: none;
  font-size: 0.85rem;
}
.patient-dashboard .stat-box strong { font-size: 1rem; }
.patient-dashboard #mes-rendez-vous {
  margin-top: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
}
.patient-dashboard #mes-rendez-vous h2 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.patient-dashboard #mes-rendez-vous .empty-state { margin: 0; font-size: 0.9rem; }
.app-intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, #fff 20%, #e9f8f5 75%, #e7f0fa);
  animation: intro-dismiss 0.4s 1.8s both;
}
.app-intro-screen[hidden] { display: none; }
.app-intro-art { width: min(320px, 80vw); text-align: center; }
.app-intro-pulse { display: block; width: 100%; height: 90px; }
.app-intro-pulse path {
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: intro-pulse 0.9s ease-out forwards;
}
.app-intro-logo {
  display: block;
  width: 90%;
  height: auto;
  margin: 0 auto;
  animation: intro-reveal 0.6s 0.65s both;
}
.app-intro-art p { color: var(--primary-dark); animation: intro-reveal 0.5s 0.95s both; }
@keyframes intro-pulse { to { stroke-dashoffset: 0; } }
@keyframes intro-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes intro-dismiss { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .app-intro-screen { display: none; }
}
.mobile-bottom-nav { display: none; }

@media (min-width: 901px) {
  .professional-dashboard-page .professional-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 601px) {
  :is(.public-home-page, .professional-home-page, .professional-dashboard-page) { padding-bottom: 100px; }
  :is(.public-home-page, .professional-home-page, .professional-dashboard-page) .mobile-bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(560px, calc(100% - 2rem));
    padding: 0.4rem;
    border: 1px solid rgba(15, 157, 138, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 28px rgba(20, 33, 61, 0.12);
  }
  @supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
    :is(.public-home-page, .professional-home-page, .professional-dashboard-page) .mobile-bottom-nav {
      background: rgba(255, 255, 255, 0.72);
      -webkit-backdrop-filter: blur(16px) saturate(140%);
      backdrop-filter: blur(16px) saturate(140%);
    }
  }
  :is(.public-home-page, .professional-home-page, .professional-dashboard-page) .mobile-bottom-nav :is(a, button) {
    display: grid;
    grid-template-rows: 20px 18px;
    align-content: center;
    justify-items: center;
    gap: 0.3rem;
    min-height: 52px;
    padding: 0.25rem;
    border: 0;
    background: none;
    color: var(--primary-dark);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
  }
  :is(.public-home-page, .professional-home-page, .professional-dashboard-page) .mobile-bottom-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  :is(.public-home-page, .professional-home-page, .professional-dashboard-page) .mobile-bottom-nav.is-scroll-hidden { visibility: hidden; pointer-events: none; }
  :is(.public-home-page, .professional-home-page, .professional-dashboard-page) .mobile-bottom-nav :is(a, button):focus-visible { outline: 3px solid var(--secondary); border-radius: 12px; }
}
.friendly-empty p { max-width: 65ch; }
.friendly-empty .btn { margin-top: 0.65rem; }
.booking-illustration { display: block; width: min(220px, 100%); height: auto; margin: 0 auto 0.75rem; }
.booking-illustration-check { stroke-dasharray: 40; animation: booking-check 450ms ease-out both; }
@keyframes booking-check { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .booking-illustration-check { animation: none; }
}
.booking-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  max-width: 600px;
}
.booking-progress li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 3px solid var(--border);
  color: var(--muted);
  font-size: clamp(0.7rem, 2.8vw, 0.9rem);
}
.booking-progress-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #e9eff5;
}
.booking-progress li[aria-current] { color: var(--primary-dark); border-color: var(--primary); font-weight: 700; }
.booking-progress li[aria-current] .booking-progress-number,
.booking-progress .is-complete .booking-progress-number { background: var(--primary); color: #fff; }
.booking-progress .is-complete { border-color: var(--primary); }
:is(.app-tile, .btn, .mobile-bottom-nav a, .mobile-bottom-nav button):not(:disabled):not([aria-disabled="true"]) {
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, filter 120ms ease-out;
}
:is(.app-tile, .btn, .mobile-bottom-nav a, .mobile-bottom-nav button):not(:disabled):not([aria-disabled="true"]):active {
  transform: scale(0.97);
  filter: brightness(0.94);
}
@media (prefers-reduced-motion: reduce) {
  :is(.app-tile, .btn, .mobile-bottom-nav a, .mobile-bottom-nav button):not(:disabled):not([aria-disabled="true"]) { transition: none; }
  :is(.app-tile, .btn, .mobile-bottom-nav a, .mobile-bottom-nav button):not(:disabled):not([aria-disabled="true"]):active {
    transform: none;
  }
}
.contact-dialog {
  width: min(360px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  box-sizing: border-box;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  text-align: center;
  color: var(--primary-dark);
}
.contact-dialog::backdrop { background: rgba(15, 23, 42, 0.6); }
.contact-dialog img { max-width: 100%; object-fit: contain; }
.contact-dialog address { display: grid; margin-bottom: 1rem; font-style: normal; }
.contact-dialog address a { display: grid; align-items: center; min-height: 44px; overflow-wrap: anywhere; }

@media (min-width: 601px) {
  .auth-page:has(> .patient-header) {
    display: block;
    padding: 0;
  }
  .auth-page:has(> .patient-header) > .auth-shell { margin: 1.5rem auto; }
}

@media (max-width: 600px) {
  .public-page { font-size: 0.875rem; }
  .public-page .container { width: calc(100% - 1.5rem); }
  .public-page .nav-wrap { gap: 0.4rem; padding: 0.5rem 0; }
  .public-page .brand-logo { width: 7.5rem; height: 1.8rem; }
  .public-page .main-nav {
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid #dbe7e1;
    border-radius: 14px;
    background: #fafbf7;
    box-shadow: 0 2px 8px rgba(14, 66, 57, 0.04);
  }
  .public-page .main-nav a,
  .public-page .nav-actions .btn { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0.35rem 0.65rem; font-size: 0.75rem; }
  .public-page .main-nav a { padding-inline: 0.35rem; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #354d48; }
  .public-page .main-nav a[aria-current] { background: #fff; color: #0b6256; border-color: #cbded6; box-shadow: 0 2px 5px rgba(14, 66, 57, 0.06); }
  .public-page .nav-actions { justify-content: flex-end; gap: 0.4rem; }
  .public-page .nav-actions .btn { flex: 0 1 auto; border-radius: 12px; box-shadow: none; }
  .public-page .nav-actions .btn-primary { background: linear-gradient(135deg, #0b6256, #128573); color: #fff; border: 1px solid #0b6256; box-shadow: 0 3px 8px rgba(11, 98, 86, 0.12); }
  .public-page .nav-actions .btn-light { background: #fafbf7; border: 1px solid #dbe7e1; color: #354d48; }
  .public-page .nav-actions .logout-action { width: 44px; min-height: 44px; padding: 0; color: #b42332; border-color: #f0cdd1; background: #fff5f5; }
  .public-page .logout-action span { display: none; }
  .public-page .logout-action svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .public-page .nav-wrap:has(.logout-action) { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .public-page .nav-wrap:has(.logout-action) .brand-wrap { grid-column: 1 / -1; justify-self: start; min-height: 44px; margin-right: 52px; }
  .public-page .nav-wrap:has(.logout-action) .main-nav { grid-column: 1; grid-row: 2; min-width: 0; }
  .public-page .nav-wrap:has(.logout-action) .nav-actions { grid-column: 2; grid-row: 2; width: auto; }
  .public-page .nav-wrap:has(.logout-action) .main-nav a { min-width: 0; padding-inline: 0.25rem; font-size: 0.6875rem; line-height: 1.25; }
  .public-page .nav-wrap:has(.logout-action) .nav-actions .btn-primary { min-height: 48px; padding-inline: 0.55rem; font-size: 0.6875rem; }
  .public-page .nav-actions .logout-action { position: absolute; top: 0.5rem; right: 0; }
  .public-page .app-screen { padding-top: 0.85rem; }
  .public-page .app-screen > h1,
  .public-page .app-home h1 { font-size: 1.5rem; line-height: 1.2; margin: 0.65rem 0; }
  .public-page .app-intro { margin: 0.6rem 0 1rem; }
  .public-page .app-grid { margin: 1rem 0; }
  .public-page .app-tile { min-height: 148px; padding: 0.8rem 0.5rem; }
  .public-page .app-tile-icon { width: 48px; height: 48px; border-radius: 16px; }
  .public-page .app-tile-icon svg { width: 28px; height: 28px; }
  .public-page .app-tile strong { font-size: 0.875rem; }
  .public-page .app-tile-description { font-size: 0.8rem; }
  .specialties-page .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  .specialties-page .app-tile {
    min-height: 104px;
    padding: 0.65rem 0.4rem;
    gap: 0.4rem;
    border-radius: 16px;
    border-color: #d7e5df;
    background: linear-gradient(145deg, #fff, #f8faf6);
    box-shadow: 0 3px 10px rgba(14, 66, 57, 0.05);
  }
  .specialties-page .app-tile-icon { width: 36px; height: 36px; border-radius: 12px; }
  .specialties-page .app-tile-icon svg { width: 22px; height: 22px; }
  .specialties-page .app-tile strong { font-size: 0.75rem; line-height: 1.3; hyphens: auto; }
  .specialties-page .app-tile-description { display: none; }
  .public-page #mes-services .app-tile { min-height: 112px; gap: 0.45rem; padding: 0.65rem 0.25rem; border-radius: 1rem; }
  .public-page #mes-services .app-tile-icon { width: 44px; height: 44px; border-radius: 14px; }
  .public-page #mes-services .app-tile-icon svg { width: 26px; height: 26px; }
  .public-page #mes-services .app-tile strong { font-size: 0.75rem; line-height: 1.35; }
  .public-home-page .app-home > .badge,
  .public-home-page .home-search-accordion > .app-intro { display: none; }
  .public-home-page .app-home h1 { font-size: 1.25rem; margin: 0; }
  .public-home-page .home-search-accordion > summary::after {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-dark);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
  }
  .public-home-page .home-search-accordion[open] > summary { margin-bottom: 0.75rem; }
  .public-home-page .directory-search { margin: 0 0 1rem; }
  .public-home-page .search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; align-items: end; margin-top: 0; }
  .public-home-page .search-field:first-child { grid-column: 1 / -1; }
  .public-home-page .search-field label { font-size: 0.8rem; }
  .public-home-page .search-field input { min-height: 44px; padding: 0.5rem 0.75rem; font-size: 1rem; }
  .public-home-page .search-controls .btn { min-height: 44px; padding: 0.65rem 0.85rem; font-size: 0.8rem; }
  .public-page:has(.mobile-bottom-nav) { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .practitioner-directory-page:has(.mobile-bottom-nav) { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .practitioner-directory-page .app-screen { flex: 1; min-height: 0; padding-block: 0.75rem; }
  .practitioner-directory-page .directory-home-button { margin-bottom: 0.5rem; }
  .practitioner-directory-page .directory-search { margin: 0.75rem 0; }
  .practitioner-directory-page .search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; margin-top: 0; }
  .practitioner-directory-page .search-field:first-child { grid-column: 1 / -1; }
  .practitioner-directory-page .search-field label { font-size: 0.8rem; }
  .practitioner-directory-page .search-field input { min-height: 44px; padding: 0.5rem 0.75rem; font-size: 1rem; }
  .practitioner-directory-page .search-controls .btn { min-height: 44px; padding: 0.6rem 0.85rem; font-size: 0.8rem; }
  .practitioner-directory-page .booking-progress { margin-bottom: 0.75rem; }
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.125rem 0 calc(0.125rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(15, 157, 138, 0.16);
    box-shadow: 0 -2px 14px rgba(20, 33, 61, 0.06);
    border-radius: 18px 18px 0 0;
  }
  .mobile-bottom-nav :is(a, button) { display: grid; grid-template-rows: 20px 16px; justify-items: center; align-content: center; align-items: center; gap: 0.2rem; min-width: 0; min-height: 48px; padding: 0 0.1rem; font: inherit; font-size: clamp(0.55rem, 2.5vw, 0.65rem); line-height: 16px; font-weight: 700; color: var(--primary-dark); text-align: center; background: none; border: 0; cursor: pointer; }
  .mobile-bottom-nav span { white-space: nowrap; }
  .mobile-bottom-nav.is-scroll-hidden { visibility: hidden; pointer-events: none; }
  @supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
    .mobile-bottom-nav {
      background: rgba(255, 255, 255, 0.72);
      -webkit-backdrop-filter: blur(16px) saturate(140%);
      backdrop-filter: blur(16px) saturate(140%);
    }
  }
  .mobile-bottom-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-bottom-nav :is(a, button):focus-visible { outline: 3px solid var(--secondary); outline-offset: -3px; }
  .booking-screen .two-columns { grid-template-columns: 1fr; }
  .booking-screen .panel { padding: 1rem; }
  .app-screen .app-home { padding-top: 0.7rem; }
  .public-home-page:has(.home-search-accordion:not([open])) {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }
  .public-home-page:has(.home-search-accordion:not([open])) .app-screen {
    flex: 1;
    min-height: 0;
    padding-block: 0.5rem;
  }
  .public-home-page:has(.home-search-accordion:not([open])) .app-screen .app-home { padding: 0; }
  .public-home-page:has(.home-search-accordion:not([open])) #mes-services .app-tile {
    min-height: clamp(80px, calc((100dvh - 340px) / 4), 112px);
    padding-block: 0.35rem;
  }
  .public-home-page:has(.home-search-accordion:not([open])) .app-grid { margin: 0.5rem 0; }

  body.public-page:has(> header.topbar.patient-header) {
    display: grid;
    place-items: stretch;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }
  .patient-header { grid-row: 1; position: relative; min-width: 0; }
  .public-page .patient-header .main-nav { grid-column: 1 / -1; }
  body.public-page:has(> header.topbar.patient-header) > main {
    grid-row: 2;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0.75rem;
    overflow: auto;
    overscroll-behavior-y: contain;
    scroll-padding-block: 0.75rem;
  }
  body.public-page:has(> header.topbar.patient-header) > .confirmation-shell {
    display: block;
  }
  .public-page:has(> .patient-header) .auth-card { padding: 1rem; border-radius: 1.25rem; }
  .public-page:has(> .patient-header) .auth-header > .brand-logo { display: none; }
  .public-page:has(> .patient-header) > .mobile-bottom-nav {
    position: relative;
    grid-row: 3;
    min-width: 0;
  }
  .register-page.public-page .auth-card { padding: 0.75rem; }
  .register-page.public-page .directory-home-button { margin-bottom: 0.5rem; }
  .register-page.public-page .auth-header { margin-bottom: 0.5rem; }
  .register-page.public-page .auth-header :is(.badge, p) { display: none; }
  .register-page.public-page .auth-header h1 { font-size: 1.2rem; line-height: 1.3; margin: 0; }
  .register-page.public-page .auth-card form { gap: 0.5rem; }
  .register-page.public-page .form-grid.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .register-page.public-page .form-grid > div { min-width: 0; }
  .register-page.public-page .full-width { grid-column: auto; }
  .register-page.public-page label { font-size: 0.75rem; margin-bottom: 0.2rem; }
  .register-page.public-page input:not([type="hidden"]) {
    min-height: 44px;
    padding: 0.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
  }
  .register-page.public-page form > .btn { min-height: 44px; padding: 0.5rem; }
  .register-page.public-page .registration-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0 0.5rem;
    margin-top: 0.25rem;
  }
  .register-page.public-page .registration-links .auth-link { margin: 0; font-size: 0.75rem; }
  .register-page.public-page .registration-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    line-height: 1.3;
  }
  .professional-login-page { min-height: 100dvh; padding: 0.75rem; }
  .professional-login-page .auth-shell { width: min(420px, 100%); }
  .professional-login-page .auth-card { padding: 1rem; border-radius: 1.25rem; }
  .professional-login-page .auth-header { margin-bottom: 0.75rem; }
  .professional-login-page .auth-header .brand-logo { width: 120px; height: auto; margin: 0 auto 0.5rem; }
  .professional-login-page .auth-header .badge { font-size: 0.7rem; padding: 0.25rem 0.6rem; }
  .professional-login-page .auth-header h1 { font-size: 1.25rem; line-height: 1.3; margin: 0.4rem 0; }
  .professional-login-page .auth-header p { font-size: 0.8rem; line-height: 1.4; }
  .professional-login-page .auth-card form { gap: 0.4rem; }
  .professional-login-page label { font-size: 0.8rem; }
  .professional-login-page :is(input, select) { min-height: 44px; padding: 0.5rem 0.65rem; border-radius: 0.75rem; font-size: 1rem; }
  .professional-login-page form > .btn { min-height: 44px; padding: 0.5rem; margin-top: 0.25rem; }
  .professional-login-page .auth-link { margin: 0.25rem 0 0; font-size: 0.8rem; }
  .professional-login-page .auth-link a { display: inline-flex; align-items: center; min-height: 44px; }
  .professional-dashboard-page { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .professional-dashboard-page > .mobile-bottom-nav {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    padding: 0.4rem;
    border: 1px solid rgba(15, 157, 138, 0.16);
    border-radius: 22px;
    box-shadow: 0 8px 28px rgba(20, 33, 61, 0.12);
  }
}

/* Composition familiale — demande de carte OUNONO */
.card-request-family { border: 1px solid #dfeaf4; border-radius: 12px; padding: 12px 14px; }
.card-request-family legend { font-size: 0.82rem; font-weight: 700; color: #5f6f87; padding: 0 6px; }
#family-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.family-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f3f7fb; border: 1px solid #dfeaf4; border-radius: 10px; padding: 8px 12px; font-size: 0.9rem; }
#family-status { margin: 8px 0 0; font-size: 0.82rem; color: #5f6f87; }
#family-dialog-status { color: #d95f5f; font-size: 0.85rem; min-height: 1em; margin: 4px 0; }
