/* ============================================================
   AskMed — Client Account Dashboard
   Design premium & professionnel — blanc / gris / navy
   Accent rose #E12454 utilisé avec parcimonie (boutons, liens,
   états actifs) pour ne jamais ressembler à une alerte d'erreur.
   Prefixe : .ajd-
   ============================================================ */

.ajd {
  --ajd-primary: #E12454;
  --ajd-primary-dark: #c01c47;
  --ajd-primary-light: #fdeef2;
  --ajd-primary-soft: rgba(225, 36, 84, 0.08);
  --ajd-navy: #14161c;
  --ajd-navy-soft: #1e212a;
  --ajd-text: #101828;
  --ajd-text-soft: #475467;
  --ajd-text-faint: #98a2b3;
  --ajd-border: #e6e8ee;
  --ajd-bg: #f6f7f9;
  --ajd-white: #ffffff;
  --ajd-green: #12b76a;
  --ajd-red: #f04438;
  --ajd-radius: 16px;
  --ajd-radius-sm: 10px;
  --ajd-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --ajd-shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.08);
  --ajd-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ajd *,
.ajd *::before,
.ajd *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ajd {
  font-family: var(--ajd-font);
  color: var(--ajd-text);
  background: var(--ajd-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ajd a {
  color: var(--ajd-primary);
  text-decoration: none;
}
.ajd a:hover {
  text-decoration: underline;
}

.ajd input,
.ajd button,
.ajd summary {
  font-family: inherit;
}

/* ------------------------------------------------------------------ */
/* Header blanc minimaliste, logo seul                                 */
/* ------------------------------------------------------------------ */
.ajd-header {
  position: sticky;
  top: 0;
  background: var(--ajd-white);
  border-bottom: 1px solid var(--ajd-border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  color: var(--ajd-text);
  z-index: 50;
}

.ajd-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ajd-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.ajd-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}
.ajd-logo-img {
  height: 72px;
  width: auto;
  max-width: 300px;
  display: block;
  object-fit: contain;
}

.ajd-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.ajd-nav-link {
  color: var(--ajd-text-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ajd-nav-link:hover {
  color: var(--ajd-text);
  text-decoration: none;
}
.ajd-nav-link-active,
.ajd-nav-link-active:hover {
  color: var(--ajd-text);
  border-bottom-color: var(--ajd-primary);
}

/* Hamburger + drawer mobile (menu My Account) */
.ajd-nav-link-desk {
  display: inline;
}
.ajd-nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  background: var(--ajd-white);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.ajd-nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ajd-text);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.ajd-nav-burger:hover {
  border-color: var(--ajd-primary);
}
.ajd-nav-burger:hover span {
  background: var(--ajd-primary);
}
body.ajd-sidebar-open .ajd-nav-burger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.ajd-sidebar-open .ajd-nav-burger span:nth-child(2) {
  opacity: 0;
}
body.ajd-sidebar-open .ajd-nav-burger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.ajd-sidebar-drawer {
  display: contents;
}
.ajd-sidebar-drawer-head {
  display: none;
}
.ajd-sidebar-overlay {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */
.ajd-layout {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
  align-items: start;
  flex: 1;
}

.ajd-main {
  min-width: 0;
}

.ajd-card {
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius);
  padding: 32px;
  box-shadow: var(--ajd-shadow);
}

/* ------------------------------------------------------------------ */
/* Notices (succès / erreur)                                           */
/* ------------------------------------------------------------------ */
.ajd-notice {
  border-radius: var(--ajd-radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 500;
}
.ajd-notice-success {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}
.ajd-notice-error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}

/* ------------------------------------------------------------------ */
/* Sidebar                                                             */
/* ------------------------------------------------------------------ */
.ajd-sidebar-card {
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius);
  padding: 20px 14px;
  box-shadow: var(--ajd-shadow);
}

.ajd-sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ajd-text-faint);
  padding: 0 12px 12px;
}

.ajd-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ajd-sidebar-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--ajd-radius-sm);
  color: var(--ajd-text-soft);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.ajd-sidebar-link:hover {
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
  text-decoration: none;
}
.ajd-sidebar-link.is-active {
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
  font-weight: 600;
}
.ajd-sidebar-link-logout {
  margin-top: 10px;
  border-top: 1px solid var(--ajd-border);
  border-radius: 0 0 var(--ajd-radius-sm) var(--ajd-radius-sm);
  padding-top: 12px;
  color: var(--ajd-red);
}
.ajd-sidebar-link-logout:hover {
  background: #fef3f2;
  color: #b42318;
}

/* ------------------------------------------------------------------ */
/* Titres de page                                                      */
/* ------------------------------------------------------------------ */
.ajd-page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ajd-text);
  margin-bottom: 4px;
}
.ajd-page-sub {
  color: var(--ajd-text-soft);
  font-size: 15px;
  margin-bottom: 24px;
}

/* ------------------------------------------------------------------ */
/* Page Welcome                                                        */
/* ------------------------------------------------------------------ */
/* Bandeau abonnement : carte premium sombre (aucun rose/rouge) */
.ajd-sub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background:
    radial-gradient(620px 240px at 100% 0%, rgba(225, 36, 84, 0.22), transparent 60%),
    linear-gradient(135deg, var(--ajd-navy) 0%, var(--ajd-navy-soft) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--ajd-radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  color: #fff;
}
.ajd-sub-label {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #98a2b3;
}
.ajd-sub-value {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
}
/* Page Subscription : le plan ("Monthly") est sur carte claire -> texte sombre */
.ajd-sub-plan .ajd-sub-value {
  color: var(--ajd-text);
}
.ajd-sub-badge {
  background: rgba(18, 183, 106, 0.14);
  color: #6ce9a9;
  border: 1px solid rgba(18, 183, 106, 0.35);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.ajd-sub-badge-off {
  background: rgba(255, 183, 74, 0.12);
  color: #f7c26b;
  border: 1px solid rgba(255, 183, 74, 0.35);
  text-decoration: none;
}
.ajd-sub-meta {
  display: block;
  font-size: 12.5px;
  color: #b6becd;
  margin-top: 3px;
}

/* Page Subscription */
.ajd-sub-plan {
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.ajd-sub-plan.is-inactive {
  border-color: rgba(255, 183, 74, 0.4);
}
.ajd-sub-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ajd-sub-facts {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--ajd-border);
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 20px;
}
.ajd-sub-facts li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  color: #98a2b3;
}
.ajd-sub-facts strong {
  color: var(--ajd-text);
}
.ajd-sub-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.ajd-price-card {
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  padding: 18px 20px;
}
.ajd-price-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #98a2b3;
  font-weight: 600;
}
.ajd-price-tag {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--ajd-text);
  margin-bottom: 6px;
}
.ajd-price-card p {
  margin: 0 0 14px;
  font-size: 13px;
  color: #98a2b3;
}
.ajd-price-state {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #6ce9a9;
}
.ajd-sub-note {
  font-size: 12.5px;
  color: #98a2b3;
  margin: 0 0 18px;
}
.ajd-inline-note {
  font-size: 12.5px;
  color: #98a2b3;
  margin: -6px 0 18px;
}
.ajd-btn.ajd-disabled,
.ajd-btn.ajd-disabled:hover,
.ajd-btn.ajd-disabled:focus {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}
.ajd-sub-cancel {
  margin: 4px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--ajd-border);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ajd-sub-cancel-hint {
  margin: 0;
  font-size: 12.5px;
  color: #98a2b3;
  line-height: 1.45;
  max-width: 420px;
}
.ajd-conv-composer-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7c26b;
  font-size: 13px;
  border-top: 1px solid var(--ajd-border);
  padding: 12px;
}
.ajd-conv-composer-closed {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #98a2b3;
  font-size: 13px;
  border-top: 1px solid var(--ajd-border);
  background: #f9fafb;
  padding: 12px;
}

