/* ============================================================================
   DEMEURER — ÉDITION DESIGN NOORBIS (WEB PWA)
   Variables cosmiques, typographie Orbitron & Plus Jakarta Sans,
   effets Astro Touch, nébuleuse animée et cartes de méditation.
   ============================================================================ */

:root {
  /* Palette officielle Noorbis */
  --bg-space: #070B19;
  --surface-space: #111827;
  --surface-variant: #1E293B;
  --cyan: #00E5FF;
  --rose: #F43F5E;
  --gold: #F59E0B;
  --emerald: #10B981;
  --violet: #A855F7;
  --coral: #FF6B4A;
  --star-white: #F8FAFC;
  --nebula-gray: #94A3B8;
  --touch-glow: #38BDF8;
  --touch-shimmer-color: rgba(56, 189, 248, 0.22);

  /* Typographie Noorbis */
  --font-display: 'Orbitron', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Alias sémantiques de l'application Demeurer mappés sur Noorbis */
  --bg: var(--bg-space);
  --bg2: var(--surface-variant);
  --card: rgba(17, 24, 39, 0.90);
  --ink: var(--star-white);
  --muted: var(--nebula-gray);
  --olive: var(--cyan);
  --olive2: var(--emerald);
  --gold2: #FBBF24;
  --line: rgba(56, 189, 248, 0.32);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 229, 255, 0.12);
  --radius: 20px;
  --fs: 18px;
}

/* Mode Clair ("Aurore Stellaire") activable via le bouton thème */
[data-theme="clair"] {
  --bg-space: #F0F6FF;
  --surface-space: #FFFFFF;
  --surface-variant: #E2EEFF;
  --cyan: #0284C7;
  --rose: #E11D48;
  --gold: #D97706;
  --emerald: #059669;
  --violet: #7C3AED;
  --star-white: #0F172A;
  --nebula-gray: #475569;
  --touch-glow: #0284C7;
  --touch-shimmer-color: rgba(2, 132, 199, 0.14);

  --bg: #F0F6FF;
  --bg2: #E2EEFF;
  --card: rgba(255, 255, 255, 0.95);
  --ink: #0F172A;
  --muted: #475569;
  --olive: #0284C7;
  --olive2: #059669;
  --gold2: #F59E0B;
  --line: rgba(2, 132, 199, 0.28);
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08), 0 0 18px rgba(2, 132, 199, 0.10);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-space);
  background-image:
    radial-gradient(circle at 50% 0%, #152246 0%, var(--bg-space) 68%),
    radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(0, 229, 255, 0.08) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs);
  line-height: 1.65;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-theme="clair"] body {
  background-image:
    radial-gradient(circle at 50% 0%, #DBEAFE 0%, #F0F6FF 70%),
    radial-gradient(circle at 85% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 45%);
}

/* ============================================================================
   ANIMATIONS NOORBIS (AstroTouchEffect & Bulles Nébuleuse)
   ============================================================================ */
@keyframes astroIdleBreathe {
  0% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.20), inset 0 0 6px rgba(56, 189, 248, 0.08);
  }
  100% {
    transform: scale(1.014);
    box-shadow: 0 0 16px var(--touch-glow, #38BDF8), inset 0 0 12px rgba(255, 255, 255, 0.12);
  }
}

@keyframes astroShimmerSweep {
  0% {
    transform: translateX(-140%) skewX(-24deg);
  }
  100% {
    transform: translateX(240%) skewX(-24deg);
  }
}

@keyframes floatBubbleSlow {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  50% {
    transform: translate(8px, -10px) scale(1.08);
  }
  100% {
    transform: translate(-6px, 6px) scale(0.95);
  }
}

@keyframes floatBubbleReverse {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  50% {
    transform: translate(-10px, 8px) scale(1.1);
  }
  100% {
    transform: translate(7px, -7px) scale(0.94);
  }
}

/* Scrollbar cosmique Noorbis */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(7, 11, 25, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.65);
}

