/* =========================================================================
   LE PROTOCOLE 33 — Design system v2
   Fond quasi-noir chaud. Accent or ambré (discipline, achievement).
   DM Sans — propre, géométrique, premium.
   Une seule action visible par écran.
   ========================================================================= */

:root {
  /* Fonds — proches du noir, légèrement chauds */
  --bg:            #0C0B0A;
  --bg-elevated:   #151311;
  --bg-card:       #1C1915;
  --bg-card-hover: #242018;

  /* Texte */
  --text:        #F5F3EE;
  --text-dim:    #9A9590;
  --text-faint:  #5C5852;

  /* Accent — or ambré (discipline, achievement, protocole masculin) */
  --accent:        #C4903A;
  --accent-soft:   rgba(196, 144, 58, 0.11);
  --accent-line:   rgba(196, 144, 58, 0.26);
  --warm:          #F2D98A;   /* or clair pour les grands chiffres */

  /* États */
  --success:  #6FA882;
  --danger:   #B87070;

  /* Bordures */
  --line: rgba(255, 241, 218, 0.07);

  /* Rayons */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  /* Rythme */
  --space: 20px;
  --max-w: 480px;

  /* Transitions */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ----------------------------------------------------------------- Reset */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar { width: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, "SF Pro Text", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: flex;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
  overscroll-behavior-y: none;
}

#app {
  width: 100%;
  max-width: var(--max-w);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------- Écrans */
.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 32px 24px 40px;
  animation: fadeIn 0.4s var(--ease);
}
.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen--center {
  justify-content: center;
  text-align: center;
}

/* ------------------------------------------------------------ Typographie */
h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 14px;
}
h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
p { color: var(--text-dim); margin-bottom: 14px; }
p.lead { color: var(--text); font-size: 18px; }
.muted { color: var(--text-faint); font-size: 14px; }

/* Phrase signée Marc */
.marc {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  font-weight: 400;
}
.marc--sign {
  color: var(--text-faint);
  font-size: 14px;
  margin-top: 18px;
  font-style: normal;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------- Boutons */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  padding: 17px 20px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
  text-align: center;
  letter-spacing: -0.01em;
}
.btn:active { transform: scale(0.97); }

/* Bouton principal — gradient or ambré */
.btn--primary {
  background: linear-gradient(160deg, #D4A040 0%, #B07820 100%);
  color: #0C0B0A;
  box-shadow:
    0 0 0 1px rgba(196, 144, 58, 0.18),
    0 6px 28px rgba(196, 144, 58, 0.26);
}
.btn--primary:active {
  background: linear-gradient(160deg, #C49030 0%, #A06818 100%);
  box-shadow:
    0 0 0 1px rgba(196, 144, 58, 0.12),
    0 3px 12px rgba(196, 144, 58, 0.14);
}

.btn--ghost {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn--ghost:active { background: var(--bg-card-hover); }

.btn--accent {
  background: var(--accent);
  color: #0C0B0A;
  font-weight: 700;
}
.btn--accent:active {
  background: #B07820;
}

.btn--text {
  background: none;
  color: var(--text-dim);
  font-weight: 500;
  padding: 12px;
}
.btn[disabled] { opacity: 0.35; pointer-events: none; }

/* Zone d'action collée en bas d'écran */
.actions {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --------------------------------------------------- Choix (questionnaire) */
.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.choice {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 17px 20px;
  font-size: 17px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.choice:active { transform: scale(0.98); }
.choice.selected {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.choice .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--text-faint);
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s var(--ease);
}
.choice.selected .check {
  border-color: var(--accent);
  background: var(--accent);
}
.choice.selected .check::after {
  content: "";
  position: absolute;
  left: 7px; top: 3px;
  width: 5px; height: 10px;
  border: solid #0C0B0A;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Champ texte libre */
textarea, input[type="text"] {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus, input:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(196, 144, 58, 0.07);
}
textarea { min-height: 120px; }

/* ---------------------------------------------------------------- Curseur */
.slider-wrap { margin: 32px 0; }
.slider-value {
  font-size: 64px;
  font-weight: 200;
  text-align: center;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: linear-gradient(160deg, var(--warm) 10%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-card);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--warm), var(--accent));
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(196, 144, 58, 0.4);
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 13px;
  margin-top: 14px;
}

/* ------------------------------------------------------- Analyse (spinner) */
.analyse { text-align: center; }
.dots { display: inline-flex; gap: 8px; margin: 30px 0; }
.dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.3s var(--ease) infinite;
}
.dots span:nth-child(2) { animation-delay: 0.22s; }
.dots span:nth-child(3) { animation-delay: 0.44s; }
@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50%       { opacity: 1;    transform: scale(1.1); }
}

/* ------------------------------------------------------------- App suivi */

/* Streak — le plus gros élément de l'écran */
.streak {
  text-align: center;
  padding: 24px 0 8px;
}
.streak-number {
  font-size: 110px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(160deg, var(--warm) 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.streak-label {
  font-size: 15px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-top: 6px;
}
.day-counter {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Carte (message du jour, récap, bilan) */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
/* Filet doré subtil en haut de chaque carte */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 144, 58, 0.38), transparent);
  pointer-events: none;
}
.card .phase-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.card h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  color: var(--text);
}
.card p { color: var(--text-dim); }
.card .action-box {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
}
.card .action-box strong {
  color: var(--accent);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Récap de Marc — ton plus chaleureux */
.recap p { color: var(--text); line-height: 1.68; margin-bottom: 10px; }

/* Bandeau d'aide professionnelle */
.help-banner {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(184, 112, 112, 0.08);
  border: 1px solid rgba(184, 112, 112, 0.22);
}
.help-banner p { color: var(--text); font-size: 15px; margin: 0; }
.help-banner a { color: var(--danger); font-weight: 600; text-decoration: none; }

/* Header app discret */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 0;
}
.app-header .title {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}
.icon-btn {
  background: none; border: none; color: var(--text-faint);
  font-size: 13px; cursor: pointer; padding: 6px;
}

