:root {
  --navy: #0d2340;
  --navy-light: #18395f;
  --gold: #d6a84f;
  --green: #20a36a;
  --text: #243447;
  --muted: #718096;
  --background: #f3f6fa;
  --white: #ffffff;
  --border: #dce3eb;
  --danger: #d9534f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--background);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.brand-panel {
  width: 42%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(13, 35, 64, 0.96), rgba(24, 57, 95, 0.94)),
    radial-gradient(circle at 20% 20%, #2c6090, transparent 35%);
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 18px;
  color: var(--navy);
  background: var(--gold);
  font-size: 34px;
  font-weight: bold;
}

.brand-panel h1 {
  margin-bottom: 14px;
  font-size: 48px;
  letter-spacing: -1px;
}

.brand-panel p {
  max-width: 330px;
  color: #d8e3ef;
  font-size: 18px;
  line-height: 1.6;
}

.auth-card {
  width: min(520px, 90%);
  margin: auto;
  padding: 42px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(13, 35, 64, 0.12);
}

.card-header {
  margin-bottom: 26px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
}

.card-header h2 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 32px;
}

.subtitle {
  color: var(--muted);
}

.role-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
  padding: 5px;
  border-radius: 10px;
  background: #eef2f6;
}

.role-tab {
  flex: 1;
  padding: 12px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
}


.role-tab.active {
  color: var(--navy);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(13, 35, 64, 0.1);
}

form label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: bold;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  height: 48px;
  margin-bottom: 18px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  font-size: 15px;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 168, 79, 0.16);
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 82px;
}

.password-button {
  position: absolute;
  top: 0;
  right: 10px;
  height: 48px;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 24px;
  font-size: 12px;
}

.remember-option {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-weight: normal;
}

.remember-option input {
  accent-color: var(--green);
}

.form-options a,
.register-text a {
  color: var(--navy);
  font-weight: bold;
  text-decoration: none;
}

.primary-button {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  transition: 0.2s ease;
}

.primary-button:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}

.message {
  min-height: 20px;
  margin-top: 14px;
  color: var(--green);
  text-align: center;
  font-size: 13px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.register-text {
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.demo-notice {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

/* الهاتف */
@media (max-width: 760px) {
  .auth-page {
    display: block;
  }

  .brand-panel {
    width: 100%;
    min-height: 230px;
    padding: 32px 24px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    border-radius: 14px;
    font-size: 25px;
  }

  .brand-panel h1 {
    font-size: 34px;
  }

  .brand-panel p {
    font-size: 15px;
  }

  .auth-card {
    width: calc(100% - 28px);
    margin: -24px auto 28px;
    padding: 28px 22px;
    position: relative;
  }

  .card-header h2 {
    font-size: 27px;
  }
}
/* تنسيق واجهة التسجيل - إضافة المرحلة الثانية */

.register-section {
  width: 100%;
}

#registerForm input[type="text"],
#registerForm input[type="email"],
#registerForm input[type="tel"],
#registerForm input[type="password"],
#registerForm input[type="time"],
#registerForm input[type="number"] {
  width: 100%;
  height: 48px;
  margin-bottom: 18px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: var(--white);
  font-size: 15px;
}

#registerForm input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 168, 79, 0.16);
}

.register-role-tab {
  flex: 1;
  padding: 12px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
}

.register-role-tab.active {
  color: var(--navy);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(13, 35, 64, 0.1);
}

#doctorRegisterFields {
  margin: 8px 0 8px;
  padding: 18px 14px 4px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.back-login-button {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

.back-login-button:hover {
  border-color: var(--gold);
  background: #fffaf0;
}

.register-note {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .register-section {
    width: 100%;
  }

  #doctorRegisterFields {
    padding-right: 10px;
    padding-left: 10px;
  }

  .register-role-tab {
    padding: 11px 8px;
    font-size: 14px;
  }

  #registerForm input[type="text"],
  #registerForm input[type="email"],
  #registerForm input[type="tel"],
  #registerForm input[type="password"],
  #registerForm input[type="time"],
  #registerForm input[type="number"] {
    height: 46px;
    font-size: 14px;
  }
}
/* Patient Dashboard — Demo locale uniquement */

.patient-dashboard {
  width: 100%;
}

.patient-dashboard h2 {
  margin-bottom: 24px;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.3;
}

.dashboard-action {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
}

.dashboard-action:hover {
  background: var(--navy-light);
}

.appointments-section {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.appointments-section h3 {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 17px;
}

.appointments-section p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.patient-dashboard .back-login-button {
  text-align: center;
}

@media (max-width: 760px) {
  .patient-dashboard h2 {
    font-size: 24px;
  }
}
/* Patient Dashboard — تنسيق إضافي فقط */

#patientDashboard {
  width: 100%;
  padding: 4px 0;
  background: var(--white);
}

#patientDashboard .eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
}

#patientDashboard h2 {
  margin-bottom: 24px;
  color: var(--navy);
  font-size: 30px;
  line-height: 1.3;
}

#patientName {
  color: var(--navy);
  font-weight: bold;
}

#patientDashboard .dashboard-action,
#patientDashboard .back-login-button {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 0 0 12px;
  padding: 14px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
  transition: 0.2s ease;
}

#patientDashboard .dashboard-action {
  border: 1px solid var(--navy);
  color: var(--white);
  background: var(--navy);
}

#patientDashboard .dashboard-action:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}

#patientDashboard .appointments-section {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

#patientDashboard .appointments-section h3 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 18px;
}

#patientDashboard .appointments-section p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

#patientDashboard .back-login-button {
  border: 1px solid var(--border);
  color: var(--navy);
  background: #eef2f6;
  text-align: center;
}

#patientDashboard .back-login-button:hover {
  border-color: var(--gold);
  background: #fffaf0;
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  #patientDashboard h2 {
    font-size: 25px;
  }

  #patientDashboard .dashboard-action,
  #patientDashboard .back-login-button {
    width: 100%;
    min-height: 48px;
    font-size: 14px;
  }

  #patientDashboard .appointments-section {
    margin: 20px 0;
    padding: 16px;
  }
}
/* Correctif Patient Dashboard */

.dashboard-section {
  width: 100%;
  padding: 8px 0;
  color: var(--text);
}

.dashboard-section .eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
}

.dashboard-section h2 {
  margin-bottom: 24px;
  color: var(--navy);
  font-size: 30px;
  line-height: 1.3;
}

.dashboard-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.dashboard-button {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 14px 18px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
}

.dashboard-button:hover {
  background: var(--navy-light);
}

.dashboard-button.logout-button {
  border-color: var(--border);
  color: var(--navy);
  background: #eef2f6;
  text-align: center;
}

.dashboard-button.logout-button:hover {
  border-color: var(--gold);
  background: #fffaf0;
}

@media (max-width: 760px) {
  .dashboard-section h2 {
    font-size: 25px;
  }

  .dashboard-button {
    width: 100%;
    min-height: 48px;
    font-size: 14px;
  }
}
/* Patient mobile dashboard — Demo locale uniquement */

#patientDashboard {
  width: 100%;
  padding-bottom: 78px;
}

#patientDashboard > .dashboard-actions {
  display: none;
}

.patient-page-view {
  width: 100%;
  padding: 20px 0;
}

.appointment-main-button {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 16px 20px;
  border: 0;
  border-radius: 10px;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  transition: 0.2s ease;
}

.appointment-main-button:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}

.dashboard-helper-text {
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

#patientAppointmentsView,
#patientProfileView {
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

#patientAppointmentsView h3,
#patientProfileView h3 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 20px;
}

#patientAppointmentsView p,
#patientProfileView p {
  color: var(--muted);
  line-height: 1.6;
}

.profile-logout-button {
  width: 100%;
  min-height: 46px;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--navy);
  background: #eef2f6;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
}

.profile-logout-button:hover {
  border-color: var(--gold);
  background: #fffaf0;
}

.patient-bottom-nav {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px 8px;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.patient-nav-button {
  min-height: 52px;
  padding: 6px 4px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.patient-nav-button span,
.patient-nav-button small {
  display: block;
}

.patient-nav-button span {
  font-size: 10px;
  font-weight: bold;
}

.patient-nav-button small {
  margin-top: 4px;
  font-size: 10px;
}

.patient-nav-button.active {
  color: var(--navy);
  background: #eef2f6;
}

@media (max-width: 760px) {
  #patientDashboard {
    padding-bottom: 82px;
  }

  .patient-bottom-nav {
    padding: 8px 5px;
  }

  .patient-nav-button {
    min-height: 50px;
  }
}
#patientDashboard {
  position: relative;
}
#mapPicker { width: 100%; height: 260px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 8px; }
#mapPicker.hidden-map { display: none; }
/* -------------------- Success Overlay -------------------- */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 35, 64, 0.6);
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 0.5s ease;
}
.success-overlay.fade-out { opacity: 0; }
.success-overlay[hidden] { display: none; }
.success-box { text-align: center; }
.success-check { width: 130px; height: 130px; }
.check-circle {
  fill: none;
  stroke: var(--green);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 277;
  stroke-dashoffset: 277;
  animation: draw-circle 0.6s ease-out forwards;
}
.check-mark {
  fill: none;
  stroke: var(--green);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  animation: draw-check 0.45s ease-out 0.5s forwards;
}
.success-text {
  margin-top: 20px;
  color: var(--white);
  font-size: 19px;
  font-weight: bold;
  opacity: 0;
  animation: fade-text 0.4s ease-out 0.8s forwards;
}
/* Ligne secondaire du message de succès (ex. « chez Dr … ») */
.success-sub {
  margin-top: 8px;
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  animation: fade-text 0.4s ease-out 1.05s forwards;
}
.success-sub:empty { display: none; }
@keyframes draw-circle { to { stroke-dashoffset: 0; } }
@keyframes draw-check { to { stroke-dashoffset: 0; } }
@keyframes fade-text { to { opacity: 1; } }
/* -------------------- App Mode plein écran -------------------- */
body.app-mode .brand-panel { display: none; }
body.app-mode .auth-page { display: block; }
body.app-mode .auth-card {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 32px 22px 110px;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}
.app-subtitle { color: var(--muted); margin: -10px 0 26px; }

