:root {
  --rd-medit-bg: #d8effc;
  --rd-medit-bg-2: #c7e7f7;
  --rd-medit-bg-3: #b8def2;
  --rd-medit-card: rgba(229, 246, 255, 0.92);
  --rd-medit-card-strong: rgba(213, 239, 252, 0.96);
  --rd-medit-text: #0f2436;
  --rd-medit-soft: #263f53;
  --rd-medit-blue-button: #2f7fa8;
  --rd-medit-blue-button-hover: #246a94;
}

html[data-rd-effective-theme="dark"],
body[data-rd-effective-theme="dark"],
html[data-theme="dark"],
body[data-theme="dark"],
html.dark,
body.dark,
html.rd-theme-dark,
body.rd-theme-dark,
html.theme-dark,
body.theme-dark {
  --rd-medit-bg: #07111f;
  --rd-medit-bg-2: #0b1728;
  --rd-medit-bg-3: #10243a;
  --rd-medit-card: rgba(10, 24, 42, 0.88);
  --rd-medit-card-strong: rgba(16, 36, 58, 0.94);
  --rd-medit-text: #f8fafc;
  --rd-medit-soft: #e5edf7;
  --rd-medit-blue-button: #1f5f86;
  --rd-medit-blue-button-hover: #174966;
}

html[data-rd-effective-theme="light"],
body[data-rd-effective-theme="light"],
html[data-theme="light"],
body[data-theme="light"],
html.light,
body.light,
html.rd-theme-light,
body.rd-theme-light,
html.theme-light,
body.theme-light {
  --rd-medit-bg: #d8effc;
  --rd-medit-bg-2: #c7e7f7;
  --rd-medit-bg-3: #b8def2;
  --rd-medit-card: rgba(229, 246, 255, 0.92);
  --rd-medit-card-strong: rgba(213, 239, 252, 0.96);
  --rd-medit-text: #0f2436;
  --rd-medit-soft: #263f53;
  --rd-medit-blue-button: #2f7fa8;
  --rd-medit-blue-button-hover: #246a94;
}

.rd-button,
.rd-share-button,
button,
a.rd-button,
a.rd-share-button,
.rd-site-menu-root a,
.rd-site-menu-root button {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.rd-site-menu-root .rd-site-menu-panel,
.rd-site-menu-root .rd-site-menu-panel *,
.rd-site-menu-root .rd-site-menu-title strong,
.rd-site-menu-root .rd-site-menu-title span,
.rd-site-menu-root .rd-site-help-inline-card h3,
.rd-site-menu-root .rd-site-help-inline-card p {
  -webkit-text-fill-color: currentColor;
}

/* RD_STABLE_MENU_READABILITY_PATCH START */
/* Menu premium lisible sur fonds clairs et pages méditation */

#rd-site-menu-root,
.rd-site-menu-root {
  z-index: 999999 !important;
  color: #123047 !important;
  -webkit-text-fill-color: initial !important;
}

#rd-site-menu-root *,
.rd-site-menu-root * {
  box-sizing: border-box !important;
}

/* Texte des liens du menu : sombre en mode clair */
#rd-site-menu-root a,
#rd-site-menu-root a:link,
#rd-site-menu-root a:visited,
#rd-site-menu-root button,
#rd-site-menu-root [role="button"],
.rd-site-menu-root a,
.rd-site-menu-root a:link,
.rd-site-menu-root a:visited,
.rd-site-menu-root button,
.rd-site-menu-root [role="button"] {
  color: #123047 !important;
  -webkit-text-fill-color: #123047 !important;
  text-shadow: none !important;
  font-weight: 850 !important;
  opacity: 1 !important;
}

#rd-site-menu-root a *,
#rd-site-menu-root button *,
.rd-site-menu-root a *,
.rd-site-menu-root button * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  opacity: 1 !important;
}

/* Fond plus lisible du panneau, style proche accueil */
#rd-site-menu-root nav,
#rd-site-menu-root aside,
#rd-site-menu-root [role="dialog"],
#rd-site-menu-root [class*="panel"],
#rd-site-menu-root [class*="drawer"],
.rd-site-menu-root nav,
.rd-site-menu-root aside,
.rd-site-menu-root [role="dialog"],
.rd-site-menu-root [class*="panel"],
.rd-site-menu-root [class*="drawer"] {
  background: linear-gradient(145deg, rgba(235, 249, 255, .96), rgba(218, 241, 252, .94)) !important;
  color: #123047 !important;
  -webkit-text-fill-color: initial !important;
  border-color: rgba(47, 127, 168, .28) !important;
  box-shadow: 0 24px 80px rgba(14, 65, 96, .20) !important;
  backdrop-filter: blur(18px) !important;
}