/* ============================================================================
   EN-TÊTE DE NAVIGATION (HUD BAR NOORBIS)
   ============================================================================ */
header.app {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 25, 0.86);
  border-bottom: 1px solid rgba(56, 189, 248, 0.26);
  padding: calc(12px + env(safe-area-inset-top, 0px)) clamp(14px, 3.5vw, 44px) 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

[data-theme="clair"] header.app {
  background: rgba(240, 246, 255, 0.88);
  border-bottom-color: rgba(2, 132, 199, 0.22);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, var(--cyan), #0284C7 60%, #1E1B4B 100%);
  border: 1.5px solid rgba(0, 229, 255, 0.75);
  display: grid;
  place-items: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.40), inset 0 0 10px rgba(255, 255, 255, 0.35);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  line-height: 1.15;
  color: var(--star-white);
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
  font-weight: 600;
}

.tools {
  display: flex;
  gap: 8px;
}

.icon-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1.5px solid rgba(56, 189, 248, 0.60);
  background: rgba(15, 23, 42, 0.90);
  color: var(--star-white);
  border-radius: 12px;
  padding: 6px 11px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

[data-theme="clair"] .icon-btn {
  background: #FFFFFF;
  color: #0F172A;
  border-color: rgba(2, 132, 199, 0.45);
}

.icon-btn:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35);
}

.icon-btn:active {
  transform: scale(0.91);
  border-color: #FFFFFF;
  box-shadow: 0 0 18px var(--cyan);
}

/* ============================================================================
   CONTENEUR PRINCIPAL PLEIN ÉCRAN (MOBILE & PC)
   ============================================================================ */
.wrap {
  width: 100%;
  max-width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 18px clamp(14px, 3.5vw, 44px) calc(105px + env(safe-area-inset-bottom, 0px));
}

/* ============================================================================
   HERO BANNER NOORBIS AVEC NÉBULEUSE ANIMÉE & BULLES COSMIQUES
   ============================================================================ */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #0B1124;
  border: 1.5px solid rgba(0, 229, 255, 0.50);
  padding: 26px 20px 24px;
  margin: 4px 0 18px;
  text-align: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 26px rgba(0, 229, 255, 0.15);
}

[data-theme="clair"] .hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 55%, #0F2942 100%);
  color: #F8FAFC;
}

.hero-nebula-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-nebula-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.svg-float-bubble {
  transform-box: fill-box;
  transform-origin: center;
}
.svg-float-bubble.b1 {
  animation: floatBubbleSlow 5.5s ease-in-out infinite alternate;
}
.svg-float-bubble.b2 {
  animation: floatBubbleReverse 6.4s ease-in-out infinite alternate;
}
.svg-float-bubble.b3 {
  animation: floatBubbleSlow 7.2s ease-in-out infinite alternate-reverse;
}

.hero-bubbles-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-bubble.hb-1 {
  width: 76px;
  height: 76px;
  left: 5%;
  top: 18%;
  background: radial-gradient(circle at 35% 35%, rgba(224, 242, 254, 0.55) 0%, rgba(6, 182, 212, 0.35) 45%, rgba(56, 189, 248, 0.05) 75%, transparent 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.35), inset 0 0 14px rgba(255, 255, 255, 0.35);
  animation: floatBubbleSlow 6s ease-in-out infinite alternate;
}

.hero-bubble.hb-2 {
  width: 58px;
  height: 58px;
  right: 7%;
  top: 16%;
  background: radial-gradient(circle at 32% 32%, rgba(254, 243, 199, 0.6) 0%, rgba(251, 191, 36, 0.35) 48%, rgba(245, 158, 11, 0.05) 78%, transparent 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35), inset 0 0 12px rgba(255, 255, 255, 0.35);
  animation: floatBubbleReverse 5.4s ease-in-out infinite alternate;
}