/* Liste de boutons réponses du check-in (compacts, horizontaux) */
.segmented {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.segmented button {
  flex: 1; min-width: 70px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  color: var(--text);
  font-size: 15px; font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.2s, border-color 0.2s;
}
.segmented button:active { transform: scale(0.96); }
.segmented button.selected {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.field { margin-bottom: 24px; }
.field-label { font-size: 16px; color: var(--text); margin-bottom: 6px; font-weight: 500; }
.field-sub { font-size: 13px; color: var(--text-faint); margin-bottom: 4px; }

/* Pastille de progression (bilan) */
.stat-row {
  display: flex; justify-content: space-between; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.stat-row:last-child { border-bottom: none; }
.stat-row .label { color: var(--text-dim); }
.stat-row .val { color: var(--text); font-weight: 600; }
.stat-row .val.up { color: var(--success); }
.stat-row .val.down { color: var(--danger); }

/* Inclus dans l'offre */
.includes { list-style: none; margin: 6px 0 0; }
.includes li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  display: flex; gap: 14px; align-items: flex-start;
}
.includes li:last-child { border-bottom: none; }
.includes li::before {
  content: "";
  width: 18px; height: 18px; margin-top: 3px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
}

/* Prix */
.price-tag {
  text-align: center;
  margin: 8px 0 4px;
}
.price-tag .big {
  font-size: 56px;
  font-weight: 300;
  letter-spacing: -0.02em;
  background: linear-gradient(160deg, var(--warm) 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.price-tag .sub { color: var(--text-dim); font-size: 15px; margin-top: 2px; }

/* Petite progression douce en haut du tunnel (points) */
.progress-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 28px; }
.progress-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bg-card); transition: background 0.3s, width 0.3s;
}
.progress-dots i.done { background: var(--accent-line); }
.progress-dots i.current { background: var(--accent); width: 18px; border-radius: 3px; }

/* Logo / accroche */
.brand-mark {
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 700;
}
.hero-num {
  font-size: 120px;
  font-weight: 200;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
  background: linear-gradient(160deg, var(--warm) 20%, var(--accent) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Toast discret */
.toast {
  position: fixed; left: 50%; bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); color: var(--text);
  padding: 12px 22px; border-radius: 30px; font-size: 15px;
  border: 1px solid var(--line);
  opacity: 0; pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 100;
  backdrop-filter: blur(12px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------ Barre de progression --- */
.day-progress-wrap { margin: 14px 0 4px; }
.day-progress {
  height: 5px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}
.day-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  border-radius: 3px;
  transition: width 0.6s var(--ease);
  min-width: 0;
  box-shadow: 0 0 8px rgba(196, 144, 58, 0.32);
}
.day-progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px;
}
.day-progress-label { font-size: 12px; color: var(--text-faint); }
.day-progress-steps { font-size: 12px; color: var(--text-faint); }

/* ------------------------------------------------ Bouton skip (passer) -- */
.skip-btn {
  width: 100%; background: none; border: none;
  color: var(--text-faint); font-family: inherit; font-size: 13px;
  padding: 10px 0 4px; cursor: pointer; text-align: center;
  transition: color 0.2s;
}
.skip-btn:active { color: var(--text-dim); }

/* ------------------------------------------------ Bouton musique --------- */
.music-btn {
  background: none; border: none; width: 32px; height: 32px;
  border-radius: 8px; color: var(--text-faint);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, background 0.2s, transform 0.1s;
}
.music-btn:active { transform: scale(0.92); }
.music-btn.on { color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------ Bouton retour ---------- */
.back-btn {
  background: none; border: none; color: var(--text-dim);
  font-family: inherit; font-size: 16px; cursor: pointer;
  padding: 4px 0 16px; align-self: flex-start;
}
.back-btn:active { color: var(--text); }

/* ------------------------------------------------ Bouton d'urgence ------- */
.urgence-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 14px;
  background: rgba(184, 112, 112, 0.08);
  border: 1px solid rgba(184, 112, 112, 0.22);
  color: var(--text);
  border-radius: var(--radius-md); padding: 14px;
  font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: transform 0.12s, background 0.2s;
}
.urgence-btn:active { transform: scale(0.98); background: rgba(184, 112, 112, 0.14); }
.urgence-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(184, 112, 112, 0.5);
  animation: urgpulse 2.2s infinite;
  flex-shrink: 0;
}
@keyframes urgpulse {
  0%   { box-shadow: 0 0 0 0 rgba(184, 112, 112, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(184, 112, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 112, 112, 0); }
}
.urgence-card { display: flex; flex-direction: column; }
.urgence-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; margin-bottom: 10px;
}

/* ------------------------------------------------ Tuiles modules --------- */
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.module-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 16px 18px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
/* Filet doré subtil en haut des tiles */
.module-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 144, 58, 0.2), transparent);
  pointer-events: none;
}
.module-tile:active {
  transform: scale(0.97);
  background: var(--bg-card-hover);
  border-color: var(--accent-line);
}
.module-tile-icon {
  font-size: 22px; line-height: 1;
  margin-bottom: 10px;
}
.module-tile-title { color: var(--text); font-size: 15px; font-weight: 600; }
.module-tile-sub { color: var(--text-faint); font-size: 12px; margin-top: 3px; }

