/* ============================================================
   RECONNEXION DIVINE — CORRECTIFS UX / MOBILE / ACCESSIBILITE
   ============================================================ */

:root {
  --rd-blue: #1e3a8a;
  --rd-blue-soft: #dbeafe;
  --rd-gold: #f59e0b;
  --rd-bg: #f8fafc;
  --rd-card: rgba(255, 255, 255, 0.92);
  --rd-text: #172033;
  --rd-muted: #64748b;
  --rd-border: rgba(30, 58, 138, 0.16);
  --rd-shadow: 0 16px 45px rgba(15, 23, 42, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Lien accessibilité */
.rd-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 99999;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.rd-skip-link:focus {
  transform: translateY(0);
}

/* Focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.85) !important;
  outline-offset: 3px !important;
}

/* Menu mobile robuste */
@media (max-width: 900px) {
  nav,
  header nav,
  .nav,
  .navbar,
  .nav-links,
  .menu,
  .menu-panel,
  .mobile-menu,
  .drawer,
  [data-menu],
  [aria-label*="menu" i] + * {
    max-width: 100vw;
  }

  .nav-links.open,
  .nav-links.active,
  .menu.open,
  .menu.active,
  .mobile-menu.open,
  .mobile-menu.active,
  .drawer.open,
  .drawer.active,
  [data-menu].open,
  [data-menu].active {
    max-height: calc(100dvh - 70px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-bottom: 90px !important;
    -webkit-overflow-scrolling: touch;
  }

  body.rd-menu-open {
    overflow: hidden;
  }

  body.rd-menu-open nav,
  body.rd-menu-open .nav-links,
  body.rd-menu-open .menu,
  body.rd-menu-open .mobile-menu,
  body.rd-menu-open .drawer,
  body.rd-menu-open [data-menu] {
    max-height: calc(100dvh - 70px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Bouton aide ajouté au menu */
.rd-help-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(30, 58, 138, 0.20);
  background: rgba(255, 255, 255, 0.72);
  color: var(--rd-blue);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.rd-help-link:hover {
  background: var(--rd-blue-soft);
}

/* Logo colombe de secours */
.rd-dove-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.45rem;
  font-size: 1.2em;
}

/* Sections enrichies */
.rd-enhanced-panel {
  margin: 2rem auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.95), transparent 42%),
    radial-gradient(circle at bottom right, rgba(254, 243, 199, 0.75), transparent 42%),
    var(--rd-card);
  border: 1px solid var(--rd-border);
  box-shadow: var(--rd-shadow);
  max-width: 1080px;
  color: var(--rd-text);
}

.rd-enhanced-panel h2,
.rd-enhanced-panel h3 {
  margin-top: 0;
}

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

@media (min-width: 760px) {
  .rd-grid.rd-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

.rd-card {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(30, 58, 138, 0.13);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.rd-card strong {
  color: var(--rd-blue);
}

.rd-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.78rem 1rem;
  font-weight: 800;
  text-decoration: none !important;
  background: var(--rd-blue);
  color: white !important;
  box-shadow: 0 12px 25px rgba(30, 58, 138, 0.20);
}

.rd-btn.rd-btn-soft {
  background: #ffffff;
  color: var(--rd-blue) !important;
  border: 1px solid rgba(30, 58, 138, 0.18);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* Urgence spirituelle */
.rd-urgency-choice {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(30, 58, 138, 0.14);
  background: rgba(255, 255, 255, 0.80);
  border-radius: 20px;
  padding: 1rem;
  cursor: pointer;
  color: var(--rd-text);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.rd-urgency-choice:hover {
  background: rgba(219, 234, 254, 0.80);
}

.rd-urgency-choice span {
  display: block;
  font-weight: 800;
  color: var(--rd-blue);
  margin-bottom: 0.25rem;
}

.rd-urgency-output {
  margin-top: 1.2rem;
  padding: 1.2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(245, 158, 11, 0.28);
  min-height: 90px;
}

/* Recherche */
.rd-search-box {
  max-width: 920px;
  margin: 1.5rem auto;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(30,58,138,0.14);
  box-shadow: 0 12px 30px rgba(15,23,42,0.08);
}

.rd-search-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(30,58,138,0.22);
  font-size: 1rem;
}

.rd-filter-hidden {
  display: none !important;
}

/* Images */
img:not([alt]),
img[alt=""] {
  outline: 2px dashed rgba(245, 158, 11, 0.8);
  outline-offset: 4px;
}

/* Petits écrans */
@media (max-width: 520px) {
  .rd-enhanced-panel {
    border-radius: 22px;
    margin: 1.2rem 0.6rem;
    padding: 1rem;
  }

  .rd-card {
    border-radius: 18px;
  }

  .rd-btn,
  .rd-help-link {
    width: 100%;
    box-sizing: border-box;
  }
}

/* RD_HIDE_TODAY_SOURCE_REMINDER_START */
#rd-today-source-reminder {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
/* RD_HIDE_TODAY_SOURCE_REMINDER_END */