.hero-bubble.hb-3 {
  width: 46px;
  height: 46px;
  right: 22%;
  bottom: 14%;
  background: radial-gradient(circle at 35% 35%, rgba(243, 232, 255, 0.55) 0%, rgba(168, 85, 247, 0.36) 48%, rgba(168, 85, 247, 0.05) 78%, transparent 100%);
  border: 1.5px solid rgba(192, 132, 252, 0.6);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.35);
  animation: floatBubbleSlow 7.1s ease-in-out infinite alternate-reverse;
}

.hero-bubble.hb-4 {
  width: 42px;
  height: 42px;
  left: 18%;
  bottom: 16%;
  background: radial-gradient(circle at 32% 32%, rgba(209, 250, 229, 0.55) 0%, rgba(16, 185, 129, 0.32) 50%, transparent 100%);
  border: 1.2px solid rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
  animation: floatBubbleSlow 5.2s ease-in-out infinite alternate;
}

.hero-nebula-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 10, 18, 0.18) 0%,
    rgba(15, 23, 42, 0.42) 54%,
    rgba(17, 24, 39, 0.86) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(7, 11, 25, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 229, 255, 0.55);
  color: #00E5FF;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
  margin-bottom: 10px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5vw, 1.95rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 4px 0 10px;
  color: #F8FAFC;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9), 0 0 22px rgba(56, 189, 248, 0.45);
}

.hero p {
  margin: 0 auto;
  max-width: 34ch;
  color: #CBD5E1;
  font-size: 0.94rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

/* ============================================================================
   BARRE DE RECHERCHE NOORBIS
   ============================================================================ */
.home-search-wrap {
  margin: 6px 0 22px;
}

.home-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-space);
  border: 1.5px solid rgba(56, 189, 248, 0.42);
  border-radius: 16px;
  padding: 4px 12px 4px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 0 10px rgba(0, 229, 255, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-search-box:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 248, 0.28), inset 0 0 12px rgba(0, 229, 255, 0.10);
}

.home-search-icon {
  font-size: 1rem;
  color: var(--cyan);
  margin-right: 10px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
}

.home-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 0;
  outline: none;
  width: 100%;
}

.home-search-input::placeholder {
  color: var(--muted);
  opacity: 0.78;
}