/* ------------------------------------------------ Lecture du jour -------- */
.lecture-title { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 20px; }
.lecture-body p { color: var(--text); font-size: 17.5px; line-height: 1.72; margin-bottom: 18px; }
.lecture-body { max-width: 38em; }

/* ------------------------------------------------ QCM -------------------- */
.qcm-block { margin-bottom: 28px; }
.qcm-q { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 14px; letter-spacing: -0.01em; }
.qcm-opt {
  display: block; width: 100%; text-align: left;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 15px 18px; margin-bottom: 10px;
  color: var(--text); font-family: inherit; font-size: 16px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.qcm-opt:active { transform: scale(0.99); }
.qcm-opt.ok  { background: rgba(111, 168, 130, 0.13); border-color: rgba(111, 168, 130, 0.45); }
.qcm-opt.ko  { background: rgba(184, 112, 112, 0.11); border-color: rgba(184, 112, 112, 0.38); }
.qcm-opt.reveal { border-color: rgba(111, 168, 130, 0.45); }
.qcm-feedback {
  display: none; margin-top: 4px; padding: 14px 16px;
  border-radius: var(--radius-sm); font-size: 15px; line-height: 1.55;
}
.qcm-feedback.show { display: block; }
.qcm-feedback.ok { background: rgba(111, 168, 130, 0.10); color: var(--text); }
.qcm-feedback.ko { background: rgba(196, 144, 58, 0.10); color: var(--text); }

/* ------------------------------------------------ Timeline 33 jours ----- */
.timeline-phase {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent); margin: 26px 0 12px;
}
.timeline-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px;
  font-family: inherit; text-align: left; cursor: pointer;
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
}
.timeline-row:active { transform: scale(0.99); }
.timeline-num {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
  background: var(--bg-card); color: var(--text-dim);
}
.timeline-row.current {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.timeline-row.current .timeline-num {
  background: var(--accent);
  color: #0C0B0A;
  box-shadow: 0 2px 12px rgba(196, 144, 58, 0.35);
}
.timeline-row.done .timeline-num {
  background: rgba(111, 168, 130, 0.18);
  color: var(--success);
}
.timeline-row.locked { opacity: 0.45; cursor: default; }
.timeline-title { color: var(--text); font-size: 16px; font-weight: 500; }
.timeline-meta { color: var(--text-faint); font-size: 13px; margin-top: 1px; }

/* ------------------------------------------------ Badges ---------------- */
.badge-card {
  text-align: center;
  padding: 32px 24px;
  margin-top: 22px;
  background: linear-gradient(160deg, rgba(196, 144, 58, 0.12) 0%, rgba(196, 144, 58, 0.04) 100%);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.badge-card::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 144, 58, 0.6), transparent);
  pointer-events: none;
}
.badge-medal { font-size: 48px; line-height: 1; }
.badge-title {
  font-size: 20px; font-weight: 600; color: var(--text);
  margin-top: 10px; letter-spacing: -0.01em;
}
.badge-sub { color: var(--text-dim); font-size: 15px; margin-top: 4px; }