/* Liens rapides */
.ajd-quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.ajd-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  padding: 14px;
  color: var(--ajd-text);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ajd-quick-link:hover {
  border-color: #d8dae2;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}
.ajd-quick-icon {
  font-size: 22px;
  line-height: 1;
}
.ajd-quick-text {
  display: flex;
  flex-direction: column;
}
.ajd-quick-text strong {
  font-size: 14px;
}
.ajd-quick-text small {
  color: var(--ajd-text-faint);
  font-size: 12px;
}

/* Annonce : carte neutre avec pastille accent (plus de fond rose) */
.ajd-announce {
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-left: 3px solid var(--ajd-primary);
  border-radius: var(--ajd-radius-sm);
  padding: 16px 18px;
  margin-bottom: 28px;
  box-shadow: var(--ajd-shadow);
}
.ajd-announce strong {
  display: inline-block;
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.ajd-announce p {
  color: var(--ajd-text-soft);
  font-size: 14px;
}

.ajd-block {
  margin-top: 28px;
}
.ajd-block-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 14px;
}

.ajd-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ajd-step {
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  padding: 20px;
  box-shadow: var(--ajd-shadow);
}
.ajd-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}
.ajd-step h3 {
  font-size: 15px;
  margin-bottom: 4px;
}
.ajd-step p {
  color: var(--ajd-text-soft);
  font-size: 13.5px;
}

.ajd-check-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 18px;
}
.ajd-check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ajd-text-soft);
  font-size: 14px;
}
.ajd-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ajd-green);
  font-weight: 700;
}

.ajd-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ajd-testimonial {
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  padding: 18px;
  box-shadow: var(--ajd-shadow);
}
.ajd-testimonial blockquote {
  font-size: 13.5px;
  color: var(--ajd-text);
  margin-bottom: 10px;
}
.ajd-testimonial figcaption {
  font-size: 12.5px;
  color: var(--ajd-text-faint);
}

/* ------------------------------------------------------------------ */
/* Page Edit Settings                                                  */
/* ------------------------------------------------------------------ */
.ajd-settings-section {
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--ajd-shadow);
}
.ajd-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}
.ajd-settings-info h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}
.ajd-settings-desc {
  font-size: 13px;
  color: var(--ajd-text-faint);
}
.ajd-settings-value {
  display: inline-block;
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ajd-text);
  background: var(--ajd-bg);
  border: 1px solid var(--ajd-border);
  padding: 3px 10px;
  border-radius: 8px;
}

.ajd-edit-panel {
  background: var(--ajd-bg);
  border-top: 1px solid var(--ajd-border);
  padding: 18px 20px;
}
.ajd-edit-panel[hidden] {
  display: none;
}
.ajd-edit-panel form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ajd-edit-panel input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  font-size: 14px;
  background: #fff;
  color: var(--ajd-text);
  transition: border-color 0.15s ease;
}
.ajd-edit-panel input:focus {
  outline: none;
  border-color: var(--ajd-primary);
  box-shadow: 0 0 0 3px var(--ajd-primary-soft);
}
.ajd-edit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Formule Profil : grille à 2 colonnes */
.ajd-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 560px) {
  .ajd-profile-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.ajd-profile-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ajd-profile-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ajd-text-faint);
}
.ajd-edit-panel select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  font-size: 14px;
  background: #fff;
  color: var(--ajd-text);
  transition: border-color 0.15s ease;
}
.ajd-edit-panel select:focus {
  outline: none;
  border-color: var(--ajd-primary);
  box-shadow: 0 0 0 3px var(--ajd-primary-soft);
}

.ajd-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--ajd-border);
  font-size: 14.5px;
}
.ajd-toggle-row:first-of-type {
  border-top: none;
}
.ajd-toggle-form {
  margin: 0;
}

/* Switch */
.ajd-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  cursor: pointer;
}
.ajd-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ajd-slider {
  position: absolute;
  inset: 0;
  background: #d0d5dd;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.ajd-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.ajd-switch input:checked + .ajd-slider {
  background: var(--ajd-primary);
}
.ajd-switch input:checked + .ajd-slider::before {
  transform: translateX(20px);
}
.ajd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ */
/* Page Order History                                                  */
/* ------------------------------------------------------------------ */
.ajd-empty {
  text-align: center;
  padding: 40px 20px;
  background: var(--ajd-white);
  border: 1px dashed #d0d5dd;
  border-radius: var(--ajd-radius);
}
.ajd-empty-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 10px;
}
.ajd-empty h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.ajd-empty p {
  color: var(--ajd-text-soft);
  font-size: 14px;
  max-width: 420px;
  margin: 0 auto 18px;
}