/* Bottom nav — pleine largeur, style Reddit */
body.app-mode .patient-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--navy);
  border-top: none;
  z-index: 50;
}
body.app-mode .patient-nav-button { color: #9fb3c8; }
body.app-mode .patient-nav-button.active { color: var(--gold); background: rgba(255,255,255,0.07); }
body.app-mode .patient-nav-button .nav-icon { display: block; font-size: 19px; margin-bottom: 3px; }
body.app-mode .patient-nav-button span,
body.app-mode .patient-nav-button small { display: block; text-align: center; }

/* Cartes médecins */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.doctor-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(13, 35, 64, 0.06);
}
.doctor-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  font-size: 20px;
  font-weight: bold;
}
.doctor-card h4 { color: var(--navy); margin-bottom: 4px; }
.doctor-specialty { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.doctor-stars { color: var(--gold); margin-bottom: 14px; }
.doctor-stars span { color: var(--muted); font-size: 12px; }
.doctor-book-button {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-weight: bold;
  cursor: pointer;
}
.doctor-book-button:hover { background: var(--navy-light); }

/* Rendez-vous */
.appointments-block { margin-bottom: 28px; }
.appointments-block h3 { color: var(--navy); margin-bottom: 12px; }
.appointment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.appointment-item small { color: var(--muted); }
.appointment-badge { font-size: 11px; font-weight: bold; padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.appointment-badge.upcoming { background: #e7f6ef; color: var(--green); }
.appointment-badge.past { background: #eef2f6; color: var(--muted); }
.profile-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.profile-card h3 { color: var(--navy); margin-bottom: 12px; }
.profile-note { color: var(--muted); font-size: 13px; margin: 8px 0 18px; }
/* -------------------- إخفاء اللوحة الزرقاء نهائيًا -------------------- */
.brand-panel { display: none !important; }

/* كارد التطبيق بعرض الشاشة */
.auth-card { width: 100%; max-width: 720px; }
body.app-mode .auth-card {
  max-width: none;
  min-height: 100vh;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 28px 20px 110px;
  position: relative;
}
/* -------------------- Splash Screen -------------------- */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  transition: opacity 0.6s ease;
}
.splash-screen.fade-out { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  margin-bottom: 22px;
  object-fit: contain;
  background: var(--gold);
  animation: splash-pop 0.7s ease;
}
.splash-name {
  font-size: 34px;
  letter-spacing: 1px;
  animation: wordmark-grow 0.8s 0.1s ease backwards,
             wordmark-breathe 2.2s 0.9s ease-in-out infinite;
}
.splash-tagline {
  margin-top: 10px;
  color: #9fb3c8;
  font-size: 14px;
  animation: splash-pop 0.7s 0.3s ease backwards;
}
@keyframes splash-pop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
/* ================= PUBLIC HOME ================= */

.public-home {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 0%, rgba(214, 168, 79, 0.14), transparent 28%),
    var(--background);
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px;
}

.public-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.public-logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: var(--navy);
  background: var(--gold);
  font-size: 25px;
  font-weight: 900;
}

.public-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.language-switcher {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(13, 35, 64, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 5px 18px rgba(13, 35, 64, 0.08);
}

.language-option {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.language-option.active {
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 3px 8px rgba(13, 35, 64, 0.2);
}

.secondary-header-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--navy);
  border-radius: 9px;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.public-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 25px 28px 120px;
}

/* ============ HERO : logo en filigrane + recherche centrale ============ */
.public-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  padding: 64px 40px 56px;
  border: 1px solid var(--border);
  border-radius: 28px;
  color: var(--navy);
  background:
    radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f6f9fc 55%, #eef3f9 100%);
  box-shadow: 0 20px 50px rgba(13, 35, 64, 0.08);
  text-align: center;
}

/* Filigrane : le logo en arrière-plan, très pâle */
.public-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(760px, 118%);
  aspect-ratio: 1 / 1;
  background: url("logo.jpg.jpg") center / contain no-repeat;
  opacity: 0.07;
  filter: grayscale(1) contrast(0.85);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: hero-watermark 22s ease-in-out infinite alternate;
}

/* Halo doré très discret */
.public-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -180px;
  left: 50%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 168, 79, 0.16) 0%, rgba(214, 168, 79, 0) 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

@keyframes hero-watermark {
  0%   { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.06); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}

.public-eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.public-hero h1,
.hero-title {
  max-width: 700px;
  margin-bottom: 14px;
  color: var(--navy);
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.1;
  animation: hero-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-subtitle {
  max-width: 560px;
  margin-bottom: 30px;
  color: #4a5c72;
  font-size: 17px;
  line-height: 1.6;
  animation: hero-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Barre de recherche ---------- */
.hero-search {
  width: 100%;
  max-width: 700px;
  margin-top: 0;
}

.hero-search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: none;
  min-height: 66px;
  margin-top: 0;
  padding: 0 22px;
  border: 1px solid rgba(13, 35, 64, 0.12);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 14px 40px rgba(13, 35, 64, 0.1);
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
  animation: hero-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

/* Lueur dorée qui parcourt le contour au focus */
.hero-search-box::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(214, 168, 79, 0.05) 45%, var(--navy) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.hero-search-box:focus-within {
  border-color: rgba(214, 168, 79, 0.6);
  box-shadow: 0 18px 50px rgba(13, 35, 64, 0.16);
  transform: translateY(-2px);
}

.hero-search-box:focus-within::after {
  opacity: 0.85;
  animation: hero-glow 2.6s linear infinite;
}

@keyframes hero-glow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.hero-search-box .search-icon {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 26px;
  font-weight: 900;
  transition: transform 0.3s ease;
}

.hero-search-box:focus-within .search-icon {
  transform: scale(1.15);
}

.hero-search-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
}

/* ---------- Liste de suggestions (autocomplétion) ---------- */
.hero-suggest {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: 320px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 22px 55px rgba(13, 35, 64, 0.16);
  text-align: left;
  animation: suggest-in 0.22s ease both;
}

@keyframes suggest-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-suggest[hidden] {
  display: none;
}

.hero-suggest li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--navy);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.18s ease, transform 0.18s ease;
}

.hero-suggest li:hover,
.hero-suggest li.active {
  background: rgba(214, 168, 79, 0.12);
  transform: translateX(3px);
}

.hero-suggest .sug-ico {
  flex: 0 0 auto;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: var(--navy);
  background: rgba(13, 35, 64, 0.06);
  font-size: 15px;
}

.hero-suggest .sug-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-suggest .sug-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-suggest .sug-sub {
  color: #6b7c92;
  font-size: 12px;
  font-weight: 500;
}

.hero-suggest .sug-empty {
  justify-content: center;
  color: #6b7c92;
  cursor: default;
  font-weight: 500;
}

.hero-suggest .sug-empty:hover {
  background: transparent;
  transform: none;
}

/* ---------- Chips sous la barre ---------- */
.public-hero .specialty-chips {
  justify-content: center;
  margin-top: 20px;
}

.public-hero .specialty-chips button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.public-hero .specialty-chips button:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 8px 20px rgba(13, 35, 64, 0.1);
}

.hero-search .public-search-message {
  margin-top: 14px;
  color: #b4552f;
  font-size: 14px;
  font-weight: 600;
}

.featured-doctors {
  margin-top: 65px;
}

.section-heading h2 {
  color: var(--navy);
  font-size: 30px;
}

.search-icon {
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

.search-preview-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-family: inherit;
  font-size: 16px;
}

.specialty-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.specialty-chips button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.steps-grid,
.featured-doctors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.step-card,
.featured-doctor-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(13, 35, 64, 0.05);
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: var(--gold);
  font-weight: 900;
}

.step-card h3,
.featured-doctor-card h3 {
  margin-bottom: 8px;
  color: var(--navy);
}

.step-card p,
.featured-doctor-card p {
  color: var(--muted);
  line-height: 1.55;
}

.inline-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.demo-label {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: #fff4d9;
  font-size: 10px;
  font-weight: 900;
}

.featured-doctors-grid {
  grid-template-columns: repeat(2, 1fr);
}

.featured-doctor-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.featured-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  background: var(--navy);
  font-weight: 900;
}

.availability-dot {
  margin-left: auto;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.public-bottom-nav {
  display: none;
}

[dir="rtl"] .public-home {
  text-align: right;
}

[dir="rtl"] .hero-button {
  flex-direction: row-reverse;
}

[dir="rtl"] .public-header,
[dir="rtl"] .public-header-actions,
[dir="rtl"] .featured-doctor-card {
  direction: rtl;
}

@media (max-width: 760px) {
  .public-header {
    padding: 16px;
  }

  .public-header-actions {
    gap: 7px;
  }

  .secondary-header-button {
    display: none;
  }

  .language-option {
    padding: 0 9px;
    font-size: 11px;
  }

  .public-main {
    padding: 12px 14px 100px;
  }

  .public-hero::before {
    width: 128%;
    opacity: 0.06;
  }

  .hero-search-box {
    min-height: 58px;
    padding: 0 18px;
  }

  .hero-search-input {
    font-size: 16px;
  }

  .hero-subtitle {
    margin-bottom: 24px;
    font-size: 15px;
  }

  .hero-suggest li {
    padding: 10px 12px;
    font-size: 14px;
  }

  .public-hero {
    display: block;
    min-height: auto;
    padding: 32px 22px 22px;
    border-radius: 22px;
  }

  .public-hero h1 {
    font-size: 36px;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  .steps-grid,
  .featured-doctors-grid {
    grid-template-columns: 1fr;
  }

  .step-card,
  .featured-doctor-card {
    padding: 18px;
  }

  .public-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 5px;
    border-top: 1px solid var(--border);
    background: var(--white);
    box-shadow: 0 -8px 25px rgba(13, 35, 64, 0.1);
  }

  .public-nav-item {
    min-height: 55px;
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
  }

  .public-nav-item span,
  .public-nav-item strong {
    display: block;
  }

  .public-nav-item span {
    margin-bottom: 4px;
    color: var(--gold);
    font-size: 20px;
  }

  .public-nav-item strong {
    font-size: 11px;
  }

  .public-nav-item.active {
    color: var(--navy);
  }
}
/* -------------------- هوية Maw3idi -------------------- */
.splash-logo {
  background: transparent;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-radius: 30px;
}
.splash-name-img {
  height: 48px;
  margin-top: 22px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  animation: splash-pop 0.7s 0.15s ease backwards;
}
.public-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(13, 35, 64, 0.18);
}
.public-name-img {
  height: 24px;
  border-radius: 6px;
}
.splash-logo {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 26px;
  background: white;
}

.splash-name-img {
  display: block;
  width: 220px;
  height: auto;
  margin-top: 22px;
  object-fit: contain;
}
/* -------------------- Wordmark Maw3idi -------------------- */
.app-wordmark {
  margin-top: 22px;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 1px;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(90deg, #2f80ed 0%, #2196f3 45%, #00c896 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: splash-pop 0.7s 0.15s ease backwards;
}
@keyframes wordmark-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.header-wordmark {
  font-size: 26px;
  margin-top: 0;
  animation: none;
}
/* -------------------- Bottom Nav — Upgrade -------------------- */
.patient-bottom-nav,
.public-bottom-nav {
  background: var(--white);
  box-shadow: 0 -6px 24px rgba(13, 35, 64, 0.1);
}

.patient-nav-button,
.public-nav-item {
  border-radius: 14px;
  transition: all 0.25s ease;
}

.patient-nav-button .nav-icon,
.public-nav-item span:first-child {
  font-size: 21px;
  opacity: 0.55;
  filter: grayscale(0.5);
  transition: all 0.25s ease;
}

.patient-nav-button.active,
.public-nav-item.active {
  background: var(--navy);
  color: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(13, 35, 64, 0.28);
  transform: translateY(-4px);
}

.patient-nav-button.active .nav-icon,
.public-nav-item.active span:first-child {
  opacity: 1;
  filter: none;
  transform: scale(1.15);
}

.patient-nav-button.active span,
.patient-nav-button.active small,
.public-nav-item.active strong {
  color: var(--gold);
}

.patient-nav-button:not(.active):hover,
.public-nav-item:not(.active):hover {
  background: #eef2f6;
}
/* -------------------- Profil amélioré -------------------- */
.profile-hero {
  text-align: center;
  padding: 28px 20px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff 60%, #f4f8fc);
  margin-bottom: 20px;
}
.profile-avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(13, 35, 64, 0.25);
}
.profile-hero h3 { color: var(--navy); font-size: 22px; }
.profile-phone { color: var(--muted); margin: 4px 0 12px; }
.profile-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: #e7f6ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}
.profile-menu { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  transition: all 0.2s ease;
}
.profile-menu-item:hover { border-color: var(--gold); transform: translateY(-1px); }
.profile-menu-item.static { cursor: default; }
.profile-menu-item.static:hover { border-color: var(--border); transform: none; }
.menu-icon { font-size: 20px; }
.menu-label { flex: 1; font-weight: 700; color: var(--navy); }
.menu-value { color: var(--muted); font-size: 13px; }
.menu-arrow { color: var(--gold); font-weight: 900; }
.profile-logout-button.secondary { margin-top: 10px; background: var(--white); }
/* -------------------- شريط التنقل العام — دائمًا ظاهر -------------------- */
.public-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 10px 8px;
  border-top: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 -8px 25px rgba(13, 35, 64, 0.12);
}
body.app-mode .public-bottom-nav { display: none; }
.public-bottom-nav { display: none !important; }
/* ================= Public Search Results ================= */

.public-search-message {
  margin-top: 18px;
  padding: 15px 18px;
  border: 1px solid #f0d9a2;
  border-radius: 12px;
  color: #795b18;
  background: #fff8e8;
  font-weight: 700;
}

.specialty-chips button.selected {
  color: #ffffff;
  border-color: var(--navy);
  background: var(--navy);
}

