/* ===== Verset Quotidien – style responsive ===== */
:root {
  --bg: #f6f4ff;
  --surface: #ffffff;
  --text: #25233f;
  --muted: #6f6c8f;
  --primary: #4b49b6;
  --primary-2: #7b6cf6;
  --accent: #e9b44c;
  --border: #e4e1f5;
  --shadow: 0 10px 40px rgba(75, 73, 182, .14);
  --glow1: #c9c3ff;
  --glow2: #ffe7b8;
  --radius: 22px;
}
[data-theme="dark"] {
  --bg: #12112a;
  --surface: #1c1b3a;
  --text: #f1efff;
  --muted: #a9a6cf;
  --primary: #8c85ff;
  --primary-2: #b39dff;
  --border: #2e2c58;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --glow1: #3a35a0;
  --glow2: #6a4a1a;
}

/* Couleur d'ambiance selon la catégorie */
body[data-cat="courage"]    { --glow1:#ffc9a8; --glow2:#ffd9a0; }
body[data-cat="force"]      { --glow1:#ffb8b8; --glow2:#ffd9a0; }
body[data-cat="paix"]       { --glow1:#b8e6ff; --glow2:#d6f5e6; }
body[data-cat="espoir"]     { --glow1:#ffe7a1; --glow2:#ffd0e0; }
body[data-cat="foi"]        { --glow1:#d1c4ff; --glow2:#b8d9ff; }
body[data-cat="amour"]      { --glow1:#ffc1d9; --glow2:#ffd6c4; }
body[data-cat="gratitude"]  { --glow1:#c9f2c0; --glow2:#fff2a8; }
body[data-cat="sagesse"]    { --glow1:#c6d7ff; --glow2:#e6d2ff; }
body[data-cat="consolation"]{ --glow1:#d9d2f5; --glow2:#c2e3ee; }
body[data-cat="confiance"]  { --glow1:#bfe9e1; --glow2:#c9d6ff; }
[data-theme="dark"] body[data-cat],
[data-theme="dark"] body { --glow1:#3a35a0; --glow2:#5c3d17; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background .4s, color .4s;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 15% 5%, var(--glow1), transparent 70%),
    radial-gradient(600px 450px at 90% 95%, var(--glow2), transparent 70%);
  opacity: .65;
  transition: background 1s;
}

/* ----- Header ----- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; max-width: 760px; width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-cross {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 18px rgba(75, 73, 182, .35);
}
.brand h1 { font-family: 'Playfair Display', serif; font-size: 1.3rem; line-height: 1.1; }
.brand p  { font-size: .78rem; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.streak {
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px; font-size: .9rem;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); font-size: 1.1rem;
  transition: transform .2s;
}
.icon-btn:hover { transform: rotate(20deg) scale(1.06); }

/* ----- Tabs ----- */
.tabs {
  display: flex; gap: 6px; max-width: 760px; width: calc(100% - 32px); margin: 4px auto 0;
  padding: 5px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: var(--shadow);
}
.tab {
  flex: 1; padding: 10px 6px; border: 0; background: transparent;
  border-radius: 999px; font-weight: 500; font-size: .9rem; color: var(--muted);
  transition: all .25s;
}
.tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }

/* ----- Layout ----- */
.container { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 22px 16px 30px; }
.date-label { text-align: center; color: var(--muted); font-size: .85rem; text-transform: capitalize; margin-bottom: 10px; }
.hint { color: var(--muted); font-size: .88rem; margin-bottom: 8px; text-align: center; }

/* ----- Chips ----- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: .88rem; transition: all .2s;
}
.chip:hover { transform: translateY(-2px); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ----- Carte verset ----- */
.verse-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 38px 24px 26px; box-shadow: var(--shadow);
  min-height: 280px; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.verse-card::before {
  content: "“"; position: absolute; top: -18px; left: 14px;
  font-family: 'Playfair Display', serif; font-size: 9rem; line-height: 1;
  color: var(--primary); opacity: .1; pointer-events: none;
}
#verseContent { width: 100%; text-align: center; animation: rise .5s ease both; }
.cat-badge {
  display: inline-block; padding: 4px 12px; font-size: .78rem; font-weight: 600;
  border-radius: 999px; background: color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--text); margin-bottom: 18px; letter-spacing: .03em;
}
.verse-text {
  font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 500;
  font-size: clamp(1.2rem, 4.2vw, 1.65rem); line-height: 1.55; margin-bottom: 18px;
}
.verse-ref { color: var(--primary); font-size: 1rem; }
.verse-ref span { color: var(--muted); font-size: .8rem; margin-left: 6px; }

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 26px; }

/* ----- Boutons ----- */
.btn {
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); font-size: .9rem; font-weight: 500;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; border: 0; box-shadow: 0 8px 22px rgba(75, 73, 182, .35);
}
.btn-big { display: block; width: 100%; max-width: 360px; margin: 22px auto 0; padding: 15px; font-size: 1.05rem; }
.btn-fav .heart { display: inline-block; transition: transform .3s; }
.btn-fav.on { background: #ffe5ec; border-color: #ffb3c6; color: #c2185b; }
[data-theme="dark"] .btn-fav.on { background: #4a1f33; border-color: #8a3556; color: #ff9ab9; }
.btn-fav.on .heart { transform: scale(1.25); }

/* ----- Méditation ----- */
.meditation { display: grid; gap: 14px; margin-top: 24px; animation: rise .6s .1s ease both; }
.med-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 18px 20px;
}
.med-block h2 { font-size: .95rem; margin-bottom: 6px; color: var(--primary); }
.med-block p { color: var(--text); font-size: .98rem; }

/* ----- Favoris ----- */
.section-title { font-family: 'Playfair Display', serif; text-align: center; margin-bottom: 18px; }
.fav-list { display: grid; gap: 14px; }
.fav-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 18px 20px; box-shadow: var(--shadow); animation: rise .4s ease both;
}
.fav-item p { font-family: 'Playfair Display', serif; font-style: italic; margin-bottom: 8px; }
.fav-item .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fav-item .ref { color: var(--primary); font-weight: 600; font-size: .9rem; }
.fav-item .mini { border: 0; background: transparent; font-size: 1.1rem; padding: 4px 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

.footer { text-align: center; color: var(--muted); font-size: .78rem; padding: 18px; }

/* ----- Loader ----- */
.loader { display: flex; gap: 8px; }
.loader span { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); animation: bounce 1s infinite ease-in-out; }
.loader span:nth-child(2) { animation-delay: .15s; }
.loader span:nth-child(3) { animation-delay: .3s; }

/* ----- Toast ----- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px);
  background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: 999px;
  font-size: .9rem; opacity: 0; pointer-events: none; transition: all .3s; z-index: 50;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ----- Animations ----- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ----- Responsive ----- */
@media (max-width: 520px) {
  .brand p { display: none; }
  .tab { font-size: .8rem; padding: 10px 2px; }
  .verse-card { padding: 34px 18px 22px; }
  .btn { padding: 9px 13px; font-size: .85rem; }
}
@media (min-width: 900px) {
  .verse-card { padding: 48px 48px 34px; }
  .meditation { grid-template-columns: 1fr 1fr; }
}