.ajd-orders-table {
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  overflow: hidden;
  box-shadow: var(--ajd-shadow);
}
.ajd-orders-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.1fr 0.8fr 0.9fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  font-size: 14px;
}
.ajd-orders-row + .ajd-orders-row {
  border-top: 1px solid var(--ajd-border);
}
.ajd-orders-head {
  background: var(--ajd-bg);
  font-weight: 600;
  color: var(--ajd-text-soft);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ajd-order-status {
  font-weight: 600;
  color: var(--ajd-green);
}
.ajd-order-status-off {
  color: var(--ajd-red, #dc2626);
}
.ajd-order-provider {
  display: block;
  color: var(--ajd-text-faint);
  font-size: 12px;
  font-weight: 500;
}
.ajd-order-detail {
  display: block;
  color: var(--ajd-text-soft);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 2px;
}

/* FAQ */
.ajd-faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ajd-faq-item {
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  overflow: hidden;
  box-shadow: var(--ajd-shadow);
}
.ajd-faq-item summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ajd-faq-item summary::-webkit-details-marker {
  display: none;
}
.ajd-faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: var(--ajd-primary);
  transition: transform 0.15s ease;
}
.ajd-faq-item[open] summary::after {
  transform: rotate(45deg);
}
.ajd-faq-item p {
  padding: 0 18px 16px;
  color: var(--ajd-text-soft);
  font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* Boutons                                                             */
/* ------------------------------------------------------------------ */
.ajd-btn {
  display: inline-block;
  border: none;
  border-radius: var(--ajd-radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.ajd-btn-primary {
  background: var(--ajd-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(225, 36, 84, 0.25);
}
.ajd-btn-primary:hover {
  background: var(--ajd-primary-dark);
  color: #fff;
  text-decoration: none;
}
.ajd-btn-ghost {
  background: transparent;
  color: var(--ajd-primary-dark);
  border: 1px solid #d0d5dd;
}
.ajd-btn-ghost:hover {
  background: var(--ajd-primary-soft);
  text-decoration: none;
}
.ajd-btn-block {
  width: 100%;
}
.ajd-btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}
.ajd-btn-soft {
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
  border: 1px solid rgba(225, 36, 84, 0.18);
}
.ajd-btn-soft:hover {
  background: var(--ajd-primary-light);
  color: var(--ajd-primary-dark);
  text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Connexion / Inscription                                             */
/* ------------------------------------------------------------------ */
.ajd-layout-auth {
  display: flex;
  justify-content: center;
  padding-top: 48px;
}
.ajd-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius);
  padding: 32px;
  box-shadow: var(--ajd-shadow-lg);
}
.ajd-auth-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.ajd-auth-sub {
  color: var(--ajd-text-soft);
  font-size: 14px;
  margin-bottom: 20px;
}
.ajd-auth-tabs {
  display: flex;
  gap: 8px;
  background: var(--ajd-bg);
  border-radius: var(--ajd-radius-sm);
  padding: 5px;
  margin-bottom: 20px;
}
.ajd-auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ajd-text-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ajd-auth-tab.is-active {
  background: #fff;
  color: var(--ajd-primary-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.ajd-auth-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ajd-auth-panel[hidden] {
  display: none;
}
.ajd-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ajd-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ajd-text-soft);
}
.ajd-field input {
  padding: 11px 13px;
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  font-size: 14.5px;
  background: #fff;
  color: var(--ajd-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ajd-field input:focus {
  outline: none;
  border-color: var(--ajd-primary);
  box-shadow: 0 0 0 3px var(--ajd-primary-soft);
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.ajd-footer {
  background: #fafafa;
  color: #666666;
  margin-top: auto;
  font-family: Arial, Helvetica, "Helvetica Neue", system-ui, sans-serif;
}
.ajd-footer-inner {
  margin: 0 auto;
  padding: 0 80px;
}

/* --- Séparateurs horizontaux fins (limités à la largeur du conteneur) --- */
.ajd-f-divider {
  border-top: 1px solid #d9d9d9;
}

/* --- Zone 2 : navigation --- */
.ajd-f-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 46px 0 42px;
}
.ajd-f-col h4 {
  color: #333333;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 18px;
}
.ajd-f-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ajd-f-col ul a {
  display: inline-flex;
  align-items: center;
  color: #666666;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  line-height: 1.3;
}
.ajd-f-col ul a:hover {
  color: #e12454;
}
.ajd-f-col ul a.ajd-f-has-sub::after {
  content: "\25BE";
  font-size: 13px;
  margin-left: 7px;
  line-height: 1;
}

/* --- Footer de site sur la page dashboard : pleine largeur + bien organisé --- */
/* (ce CSS n'est chargé que sur les pages dashboard/login) */
#askmed-footer {
  background: #fafafa;
  border-top: 0;
  padding: 0;
}
#askmed-footer .askmed-footer-inner {
  max-width: none;
  padding: 0 80px;
}
#askmed-footer .askmed-footer-badges {
  justify-content: center;
  gap: clamp(28px, 6vw, 80px);
  padding: 40px 0 0;
}
#askmed-footer .askmed-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 32px;
  margin-top: 30px;
  padding: 22px 0 28px;
  border-top: 1px solid #d9d9d9;
}
#askmed-footer .askmed-footer-copy {
  margin-top: 0;
}
#askmed-footer .askmed-footer-copy p {
  margin: 0 0 2px;
  font-size: 14px;
  color: #333333;
}
#askmed-footer .askmed-footer-links {
  margin-top: 0;
  gap: 22px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1023px) {
  .ajd-nav-link-desk {
    display: none;
  }
  .ajd-nav-burger {
    display: inline-flex;
  }
  .ajd-layout {
    grid-template-columns: 1fr;
    padding: 24px 20px 48px;
    gap: 16px;
  }
  .ajd-sidebar-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 210;
    width: min(320px, 86vw);
    padding: 18px 16px 24px;
    background: var(--ajd-white);
    box-shadow: -12px 0 40px rgba(16, 24, 40, 0.18);
    transform: translateX(105%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.ajd-sidebar-open .ajd-sidebar-drawer {
    transform: translateX(0);
  }
  .ajd-sidebar-drawer .ajd-sidebar {
    order: 0;
  }
  .ajd-sidebar-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
  }
  .ajd-drawer-logo img {
    height: 44px;
    width: auto;
    display: block;
    max-width: 200px;
    object-fit: contain;
  }
  .ajd-sidebar-close {
    flex: none;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ajd-border);
    border-radius: 50%;
    background: var(--ajd-white);
    color: var(--ajd-text);
    font-size: 24px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
  }
  .ajd-sidebar-close:hover {
    color: var(--ajd-red);
  }
  .ajd-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(16, 24, 40, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }
  body.ajd-sidebar-open .ajd-sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }
  .ajd-sidebar-drawer .ajd-sidebar-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
  }
  .ajd-sidebar-drawer .ajd-sidebar-link {
    border-radius: var(--ajd-radius-sm);
    padding: 12px 14px;
    font-size: 14.5px;
  }
  .ajd-sidebar-drawer .ajd-sidebar-link-logout {
    margin-top: 10px;
    border-top: 1px solid var(--ajd-border);
  }
  .ajd-quick-links {
    grid-template-columns: repeat(2, 1fr);
  }
  .ajd-footer-inner {
    padding: 0 40px;
  }
  .ajd-f-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .ajd-layout {
    padding: 20px 16px 40px;
  }
  .ajd-card {
    padding: 22px 18px;
  }
  .ajd-steps,
  .ajd-testimonials {
    grid-template-columns: 1fr;
  }
  .ajd-check-list {
    grid-template-columns: 1fr;
  }
  .ajd-quick-links {
    grid-template-columns: 1fr;
  }
  .ajd-orders-row {
    grid-template-columns: 1fr 1fr;
  }
  .ajd-orders-head {
    display: none;
  }
  .ajd-orders-row > span:nth-child(3),
  .ajd-orders-row > span:nth-child(4) {
    font-size: 12.5px;
  }
  .ajd-header-inner {
    padding: 8px 16px;
  }
  .ajd-nav {
    gap: 14px;
  }
  .ajd-footer-inner {
    padding: 0 30px;
  }
  .ajd-f-nav {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 0;
  }
  #askmed-footer .askmed-footer-inner {
    padding: 0 30px;
  }
  #askmed-footer .askmed-footer-badges {
    padding-top: 30px;
  }
  #askmed-footer .askmed-footer-meta {
    margin-top: 24px;
    padding: 20px 0 24px;
  }
  .ajd-auth-card {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .ajd-header-inner {
    padding: 6px 14px;
    gap: 8px;
  }
  .ajd-logo-img {
    height: 52px;
    max-width: 180px;
  }
  .ajd-nav {
    gap: 12px;
  }
  .ajd-nav-link {
    font-size: 13.5px;
  }
  .ajd-ask-nav-btn {
    padding: 6px 12px;
    font-size: 12.5px;
  }
}

/* ------------------------------------------------------------------ */
/* Page de connexion / inscription (style JustAnswer)                  */
/* ------------------------------------------------------------------ */
.ajd-login-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 64px;
  background:
    radial-gradient(1100px 500px at 75% -10%, rgba(225, 36, 84, 0.06), transparent 60%),
    radial-gradient(900px 500px at 8% 110%, rgba(225, 36, 84, 0.05), transparent 60%),
    var(--ajd-bg);
}