/* ------------------------------------------------ Journal & patterns ---- */
.pattern-note {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--text); font-size: 14px; margin-bottom: 14px;
}
.journal-entry {
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px;
}
.journal-meta { color: var(--accent); font-size: 13px; font-weight: 600; }
.journal-text { color: var(--text-dim); font-size: 15px; margin-top: 4px; }

/* ----------------------------------------------------- MODE TEST (dev) ----
   Surcouche de développement. Retirable avec testmode.js. */
.test-launch {
  position: fixed; left: 16px; bottom: 16px; z-index: 200;
  background: rgba(196, 144, 58, 0.10);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  padding: 9px 14px; border-radius: 20px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; backdrop-filter: blur(8px);
}
.test-launch:active { transform: scale(0.96); }

.test-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 200;
  display: flex; align-items: center; gap: 6px;
  background: rgba(21, 19, 17, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 6px 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}
.test-bar button {
  background: none; border: none; color: var(--text);
  font-family: inherit; cursor: pointer; border-radius: 12px;
  transition: background 0.15s, transform 0.1s;
}
.test-bar button:active { transform: scale(0.92); }
.test-nav { font-size: 24px; width: 40px; height: 40px; line-height: 1; }
.test-nav:active { background: var(--bg-card-hover); }
.test-info { text-align: center; min-width: 110px; padding: 0 4px; }
.test-day { font-size: 15px; font-weight: 600; color: var(--text); }
.test-hint { font-size: 10px; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.test-redo { font-size: 18px; width: 38px; height: 38px; color: var(--accent); }
.test-redo:active { background: var(--accent-soft); }
.test-tunnel {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 0 10px; height: 38px; border-radius: 10px;
  color: var(--text-dim); background: var(--bg-card);
  border: 1px solid var(--line);
}
.test-tunnel:active { background: var(--bg-card-hover); }
.test-close { font-size: 14px; width: 32px; height: 38px; color: var(--text-faint); }

/* ------------------------------------------------ Banner d'installation PWA */
.install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: calc(100% - 32px);
  max-width: calc(var(--max-w) - 32px);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 20px 20px 16px;
  z-index: 190;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(196,144,58,0.08) inset;
  animation: installSlideUp 0.4s var(--ease);
}
.install-banner--out {
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
@keyframes installSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(24px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Filet doré en haut comme les cards */
.install-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,144,58,0.5), transparent);
}

.install-title {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 4px; letter-spacing: -0.01em;
}
.install-sub {
  font-size: 14px; color: var(--text-dim);
  margin-bottom: 16px; line-height: 1.5;
}

/* Steps iOS */
.install-ios-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.install-step {
  display: flex; align-items: flex-start; gap: 10px;
}
.install-step-num {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.install-step-text { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.install-step-text strong { color: var(--text); font-weight: 600; }

/* Actions Android */
.install-actions { display: flex; gap: 10px; align-items: center; }
.install-actions .btn { flex: 1; padding: 14px; font-size: 15px; }

/* Bouton "Compris / Plus tard" */
.install-dismiss {
  background: none; border: none;
  color: var(--text-faint); font-family: inherit; font-size: 14px;
  cursor: pointer; padding: 8px 4px; display: block;
  margin-top: 4px; text-align: center; width: 100%;
  transition: color 0.2s;
}
.install-dismiss:active { color: var(--text-dim); }
.install-actions .install-dismiss {
  width: auto; flex-shrink: 0; margin: 0; padding: 14px 12px;
}

/* ------------------------------------------------ Overlay notif push ------ */
.notif-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(12, 11, 10, 0.88);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s var(--ease);
  transition: opacity 0.3s;
}
.notif-card {
  width: 100%; max-width: var(--max-w);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 28px 24px 20px;
  position: relative;
  box-shadow: 0 16px 56px rgba(0,0,0,0.7);
}
.notif-card::before {
  content: "";
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,144,58,0.55), transparent);
}
.notif-icon  { font-size: 36px; line-height: 1; margin-bottom: 14px; }
.notif-title { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 10px; letter-spacing: -0.01em; }
.notif-body  { font-size: 16px; color: var(--text-dim); line-height: 1.6; margin-bottom: 6px; }

/* Espacement utilitaire */
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 24px; }
.mt-l { margin-top: 40px; }
.center { text-align: center; }
.fade-in { animation: fadeIn 0.4s var(--ease); }