/* Cartouches de menu */
#rd-site-menu-root nav a,
#rd-site-menu-root aside a,
#rd-site-menu-root [role="dialog"] a,
#rd-site-menu-root nav button,
#rd-site-menu-root aside button,
#rd-site-menu-root [role="dialog"] button,
.rd-site-menu-root nav a,
.rd-site-menu-root aside a,
.rd-site-menu-root [role="dialog"] a,
.rd-site-menu-root nav button,
.rd-site-menu-root aside button,
.rd-site-menu-root [role="dialog"] button {
  background: rgba(255, 255, 255, .54) !important;
  border: 1px solid rgba(47, 127, 168, .22) !important;
}

#rd-site-menu-root nav a:hover,
#rd-site-menu-root aside a:hover,
#rd-site-menu-root [role="dialog"] a:hover,
.rd-site-menu-root nav a:hover,
.rd-site-menu-root aside a:hover,
.rd-site-menu-root [role="dialog"] a:hover {
  background: rgba(255, 255, 255, .78) !important;
  color: #08243a !important;
  -webkit-text-fill-color: #08243a !important;
}

/* Bouton rond / fermeture / badge état : texte blanc conservé */
#rd-site-menu-root [class*="close"],
#rd-site-menu-root [class*="hamburger"],
#rd-site-menu-root [class*="status"],
#rd-site-menu-root [class*="badge"],
#rd-site-menu-root [class*="pill"],
.rd-site-menu-root [class*="close"],
.rd-site-menu-root [class*="hamburger"],
.rd-site-menu-root [class*="status"],
.rd-site-menu-root [class*="badge"],
.rd-site-menu-root [class*="pill"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Mode sombre */
html[data-rd-effective-theme="dark"] #rd-site-menu-root nav,
html[data-rd-effective-theme="dark"] #rd-site-menu-root aside,
html[data-rd-effective-theme="dark"] #rd-site-menu-root [role="dialog"],
body[data-rd-effective-theme="dark"] #rd-site-menu-root nav,
body[data-rd-effective-theme="dark"] #rd-site-menu-root aside,
body[data-rd-effective-theme="dark"] #rd-site-menu-root [role="dialog"],
html[data-rd-effective-theme="dark"] .rd-site-menu-root nav,
html[data-rd-effective-theme="dark"] .rd-site-menu-root aside,
html[data-rd-effective-theme="dark"] .rd-site-menu-root [role="dialog"],
body[data-rd-effective-theme="dark"] .rd-site-menu-root nav,
body[data-rd-effective-theme="dark"] .rd-site-menu-root aside,
body[data-rd-effective-theme="dark"] .rd-site-menu-root [role="dialog"] {
  background: linear-gradient(145deg, rgba(10, 24, 42, .96), rgba(16, 36, 58, .94)) !important;
  color: #f8fafc !important;
  border-color: rgba(144, 200, 235, .18) !important;
}

html[data-rd-effective-theme="dark"] #rd-site-menu-root a,
html[data-rd-effective-theme="dark"] #rd-site-menu-root button,
body[data-rd-effective-theme="dark"] #rd-site-menu-root a,
body[data-rd-effective-theme="dark"] #rd-site-menu-root button,
html[data-rd-effective-theme="dark"] .rd-site-menu-root a,
html[data-rd-effective-theme="dark"] .rd-site-menu-root button,
body[data-rd-effective-theme="dark"] .rd-site-menu-root a,
body[data-rd-effective-theme="dark"] .rd-site-menu-root button {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

/* Mobile menu */
@media (max-width: 760px) {
  #rd-site-menu-root nav,
  #rd-site-menu-root aside,
  #rd-site-menu-root [role="dialog"],
  #rd-site-menu-root [class*="panel"],
  #rd-site-menu-root [class*="drawer"],
  .rd-site-menu-root nav,
  .rd-site-menu-root aside,
  .rd-site-menu-root [role="dialog"],
  .rd-site-menu-root [class*="panel"],
  .rd-site-menu-root [class*="drawer"] {
    width: min(340px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 28px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 24px !important;
    padding: 16px !important;
    right: 12px !important;
    left: auto !important;
  }

  #rd-site-menu-root a,
  #rd-site-menu-root button,
  .rd-site-menu-root a,
  .rd-site-menu-root button {
    min-height: 42px !important;
    font-size: .96rem !important;
    line-height: 1.25 !important;
  }
}
/* RD_STABLE_MENU_READABILITY_PATCH END */