.ajd-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius);
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--ajd-shadow-lg);
}

.ajd-gate-card {
  width: 100%;
  max-width: 400px;
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius);
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--ajd-shadow-lg);
}
.ajd-dash-standalone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 64px;
}
.ajd-gate-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  color: var(--ajd-text);
}
.ajd-gate-text {
  color: var(--ajd-text-soft);
  margin-bottom: 20px;
}

.ajd-login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.ajd-login-logo:hover {
  text-decoration: none;
}
.ajd-login-logo .ajd-logo-img {
  height: 80px;
}

.ajd-login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.ajd-login-sub {
  color: var(--ajd-text-soft);
  font-size: 14px;
  margin-bottom: 22px;
}

.ajd-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.ajd-password-wrap {
  position: relative;
  display: block;
}
.ajd-password-wrap input {
  width: 100%;
  padding-right: 44px;
}
.ajd-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ajd-text-faint);
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.ajd-password-toggle:hover {
  color: var(--ajd-primary);
}
.ajd-password-toggle .ajd-eye-off {
  display: none;
}
.ajd-password-toggle.is-visible .ajd-eye {
  display: none;
}
.ajd-password-toggle.is-visible .ajd-eye-off {
  display: inline-block;
}

.ajd-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ajd-text-soft);
  cursor: pointer;
  width: fit-content;
}
.ajd-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--ajd-primary);
  margin: 0;
}

.ajd-login-forgot {
  text-align: center;
  margin-top: -4px;
  font-size: 14px;
}

.ajd-login-alt {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--ajd-border);
  text-align: center;
  font-size: 14px;
  color: var(--ajd-text-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ajd-login-alt a {
  color: var(--ajd-primary);
  font-weight: 600;
}

.ajd-login-redirect {
  text-align: center;
  padding: 60px 20px;
  color: var(--ajd-text-soft);
}

/* Règles du mot de passe + consentement (inscription) */
.ajd-password-rules {
  list-style: none;
  background: var(--ajd-bg);
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  padding: 10px 12px 10px 34px;
  margin-top: -6px;
  font-size: 12.5px;
  color: var(--ajd-text-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ajd-password-rules li {
  position: relative;
}
.ajd-password-rules li::before {
  content: "•";
  position: absolute;
  left: -14px;
  color: var(--ajd-primary);
  font-weight: 700;
}
.ajd-consent {
  font-size: 12px;
  color: var(--ajd-text-faint);
  line-height: 1.5;
  text-align: center;
}
.ajd-consent a {
  color: var(--ajd-primary);
  text-decoration: underline;
}

/* Page de connexion rendue hors du thème */
body.ajd-body-login {
  margin: 0;
}

/* ---------- Conversations ---------- */
.ajd-demo-note {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
  border-radius: var(--ajd-radius-sm);
  font-size: 13px;
}
.ajd-conv {
  display: grid;
  grid-template-columns: 280px 1fr;
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius);
  overflow: hidden;
  background: var(--ajd-white);
  min-width: 0;
  max-width: 100%;
}
.ajd-conv-list {
  border-right: 1px solid var(--ajd-border);
  max-height: 370px;
  overflow-y: auto;
  padding: 8px;
}
.ajd-conv-thread {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px;
  border-radius: var(--ajd-radius-sm);
  cursor: pointer;
}
.ajd-conv-thread:hover {
  background: var(--ajd-bg);
}
.ajd-conv-thread.is-active {
  background: var(--ajd-primary-soft);
}
.ajd-avatar-mini {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ajd-primary-light);
  color: var(--ajd-primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.ajd-conv-thread-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ajd-conv-thread-meta strong {
  font-size: 13.5px;
  color: var(--ajd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ajd-conv-thread-meta small {
  font-size: 12px;
  color: var(--ajd-text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ajd-conv-thread-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.ajd-conv-thread-side small {
  font-size: 11.5px;
  color: var(--ajd-text-faint);
}
.ajd-conv-thread-side .ajd-conv-unread {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e62b5d;
  box-shadow: 0 0 0 2px rgba(230, 43, 93, 0.15);
}
.ajd-conv-thread-side .ajd-conv-unread[hidden] {
  display: none;
}
.ajd-conv-main {
  display: flex;
  flex-direction: column;
  max-height: 370px;
  min-width: 0;
  max-width: 100%;
}
.ajd-conv-session {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}
.ajd-conv-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ajd-border);
}
.ajd-conv-session-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ajd-conv-session-head strong {
  font-size: 15px;
  color: var(--ajd-text);
}
.ajd-conv-session-head small {
  font-size: 12.5px;
  color: var(--ajd-text-soft);
}
.ajd-conv-session-head .ajd-conv-session-actions {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.ajd-close-conv-btn {
  white-space: nowrap;
}
.ajd-pill {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.ajd-pill-active {
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
}
.ajd-pill-wait {
  background: #fef0c7;
  color: #b54708;
}
.ajd-pill-closed {
  background: #f2f4f7;
  color: #475467;
}
.ajd-pill-resolved {
  background: #ecfdf3;
  color: #067647;
}
.ajd-conv-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--ajd-bg);
  min-width: 0;
  max-width: 100%;
}
.ajd-cmsg {
  display: flex;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
}
.ajd-cmsg.ajd-cmsg-me {
  justify-content: flex-end;
}
.ajd-cmsg-bubble {
  max-width: 72%;
  min-width: 0;
  padding: 10px 13px;
  border-radius: 14px;
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  color: var(--ajd-text);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}
.ajd-cmsg.ajd-cmsg-me .ajd-cmsg-bubble {
  background: var(--ajd-primary);
  border-color: var(--ajd-primary);
  color: #fff;
}
.ajd-cmsg.ajd-cmsg-system {
  justify-content: center;
}.ajd-cmsg-system-bubble {
  max-width: 86%;
  min-width: 0;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--ajd-primary-soft);
  border: 1px solid transparent;
  color: var(--ajd-text-soft);
  font-size: 12.5px;
  line-height: 1.55;
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
}
/* --- Indicateur de frappe (même animation que le chat IA) --- */
.ajd-cmsg-typing {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
}
.ajd-cmsg-typing .ajd-cmsg-bubble {
  padding: 8px 13px;
  border-radius: 14px;
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
.ajd-typing-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  margin-top: 2px;
  background: var(--ajd-border);
}
.ajd-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: none;
}
.ajd-typing-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ajd-text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.ajd-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
}
.ajd-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa3ad;
  animation: ajd-typing 1.2s infinite ease-in-out;
}
.ajd-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.ajd-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes ajd-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.ajd-online-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ajd-green);
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.18);
}
.ajd-online-dot[hidden] {
  display: none;
}
.ajd-conv-session-head strong {
  display: inline-flex;
  align-items: center;
}
.ajd-conv-session-head .ajd-conv-doctor {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.ajd-doctor-bubble {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
}
.ajd-doctor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--ajd-primary-light);
  border: 2px solid var(--ajd-white);
  box-shadow: var(--ajd-shadow);
}
.ajd-doctor-avatar-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--ajd-primary);
}
.ajd-verified-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ajd-green);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ajd-white);
}
.ajd-verified-badge[hidden] {
  display: none;
}
.ajd-conv-doctor-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ajd-conv-doctor-meta strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ajd-doctor-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ajd-status-card {
  margin: 14px 16px 2px;
  padding: 16px 18px;
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  background: var(--ajd-white);
  box-shadow: var(--ajd-shadow);
}
.ajd-status-card-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.ajd-status-card-text {
  flex: 1;
}
.ajd-status-card-text strong {
  display: block;
  font-size: 15px;
  color: var(--ajd-text);
  margin-bottom: 3px;
}
.ajd-status-card-text p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ajd-text-soft);
  line-height: 1.5;
}
.ajd-status-live {
  margin-top: 6px !important;
  font-size: 12.5px !important;
  font-weight: 600;
  color: var(--ajd-primary-dark) !important;
}
.ajd-status-loader {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 10px;
}
.ajd-status-loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ajd-primary);
  animation: ajd-blink 1.2s infinite ease-in-out;
}
.ajd-status-loader span:nth-child(2) {
  animation-delay: 0.2s;
}
.ajd-status-loader span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes ajd-blink {
  0%, 80%, 100% {
    opacity: 0.25;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}
.ajd-status-timeline {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ajd-status-timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--ajd-bg);
  border: 1px solid var(--ajd-border);
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ajd-text-faint);
}
.ajd-status-step-ic {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  color: var(--ajd-text-faint);
}
.ajd-status-timeline li.is-done {
  color: var(--ajd-text-soft);
}
.ajd-status-timeline li.is-done .ajd-status-step-ic {
  background: var(--ajd-green);
  border-color: var(--ajd-green);
  color: #fff;
}
.ajd-status-timeline li.is-current {
  color: var(--ajd-text);
  border-color: var(--ajd-primary);
  box-shadow: 0 0 0 2px var(--ajd-primary-soft);
}
.ajd-status-timeline li.is-current .ajd-status-step-ic {
  background: var(--ajd-primary);
  border-color: var(--ajd-primary);
  color: #fff;
  animation: ajd-pulse 1.6s infinite ease-in-out;
}
@keyframes ajd-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(225, 36, 84, 0.35);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(225, 36, 84, 0);
  }
}
.ajd-status-card.is-joined {
  border-color: var(--ajd-green);
}
.ajd-status-card.is-joined .ajd-status-live {
  color: var(--ajd-green) !important;
}
.ajd-status-card.is-hidden {
  display: none;
}
@media (max-width: 720px) {
  .ajd-status-timeline {
    grid-template-columns: 1fr 1fr;
  }
}
.ajd-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  max-width: 340px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--ajd-navy);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: var(--ajd-shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.ajd-toast.is-show {
  opacity: 1;
  transform: translateY(0);
}
.ajd-ask-submit.is-loading {
  opacity: 0.75;
  cursor: progress;
  pointer-events: none;
}
.ajd-ask-submit.is-loading .ajd-ask-submit-ic {
  display: none;
}
.ajd-ask-submit .ajd-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ajd-spin 0.7s linear infinite;
}
.ajd-ask-submit.is-loading .ajd-spinner {
  display: inline-block;
}
@keyframes ajd-spin {
  to {
    transform: rotate(360deg);
  }
}
.ajd-cmsg-time {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.7;
}
.ajd-conv-composer {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--ajd-border);
  background: var(--ajd-white);
  position: relative;
}
.ajd-conv-composer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ajd-conv-composer-row input[data-ajd-conv-input] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  color: var(--ajd-text);
}
.ajd-conv-composer-row input[data-ajd-conv-input]:focus {
  border-color: var(--ajd-primary);
}
.ajd-composer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--ajd-border);
  border-radius: var(--ajd-radius-sm);
  background: var(--ajd-white);
  color: var(--ajd-text-soft);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.ajd-composer-btn:hover {
  border-color: var(--ajd-primary);
  background: var(--ajd-primary-soft);
}
.ajd-composer-btn.is-open {
  border-color: var(--ajd-primary);
  background: var(--ajd-primary-soft);
}
.ajd-composer-btn-file {
  padding: 0;
  cursor: pointer;
}
.ajd-composer-btn-file input {
  display: none;
}
.ajd-emoji-picker {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(100% - 4px);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  max-height: 180px;
  overflow-y: auto;
  padding: 8px;
  background: var(--ajd-white);
  border: 1px solid var(--ajd-border);
  border-radius: 12px;
  box-shadow: var(--ajd-shadow-lg);
}
.ajd-emoji-picker[hidden] {
  display: none;
}
.ajd-emoji-btn {
  border: none;
  background: none;
  font-size: 19px;
  line-height: 1;
  padding: 5px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.ajd-emoji-btn:hover {
  background: var(--ajd-primary-soft);
  transform: scale(1.12);
}
.ajd-attach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 8px;
}
.ajd-attach-chips[hidden] {
  display: none;
}
.ajd-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px 4px 4px;
  border: 1px solid var(--ajd-border);
  border-radius: 9px;
  background: var(--ajd-bg);
  font-size: 12px;
  color: var(--ajd-text-soft);
  max-width: 260px;
}
.ajd-attach-chip img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
}
.ajd-attach-chip-ic {
  font-size: 16px;
}
.ajd-attach-chip-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ajd-attach-chip-rm {
  flex: none;
  border: none;
  background: none;
  color: var(--ajd-text-faint);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}