.home-search-clear {
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(30, 41, 59, 0.8);
  color: var(--star-white);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

[data-theme="clair"] .home-search-clear {
  background: #E2EEFF;
  color: #0F172A;
}

.home-search-clear:hover {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #070B19;
}

.home-search-results {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-section-title {
  font-family: var(--font-display);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  font-weight: 700;
  margin: 8px 4px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-item {
  position: relative;
  overflow: hidden;
  background: var(--surface-space);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 15px 16px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

.search-item:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
}

.search-item:active {
  transform: scale(0.98);
}

.search-item .meta-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.14);
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.search-item .ref-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.search-item .verse-quote {
  font-size: 0.92rem;
  color: var(--ink);
  font-style: italic;
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-item .keep-snippet {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  border-left: 2.5px solid var(--gold);
  padding-left: 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-empty {
  text-align: center;
  padding: 28px 18px;
  background: var(--surface-space);
  border: 1.5px dashed rgba(56, 189, 248, 0.35);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
}

/* ============================================================================
   GRILLE DES 9 FRUITS DE L'ESPRIT (STYLE ASTRO CARDS NOORBIS)
   ============================================================================ */
.fruits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 28px;
}

@media (max-width: 390px) {
  .fruits {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fruit {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface-space);
  border: 1.5px solid rgba(56, 189, 248, 0.42);
  border-radius: 18px;
  padding: 18px 10px 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Points lumineux d'angle Noorbis sur chaque fruit */
.fruit.open::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image:
    radial-gradient(circle, #FFFFFF 0%, #FFFFFF 46%, rgba(255, 255, 255, 0) 76%),
    radial-gradient(circle, var(--touch-glow, #38BDF8) 0%, var(--touch-glow, #38BDF8) 48%, rgba(0, 0, 0, 0) 78%);
  background-size: 6px 6px, 6px 6px;
  background-position: calc(100% - 6px) 6px, 6px calc(100% - 6px);
  background-repeat: no-repeat;
}

/* Shimmer sweep au survol */
.fruit.open:hover::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 0;
  width: 52%;
  height: 120%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    var(--touch-shimmer-color, rgba(56, 189, 248, 0.22)) 30%,
    rgba(255, 255, 255, 0.30) 50%,
    var(--touch-shimmer-color, rgba(56, 189, 248, 0.22)) 70%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 1;
  animation: astroShimmerSweep 2.2s linear infinite;
}

.fruit.open {
  border-color: rgba(0, 229, 255, 0.58);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(15, 23, 42, 0.92) 100%);
}

[data-theme="clair"] .fruit.open {
  background: linear-gradient(180deg, #FFFFFF 0%, #F0F7FF 100%);
  border-color: rgba(2, 132, 199, 0.45);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.08);
}

.fruit.open:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35), inset 0 0 12px rgba(0, 229, 255, 0.12);
  transform: translateY(-2px) scale(1.02);
}

.fruit:active {
  transform: scale(0.92) !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 0 22px var(--cyan), inset 0 0 16px rgba(255, 255, 255, 0.35) !important;
}

.fruit .emoji {
  font-size: 1.75rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 35%, rgba(0, 229, 255, 0.22), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.18);
}

.fruit .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.fruit.locked {
  opacity: 0.55;
  border-color: rgba(148, 163, 184, 0.25);
}

.fruit .soon {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================================
   ÉCRAN "MALGRÉ..." (CHOIX DES 15 SITUATIONS)
   ============================================================================ */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(17, 24, 39, 0.85);
  border: 1.5px solid rgba(0, 229, 255, 0.45);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  margin-bottom: 14px;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.15);
  transition: all 0.2s ease;
}

[data-theme="clair"] .back {
  background: #FFFFFF;
  border-color: rgba(2, 132, 199, 0.45);
}

.back:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
  transform: translateX(-2px);
}

.malgre-head {
  margin: 4px 0 20px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.94) 0%, rgba(30, 41, 59, 0.88) 100%);
  border: 1.5px solid rgba(0, 229, 255, 0.42);
  box-shadow: var(--shadow);
}

[data-theme="clair"] .malgre-head {
  background: linear-gradient(135deg, #FFFFFF 0%, #E2EEFF 100%);
}

.malgre-head .tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.malgre-head h2 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.25);
}

.malgre-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.malgre-q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 20px 2px 12px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 12px;
}

.choice {
  position: relative;
  overflow: hidden;
  background: var(--surface-space);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 15px 42px 15px 18px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  font-family: inherit;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

[data-theme="clair"] .choice {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.choice:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.28);
  transform: translateX(3px);
}

.choice:active {
  transform: scale(0.97);
  border-color: #FFFFFF;
}