.featured-doctor-card[hidden] {
  display: none;
}
/* ================= DOCTOR GATEWAY — بوابة الطبيب ================= */

/* ملاحظة: لم أجد هذه القاعدة في style.css الملصق. تكرارها لا يضرّ. */
[hidden] { display: none !important; }

.doctor-gateway {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, rgba(214, 168, 79, 0.16), transparent 32%),
    var(--background);
}

/* البوابة بالفرنسية: لا تنقلب مع وضع RTL العربي */
[dir="rtl"] .doctor-gateway { direction: ltr; text-align: left; }

.dg-shell {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 56px;
}

/* ---------- Barre du haut ---------- */
.dg-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dg-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border: 2px solid var(--navy);
  border-radius: 14px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  transition: 0.2s ease;
}
.dg-back:hover { background: var(--navy); color: var(--white); }

/* ---------- Bandeau d'accueil ---------- */
.dg-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 28px 24px;
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  box-shadow: 0 18px 40px rgba(13, 35, 64, 0.18);
}
.dg-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 190px;
  height: 190px;
  border: 22px solid rgba(214, 168, 79, 0.55);
  border-radius: 50%;
}
.dg-eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}
.dg-hero h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.15;
}
.dg-hero-text {
  position: relative;
  z-index: 1;
  max-width: 420px;
  color: #d8e3ef;
  font-size: 17px;
  line-height: 1.5;
}

/* ---------- Onglets ---------- */
.dg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 18px;
  padding: 5px;
  border-radius: 18px;
  background: #e3e9f0;
}
.dg-tab {
  min-height: 58px;
  padding: 0 8px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  transition: 0.2s ease;
}
.dg-tab.active {
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 6px 14px rgba(13, 35, 64, 0.25), inset 0 -3px 0 var(--gold);
}

/* ---------- Carte ---------- */
.dg-card {
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(13, 35, 64, 0.08);
}

/* ---------- Groupes ---------- */
.dg-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
}
.dg-group:not(:first-child) {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.dg-group-num {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: var(--gold);
  font-size: 17px;
  font-weight: 900;
}

/* ---------- Champs ---------- */
.dg-field { margin-bottom: 20px; }

.dg-field label,
.dg-label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}
.dg-optional { color: var(--muted); font-size: 14px; font-weight: 600; }