.ajd-attach-chip-rm:hover {
  color: var(--ajd-red);
}
.ajd-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 2px;
}
.ajd-attach-img {
  display: inline-block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ajd-border);
  max-width: 100%;
}
.ajd-attach-img img {
  display: block;
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 200px;
  object-fit: cover;
}
.ajd-attach-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--ajd-border);
  border-radius: 9px;
  background: var(--ajd-white);
  color: var(--ajd-primary-dark);
  font-size: 12.5px;
  text-decoration: none;
  max-width: 230px;
  min-width: 0;
}
.ajd-attach-file:hover {
  border-color: var(--ajd-primary);
  background: var(--ajd-primary-soft);
}
.ajd-attach-file-ic {
  font-size: 15px;
}
.ajd-attach-file span:not(.ajd-attach-file-ic) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ajd-attach-file small {
  color: var(--ajd-text-faint);
  font-size: 11px;
  flex: none;
}
.ajd-cmsg-text {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
.ajd-conv-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  color: var(--ajd-text-soft);
  text-align: center;
}
.ajd-empty-sm {
  padding: 16px;
  color: var(--ajd-text-soft);
  font-size: 14px;
}
@media (max-width: 1023px) {
  .ajd-conv {
    grid-template-columns: 1fr;
  }
  .ajd-conv-list {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-right: none;
    border-bottom: 1px solid var(--ajd-border);
    max-height: none;
    padding: 8px;
  }
  .ajd-conv-thread {
    flex: 0 0 auto;
    width: auto;
    min-width: 190px;
    max-width: 240px;
    border: 1px solid var(--ajd-border);
    border-radius: var(--ajd-radius-sm);
    background: var(--ajd-white);
  }
  .ajd-conv-thread.is-active {
    border-color: var(--ajd-primary);
  }
  .ajd-conv-main {
    max-height: none;
    height: calc(100vh - 250px);
    min-height: 420px;
  }
}