.choice strong {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.choice span {
  font-size: 0.85rem;
  color: var(--muted);
}

.choice::after {
  content: "›";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

/* ============================================================================
   CARTE DE MÉDITATION COMPLÈTE (DESIGN NOORBIS)
   ============================================================================ */
.card {
  position: relative;
  background: var(--surface-space);
  border: 1.5px solid rgba(0, 229, 255, 0.48);
  border-radius: 24px;
  padding: 24px 22px;
  box-shadow: var(--shadow);
  margin-top: 8px;
}

.card .meta {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
}

.card .ref {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--gold);
  margin-top: 6px;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

blockquote.verse {
  margin: 0 0 20px;
  padding: 18px 18px 18px 20px;
  background: linear-gradient(135deg, rgba(14, 42, 68, 0.55) 0%, rgba(30, 41, 59, 0.75) 100%);
  border-left: 3.5px solid var(--cyan);
  border-top: 1px solid rgba(0, 229, 255, 0.22);
  border-right: 1px solid rgba(0, 229, 255, 0.22);
  border-bottom: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 14px;
  font-size: 1.08em;
  line-height: 1.6;
  font-style: italic;
  color: var(--ink);
  box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.08);
}

[data-theme="clair"] blockquote.verse {
  background: linear-gradient(135deg, #E0F2FE 0%, #F0F9FF 100%);
}

h3.block {
  font-family: var(--font-display);
  font-size: 0.73rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 22px 0 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

h3.block::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.explain, .prayer {
  margin: 0;
  color: var(--ink);
  line-height: 1.72;
}

.prayer {
  font-style: italic;
  padding: 16px 18px;
  background: rgba(168, 85, 247, 0.10);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 14px;
  color: var(--ink);
}

.keep {
  padding: 15px 18px;
  border: 1.5px solid rgba(245, 158, 11, 0.50);
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.10);
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.08);
}

/* ============================================================================
   BOUTONS D'ACTION DE LA CARTE (GARDER, LU, NOTE, PARTAGER)
   ============================================================================ */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

button.act {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  flex: 1;
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  background: rgba(15, 23, 42, 0.92);
  color: var(--star-white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              background-color 0.2s ease;
}

[data-theme="clair"] button.act {
  background: #FFFFFF;
  color: #0F172A;
  border-color: rgba(2, 132, 199, 0.45);
}

button.act.primary {
  background: linear-gradient(135deg, #00E5FF 0%, #0284C7 100%);
  color: #070B19;
  border-color: #00E5FF;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}

button.act.ghost {
  background: var(--surface-variant);
  color: var(--ink);
  border-color: rgba(56, 189, 248, 0.40);
}

button.act:hover:not(:disabled) {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.30);
}

button.act:active:not(:disabled) {
  transform: scale(0.93);
}

button.act.saved {
  background: rgba(245, 158, 11, 0.20);
  color: var(--gold2);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.30);
}

[data-theme="clair"] button.act.saved {
  color: #B45309;
  background: rgba(245, 158, 11, 0.16);
}

button.act.read-done {
  background: rgba(16, 185, 129, 0.22);
  color: #34D399;
  border-color: var(--emerald);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.30);
}

[data-theme="clair"] button.act.read-done {
  color: #047857;
  background: rgba(16, 185, 129, 0.16);
}

.badge-read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  color: #070B19;
  background: var(--emerald);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

/* ============================================================================
   FAVORIS & NOTES PERSONNELLES (INVENTORY STYLE NOORBIS)
   ============================================================================ */
.empty {
  text-align: center;
  padding: 34px 20px;
  color: var(--muted);
  border: 1.5px dashed rgba(56, 189, 248, 0.35);
  border-radius: var(--radius);
  background: var(--surface-space);
}

.fav-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 14px;
}

.fav-item {
  background: var(--surface-space);
  border: 1.5px solid rgba(56, 189, 248, 0.38);
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fav-item:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.22);
}

.fav-item-main {
  cursor: pointer;
}

.fav-item .t {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
}

.fav-item .s {
  font-size: 0.9rem;
  color: var(--ink);
  font-style: italic;
  margin-top: 4px;
}

.fav-read-btn {
  border: 1px solid rgba(56, 189, 248, 0.40);
  background: var(--surface-variant);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}

.fav-read-btn.on {
  background: rgba(16, 185, 129, 0.22);
  color: #34D399;
  border-color: var(--emerald);
}

[data-theme="clair"] .fav-read-btn.on {
  color: #047857;
}

.fav-item-del {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.40);
  color: var(--rose);
  cursor: pointer;
  font-size: 0.8rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.fav-item-del:hover {
  background: var(--rose);
  color: #FFFFFF;
}

.fav-item-note-section {
  border-top: 1px dashed rgba(56, 189, 248, 0.25);
  padding-top: 10px;
  margin-top: 4px;
}