.dg-field input {
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid var(--border);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: var(--white);
  font-family: inherit;
  font-size: 18px;
}
.dg-field input::placeholder { color: #9aa8b8; }
.dg-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 168, 79, 0.22);
}
.dg-field.has-error input { border-color: var(--danger); background: #fff8f8; }

.dg-help { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.dg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Mot de passe ---------- */
.dg-pass { position: relative; }
.dg-pass input { padding-right: 108px; }
.dg-eye {
  position: absolute;
  top: 7px;
  right: 7px;
  bottom: 7px;
  min-width: 90px;
  border: 0;
  border-radius: 10px;
  color: var(--navy);
  background: #eef2f6;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
}
.dg-eye:hover { background: #fff4d9; }

/* ---------- Boutons ---------- */
.dg-primary {
  display: block;
  width: 100%;
  min-height: 62px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
  font-family: inherit;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(13, 35, 64, 0.25), inset 0 -3px 0 var(--gold);
  transition: 0.2s ease;
}
.dg-primary:hover { background: var(--navy-light); transform: translateY(-1px); }
.dg-primary:active { transform: scale(0.99); }
.dg-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }

.dg-secondary {
  min-height: 54px;
  padding: 0 14px;
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  transition: 0.2s ease;
}
.dg-secondary:hover { border-color: var(--gold); background: #fffaf0; }

.dg-link {
  padding: 6px 2px;
  border: 0;
  color: var(--navy);
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.dg-switch { margin-top: 22px; color: var(--muted); text-align: center; font-size: 16px; }

/* ---------- Carte Leaflet ---------- */
.dg-map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dg-map {
  isolation: isolate;
  width: 100%;
  height: 300px;
  margin-top: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 16px;
}

/* ---------- Messages ---------- */
.dg-message {
  margin: 4px 0 16px;
  padding: 13px 15px;
  border-radius: 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.dg-message:empty { display: none; }
.dg-message.is-error   { color: #a8302c; background: #fdeceb; border: 1px solid #f3c4c1; }
.dg-message.is-success { color: #12724a; background: #e7f6ef; border: 1px solid #b8e4d0; }
.dg-message.is-info    { color: #795b18; background: #fff8e8; border: 1px solid #f0d9a2; }

/* ---------- Confirmation ---------- */
.dg-done { padding: 38px 22px 28px; text-align: center; }
.dg-done-icon {
  display: grid;
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-size: 54px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(32, 163, 106, 0.35);
}
.dg-done h3 { margin-bottom: 12px; color: var(--navy); font-size: 26px; }
.dg-done p { margin-bottom: 26px; color: var(--muted); font-size: 17px; line-height: 1.65; }

/* ---------- Correctifs de l'accueil public sur mobile ---------- */
/* Le bouton "Se connecter" était masqué sous 760px : les médecins sont aussi sur téléphone */
@media (max-width: 760px) {
  .public-header { flex-wrap: wrap; row-gap: 10px; }
  .public-header-actions { width: 100%; justify-content: space-between; }
  .secondary-header-button {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .dg-map-actions { grid-template-columns: 1fr; }
  .dg-hero h2 { font-size: 28px; }
}
@media (max-width: 340px) {
  .dg-row { grid-template-columns: 1fr; }
}
/* ================= Splash Medical Particles ================= */

.splash-screen {
  position: relative;
  overflow: hidden;
}

/* ضمان بقاء الجزيئات خلف الشعار والاسم */
.splash-screen > :not(.splash-particles) {
  position: relative;
  z-index: 2;
}

.splash-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.splash-particles span {
  position: absolute;
  bottom: -55px;
  left: var(--particle-left);
  color: var(--particle-color);
  font-size: var(--particle-size);
  line-height: 1;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.8);
  animation: splash-particle-float var(--particle-duration) ease-in-out
    var(--particle-delay) infinite;
}

/* اختلافات مرئية بين الجزيئات */
.splash-particles span:nth-child(1) {
  --particle-left: 8%;
  --particle-size: 20px;
  --particle-color: rgba(255, 255, 255, 0.22);
  --particle-duration: 10s;
  --particle-delay: 0s;
}

.splash-particles span:nth-child(2) {
  --particle-left: 18%;
  --particle-size: 25px;
  --particle-color: rgba(214, 168, 79, 0.28);
  --particle-duration: 13s;
  --particle-delay: 2s;
}

.splash-particles span:nth-child(3) {
  --particle-left: 29%;
  --particle-size: 17px;
  --particle-color: rgba(255, 255, 255, 0.18);
  --particle-duration: 11s;
  --particle-delay: 4s;
}

.splash-particles span:nth-child(4) {
  --particle-left: 40%;
  --particle-size: 23px;
  --particle-color: rgba(214, 168, 79, 0.24);
  --particle-duration: 14s;
  --particle-delay: 1s;
}

.splash-particles span:nth-child(5) {
  --particle-left: 51%;
  --particle-size: 19px;
  --particle-color: rgba(255, 255, 255, 0.2);
  --particle-duration: 12s;
  --particle-delay: 5s;
}

.splash-particles span:nth-child(6) {
  --particle-left: 62%;
  --particle-size: 27px;
  --particle-color: rgba(214, 168, 79, 0.27);
  --particle-duration: 15s;
  --particle-delay: 3s;
}

.splash-particles span:nth-child(7) {
  --particle-left: 72%;
  --particle-size: 18px;
  --particle-color: rgba(255, 255, 255, 0.2);
  --particle-duration: 11s;
  --particle-delay: 6s;
}

.splash-particles span:nth-child(8) {
  --particle-left: 81%;
  --particle-size: 24px;
  --particle-color: rgba(214, 168, 79, 0.25);
  --particle-duration: 13s;
  --particle-delay: 2.5s;
}

.splash-particles span:nth-child(9) {
  --particle-left: 91%;
  --particle-size: 16px;
  --particle-color: rgba(255, 255, 255, 0.18);
  --particle-duration: 10s;
  --particle-delay: 7s;
}

.splash-particles span:nth-child(10) {
  --particle-left: 35%;
  --particle-size: 21px;
  --particle-color: rgba(214, 168, 79, 0.22);
  --particle-duration: 16s;
  --particle-delay: 8s;
}

@keyframes splash-particle-float {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.75);
  }

  15% {
    opacity: 0.75;
  }

  55% {
    opacity: 0.45;
    transform: translate3d(18px, -48vh, 0) scale(1);
  }

  85% {
    opacity: 0.12;
  }

  100% {
    opacity: 0;
    transform: translate3d(-14px, -112vh, 0) scale(1.12);
  }
}

/* احترام تفضيل المستخدم لتقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .splash-particles {
    display: none;
  }
}
/* =========================================================
   Maw3idi Splash Screen + Medical Particles
   ========================================================= */

/* الشاشة الكاملة فوق جميع عناصر التطبيق */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;

  background: #0d2340;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

/* يجب أن تبقى الشاشة مخفية كلياً عند استعمال hidden */
.splash-screen[hidden] {
  display: none !important;
}

/* يستعمله JavaScript الموجود لديك أثناء الخروج */
.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* حاوية الجزيئات خلف الشعار */
.splash-particles {
  position: absolute;
  inset: 0;
  z-index: 0;

  overflow: hidden;
  pointer-events: none;
}

/* محتوى Splash فوق الجزيئات */
.splash-screen > :not(.splash-particles) {
  position: relative;
  z-index: 2;
}

/* صورة اللوغو */
.splash-logo {
  position: relative;
  z-index: 2;

  display: block;
  width: min(170px, 42vw);
  height: min(170px, 42vw);
  object-fit: contain;

  border-radius: 30px;
}

/* اسم Maw3idi المتدرج */
.splash-screen .app-wordmark,
.splash-name-img {
  position: relative;
  z-index: 2;
}

/* إذا استُخدم النص المتدرج Maw3idi */
.splash-screen .app-wordmark {
  margin-top: 22px;
}

/* إذا استُخدمت صورة الاسم */
.splash-name-img {
  display: block;
  width: min(250px, 62vw);
  height: auto;
  margin-top: 22px;
  object-fit: contain;
}

/* الجملة أسفل الاسم */
.splash-tagline {
  position: relative;
  z-index: 2;

  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

/* الجزيئات الصاعدة */
.splash-particles span {
  position: absolute;
  bottom: -60px;
  left: var(--particle-left);

  z-index: 1;

  color: var(--particle-color);
  font-size: var(--particle-size);
  line-height: 1;
  opacity: 0;

  transform: translate3d(0, 0, 0) scale(0.8);

  animation:
    splash-particle-float
    var(--particle-duration)
    ease-in-out
    var(--particle-delay)
    infinite;
}

/* اختلاف المواضع والأحجام والسرعات */
.splash-particles span:nth-child(1) {
  --particle-left: 8%;
  --particle-size: 20px;
  --particle-color: rgba(255, 255, 255, 0.22);
  --particle-duration: 10s;
  --particle-delay: 0s;
}

.splash-particles span:nth-child(2) {
  --particle-left: 18%;
  --particle-size: 25px;
  --particle-color: rgba(214, 168, 79, 0.28);
  --particle-duration: 13s;
  --particle-delay: 2s;
}

.splash-particles span:nth-child(3) {
  --particle-left: 29%;
  --particle-size: 17px;
  --particle-color: rgba(255, 255, 255, 0.18);
  --particle-duration: 11s;
  --particle-delay: 4s;
}

.splash-particles span:nth-child(4) {
  --particle-left: 40%;
  --particle-size: 23px;
  --particle-color: rgba(214, 168, 79, 0.24);
  --particle-duration: 14s;
  --particle-delay: 1s;
}

.splash-particles span:nth-child(5) {
  --particle-left: 51%;
  --particle-size: 19px;
  --particle-color: rgba(255, 255, 255, 0.2);
  --particle-duration: 12s;
  --particle-delay: 5s;
}

.splash-particles span:nth-child(6) {
  --particle-left: 62%;
  --particle-size: 27px;
  --particle-color: rgba(214, 168, 79, 0.27);
  --particle-duration: 15s;
  --particle-delay: 3s;
}

.splash-particles span:nth-child(7) {
  --particle-left: 72%;
  --particle-size: 18px;
  --particle-color: rgba(255, 255, 255, 0.2);
  --particle-duration: 11s;
  --particle-delay: 6s;
}

.splash-particles span:nth-child(8) {
  --particle-left: 81%;
  --particle-size: 24px;
  --particle-color: rgba(214, 168, 79, 0.25);
  --particle-duration: 13s;
  --particle-delay: 2.5s;
}

.splash-particles span:nth-child(9) {
  --particle-left: 91%;
  --particle-size: 16px;
  --particle-color: rgba(255, 255, 255, 0.18);
  --particle-duration: 10s;
  --particle-delay: 7s;
}

.splash-particles span:nth-child(10) {
  --particle-left: 35%;
  --particle-size: 21px;
  --particle-color: rgba(214, 168, 79, 0.22);
  --particle-duration: 16s;
  --particle-delay: 8s;
}

/* حركة واحدة خفيفة تعتمد على transform وopacity فقط */
@keyframes splash-particle-float {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.75);
  }

  15% {
    opacity: 0.7;
  }

  55% {
    opacity: 0.42;
    transform: translate3d(18px, -48vh, 0) scale(1);
  }

  85% {
    opacity: 0.12;
  }

  100% {
    opacity: 0;
    transform: translate3d(-14px, -112vh, 0) scale(1.12);
  }
}

/* تقليل الحركة عند طلب المستخدم ذلك */
@media (prefers-reduced-motion: reduce) {
  .splash-particles {
    display: none;
  }
}
/* إصلاح ظهور الجزيئات خلال مدة Splash القصيرة */

.splash-particles span {
  --particle-duration: 2.8s;
  animation-duration: var(--particle-duration);
  animation-delay: var(--particle-delay);
}

/* بدء الجزيئات فوراً بتأخيرات سالبة مختلفة */
.splash-particles span:nth-child(1) {
  --particle-delay: -0.1s;
}

.splash-particles span:nth-child(2) {
  --particle-delay: -0.8s;
}

.splash-particles span:nth-child(3) {
  --particle-delay: -1.5s;
}

.splash-particles span:nth-child(4) {
  --particle-delay: -2.1s;
}

.splash-particles span:nth-child(5) {
  --particle-delay: -0.4s;
}

.splash-particles span:nth-child(6) {
  --particle-delay: -1.1s;
}

.splash-particles span:nth-child(7) {
  --particle-delay: -1.8s;
}

.splash-particles span:nth-child(8) {
  --particle-delay: -2.5s;
}

.splash-particles span:nth-child(9) {
  --particle-delay: -0.6s;
}

.splash-particles span:nth-child(10) {
  --particle-delay: -1.3s;
}
/* كثافة إضافية لجزيئات شاشة البداية */
.splash-particles span {
  --particle-duration: 2.8s;
  animation-duration: var(--particle-duration);
}

/* الجزيئات 11 إلى 24 */
.splash-particles span:nth-child(11) {
  --particle-left: 14%;
  --particle-size: 18px;
  --particle-color: rgba(255, 255, 255, 0.20);
  --particle-delay: -1.9s;
}

.splash-particles span:nth-child(12) {
  --particle-left: 23%;
  --particle-size: 26px;
  --particle-color: rgba(214, 168, 79, 0.25);
  --particle-delay: -0.7s;
}

.splash-particles span:nth-child(13) {
  --particle-left: 33%;
  --particle-size: 15px;
  --particle-color: rgba(255, 255, 255, 0.18);
  --particle-delay: -2.4s;
}

.splash-particles span:nth-child(14) {
  --particle-left: 46%;
  --particle-size: 22px;
  --particle-color: rgba(214, 168, 79, 0.24);
  --particle-delay: -1.4s;
}

.splash-particles span:nth-child(15) {
  --particle-left: 57%;
  --particle-size: 17px;
  --particle-color: rgba(255, 255, 255, 0.22);
  --particle-delay: -2.2s;
}

.splash-particles span:nth-child(16) {
  --particle-left: 68%;
  --particle-size: 25px;
  --particle-color: rgba(214, 168, 79, 0.27);
  --particle-delay: -0.5s;
}

.splash-particles span:nth-child(17) {
  --particle-left: 77%;
  --particle-size: 16px;
  --particle-color: rgba(255, 255, 255, 0.19);
  --particle-delay: -1.7s;
}

.splash-particles span:nth-child(18) {
  --particle-left: 87%;
  --particle-size: 23px;
  --particle-color: rgba(214, 168, 79, 0.23);
  --particle-delay: -2.6s;
}

.splash-particles span:nth-child(19) {
  --particle-left: 5%;
  --particle-size: 14px;
  --particle-color: rgba(255, 255, 255, 0.17);
  --particle-delay: -1.1s;
}

.splash-particles span:nth-child(20) {
  --particle-left: 27%;
  --particle-size: 20px;
  --particle-color: rgba(214, 168, 79, 0.22);
  --particle-delay: -2.0s;
}

.splash-particles span:nth-child(21) {
  --particle-left: 43%;
  --particle-size: 16px;
  --particle-color: rgba(255, 255, 255, 0.20);
  --particle-delay: -0.9s;
}

.splash-particles span:nth-child(22) {
  --particle-left: 64%;
  --particle-size: 21px;
  --particle-color: rgba(214, 168, 79, 0.25);
  --particle-delay: -2.3s;
}

.splash-particles span:nth-child(23) {
  --particle-left: 74%;
  --particle-size: 15px;
  --particle-color: rgba(255, 255, 255, 0.18);
  --particle-delay: -1.5s;
}

.splash-particles span:nth-child(24) {
  --particle-left: 96%;
  --particle-size: 22px;
  --particle-color: rgba(214, 168, 79, 0.23);
  --particle-delay: -0.3s;
}
/* ================= doctorDashboard ================= */

.doctor-dashboard {
  min-height: 100vh;
  padding: 26px 16px 120px;
  background:
    radial-gradient(circle at 90% 0%, rgba(214, 168, 79, 0.16), transparent 30%),
    var(--background);
  animation: dg-rise 0.35s ease;
}
.dd-header, .dd-view { max-width: 720px; margin-left: auto; margin-right: auto; }

.dd-header { margin-bottom: 20px; }
.dd-eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
}
.dd-header h2 { color: var(--navy); font-size: 30px; line-height: 1.25; }
.dd-specialty { margin-top: 6px; color: var(--muted); font-size: 17px; font-weight: 700; }

.dd-card {
  margin-bottom: 18px;
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(13, 35, 64, 0.08);
}
.dd-card h3 { margin-bottom: 14px; color: var(--navy); font-size: 21px; }
.dd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dd-card-head h3 { margin-bottom: 14px; }
.dd-pill {
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--navy);
  background: #fff4d9;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

/* Infos */
.dd-info-list { display: flex; flex-direction: column; gap: 4px; list-style: none; }
.dd-info-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f6;
}
.dd-info-list li:last-child { border-bottom: 0; }
.dd-ico {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #f3f6fa;
  font-size: 22px;
}
.dd-info-list small { display: block; color: var(--muted); font-size: 14px; }
.dd-info-list strong { display: block; color: var(--navy); font-size: 17px; line-height: 1.35; word-break: break-word; }

/* Semaine */
.dd-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 18px; }
.dd-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 70px;
  padding: 8px 0;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.dd-day small { font-size: 12px; font-weight: 700; color: var(--muted); }
.dd-day strong { font-size: 20px; }
.dd-day.off { background: #f3f6fa; }
.dd-day.off strong, .dd-day.off small { color: #a0aec0; }
.dd-day.today { border-color: var(--gold); }
.dd-day.active { color: var(--white); background: var(--navy); border-color: var(--navy); box-shadow: 0 8px 18px rgba(13, 35, 64, 0.28); }
.dd-day.active small, .dd-day.active strong { color: var(--white); }

.dd-day-title { margin-bottom: 12px; color: var(--navy); font-size: 18px; font-weight: 800; }

.dd-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; color: var(--muted); font-size: 14px; font-weight: 700; }
.dd-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dd-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dd-dot.free { background: var(--green); }
.dd-dot.booked { background: var(--danger); }
.dd-dot.past { background: #a0aec0; }

/* Créneaux */
.dd-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 520px) { .dd-slots { grid-template-columns: repeat(4, 1fr); } }
.dd-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
}
.dd-slot small { font-size: 11px; font-weight: 700; }
.dd-slot.free { color: var(--green); background: #e7f6ef; border-color: #bfe6d3; }
.dd-slot.booked { color: var(--danger); background: #fdecec; border-color: #f5c6c4; }
.dd-slot.past { color: #8a97a8; background: #eef2f6; text-decoration: line-through; }

.dd-empty {
  padding: 22px 12px;
  border: 1.5px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
}
.dd-empty strong { display: block; margin-bottom: 4px; color: var(--navy); font-size: 18px; }

/* RDV du jour */
.dd-appt {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  background: #fffdf7;
}
.dd-appt-time { color: var(--navy); font-size: 20px; font-weight: 900; }
.dd-appt-info strong { display: block; color: var(--navy); font-size: 16px; }
.dd-appt-info small { color: var(--muted); font-size: 14px; }

/* Profil */
.dd-profile-hero { text-align: center; }
.dd-avatar {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  background: var(--navy);
  font-size: 36px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(13, 35, 64, 0.25);
}
.dd-profile-hero h3 { margin-bottom: 2px; font-size: 24px; }
.dd-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--green);
  background: #e7f6ef;
  font-size: 14px;
  font-weight: 800;
}
.dd-email { margin-top: 12px; color: var(--muted); font-size: 15px; word-break: break-all; }
.dd-logout {
  display: block;
  width: 100%;
  min-height: 60px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
}
.dd-logout:hover { border-color: var(--gold); background: #fffaf0; }
.dd-version { margin-top: 14px; color: var(--muted); text-align: center; font-size: 13px; }

/* Barre inférieure */
.dd-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: var(--white);
  box-shadow: 0 -8px 26px rgba(13, 35, 64, 0.12);
}
.dd-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 62px;
  border: 0;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.25s ease;
}
.dd-nav-ico { font-size: 22px; opacity: 0.6; transition: all 0.25s ease; }
.dd-nav-btn.active {
  color: var(--gold);
  background: var(--navy);
  box-shadow: 0 8px 18px rgba(13, 35, 64, 0.28);
  transform: translateY(-4px);
}
.dd-nav-btn.active .dd-nav-ico { opacity: 1; transform: scale(1.15); }

@media (max-width: 380px) {
  .dd-header h2 { font-size: 26px; }
  .dd-day strong { font-size: 17px; }
}
/* ================= doctorGateway ================= */

[hidden] { display: none !important; }

/* Le bouton "Se connecter" doit rester visible sur mobile */
.secondary-header-button {
  display: inline-flex;
  align-items: center;
}
@media (max-width: 760px) {
  .public-header { flex-wrap: wrap; gap: 10px; }
  .secondary-header-button {
    display: inline-flex;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    color: var(--white);
    background: var(--navy);
  }
}

@keyframes dg-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.doctor-gateway {
  min-height: 100vh;
  padding: 16px 16px 56px;
  background:
    radial-gradient(circle at 85% 0%, rgba(214, 168, 79, 0.18), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(13, 35, 64, 0.08), transparent 40%),
    var(--background);
  animation: dg-rise 0.35s ease;
}

.dg-shell { max-width: 640px; margin: 0 auto; }

.dg-back {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(13, 35, 64, 0.07);
}
.dg-back:hover { border-color: var(--gold); background: #fffaf0; }

.dg-hero { margin: 22px 0 18px; text-align: center; }
.dg-wordmark { display: inline-block; margin-top: 0; font-size: 42px; animation: none; }
.dg-kicker {
  margin-top: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
}

.dg-card {
  padding: 26px 20px 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 20px 50px rgba(13, 35, 64, 0.12);
}
.dg-card h2 { color: var(--navy); font-size: 28px; line-height: 1.25; }
.dg-sub { margin: 8px 0 22px; color: var(--muted); font-size: 16px; line-height: 1.5; }

.dg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 26px;
  padding: 6px;
  border-radius: 16px;
  background: #eef2f6;
}
.dg-tab {
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  transition: all 0.2s ease;
}
.dg-tab.active {
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 6px 14px rgba(13, 35, 64, 0.25);
}

.dg-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 800;
}
.dg-optional { color: var(--muted); font-weight: 400; font-size: 14px; }

.dg-card input:not([type="hidden"]) {
  width: 100%;
  height: 58px;
  margin-bottom: 20px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--white);
  font-family: inherit;
  font-size: 17px;
}
.dg-card input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 168, 79, 0.2);
}