@media (max-width: 767px) {
  .ajd-conv-thread {
    min-width: 160px;
    max-width: 200px;
  }
  .ajd-conv-thread-side {
    display: flex;
  }
  .ajd-conv-thread-side small {
    display: none;
  }
  .ajd-conv-main {
    height: calc(100vh - 220px);
    min-height: 380px;
  }
  .ajd-conv-messages {
    padding: 12px;
  }
  .ajd-status-timeline {
    grid-template-columns: repeat(2, 1fr);
  }
  .ajd-status-card-main {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .ajd-conv-thread {
    min-width: 140px;
    max-width: 180px;
  }
  .ajd-conv-main {
    height: calc(100vh - 200px);
    min-height: 340px;
  }
  .ajd-cmsg-bubble {
    max-width: 86%;
  }
  .ajd-conv-composer {
    padding: 8px 10px;
  }
  .ajd-emoji-picker {
    grid-template-columns: repeat(6, 1fr);
  }
  .ajd-conv-composer-row input[data-ajd-conv-input] {
    font-size: 16px;
  }
  .ajd-conv-session-head {
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .ajd-close-conv-btn {
    padding: 6px 10px;
    font-size: 12.5px;
  }
  .ajd-status-card {
    margin: 10px 10px 2px;
    padding: 12px 14px;
  }
}

/* ------------------------------------------------------------------ */
/* Carte Conversations : en-tête + bouton "Ask a new medical question"  */
/* ------------------------------------------------------------------ */
.ajd-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.ajd-card-head .ajd-page-sub {
  margin-bottom: 0;
}
.ajd-ask-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.ajd-ask-trigger .ajd-ask-svg {
  flex: 0 0 auto;
}
.ajd-ask-nav-btn {
  padding: 8px 16px;
  font-size: 13.5px;
}
.ajd-quick-link[type="button"] {
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: var(--ajd-text);
  cursor: pointer;
}

/* Chips spécialités dans une conversation */
.ajd-conv-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.ajd-conv-spec {
  display: inline-flex;
  align-items: center;
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
  border: 1px solid rgba(225, 36, 84, 0.18);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ------------------------------------------------------------------ */
/* Fenêtre modale "Ask your medical question"                          */
/* ------------------------------------------------------------------ */
.ajd-ask-overlay {
  --ajd-ask-primary: #E22454;
  --ajd-ask-hover: #C91F4B;
  --ajd-ask-bg: #FFFFFF;
  --ajd-ask-surface: #F9FAFB;
  --ajd-ask-border: #E5E7EB;
  --ajd-ask-text: #111827;
  --ajd-ask-sub: #4B5563;
  --ajd-ask-faint: #6B7280;
  --ajd-ask-error: #EF4444;

  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 48px 16px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 250ms ease;
}
.ajd-ask-overlay[hidden] {
  display: none;
}
.ajd-ask-overlay.is-open {
  opacity: 1;
}
.ajd-ask-overlay.is-closing {
  opacity: 0;
}

.ajd-ask {
  position: relative;
  width: 700px;
  max-width: 100%;
  margin: auto 0;
  background: var(--ajd-ask-bg);
  border-radius: 18px;
  padding: 32px;
  box-shadow:
    0 24px 64px rgba(16, 24, 40, 0.22),
    0 8px 24px rgba(16, 24, 40, 0.1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ajd-ask-text);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 250ms ease, transform 250ms ease;
}
.ajd-ask-overlay.is-open .ajd-ask {
  opacity: 1;
  transform: scale(1);
}

/* Bouton fermer */
.ajd-ask-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: #6B7280;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.ajd-ask-close:hover {
  color: #E22454;
  background: rgba(226, 36, 84, 0.06);
  transform: rotate(10deg);
}
.ajd-ask-close:focus-visible {
  outline: 2px solid #E22454;
  outline-offset: 2px;
}

/* Titre + description */
.ajd-ask-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #E22454;
  margin: 0 0 10px;
  line-height: 1.15;
}
.ajd-ask-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #4B5563;
  margin: 0 0 22px;
}

/* Textarea */
.ajd-ask-form {
  margin: 0;
}
.ajd-ask-textarea {
  display: block;
  width: 100%;
  min-height: 190px;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 18px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: #111827;
  background: #fff;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ajd-ask-textarea::placeholder {
  color: #9CA3AF;
}
.ajd-ask-textarea:focus {
  outline: none;
  border-color: #E22454;
  box-shadow: 0 0 0 4px rgba(226, 36, 84, 0.12);
}

/* Messages d'erreur */
.ajd-ask-error {
  display: none;
  margin: 8px 0 0;
  font-size: 14px;
  color: #EF4444;
  font-weight: 500;
}
.ajd-ask-error.is-visible {
  display: block;
}
.ajd-ask-specs.has-error {
  padding: 14px;
  margin: 0 -14px;
  border-radius: 12px;
}

/* Info mention médecin */
.ajd-ask-info {
  margin: 12px 0 0;
  font-size: 14px;
  color: #6B7280;
}
.ajd-ask-info code {
  font-family: inherit;
  font-weight: 600;
  color: #111827;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  padding: 1px 6px;
  border-radius: 6px;
}

/* Section spécialités */
.ajd-ask-specs {
  margin-top: 30px;
}
.ajd-ask-specs-title {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 14px;
}
.ajd-ask-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Badges spécialités */
.ajd-ask-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  color: #374151;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease,
    transform 200ms ease, box-shadow 200ms ease;
}
.ajd-ask-badge .ajd-ask-svg {
  flex: 0 0 auto;
  color: #9CA3AF;
  transition: color 200ms ease;
}
.ajd-ask-badge:hover {
  border-color: #d1d5db;
  background: #fff;
  transform: translateY(-1px);
}
.ajd-ask-badge.is-selected {
  background: #E22454;
  border-color: #E22454;
  color: #fff;
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(226, 36, 84, 0.28);
}
.ajd-ask-badge.is-selected .ajd-ask-svg {
  color: #fff;
}
.ajd-ask-badge:focus-visible {
  outline: 2px solid #E22454;
  outline-offset: 2px;
}

/* Bouton principal */
.ajd-ask-actions {
  margin-top: 30px;
  text-align: center;
}
.ajd-ask-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 230px;
  height: 54px;
  border: none;
  border-radius: 12px;
  background: #E22454;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(226, 36, 84, 0.3);
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease, opacity 200ms ease;
}
.ajd-ask-submit:hover:not(:disabled) {
  background: #C91F4B;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(201, 31, 75, 0.34);
}
.ajd-ask-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.ajd-ask-submit:focus-visible {
  outline: 2px solid #E22454;
  outline-offset: 3px;
}

/* Verrouillage du scroll quand la popup est ouverte */
.ajd-modal-lock {
  overflow: hidden;
}

