/* Palette reprise de mobile/tailwind.config.js — même identité visuelle
   que l'app native. */
:root {
  --sage-50: #F2F5F1;
  --sage-100: #E1E9DE;
  --sage-200: #C3D3BE;
  --sage-300: #A0B99A;
  --sage-400: #7C9C74;
  --sage-500: #5E7F56;
  --sage-600: #4A6543;
  --sage-700: #3B5136;
  --sage-800: #2F412B;
  --sage-900: #263523;
  --sand-50: #FBF8F2;
  --sand-100: #F5EEE0;
  --sand-200: #E9DBC0;
  --sand-300: #DBC49B;
  --sand-400: #CBAB76;
  --offwhite: #FAF7F2;
  --gold: #B8935A;
  --red: #DC2626;
  --whatsapp-green: #25D366;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--offwhite);
  color: var(--sage-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#screen-root {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

h1, h2, h3, p { margin: 0; }

.screen { display: flex; flex-direction: column; flex: 1; gap: 12px; }
.screen-center { justify-content: center; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }

.title-lg { font-size: 1.5rem; font-weight: 600; color: var(--sage-800); }
.title-xl { font-size: 1.75rem; font-weight: 600; color: var(--sage-800); }
.subtitle { font-size: 0.9rem; color: var(--sage-500); }
.label-xs { font-size: 0.75rem; color: var(--sage-500); text-transform: uppercase; letter-spacing: 0.03em; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--sage-200);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--sage-800);
  background: #fff;
  font-family: inherit;
}
input::placeholder, textarea::placeholder { color: var(--sage-400); }
textarea { resize: vertical; min-height: 80px; }

button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  width: 100%;
  padding: 15px;
  border-radius: 16px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: var(--sage-600); color: #fff; }
.btn-primary:disabled { opacity: 0.5; }
.btn-outline { background: transparent; color: var(--sage-700); border: 1px solid var(--sage-600); }
.btn-whatsapp { background: var(--whatsapp-green); color: #fff; }
.btn-link { background: none; border: none; color: var(--sage-400); font-size: 0.85rem; text-decoration: underline; padding: 4px; }
.btn-link.strong { color: var(--sage-600); }

.card {
  background: #fff;
  border: 1px solid var(--sage-100);
  border-radius: 18px;
  padding: 20px;
}
.card-tinted { background: var(--sage-50); border-radius: 18px; padding: 20px; }
.card-sand { background: var(--sand-100); border-radius: 18px; padding: 16px 20px; }

.error-text { color: var(--red); font-size: 0.85rem; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--sage-200);
  background: #fff;
  font-size: 0.85rem;
  color: var(--sage-700);
}
.pill.selected { background: var(--sage-600); border-color: var(--sage-600); color: #fff; }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-outline .spinner { border-color: rgba(74,101,67,0.3); border-top-color: var(--sage-700); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bouton en attente pendant un bref instant de reflet (ex: étape Intention
   du rituel) - un fondu lent plutôt qu'un spinner, pour ne pas donner
   l'impression d'un chargement réseau : c'est une pause volontaire, pas de
   l'attente technique. */
.btn-primary.btn-pending:disabled { animation: pulse-soft 2s ease-in-out infinite; }
@keyframes pulse-soft {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.75; }
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.top-bar .back { color: var(--sage-500); font-size: 0.9rem; }
.top-bar h1 { flex: 1; font-size: 1.1rem; font-weight: 600; }

.tab-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  background: var(--offwhite);
  border-top: 1px solid var(--sage-100);
  margin: 16px -20px calc(-24px - env(safe-area-inset-bottom));
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}
.tab-bar button {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--sage-300);
  font-size: 0.7rem;
}
.tab-bar button.active { color: var(--sage-600); }
.tab-bar .icon { font-size: 1.3rem; }

.row-between { display: flex; justify-content: space-between; align-items: center; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  background: #fff;
  border: 1px solid var(--sage-100);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
}
.list-item.selected { border-color: var(--sage-600); background: var(--sage-50); }
.badge-locked { color: var(--gold); font-size: 0.75rem; }
.badge-common { color: var(--sage-400); font-size: 0.75rem; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.arabic-text {
  font-family: "Amiri", "Scheherazade New", serif;
  direction: rtl;
  text-align: right;
  font-size: 1.8rem;
  line-height: 3rem;
  color: var(--sage-900);
}

.loading-text { color: var(--sage-500); font-size: 0.9rem; }

.verse-line + .verse-line { margin-top: 10px; }
.verse-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid var(--sage-400);
  border-radius: 50%;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--sage-500);
  vertical-align: middle;
  margin: 0 6px;
}
.verse-number-fr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 3px;
  background: var(--sage-100);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sage-700);
  vertical-align: middle;
  margin-right: 8px;
}