.dg-password { position: relative; }
.dg-password input { padding-right: 100px; }
.dg-toggle {
  position: absolute;
  top: 0;
  right: 8px;
  height: 58px;
  padding: 0 10px;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
}

.dg-grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 520px) { .dg-grid-2 { grid-template-columns: 1fr 1fr; } }

.dg-submit {
  display: block;
  width: 100%;
  min-height: 62px;
  margin-top: 6px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  transition: 0.2s ease;
}
.dg-submit:hover { background: var(--navy-light); transform: translateY(-1px); }
.dg-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }

.dg-secondary {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-bottom: 14px;
  border: 1.5px dashed var(--gold);
  border-radius: 12px;
  color: var(--navy);
  background: #fffaf0;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
}

.dg-map {
  width: 100%;
  height: 280px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.dg-message {
  min-height: 24px;
  margin-top: 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.dg-message.error { color: var(--danger); }
.dg-message.ok { color: var(--green); }
.dg-message.info {
  padding: 14px 16px;
  border: 1px solid #f0d9a2;
  border-radius: 12px;
  color: #795b18;
  background: #fff8e8;
}
.dg-message.ok.box {
  padding: 14px 16px;
  border-radius: 12px;
  background: #e7f6ef;
}

.dg-note {
  margin: 4px 0 14px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
}

/* Toast + notice "profil à vérifier" */
.dg-toast,
.pn-card {
  position: fixed;
  right: 16px;
  bottom: 20px;
  left: 16px;
  z-index: 1100;
  max-width: 560px;
  margin: 0 auto;
  border-left: 6px solid var(--gold);
  border-radius: 16px;
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 18px 40px rgba(13, 35, 64, 0.35);
  animation: dg-rise 0.35s ease;
}
.dg-toast { padding: 18px 20px; font-size: 16px; font-weight: 700; line-height: 1.5; }
.pn-card { padding: 20px; }
.pn-text { margin-bottom: 14px; font-size: 16px; font-weight: 700; line-height: 1.55; }
.pn-demo {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-bottom: 10px;
  border: 1.5px dashed var(--gold);
  border-radius: 12px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
}
.pn-demo:disabled { color: #7fe0b5; border-color: #7fe0b5; cursor: default; }
.pn-close {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
}
/* ================= doctorGateway v2 (préfixe dgw) ================= */

[hidden] { display: none !important; }

@keyframes dgw-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bouton "Se connecter" visible aussi sur mobile */
.secondary-header-button { display: inline-flex; align-items: center; }
@media (max-width: 760px) {
  .public-header { flex-wrap: wrap; gap: 10px; }
  .secondary-header-button {
    display: inline-flex;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    color: #ffffff;
    background: #0d2340;
  }
}

.dgw-root {
  min-height: 100vh;
  padding: 16px 16px 56px;
  background:
    radial-gradient(circle at 85% 0%, rgba(214, 168, 79, 0.18), transparent 32%),
    #f3f6fa;
  animation: dgw-rise 0.35s ease;
}
.dgw-shell { max-width: 640px; margin: 0 auto; }

.dgw-back {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid #dce3eb;
  border-radius: 14px;
  color: #0d2340;
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
}
.dgw-back:hover { border-color: #d6a84f; background: #fffaf0; }

.dgw-hero { margin: 22px 0 18px; text-align: center; }
.dgw-wordmark { display: inline-block; margin-top: 0; font-size: 42px; animation: none; }
.dgw-kicker { margin-top: 6px; color: #d6a84f; font-size: 13px; font-weight: 800; letter-spacing: 3px; }

.dgw-card {
  padding: 26px 20px 28px;
  border: 1px solid #dce3eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(13, 35, 64, 0.12);
}
.dgw-card h2 { color: #0d2340; font-size: 28px; line-height: 1.25; }
.dgw-sub { margin: 8px 0 22px; color: #5b6b80; font-size: 16px; line-height: 1.5; }

/* Onglets : l'inactif reste lisible (texte marine), l'actif est plein */
.dgw-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 26px;
  padding: 6px;
  border-radius: 16px;
  background: #e6ecf3;
}
.dgw-tab {
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  color: #0d2340;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  transition: all 0.2s ease;
}
.dgw-tab.is-active {
  color: #ffffff;
  background: #0d2340;
  box-shadow: 0 6px 14px rgba(13, 35, 64, 0.25);
}

/* Panneaux : un seul visible à la fois (classe, pas l'attribut hidden) */
.dgw-panel { display: none; }
.dgw-panel.is-active { display: block; }

.dgw-card label {
  display: block;
  margin-bottom: 8px;
  color: #0d2340;
  font-size: 16px;
  font-weight: 800;
}
.dgw-optional { color: #5b6b80; font-weight: 400; font-size: 14px; }

.dgw-card input:not([type="hidden"]) {
  display: block;
  width: 100%;
  height: 58px;
  margin: 0 0 20px;
  padding: 0 16px;
  border: 1.5px solid #dce3eb;
  border-radius: 12px;
  outline: none;
  color: #243447;
  background: #ffffff;
  font-family: inherit;
  font-size: 17px;
}
.dgw-card input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 4px rgba(214, 168, 79, 0.2);
}

.dgw-password { position: relative; }
.dgw-password input { padding-right: 100px; }
.dgw-toggle {
  position: absolute;
  top: 0;
  right: 8px;
  height: 58px;
  padding: 0 10px;
  border: 0;
  color: #0d2340;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
}

.dgw-grid2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 520px) { .dgw-grid2 { grid-template-columns: 1fr 1fr; } }

.dgw-submit {
  display: block;
  width: 100%;
  min-height: 62px;
  margin-top: 6px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: #0d2340;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  transition: 0.2s ease;
}
.dgw-submit:hover { background: #18395f; transform: translateY(-1px); }
.dgw-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }

.dgw-secondary {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-bottom: 14px;
  border: 1.5px dashed #d6a84f;
  border-radius: 12px;
  color: #0d2340;
  background: #fffaf0;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
}

.dgw-map {
  display: none;
  width: 100%;
  height: 280px;
  margin-bottom: 12px;
  border: 1px solid #dce3eb;
  border-radius: 12px;
}
.dgw-map.is-open { display: block; }

.dgw-message {
  min-height: 24px;
  margin-top: 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.dgw-message.error { color: #d9534f; }
.dgw-message.ok { color: #20a36a; }
.dgw-message.info {
  padding: 14px 16px;
  border: 1px solid #f0d9a2;
  border-radius: 12px;
  color: #795b18;
  background: #fff8e8;
}
.dgw-message.box {
  padding: 14px 16px;
  border-radius: 12px;
  background: #e7f6ef;
}

.dgw-note {
  margin: 4px 0 14px;
  color: #5b6b80;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
}

/* Notice "profil à vérifier" + outil démo */
.dgw-notice {
  position: fixed;
  right: 16px;
  bottom: 20px;
  left: 16px;
  z-index: 1100;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px;
  border-left: 6px solid #d6a84f;
  border-radius: 16px;
  color: #ffffff;
  background: #0d2340;
  box-shadow: 0 18px 40px rgba(13, 35, 64, 0.35);
  animation: dgw-rise 0.35s ease;
}
.dgw-notice-text { margin-bottom: 14px; font-size: 16px; font-weight: 700; line-height: 1.55; }
.dgw-notice-demo {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-bottom: 10px;
  border: 1.5px dashed #d6a84f;
  border-radius: 12px;
  color: #d6a84f;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
}
.dgw-notice-demo:disabled { color: #7fe0b5; border-color: #7fe0b5; cursor: default; }
.dgw-notice-close {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
}
/* ================= Médecins dynamiques + recherche vive ================= */

[hidden] { display: none !important; }

.search-preview-box input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.search-clear {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #0d2340;
  background: #eef2f6;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
}
.search-clear:hover { background: #fff4d9; }

.patient-search { max-width: none; min-height: 60px; margin: 0 0 18px; }

.featured-doctor-card.live {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.featured-doctor-card.live:hover {
  border-color: #d6a84f;
  box-shadow: 0 12px 28px rgba(13, 35, 64, 0.12);
  transform: translateY(-2px);
}
.lc-body { flex: 1; min-width: 0; }
.lc-body h3 { font-size: 18px; }
.lc-body p { font-size: 15px; }
.lc-stars { color: #d6a84f; font-size: 15px; font-weight: 800; }
.lc-stars b { color: #718096; font-weight: 700; }

.doctor-card.live { cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.doctor-card.live:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(13, 35, 64, 0.12); }
.doctor-city { margin: -4px 0 8px; color: #718096; font-size: 14px; }
.doctor-card .doctor-book-button { min-height: 48px; font-size: 16px; }

.live-empty {
  grid-column: 1 / -1;
  padding: 30px 18px;
  border: 1.5px dashed #dce3eb;
  border-radius: 18px;
  color: #718096;
  background: #ffffff;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
}
.live-empty strong { display: block; margin-bottom: 6px; color: #0d2340; font-size: 19px; }
.live-empty .live-ico { display: block; margin-bottom: 8px; font-size: 34px; }
/* OUTIL ADMIN — production */
.adm-root {
  min-height: 100vh;
  padding: 16px 14px 60px;
  background: #f3f6fa;
}
.adm-header, .adm-counter, .adm-tabs, .adm-list { max-width: 760px; margin-left: auto; margin-right: auto; }

.adm-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.adm-kicker { color: #d6a84f; font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.adm-header h2 { color: #0d2340; font-size: 24px; line-height: 1.2; }
.adm-logout {
  min-height: 50px;
  padding: 0 18px;
  border: 1.5px solid #dce3eb;
  border-radius: 14px;
  color: #0d2340;
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
}

.adm-counter {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 16px;
  color: #ffffff;
  background: #0d2340;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
}

.adm-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 16px; padding: 5px; border-radius: 14px; background: #e6ecf3; }
.adm-tab {
  min-height: 54px;
  padding: 6px 4px;
  border: 0;
  border-radius: 10px;
  color: #0d2340;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
}
.adm-tab b { display: block; font-size: 18px; }
.adm-tab.is-active { color: #ffffff; background: #0d2340; }

.adm-card {
  margin-bottom: 14px;
  padding: 18px 16px;
  border: 1px solid #dce3eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(13, 35, 64, 0.07);
}
.adm-card h3 { margin-bottom: 2px; color: #0d2340; font-size: 20px; }
.adm-spec { margin-bottom: 12px; color: #718096; font-size: 16px; font-weight: 700; }
.adm-row { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid #eef2f6; font-size: 16px; color: #243447; word-break: break-word; }
.adm-row span:first-child { flex: 0 0 26px; }
.adm-row a { color: #0d2340; font-weight: 800; text-decoration: none; }

.adm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.adm-actions.single { grid-template-columns: 1fr; }
.adm-btn {
  min-height: 62px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
}
.adm-btn.ok { background: #20a36a; }
.adm-btn.no { background: #d9534f; }
.adm-btn:active { transform: scale(0.98); }

.adm-empty {
  padding: 34px 16px;
  border: 1.5px dashed #dce3eb;
  border-radius: 18px;
  color: #718096;
  background: #ffffff;
  text-align: center;
  font-size: 17px;
}
.adm-empty strong { display: block; margin-bottom: 6px; color: #0d2340; font-size: 20px; }

@media (min-width: 900px) {
  .adm-header h2 { font-size: 30px; }
  .adm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .adm-list .adm-card, .adm-list .adm-empty { margin-bottom: 0; }
  .adm-list .adm-empty { grid-column: 1 / -1; }
}
/* ===== maw3idiCloud ===== */

/* Le bouton "démo" est retiré : seul l'admin valide via la base */
.dgw-notice-demo { display: none !important; }

.adm-head-actions { display: flex; gap: 8px; }
.adm-counter.flash { animation: adm-flash 1.2s ease; }
@keyframes adm-flash {
  0%, 100% { background: #0d2340; }
  40% { background: #d6a84f; color: #0d2340; }
}
.adm-error {
  padding: 20px 16px;
  border: 1.5px solid #f5c6c4;
  border-radius: 16px;
  color: #d9534f;
  background: #fdecec;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}
/* ================= Public bottom nav — pbn ================= */

.pbn {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  direction: ltr; /* ordre fixe, même si la page passe en arabe */
  padding: 14px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(13, 35, 64, 0.08);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -10px 30px rgba(13, 35, 64, 0.08);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .pbn {
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
  }
}

/* Masqué en mode application (la règle existante pour l'ancienne nav reste intacte) */
body.app-mode .pbn { display: none; }

.pbn-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 560px;
  margin: 0 auto;
}

.pbn-item {
  display: grid;
  place-items: center;
  min-height: 66px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* La "pilule" : seule partie animée au toucher (transform uniquement) */
.pbn-pill {
  --lift: 0px;
  --sc: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 78px;
  padding: 9px 14px 8px;
  overflow: hidden;
  border-radius: 22px;
  color: #8a97a8;
  background-color: transparent;
  transform: translateY(var(--lift)) scale(var(--sc));
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),   /* retour nerveux (spring) */
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.pbn-ico { display: block; width: 26px; height: 26px; }
.pbn-label { font-size: 12px; font-weight: 800; line-height: 1.1; white-space: nowrap; }

/* Actif : pilule marine flottante, icône dorée, texte blanc */
.pbn-item.is-active .pbn-pill {
  --lift: -12px;
  color: #ffffff;
  background-color: #0d2340;
  box-shadow: 0 12px 24px rgba(13, 35, 64, 0.34);
}
.pbn-item.is-active .pbn-ico { color: #d6a84f; }

/* Pression : écrasement rapide, puis rebond via la transition ci-dessus */
.pbn-item:active .pbn-pill {
  --sc: 0.92;
  transition:
    transform 0.1s ease-out,
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.pbn-item:focus-visible .pbn-pill { box-shadow: 0 0 0 3px rgba(214, 168, 79, 0.7); }

/* Ripple depuis le point de contact */
.pbn-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(214, 168, 79, 0.4);
  opacity: 0;
  pointer-events: none;
}
.pbn-pill.is-rippling::after { animation: pbn-ripple 0.6s ease-out; }

@keyframes pbn-ripple {
  from { opacity: 0.9; clip-path: circle(0% at var(--rx, 50%) var(--ry, 50%)); }
  to   { opacity: 0;   clip-path: circle(120% at var(--rx, 50%) var(--ry, 50%)); }
}

/* Changement d'onglet : l'ancienne icône descend, la nouvelle bondit 150 ms plus tard */
.pbn-item.is-leaving .pbn-ico { animation: pbn-drop 0.32s ease-out; }
.pbn-item.is-entering .pbn-ico {
  animation: pbn-jump 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards;
}
@keyframes pbn-drop {
  0%   { transform: translateY(0); }
  45%  { transform: translateY(6px); }
  100% { transform: translateY(0); }
}
@keyframes pbn-jump {
  0%   { transform: translateY(6px) scale(0.9); }
  45%  { transform: translateY(-10px) scale(1.2); }
  100% { transform: translateY(0) scale(1); }
}

/* Bureau : survol */
@media (hover: hover) {
  .pbn-item:not(.is-active):hover .pbn-pill { --lift: -3px; color: #0d2340; background-color: #eef2f6; }
  .pbn-item.is-active:hover .pbn-pill { --lift: -15px; }
}

@media (prefers-reduced-motion: reduce) {
  .pbn-pill { transition: background-color 0.2s ease, color 0.2s ease; }
  .pbn-item.is-leaving .pbn-ico,
  .pbn-item.is-entering .pbn-ico,
  .pbn-pill.is-rippling::after { animation: none; }
}
/* ================= pbn : pages invité (Mes rendez-vous / Aide) ================= */

body.pbn-lock { overflow: hidden; }

.pbn-sheet {
  position: fixed;
  inset: 0;
  z-index: 55; /* sous la barre (60) : la barre reste visible */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(120px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 90% 0%, rgba(214, 168, 79, 0.16), transparent 32%),
    #f3f6fa;
  visibility: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    visibility 0s linear 0.42s;
}
.pbn-sheet.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.pbn-sheet-inner { max-width: 640px; margin: 0 auto; }

.pbn-sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.pbn-sheet-head h2 { color: #0d2340; font-size: 26px; line-height: 1.2; outline: none; }
.pbn-back {
  flex: 0 0 auto;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid #dce3eb;
  border-radius: 14px;
  color: #0d2340;
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(13, 35, 64, 0.07);
}
.pbn-back:hover { border-color: #d6a84f; background: #fffaf0; }

/* Etat vide */
.pbn-empty {
  padding: 38px 22px 28px;
  border: 1px solid #dce3eb;
  border-radius: 26px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(13, 35, 64, 0.1);
}
.pbn-empty-ico {
  display: grid;
  width: 108px;
  height: 108px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 50%;
  background: #fff4d9;
  font-size: 54px;
  box-shadow: 0 0 0 12px rgba(214, 168, 79, 0.14);
  animation: pbn-float 3.4s ease-in-out infinite;
}
@keyframes pbn-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.pbn-empty h3 { margin-bottom: 10px; color: #0d2340; font-size: 23px; line-height: 1.3; }
.pbn-empty p {
  max-width: 360px;
  margin: 0 auto;
  color: #5b6b80;
  font-size: 17px;
  line-height: 1.6;
}
.pbn-cta {
  display: block;
  width: 100%;
  min-height: 62px;
  margin-top: 26px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: #0d2340;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(13, 35, 64, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}
.pbn-cta:hover { background: #18395f; }
.pbn-cta:active { transform: scale(0.97); }

/* Aide : carte d'appel */
.pbn-call {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 20px 18px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0d2340, #18395f);
  box-shadow: 0 16px 36px rgba(13, 35, 64, 0.25);
}
.pbn-call-ico {
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: #d6a84f;
  font-size: 26px;
}
.pbn-call-body { flex: 1; min-width: 0; }
.pbn-call-body small { display: block; color: #c9d7e6; font-size: 14px; font-weight: 700; }
.pbn-call-body strong { display: block; margin-top: 2px; font-size: 21px; font-weight: 900; letter-spacing: 0.5px; }
.pbn-call-btn {
  flex: 0 0 auto;
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 14px;
  color: #0d2340;
  background: #d6a84f;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pbn-call-btn:active { transform: scale(0.94); }

/* FAQ */
.pbn-faq { display: flex; flex-direction: column; gap: 10px; }
.pbn-faq details {
  border: 1px solid #dce3eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(13, 35, 64, 0.05);
}
.pbn-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 0 18px;
  color: #0d2340;
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
  list-style: none;
}
.pbn-faq summary::-webkit-details-marker { display: none; }
.pbn-faq summary::after { content: "+"; color: #d6a84f; font-size: 26px; font-weight: 900; }
.pbn-faq details[open] summary::after { content: "−"; }
.pbn-faq details p { padding: 0 18px 18px; color: #5b6b80; font-size: 16px; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  .pbn-sheet { transition: opacity 0.15s ease, visibility 0s linear 0.15s; transform: none; }
  .pbn-empty-ico { animation: none; }
}
/* ===================== doctorDashboard V2 (préfixe dx-) =====================
   À COLLER À LA FIN de style.css (après la règle [hidden] finale).
   Réutilise les classes existantes : dd-header, dd-card, dd-bottom-nav, dd-nav-btn,
   dd-info-list, dd-avatar, dd-badge, dd-logout, dd-empty, dd-pill, dd-eyebrow. */

.dx-date { margin-top: 10px; color: var(--navy); font-size: 17px; font-weight: 800; }

/* Animation tactile commune */
.dx-press {
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.18s ease;
}
.dx-press:active { transform: scale(0.97); }

/* Bandeau compteur */
.dx-summary {
  margin-bottom: 18px;
  padding: 20px 18px;
  border-left: 6px solid var(--gold);
  border-radius: 20px;
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 14px 32px rgba(13, 35, 64, 0.22);
}
.dx-summary strong { display: block; font-size: 23px; font-weight: 900; line-height: 1.3; }
.dx-summary span { display: block; margin-top: 6px; color: #f0d9a0; font-size: 17px; font-weight: 700; }

/* Frise de la journée */
.dx-timeline { display: flex; flex-direction: column; gap: 8px; }
.dx-slot {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: #f7f9fc;
  font-family: inherit;
  text-align: left;
}
.dx-slot time {
  min-width: 58px;
  font-size: 19px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.dx-slot.free span { font-size: 16px; font-weight: 700; }
.dx-slot.booked {
  cursor: pointer;
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
  border-left: 5px solid var(--gold);
  box-shadow: 0 8px 18px rgba(13, 35, 64, 0.18);
}
.dx-slot.booked time { color: var(--gold); }
.dx-slot-info { flex: 1; min-width: 0; }
.dx-slot-info strong { display: block; font-size: 18px; line-height: 1.3; word-break: break-word; }
.dx-slot-info small { color: #cbd6e4; font-size: 15px; font-weight: 700; }
.dx-chev { color: var(--gold); font-size: 24px; font-weight: 900; }
.dx-slot.past { opacity: 0.55; }

/* Repère « maintenant » */
.dx-now {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}
.dx-now::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.dx-now::after { content: ""; flex: 1; height: 2px; background: currentColor; opacity: 0.7; }

/* Zone démo */
.dx-demo { margin-top: 20px; text-align: center; }
.dx-demo-btn {
  min-height: 46px;
  padding: 0 20px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
}
.dx-link {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
}

/* Agenda — accordéon */
.dx-day { margin-bottom: 10px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--white); }
.dx-day.open { border-color: var(--gold); }
.dx-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
}
.dx-day-head small { display: block; color: var(--muted); font-size: 14px; font-weight: 700; }
.dx-day-right { display: flex; align-items: center; gap: 10px; }
.dx-count {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--green);
  background: #e7f6ef;
  font-size: 15px;
  font-weight: 900;
}
.dx-count.full { color: var(--danger); background: #fdecec; }
.dx-count.off { color: #8a97a8; background: #eef2f6; }
.dx-caret { color: var(--muted); transition: transform 0.25s ease; }
.dx-day.open .dx-caret { transform: rotate(180deg); }
.dx-day-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 12px 14px; }
@media (min-width: 520px) { .dx-day-body { grid-template-columns: repeat(4, 1fr); } }
.dx-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: #f7f9fc;
  font-family: inherit;
}
.dx-chip b { font-size: 17px; font-variant-numeric: tabular-nums; }
.dx-chip small { max-width: 100%; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dx-chip.booked { cursor: pointer; color: var(--white); background: var(--navy); border-color: var(--navy); }
.dx-chip.booked b { color: var(--gold); }
.dx-chip.past { opacity: 0.55; }

/* ===================== File d'attente — liste professionnelle ===================== */
.dx-queue-list,
.dq-queue-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Bottom sheet patient */
.dx-sheet { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90; }
.dx-sheet-backdrop {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(13, 35, 64, 0.55);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.dx-sheet-panel {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--white);
  box-shadow: 0 -16px 40px rgba(13, 35, 64, 0.25);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.dx-sheet.open .dx-sheet-backdrop { opacity: 1; }
.dx-sheet.open .dx-sheet-panel { transform: translateY(0); }
.dx-grab { display: block; width: 46px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: var(--border); }
.dx-sheet-panel h3 { margin-bottom: 12px; color: var(--navy); font-size: 28px; line-height: 1.2; word-break: break-word; }
.dx-sheet-panel .dd-info-list strong { font-size: 18px; }
.dx-tel {
  display: inline-block;
  padding: 6px 0;
  color: var(--navy);
  font-size: 21px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
}
.dx-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.dx-btn,
.dx-btn-ghost {
  min-height: 58px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
}
.dx-btn { border: 0; color: var(--white); background: var(--navy); }
.dx-btn-ghost { border: 1.5px solid var(--border); color: var(--muted); background: var(--white); }
.dx-btn-ghost:disabled { cursor: not-allowed; opacity: 0.55; }

.dx-home-tools { margin: 0 0 16px; }
.dx-home-tools .dx-btn-ghost {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

/* --- Annulation médecin (bouton rouge) --- */
.dx-cancel { background: var(--danger); }
.dx-cancel-confirm { background: var(--danger); }

/* --- File d'attente --- */
.dx-queue-card { margin-top: 16px; }
.dx-queue-body { padding: 0 18px 18px; }
.dx-queue-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.dx-queue-next { flex: 1 1 200px; background: var(--green); min-height: 60px; font-size: 18px; }
.dx-queue-progress { margin-bottom: 14px; }
.dx-queue-count { display: block; font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.dx-queue-bar { height: 8px; background: #eef2f6; border-radius: 999px; overflow: hidden; }
.dx-queue-bar-fill { height: 100%; background: var(--green); width: 0%; transition: width 0.4s ease; }
.dx-queue-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.dx-queue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: #f7f9fc; font-size: 16px;
}
.dx-queue-item.passé { opacity: 0.55; text-decoration: line-through; }
.dx-queue-item.encours { border-color: var(--gold); background: #fdf6e7; }
.dx-queue-item .dx-queue-name { flex: 1; font-weight: 800; color: var(--navy); }
.dx-queue-item .dx-queue-time { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.dx-queue-item .dx-queue-status { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; }
.dx-queue-item .dx-queue-status.passé { color: #8a97a8; }
.dx-queue-item .dx-queue-status.encours { color: var(--danger); }
.dx-queue-item .dx-queue-status.enattente { color: var(--muted); }

/* Formulaire ajout sans rendez-vous */
.dx-queue-add-form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.dx-queue-fields { display: grid; grid-template-columns: 2fr 1fr 120px 80px; gap: 10px; align-items: end; }
.dx-queue-fields input { min-height: 52px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; font-family: inherit; font-size: 16px; }
@media (max-width: 560px) {
  .dx-queue-fields { grid-template-columns: 1fr 1fr; }
  .dx-queue-fields button:nth-child(3), .dx-queue-fields button:nth-child(4) { grid-column: span 2; }
  .dx-queue-controls { flex-direction: column; }
  .dx-queue-next { width: 100%; }
}

/* --- Panneau "C'est votre tour" (patient) --- */
.dx-your-turn {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  padding: 16px env(safe-area-inset-bottom);
  background: var(--green); color: var(--white);
  text-align: center; font-size: 20px; font-weight: 900;
  box-shadow: 0 -10px 30px rgba(13, 35, 64, 0.25);
  animation: dxTurnPulse 1.2s infinite alternate;
}
@keyframes dxTurnPulse {
  from { opacity: 1; }
  to { opacity: 0.85; }
}

/* Suivre ma file — page médecin publique */
.mw-doc-queue { margin-top: 16px; }
.mw-doc-queue-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.mw-doc-queue-result { margin-top: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #f7f9fc; }
.mw-doc-queue-result p { font-size: 16px; font-weight: 800; color: var(--navy); margin: 0 0 10px; }

.dx-count.closed { color: #8a5a12; background: #f8ead0; }

.dx-closed-note {
  display: block;
  padding: 4px 16px 16px;
}
.dx-closed-note p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}
.dx-closed-note .dx-btn-ghost { width: 100%; min-height: 48px; }

.dx-closure-panel label {
  display: block;
  margin: 14px 0 6px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}
.dx-closure-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--navy);
  background: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
}
.dx-closure-input:focus {
  outline: none;
  border-color: var(--gold);
}
textarea.dx-closure-input {
  resize: vertical;
  min-height: 88px;
  font-weight: 600;
  line-height: 1.45;
}
.dx-message {
  min-height: 1.35em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.mw-closed-msg {
  display: block;
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #f0a060;
  border-radius: 10px;
  background: #fff3e6;
  color: #8a3b00;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
  direction: rtl;
}

@media (prefers-reduced-motion: reduce) {
  .dx-press, .dx-sheet-backdrop, .dx-sheet-panel, .dx-caret { transition: none; }
}

/* ===================== Maw3idi Wow (préfixe mw-) — PHASE DEMO ===================== */
.dx-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 18px;
}
.dx-stat {
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  text-align: center;
  animation: mw-rise 0.45s ease both;
}
.dx-stat:nth-child(2) { animation-delay: 0.06s; }

/* ===================== Jours de consultation — Pilules élégantes ===================== */
.dgw-working-days fieldset,
.dgw-working-days {
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
}
.dgw-working-days legend {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 12px;
  padding: 0;
}
.dgw-days-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
}
.dgw-day-option {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 44px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.18s ease;
}
.dgw-day-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
  margin: 0;
}
.dgw-day-option span {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px 4px;
  color: var(--muted);
  background: #f2f5f9;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  transition: all 0.18s ease;
}
.dgw-day-option:hover span {
  background: #e8edf4;
  border-color: var(--gold);
}
.dgw-day-option input:checked + span,
.dgw-day-option:has(input:checked) span {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.dgw-day-option input:checked + span::after,
.dgw-day-option:has(input:checked) span::after {
  content: "✔";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 12px;
  color: var(--gold);
}
@media (max-width: 480px) {
  .dgw-days-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.dx-stat:nth-child(3) { animation-delay: 0.12s; }

/* ===================== Modal Ajout Patient — Sans rendez-vous ===================== */
.dx-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: inherit;
}
.dx-modal[hidden] { display: none; }
.dx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  animation: dx-fade-in 0.2s ease both;
}
.dx-modal-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  animation: dx-slide-up 0.25s ease both;
}
.dx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.dx-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}
.dx-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease;
}
.dx-modal-close:hover { color: var(--navy); background: #f2f5f9; }
.dx-modal-field {
  margin-bottom: 16px;
}
.dx-modal-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.dx-modal-field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}
.dx-modal-field input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.12);
}
.dx-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.dx-modal-actions button {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}
.dx-modal-actions .dx-btn {
  background: var(--navy);
  color: var(--white);
}
.dx-modal-actions .dx-btn:hover { opacity: 0.92; }
.dx-modal-actions .dx-btn-ghost {
  background: #f2f5f9;
  color: var(--navy);
}
.dx-modal-actions .dx-btn-ghost:hover { background: #e8edf4; }

@keyframes dx-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dx-slide-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== File d'attente — affichage des patients ===================== */
.dx-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  transition: all 0.18s ease;
}
.dx-queue-item:hover { border-color: var(--gold); background: #fbfaf5; }
.dx-queue-item.is-next {
  border-color: var(--gold);
  background: #fffbf0;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.18);
}
.dx-queue-item.done {
  opacity: 0.55;
  background: #f2f5f9;
}
.dx-queue-item.done .dx-queue-name { text-decoration: line-through; }
.dx-queue-pos {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  background: #cbd5e1;
  flex-shrink: 0;
}
.dx-queue-item.is-next .dx-queue-pos { background: var(--gold); color: var(--navy); }
.dx-queue-info { flex: 1; min-width: 0; }
.dx-queue-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.dx-queue-phone {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
}
.dx-queue-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.dx-queue-actions button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.dx-queue-actions .dx-queue-move {
  background: #f2f5f9;
  color: var(--navy);
}
.dx-queue-actions .dx-queue-move:hover { background: #e8edf4; }
.dx-queue-actions .dx-queue-remove {
  background: var(--danger);
  color: var(--white);
}
.dx-queue-actions .dx-queue-remove:hover { opacity: 0.9; }

/* Bouton Arrêter / Reprendre les réservations */
.dx-btn-danger {
  background: var(--danger);
  color: var(--white);
  min-height: 46px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 14px;
}
.dx-btn-danger:hover { opacity: 0.9; }
.dx-btn-ghost.dx-queue-stop {
  background: var(--danger);
  color: var(--white);
  border: 1px solid var(--danger);
  min-height: 46px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 14px;
}
.dx-btn-ghost.dx-queue-stop:hover {
  opacity: 0.9;
  background: var(--white);
  color: var(--danger);
  border-color: var(--danger);
}
.dx-btn.dx-queue-stop {
  background: var(--danger);
  color: var(--white);
  min-height: 46px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 14px;
}
.dx-btn.dx-queue-stop:hover { opacity: 0.9; }
.dx-queue-item.done .dx-queue-actions button { opacity: 0.6; }

@media (max-width: 480px) {
  .dx-queue-item { padding: 12px 14px; }
  .dx-queue-name { font-size: 15px; }
  .dx-queue-phone { font-size: 12.5px; }
}
.dx-stat strong {
  display: block;
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}
.dx-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pbn-lookup {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #dce3eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(13, 35, 64, 0.07);
}
.pbn-lookup label {
  display: block;
  margin-bottom: 8px;
  color: #0d2340;
  font-size: 13px;
  font-weight: 800;
}
.pbn-lookup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.pbn-lookup input {
  min-height: 54px;
  padding: 0 14px;
  border: 1.5px solid #dce3eb;
  border-radius: 14px;
  color: #0d2340;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
}
.pbn-lookup input:focus { outline: none; border-color: #d6a84f; }
.pbn-cta-inline {
  width: auto;
  min-width: 88px;
  min-height: 54px;
  margin: 0;
  padding: 0 18px;
}
.pbn-lookup-hint {
  margin: 10px 0 0;
  color: #5b6b80;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.pbn-appt-card {
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid #dce3eb;
  border-radius: 18px;
  background: #fff;
  animation: mw-rise 0.4s ease both;
}
.pbn-appt-card strong { display: block; color: #0d2340; font-size: 18px; }
.pbn-appt-card small { color: #5b6b80; font-size: 14px; font-weight: 700; }
.pbn-appt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.pbn-appt-queue {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  color: #0d2340;
  background: #fff4d9;
  font-size: 12px;
  font-weight: 800;
}

body.mw-doc-open { overflow: hidden; }
body.mw-doc-open .pbn { visibility: hidden; }
.mw-doc {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(28px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 90% 0%, rgba(214, 168, 79, 0.16), transparent 32%),
    var(--background);
  opacity: 0;
  transform: translateY(18px);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.mw-doc.is-open { opacity: 1; transform: none; }
.mw-doc-inner { max-width: 720px; margin: 0 auto; }
.mw-doc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mw-doc-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 20px 18px;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(160deg, #0d2340 0%, #16365c 70%, #1c4470 100%);
  box-shadow: 0 16px 36px rgba(13, 35, 64, 0.22);
  animation: mw-rise 0.45s ease both;
}
.mw-doc-hero h2 { font-size: 26px; line-height: 1.2; }
.mw-doc-hero p { color: #dce6f2; font-weight: 700; }
.mw-doc-hero .mw-stars-inline { color: #d6a84f; font-weight: 800; }
.mw-doc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.mw-doc-actions a {
  display: grid;
  min-height: 50px;
  place-items: center;
  border-radius: 14px;
  color: #0d2340;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}
.mw-doc-actions a.wa { color: #fff; background: #128c7e; }
.mw-doc-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}
.mw-doc-meta div {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.mw-doc-meta small { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.mw-doc-map {
  height: 180px;
  margin-bottom: 16px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.mw-doc-cal h3 { margin: 0 0 10px; color: var(--navy); font-size: 18px; }
.mw-doc-days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.mw-doc-day {
  flex: 0 0 68px;
  scroll-snap-align: start;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}
.mw-doc-day small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; }
.mw-doc-day b { display: block; margin-top: 4px; color: var(--navy); font-size: 18px; }
.mw-doc-day.on { border-color: var(--gold); background: #fff8e8; box-shadow: 0 8px 18px rgba(214, 168, 79, 0.25); }
.mw-doc-day.off { opacity: 0.55; }
.mw-doc-closed {
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 14px;
  color: #8a5a12;
  background: #f8ead0;
  font-weight: 700;
}
.mw-doc-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mw-slot {
  min-height: 52px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.mw-slot:active { transform: scale(0.96); }
.mw-slot.free:hover { border-color: var(--gold); }
.mw-slot.busy, .mw-slot.past {
  cursor: not-allowed;
  opacity: 0.45;
}
.mw-doc-book-btn {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 18px auto 0;
  padding: 16px 24px;
  border: 0;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13,35,64,0.18);
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.mw-doc-book-btn:active { transform: scale(0.97); }
.mw-doc-book-btn:hover { background: var(--gold-dark, #1a3a5c); box-shadow: 0 6px 16px rgba(13,35,64,0.24); }

.mw-book-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}
.mw-doc label, .dx-sheet-panel label {
  display: block;
  margin: 12px 0 6px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}
.mw-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 4px;
}
.mw-stars button {
  border: 0;
  background: transparent;
  color: #dce3eb;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transition: transform 0.15s ease, color 0.15s ease;
}
.mw-stars button.on { color: #d6a84f; transform: scale(1.08); }

.mw-card-actions {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.featured-doctor-card.live { flex-wrap: wrap; }
.mw-mini {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-radius: 12px;
  color: var(--navy);
  background: #f3f6fa;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.mw-mini.wa { color: #fff; background: #128c7e; }
.doctor-card .mw-card-actions { margin: 8px 0 4px; }

.mw-install {
  position: fixed;
  right: 12px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 85;
  display: grid;
  gap: 6px;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px;
  border-radius: 18px;
  background: #0d2340;
  color: #fff;
  box-shadow: 0 16px 40px rgba(13, 35, 64, 0.3);
  animation: mw-rise 0.4s ease both;
}
.mw-install span { color: #cbd6e4; font-size: 13px; font-weight: 700; }
.mw-install .dx-btn, .mw-install .dx-btn-ghost { min-height: 46px; }
.mw-install .dx-btn-ghost { color: #fff; background: transparent; border-color: rgba(255,255,255,0.25); }

@keyframes mw-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

html[lang="ar"] .mw-doc,
html[lang="ar"] .pbn-lookup,
html[lang="ar"] .pbn-appt-card { direction: rtl; text-align: right; }

@media (min-width: 560px) {
  .mw-doc-slots { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .mw-doc, .dx-stat, .pbn-appt-card, .mw-doc-hero, .mw-install { animation: none; transition: none; }
}
/* Jours du calendrier : états ajoutés par la page médecin */
.mw-doc-day .mw-st { margin-top: 4px; font-size: 10px; font-weight: 800; color: var(--green); }
.mw-doc-day.off .mw-st { color: var(--muted); }
.mw-doc-day.full { border-color: #f5c6c4; background: #fdecec; }
.mw-doc-day.full b, .mw-doc-day.full .mw-st { color: var(--danger); }
.mw-doc-day.closed { border-color: #f0d9a2; background: #f8ead0; }
.mw-doc-day.closed .mw-st { color: #8a5a12; }
.mw-doc-day.on.full, .mw-doc-day.on.closed { border-color: var(--gold); box-shadow: 0 8px 18px rgba(214, 168, 79, 0.25); }
.mw-slot small { display: block; font-size: 11px; font-weight: 700; }
/* Badge de synchronisation — tableau de bord médecin */
.mw-sync {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}
.mw-sync.ok { color: #12724a; background: #e7f6ef; border-color: #b8e4d0; }
.mw-sync.err { color: #a8302c; background: #fdeceb; border-color: #f3c4c1; }

/* ===================== Lien d'accès direct (magic link) ===================== */
.magic-link-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  background: var(--background);
}
.magic-link-view[hidden] { display: none; }
.magic-link-card {
  width: min(480px, 100%);
  padding: 34px 28px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(13, 35, 64, 0.12);
  text-align: center;
}
.magic-link-kicker {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}
.magic-link-card h1 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 23px;
  line-height: 1.25;
}
.magic-link-message {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}
.magic-link-message.error { color: var(--danger); }
.magic-link-secondary {
  display: inline-block;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--navy);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.magic-link-secondary:hover { border-color: var(--navy); }

/* ===================== Réinitialisation du mot de passe (médecin) ===================== */
.reset-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  background: var(--background);
}
.reset-view[hidden] { display: none; }
.reset-card {
  width: min(480px, 100%);
  padding: 34px 28px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(13, 35, 64, 0.12);
  text-align: center;
}
.reset-kicker {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}
.reset-card h1 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.25;
}
.reset-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.reset-card label {
  display: block;
  margin: 14px 0 6px;
  text-align: left;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.reset-card input[type="password"] {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
}
.reset-card input[type="password"]:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13, 35, 64, 0.08);
}
.reset-message {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.reset-message.ok { color: var(--green); }
.reset-message.error { color: var(--danger); }
.reset-primary {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: var(--navy);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.reset-primary:hover { background: var(--navy-light); }
.reset-primary:active { transform: scale(0.99); }
.reset-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.reset-secondary {
  display: block;
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--navy);
  background: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.reset-secondary[hidden] { display: none; }
.reset-note {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
}

/* ===================== Admin : lien de réinitialisation ===================== */
.adm-reset-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 13px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.adm-reset-btn:hover { border-color: var(--navy); }
.adm-reset-btn:active { transform: scale(0.98); }
.adm-reset-btn:disabled { opacity: 0.55; cursor: wait; }

.adm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.adm-modal[hidden] { display: none; }
.adm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 35, 64, 0.55);
}
.adm-modal-panel {
  position: relative;
  width: min(520px, 100%);
  padding: 26px 24px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(13, 35, 64, 0.22);
}
.adm-modal-panel h3 {
  margin: 4px 0 8px;
  color: var(--navy);
  font-size: 21px;
}
.adm-modal-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.adm-modal-panel label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.adm-modal-panel input[type="text"] {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f9fc;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12px;
  color: var(--text);
}
.adm-modal-message {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
}
.adm-modal-message.ok { color: var(--green); }
.adm-modal-message.error { color: var(--danger); }
.adm-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.adm-modal-actions .adm-btn {
  min-height: 50px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}
.adm-modal-actions .adm-btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--border);
}
.adm-modal-note {
  margin: 16px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff8e8;
  border: 1px solid #f0d9a2;
  color: #795b18;
  font-size: 12px;
  line-height: 1.5;
}

/* =============================================================================
 *  Rappel de rendez-vous — notification In-App (patient)
 *  + invite d'autorisation des notifications push.
 *  Mêmes variables que le reste du site.
 * ========================================================================== */
.appt-reminder {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1400;
  padding: 10px 12px;
  pointer-events: none;
}
.appt-reminder[hidden] { display: none; }
.appt-reminder-inner {
  pointer-events: auto;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 14px 40px rgba(13, 35, 64, 0.32);
  animation: appt-slide-in 0.35s ease;
}
@keyframes appt-slide-in {
  from { transform: translateY(-120%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.appt-reminder-kicker {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}
.appt-reminder-text {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}
.appt-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.appt-reminder-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.appt-reminder-btn.ok { background: var(--green); color: var(--white); }
.appt-reminder-btn.no { background: var(--danger); color: var(--white); }
.appt-reminder-btn.ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.appt-reminder-btn:active { transform: scale(0.98); }
.appt-reminder-btn:disabled { opacity: 0.6; cursor: wait; }

/* =============================================================================
 *  MODULE « MON LIEN D'ACCÈS DIRECT » (doctor own link)
 *  -----------------------------------------------------------------------------
 *  ⚠️  Les styles de ce module vivent dans le fichier SÉPARÉ
 *      doctor-own-link.css (chargé par index.html).
 *      Ils ne sont pas dupliqués ici pour éviter toute divergence.
 * ========================================================================== */


/* ===================== Patient Queue Count — Mes rendez-vous ===================== */
.pbn-queue-count {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fff8e8;
  border: 1.5px solid var(--gold);
  color: var(--navy);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 4px 12px rgba(214, 168, 79, 0.15);
}
.pbn-queue-count strong { color: var(--gold-dark, #1a3a5c); }
/* dgw card select styles */
.dgw-card select {
  display: block; width: 100%; height: 58px; margin: 0 0 20px; padding: 0 16px;
  border: 1.5px solid #dce3eb; border-radius: 12px; outline: none;
  color: #243447; background: #ffffff;
  font-family: inherit; font-size: 17px; cursor: pointer;
}
.dgw-card select:focus { border-color: #d6a84f; box-shadow: 0 0 0 4px rgba(214, 168, 79, 0.2); }
.mw-book-message {
  display: none;
  width: 100%;
  box-sizing: border-box;
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: 2px solid #d97706;
  background: #fff3cd;
  color: #7c2d12;
  direction: rtl;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.7;
  visibility: visible;
}

.mw-book-message.mw-closed-msg {
  display: block !important;
  visibility: visible !important;
}

/* ===== Inscription médecin : jours de consultation (pastilles) ===== */
.dgw-card .dgw-working-days { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.dgw-card .dgw-working-days legend { display: block; margin: 0 0 10px; padding: 0; color: #0d2340; font-size: 16px; font-weight: 800; }
.dgw-card .dgw-days-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.dgw-card .dgw-day-option { position: relative; display: inline-flex; margin: 0; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.dgw-card .dgw-days-grid .dgw-day-option input[type="checkbox"] { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.dgw-card .dgw-day-option span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid #dce3eb; border-radius: 999px; color: #718096; background: #f3f6fa;
  font-size: 15px; font-weight: 800; line-height: 1;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.dgw-card .dgw-day-option span::before {
  content: "✓"; display: inline-block; width: 0; margin-right: 0; overflow: hidden; opacity: 0;
  color: #d6a84f; font-weight: 900; transition: width 0.22s ease, margin 0.22s ease, opacity 0.22s ease;
}
.dgw-card .dgw-day-option:hover span { border-color: #d6a84f; }
.dgw-card .dgw-day-option:active span { transform: scale(0.94); }
.dgw-card .dgw-day-option input:checked + span { color: #ffffff; background: #0d2340; border-color: #0d2340; box-shadow: 0 6px 14px rgba(13, 35, 64, 0.22); }
.dgw-card .dgw-day-option input:checked + span::before { width: 1em; margin-right: 7px; opacity: 1; }
.dgw-card .dgw-day-option input:focus-visible + span { box-shadow: 0 0 0 4px rgba(214, 168, 79, 0.35); }
@media (prefers-reduced-motion: reduce) { .dgw-card .dgw-day-option span, .dgw-card .dgw-day-option span::before { transition: none; } }

/* ===== Bouton « Arrêter / Reprendre les réservations » ===== */
.mwr-stop { min-height: 52px; }
.mwr-stop.mwr-closed { border-color: #d9534f; color: #d9534f; }
.mwr-banner { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 700; line-height: 1.45; }
.mwr-banner.warn { color: #7a5a14; background: #fff8e8; border: 1px solid #f0d9a0; }
.mwr-banner.error { color: #a12622; background: #fdecec; border: 1px solid #f3c1bf; }
.mwr-banner.ok { color: #14633f; background: #e7f6ef; border: 1px solid #bfe6d3; }