/* Confirmation "End this discussion?" */
.ajd-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 200ms ease;
}
.ajd-confirm-overlay.is-closing {
  opacity: 0;
}
.ajd-confirm {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(16, 24, 40, 0.22);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #111827;
  opacity: 1;
}
.ajd-confirm h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #111827;
}
.ajd-confirm p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}
.ajd-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ------------------------------------------------------------------ */
/* Popup "While you wait for your doctor" — premium redesign           */
/* ------------------------------------------------------------------ */
.ajd-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
}
.ajd-profile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ajd-profile-overlay.is-closing {
  opacity: 0;
}
.ajd-profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, 0.40);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ajd-profile {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(10, 37, 64, 0.18),
    0 12px 32px rgba(10, 37, 64, 0.10),
    0 2px 8px rgba(10, 37, 64, 0.06);
  font-family: var(--ajd-font);
  color: #0A2540;
  pointer-events: auto;
  transform: scale(0.97);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.ajd-profile-overlay.is-open .ajd-profile {
  transform: scale(1);
}
.ajd-profile-overlay.is-closing .ajd-profile {
  transform: scale(0.97);
}
.ajd-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #E5E7EB;
  flex: 0 0 auto;
}
.ajd-profile-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  color: #0A2540;
  letter-spacing: -0.01em;
}
.ajd-profile-brand-icon {
  color: #E12454;
}
.ajd-profile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  border-radius: 10px;
  color: #6B7280;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.ajd-profile-close:hover {
  color: #0A2540;
  background: #F9FAFB;
  border-color: #D1D5DB;
}
.ajd-profile-close:focus-visible {
  outline: 2px solid #E12454;
  outline-offset: 2px;
}
.ajd-profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, #FFF5F8 0%, #FDEEF2 50%, #FEF2F6 100%);
  border-bottom: 1px solid #F3E0E6;
  flex: 0 0 auto;
}
.ajd-profile-doc-avatar-wrap {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(225, 36, 84, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2.5px solid #ffffff;
  outline: 2px solid rgba(225, 36, 84, 0.15);
}
.ajd-profile-doc-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.ajd-profile-doc-avatar-icon {
  color: #E12454;
}
.ajd-profile-hero-text {
  flex: 1 1 auto;
  min-width: 0;
}
.ajd-profile-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0A2540;
  line-height: 1.3;
}
.ajd-profile-sub {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: #E12454;
  line-height: 1.4;
}
.ajd-profile-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6B7280;
}
.ajd-profile-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 28px 20px;
  -webkit-overflow-scrolling: touch;
}
.ajd-profile-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ajd-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.ajd-profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ajd-profile-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.01em;
}
.ajd-profile-input-wrap {
  position: relative;
  display: block;
}
.ajd-profile-input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9CA3AF;
  pointer-events: none;
  transition: color 0.15s ease;
}
.ajd-profile-input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid #E5E7EB;
  border-radius: 11px;
  font-size: 14.5px;
  font-family: inherit;
  background: #ffffff;
  color: #0A2540;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ajd-profile-input::placeholder {
  color: #9CA3AF;
}
.ajd-profile-input:focus {
  outline: none;
}
.ajd-profile-input-wrap:focus-within .ajd-profile-input {
  border-color: #E12454;
  box-shadow: 0 0 0 3px rgba(225, 36, 84, 0.08);
}
.ajd-profile-input-wrap:focus-within .ajd-profile-input-icon,
.ajd-profile-input-wrap:focus-within .ajd-profile-select-caret {
  color: #E12454;
}
.ajd-profile-field.has-error .ajd-profile-input {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.ajd-profile-error {
  font-size: 12px;
  line-height: 1.4;
  color: #EF4444;
}
.ajd-profile-field select.ajd-profile-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  color: #0A2540;
}
.ajd-profile-field select.ajd-profile-input option[value=""] {
  color: #9CA3AF;
}
.ajd-profile-select-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #9CA3AF;
  pointer-events: none;
}
.ajd-profile-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(225, 36, 84, 0.03);
  border: 1px solid rgba(225, 36, 84, 0.10);
  border-radius: 12px;
}
.ajd-profile-privacy-icon {
  flex: 0 0 auto;
  color: #E12454;
  margin-top: 1px;
}
.ajd-profile-privacy-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #6B7280;
}
.ajd-profile-privacy-sub {
  font-size: 11.5px;
  color: #9CA3AF;
}
.ajd-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ajd-profile .ajd-btn-ghost {
  background: #ffffff;
  color: #374151;
  border: 1px solid #E5E7EB;
  border-radius: 11px;
  font-weight: 500;
}
.ajd-profile .ajd-btn-ghost:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: #0A2540;
  text-decoration: none;
}
.ajd-profile-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 11px;
  box-shadow: 0 1px 3px rgba(225, 36, 84, 0.20);
}
.ajd-profile-submit-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Tablet */
@media (max-width: 1023px) {
  .ajd-profile {
    max-width: 90vw;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .ajd-profile-overlay {
    padding: 12px;
    align-items: flex-end;
  }
  .ajd-profile {
    max-width: 100%;
    border-radius: 20px 20px 16px 16px;
    max-height: 90vh;
  }
  .ajd-profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px 20px;
    gap: 14px;
  }
  .ajd-profile-doc-avatar-wrap {
    width: 60px;
    height: 60px;
  }
  .ajd-profile-title {
    font-size: 18px;
  }
  .ajd-profile-body {
    padding: 20px 18px 16px;
  }
  .ajd-profile-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ajd-profile-actions {
    flex-direction: column-reverse;
    gap: 8px;
    padding-bottom: env(safe-area-inset-bottom, 8px);
  }
  .ajd-profile-actions .ajd-btn {
    width: 100%;
    text-align: center;
    padding: 13px 16px;
  }
  .ajd-profile-submit {
    justify-content: center;
  }
}

/* Small mobile */
@media (max-width: 380px) {
  .ajd-profile-overlay {
    padding: 8px;
  }
  .ajd-profile {
    border-radius: 16px;
  }
  .ajd-profile-header {
    padding: 12px 16px;
  }
  .ajd-profile-hero {
    padding: 20px 16px 18px;
  }
  .ajd-profile-body {
    padding: 16px 14px 12px;
  }
}

/* ------------------------------------------------------------------ */
/* Responsive popup "Ask your medical question"                        */
/* ------------------------------------------------------------------ */
@media (max-width: 1023px) {
  .ajd-ask {
    width: 90%;
  }
  .ajd-ask-specs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .ajd-ask-overlay {
    padding: 20px 12px;
    align-items: center;
  }
  .ajd-ask {
    width: 95%;
    padding: 22px;
  }
  .ajd-ask-title {
    font-size: 26px;
  }
  .ajd-ask-desc {
    font-size: 15px;
  }
  .ajd-ask-textarea {
    min-height: 150px;
    font-size: 15px;
  }
  .ajd-ask-specs-title {
    font-size: 17px;
  }
  .ajd-ask-specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ajd-ask-badge {
    padding: 11px 12px;
    font-size: 14px;
  }
  .ajd-ask-submit {
    width: 100%;
  }
}

/* ------------------------------------------------------------------ */
/* Modale de confirmation (annulation d'abonnement)                    */
/* Autonome : définit ses propres variables car elle est injectée      */
/* dans <body>, hors du conteneur .ajd du thème.                       */
/* ------------------------------------------------------------------ */
.ajd-sub-confirm-overlay {
  --ajd-primary: #E12454;
  --ajd-primary-dark: #c01c47;
  --ajd-primary-soft: rgba(225, 36, 84, 0.08);
  --ajd-text: #101828;
  --ajd-text-soft: #475467;
  --ajd-text-faint: #98a2b3;
  --ajd-border: #e6e8ee;
  --ajd-radius-sm: 10px;
  --ajd-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 250ms ease;
}
.ajd-sub-confirm-overlay[hidden] {
  display: none;
}
.ajd-sub-confirm-overlay.is-open {
  opacity: 1;
}
.ajd-sub-confirm-overlay.is-closing {
  opacity: 0;
}