.fav-note-box {
  background: rgba(30, 41, 59, 0.75);
  border-left: 3px solid var(--gold);
  border-top: 1px solid rgba(245, 158, 11, 0.28);
  border-right: 1px solid rgba(245, 158, 11, 0.28);
  border-bottom: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="clair"] .fav-note-box {
  background: #FFFBEB;
}

.fav-note-box:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.20);
}

.fav-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.fav-note-title {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.fav-note-edit {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--cyan);
}

.fav-note-text {
  font-size: 0.9rem;
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.5;
}

.fav-note-date {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fav-add-note-btn {
  background: rgba(0, 229, 255, 0.08);
  border: 1px dashed rgba(0, 229, 255, 0.45);
  color: var(--cyan);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
  transition: all 0.2s ease;
}

.fav-add-note-btn:hover {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--cyan);
}

/* ============================================================================
   MODAL DE NOTE PERSONNELLE (STYLE NOORBIS MODAL-CARD)
   ============================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 25, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-dialog {
  background: var(--surface-space);
  border: 1.5px solid rgba(0, 229, 255, 0.58);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  padding: 22px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 28px rgba(0, 229, 255, 0.18);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.modal-close {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-subtitle {
  font-family: var(--font-display);
  font-size: 0.76rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-textarea {
  width: 100%;
  min-height: 120px;
  border: 1.5px solid rgba(56, 189, 248, 0.40);
  border-radius: 14px;
  background: var(--surface-variant);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  margin-bottom: 14px;
}

.modal-textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

button.act.small {
  flex: 0 1 auto;
  min-width: auto;
  padding: 9px 15px;
  font-size: 0.82rem;
}

/* ============================================================================
   PIED DE PAGE LÉGAL & SIGNATURE
   ============================================================================ */
footer.legal {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

footer.legal strong {
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

/* ============================================================================
   BARRE D'ONGLETS DU BAS (NAVIGATION BAR NOORBIS)
   ============================================================================ */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(7, 11, 25, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(56, 189, 248, 0.26);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 8px clamp(12px, 3.5vw, 44px) calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
}

[data-theme="clair"] .tabbar {
  background: rgba(240, 246, 255, 0.95);
  border-top-color: rgba(2, 132, 199, 0.25);
}

.tabbar button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  flex: 1;
  max-width: 280px;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  color: var(--nebula-gray);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s ease;
}

[data-theme="clair"] .tabbar button {
  background: #FFFFFF;
  color: #475569;
  border-color: rgba(2, 132, 199, 0.35);
}

.tabbar button:hover {
  color: var(--star-white);
  border-color: var(--cyan);
}

.tabbar button.on {
  color: var(--cyan);
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(14, 42, 68, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35), inset 0 0 12px rgba(0, 229, 255, 0.16);
  font-weight: 700;
}

[data-theme="clair"] .tabbar button.on {
  background: linear-gradient(180deg, #E0F2FE 0%, #FFFFFF 100%);
  color: #0284C7;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.22);
}

.tabbar .ic {
  font-size: 1.15rem;
  line-height: 1;
}

.hidden {
  display: none !important;
}

.soon-box {
  background: var(--surface-space);
  border: 1.5px solid rgba(56, 189, 248, 0.40);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  margin-top: 14px;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #00E5FF 0%, #38BDF8 100%);
  color: #070B19;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 90;
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.55);
}

.toast.show {
  opacity: 1;
}

/* ============================================================================
   ADAPTATION PLEIN ÉCRAN GRANDS ÉCRANS & PC
   ============================================================================ */
@media (min-width: 900px) {
  .hero {
    padding: 38px 36px 34px;
  }
  .hero p {
    max-width: 58ch;
    font-size: 1.02rem;
  }
  .fruits {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .fruit {
    padding: 26px 18px 22px;
  }
  .fruit .emoji {
    width: 58px;
    height: 58px;
    font-size: 2.05rem;
  }
  .fruit .name {
    font-size: 0.92rem;
  }
  .card {
    padding: 32px 36px;
  }
}