.ajd-sub-confirm {
  position: relative;
  width: 440px;
  max-width: 100%;
  background: #ffffff;
  border-radius: 18px;
  padding: 30px 28px 26px;
  box-shadow:
    0 24px 64px rgba(16, 24, 40, 0.22),
    0 8px 24px rgba(16, 24, 40, 0.1);
  font-family: var(--ajd-font);
  color: var(--ajd-text);
  text-align: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 250ms ease, transform 250ms ease;
}
.ajd-sub-confirm-overlay.is-open .ajd-sub-confirm {
  opacity: 1;
  transform: scale(1);
}

.ajd-sub-confirm h3,
.ajd-sub-confirm p,
.ajd-sub-confirm button {
  font-family: inherit;
}

.ajd-sub-confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary);
  font-size: 26px;
  line-height: 1;
  margin-bottom: 14px;
}
.ajd-sub-confirm-title {
  margin: 0 0 8px !important;
  padding: 0;
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ajd-text);
  line-height: 1.3;
  font-family: var(--ajd-font);
}
.ajd-sub-confirm-text {
  margin: 0 0 24px !important;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ajd-text-soft);
  font-family: var(--ajd-font);
}
.ajd-sub-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.ajd-sub-confirm-actions .ajd-btn {
  min-width: 150px;
  text-align: center;
}
.ajd-sub-confirm-actions .ajd-btn-primary {
  background: var(--ajd-primary);
  color: #ffffff;
  border: none;
}
.ajd-sub-confirm-actions .ajd-btn-primary:hover {
  background: var(--ajd-primary-dark);
  color: #ffffff;
}
.ajd-sub-confirm-actions .ajd-btn-ghost {
  background: #ffffff;
  color: var(--ajd-primary-dark);
  border: 1px solid #d0d5dd;
}
.ajd-sub-confirm-actions .ajd-btn-ghost:hover {
  background: var(--ajd-primary-soft);
  color: var(--ajd-primary-dark);
}
.ajd-sub-confirm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--ajd-text-faint);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.ajd-sub-confirm-close:hover {
  color: var(--ajd-primary);
  background: var(--ajd-primary-soft);
}

@media (max-width: 520px) {
  .ajd-sub-confirm {
    width: 100%;
    padding: 26px 18px 22px;
  }
  .ajd-sub-confirm-actions .ajd-btn {
    width: 100%;
  }
}

/* --- Avis / Ã©valuation des mÃ©decins --- */
.ajd-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  padding: 16px;
}
.ajd-review-overlay[hidden] { display: none; }
.ajd-review-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  padding: 26px 26px 22px;
  max-height: 90vh;
  overflow-y: auto;
}
.ajd-review-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}
.ajd-review-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}
.ajd-review-sub {
  margin: 0 0 18px;
  color: #64748b;
  font-size: 14px;
}
.ajd-review-criteria {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.ajd-review-crit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ajd-review-crit-label {
  font-size: 14px;
  color: #334155;
  font-weight: 600;
}
.ajd-review-stars {
  display: inline-flex;
  gap: 4px;
}
.ajd-review-star {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #d8dee9;
  padding: 2px;
  transition: color 0.12s ease, transform 0.12s ease;
}
.ajd-review-star:hover { transform: scale(1.12); }
.ajd-review-star.is-filled { color: #e62b5d; }
.ajd-review-comment-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}
.ajd-review-comment {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.ajd-review-comment:focus {
  outline: none;
  border-color: #e62b5d;
  box-shadow: 0 0 0 3px rgba(230, 43, 93, 0.12);
}
.ajd-review-error {
  color: #dc2626;
  font-size: 13px;
  margin: 10px 0 0;
}
.ajd-review-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.ajd-review-skip {
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
}
.ajd-review-submit {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #e62b5d, #c71f4b);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(199, 31, 75, 0.25);
}
.ajd-review-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.ajd-stars-static {
  display: inline-flex;
  gap: 2px;
}
.ajd-star {
  color: #d8dee9;
  font-size: 16px;
  line-height: 1;
}
.ajd-star.is-filled { color: #e62b5d; }
.ajd-reviews-view { padding: 8px 4px 40px; }
.ajd-reviews-section { margin-bottom: 28px; }
.ajd-reviews-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px;
}
.ajd-reviews-empty { color: #64748b; font-size: 14px; }
.ajd-reviews-pending { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ajd-review-pending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 12px 14px;
}
.ajd-review-pending-info { display: flex; flex-direction: column; }
.ajd-review-pending-doc { font-weight: 600; color: #0f172a; }
.ajd-review-pending-date { font-size: 12px; color: #94a3b8; }
.ajd-review-rate-btn,
.ajd-review-edit-btn {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #e62b5d, #c71f4b);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
}
.ajd-reviews-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ajd-review-item {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 16px 18px;
}
.ajd-review-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ajd-review-item-doc { font-weight: 700; color: #0f172a; }
.ajd-review-item-date { font-size: 12px; color: #94a3b8; }
.ajd-review-item-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ajd-review-item-score { font-weight: 700; color: #0f172a; }
.ajd-review-item-crit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-top: 1px solid #f1f5f9;
}
.ajd-review-item-crit-label { font-size: 13px; color: #475569; }
.ajd-review-item-comment {
  margin: 10px 0 0;
  color: #334155;
  font-size: 14px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
}
.ajd-review-edit-btn { margin-top: 12px; }
.ajd-avatar-mini { overflow: hidden; }
.ajd-avatar-mini-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.ajd-stars-yellow .ajd-star { font-size: 14px; }
.ajd-stars-yellow .ajd-star.is-filled { color: #fbbf24; }
.ajd-doctor-sub { display: block; }
.ajd-doctor-sub .ajd-stars-yellow { display: inline-flex; gap: 2px; align-items: center; }

/* Profile popup fixes v2 */
.ajd-profile-logo {
  height: 24px;
  width: auto;
  display: block;
  object-fit: contain;
}
.ajd-profile-doc-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #E12454;
  background: linear-gradient(135deg, #FFF5F8 0%, #FDEEF2 100%);
}
.ajd-profile-submit {
  background: linear-gradient(135deg, #E12454 0%, #c71f4b 100%) !important;
  color: #fff !important;
  border: none !important;
  padding: 12px 24px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(225, 36, 84, 0.35) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.ajd-profile-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(225, 36, 84, 0.45) !important;
  background: linear-gradient(135deg, #c71f4b 0%, #a8183d 100%) !important;
}
.ajd-profile-submit:disabled {
  opacity: 0.6;
  transform: none;
  box-shadow: 0 1px 3px rgba(225, 36, 84, 0.15) !important;
}
.ajd-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding: 16px 28px;
  border-top: 1px solid #F3E0E6;
  background: #FFFDFE;
}
/* Profile popup: hide empty avatar wrap */
.ajd-profile-doc-avatar-wrap:empty {
  display: none !important;
}
/* Profile popup: centered hero without avatar */
.ajd-profile-hero-centered {
  justify-content: center;
  text-align: center;
}
.ajd-profile-hero-centered .ajd-profile-hero-text {
  max-width: 420px;
}