/* ═══════════════════════════════════════════════
   SOS Ecrans v2 — Journal Quotidien
   Warm, calm, evening design
   Like a meditation app, not a dashboard
   ═══════════════════════════════════════════════ */

:root {
  --bg: #FFF8F2;
  --bg-warm: linear-gradient(180deg, #FFF8F2 0%, #F0E8F5 50%, #E8E0F0 100%);
  --primary: #8B7EC8;
  --primary-light: #E8E0F5;
  --primary-dark: #6B5CA8;
  --coral: #F97316;
  --coral-light: #FFF7ED;
  --green: #10B981;
  --green-light: #D1FAE5;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --yellow: #F59E0B;
  --text: #2D2640;
  --text-light: #7A708E;
  --card: #FFFFFF;
  --shadow: 0 4px 24px rgba(80,60,120,.06);
  --shadow-lg: 0 12px 40px rgba(80,60,120,.12);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --max-w: 520px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.warm-bg {
  background: var(--bg-warm);
  min-height: 100vh;
}

/* ═══════════════════════════════════════════
   ONBOARDING (index.html)
   ═══════════════════════════════════════════ */

.onboard-step {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  animation: fadeIn 0.4s ease;
}

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

.onboard-container {
  max-width: var(--max-w);
  width: 100%;
  text-align: center;
}

.onboard-emoji {
  font-size: 64px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.onboard-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 16px;
  color: var(--text);
}

.onboard-text {
  font-size: 18px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 32px;
}

.onboard-sub {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.onboard-hint {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 24px;
  font-style: italic;
}

.onboard-footnote {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 24px;
}

/* ═══ WARM BUTTONS ═══ */
.btn-warm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: all .2s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(139,126,200,.3);
}

.btn-warm:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,126,200,.4); }
.btn-warm:active { transform: translateY(0); }
.btn-warm:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-warm-lg { width: 100%; max-width: 360px; padding: 18px 32px; font-size: 18px; }
.btn-warm-sm { padding: 12px 24px; font-size: 14px; }

.btn-warm-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--primary);
  cursor: pointer;
  background: transparent;
  color: var(--primary);
  transition: all .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-warm-outline:hover { background: var(--primary-light); }

/* ═══ FORM ELEMENTS ═══ */
.form-group {
  margin-bottom: 24px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #E8E0F0;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .2s;
  text-align: center;
}

.form-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(139,126,200,.15);
}

.form-input::placeholder { color: #B8AED0; }

/* ═══ SLIDER ═══ */
.slider-wrap {
  text-align: center;
}

.warm-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: #E8E0F0;
  border-radius: 4px;
  outline: none;
  margin: 8px 0;
}

.warm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(139,126,200,.3);
}

.warm-slider::-moz-range-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}

.slider-display {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 8px;
}

.time-display {
  font-size: 48px;
}

/* ═══ GENDER BUTTONS ═══ */
.gender-btns {
  display: flex;
  gap: 12px;
}

.gender-btn {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 2px solid #E8E0F0;
  background: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
  color: var(--text);
}

.gender-btn:hover { border-color: var(--primary); }
.gender-btn.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

/* ═══ WORRY CARDS ═══ */
.worry-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.worry-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 2px solid #E8E0F0;
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}

.worry-card:hover { border-color: var(--primary); }
.worry-card.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(139,126,200,.15); }

.worry-icon { font-size: 28px; flex-shrink: 0; }
.worry-text { font-size: 15px; font-weight: 500; }

/* ═══════════════════════════════════════════
   JOURNAL (journal.html)
   ═══════════════════════════════════════════ */

.journal-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

.journal-container {
  width: 100%;
}

/* ── Header ── */
.journal-header {
  text-align: center;
  padding: 32px 0 20px;
}

.journal-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.journal-day {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #FEF3C7;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  color: #92400E;
  animation: fadeIn 0.4s ease;
}

.streak-badge .fire { font-size: 20px; }

/* ── Already logged ── */
.already-card {
  text-align: center;
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-bottom: 20px;
  animation: fadeIn 0.4s ease;
}

.already-emoji { font-size: 48px; margin-bottom: 12px; }
.already-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: #065F46; }
.already-card p { font-size: 15px; color: #047857; }

/* ── Questions ── */
.journal-question {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin-bottom: 16px;
  animation: fadeIn 0.4s ease;
}

.q-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.q-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.q-label {
  font-size: 16px;
  font-weight: 600;
}

/* ── Screen time slider ── */
.screen-slider-wrap {
  text-align: center;
}

.screen-slider {
  width: 100%;
  height: 10px;
  -webkit-appearance: none;
  background: #E8E0F0;
  border-radius: 5px;
  outline: none;
}

.screen-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(139,126,200,.3);
}

.screen-slider::-moz-range-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}

.screen-time-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.screen-time-value {
  font-size: 42px;
  font-weight: 800;
  color: var(--primary);
  transition: color .2s;
}

.screen-time-reco {
  font-size: 13px;
  color: var(--text-light);
}

.screen-bar {
  height: 6px;
  border-radius: 3px;
  margin-top: 12px;
  background: #E8E0F0;
  transition: background .3s;
}

/* ── Mood ── */
.mood-grid {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mood-btn {
  flex: 1;
  max-width: 80px;
  padding: 14px 4px;
  border: 2px solid #E8E0F0;
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}

.mood-btn:hover { border-color: var(--primary); }
.mood-btn.selected { border-color: var(--primary); background: var(--primary-light); transform: scale(1.05); }

.mood-emoji { font-size: 32px; display: block; margin-bottom: 4px; }
.mood-text { font-size: 11px; font-weight: 600; color: var(--text-light); }

/* ── Together ── */
.together-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.together-btn {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 2px solid #E8E0F0;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
  color: var(--text);
}

.together-btn:hover { border-color: var(--primary); }
.together-btn.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

.together-prompt {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 10px;
}

.together-nope-msg {
  text-align: center;
  font-size: 15px;
  color: var(--text-light);
  padding: 12px;
  font-style: italic;
}

/* ── Chips ── */
.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 10px 16px;
  border-radius: 50px;
  border: 2px solid #E8E0F0;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
  color: var(--text);
}

.chip:hover { border-color: var(--primary); }
.chip.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

/* ── Textarea ── */
.journal-textarea {
  width: 100%;
  min-height: 80px;
  padding: 16px;
  border: 2px solid #E8E0F0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  resize: vertical;
  background: #FDFBFF;
  color: var(--text);
  transition: border-color .2s;
}

.journal-textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(139,126,200,.1);
}

.journal-textarea::placeholder { color: #C0B8D8; }

/* ── Challenge ── */
.challenge-propose {
  text-align: center;
}

.challenge-intro {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.challenge-card-journal {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 16px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;
}

.challenge-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.challenge-ok {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  padding: 12px;
  animation: fadeIn 0.3s ease;
}

/* ── Submit ── */
.btn-submit {
  width: 100%;
  margin: 8px 0 20px;
  font-size: 18px;
  padding: 20px 32px;
  background: linear-gradient(135deg, var(--primary), #A78BFA);
  box-shadow: 0 6px 24px rgba(139,126,200,.35);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(139,126,200,.45);
}

/* ── Success ── */
.success-card {
  text-align: center;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px 24px;
  margin: 20px 0;
  animation: fadeIn 0.5s ease;
}

.success-emoji { font-size: 64px; margin-bottom: 16px; }
.success-card h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.success-card p { font-size: 16px; color: var(--text-light); }

.success-streak {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

/* ═══════════════════════════════════════════
   PROGRESS (tabs)
   ═══════════════════════════════════════════ */

.progress-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139,126,200,.3);
}

.tab-content {
  animation: fadeIn 0.3s ease;
}

.progress-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ── Week view ── */
.week-circles {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.week-day {
  text-align: center;
  flex: 1;
}

.week-day-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
}

.week-day-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 auto;
  background: #F3F0F8;
  transition: all .2s;
}

.week-day-circle.filled { background: var(--primary-light); }
.week-day-circle.today { background: var(--primary); color: #fff; font-size: 14px; }
.week-day-circle.missed { background: #F3F0F8; color: #C0B8D8; font-size: 14px; }
.week-day-circle.future { background: #F8F6FC; color: #D8D0E8; }

/* ── Month view ── */
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.month-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
}

.month-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  aspect-ratio: auto;
  padding: 4px 0;
}

.month-day {
  background: #F8F6FC;
  cursor: default;
}

.month-day.screen-green { background: var(--green-light); color: #065F46; font-weight: 700; }
.month-day.screen-yellow { background: #FEF3C7; color: #92400E; font-weight: 700; }
.month-day.screen-orange { background: #FFEDD5; color: #9A3412; font-weight: 700; }
.month-day.screen-red { background: var(--red-light); color: #991B1B; font-weight: 700; }
.month-day.month-today { border: 2px solid var(--primary); font-weight: 700; }

.legend-bar {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 12px;
  color: var(--text-light);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ── Charts ── */
.chart-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.chart-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-light);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100px;
}

.bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height .3s ease;
}

.bar-label {
  font-size: 9px;
  color: var(--text-light);
  margin-top: 4px;
  white-space: nowrap;
}

/* ── Insights ── */
.insight-card {
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
  border-left: 4px solid var(--primary);
}

/* ── Badges ── */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.badge-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  text-align: center;
  transition: all .2s;
}

.badge-card.earned {
  background: var(--primary-light);
}

.badge-card.locked {
  opacity: 0.4;
  filter: grayscale(0.8);
}

.badge-emoji { font-size: 36px; margin-bottom: 8px; }
.badge-label { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.badge-desc { font-size: 12px; color: var(--text-light); }

/* ═══════════════════════════════════════════
   HAMBURGER MENU
   ═══════════════════════════════════════════ */

.hamburger {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  color: var(--text);
}

.side-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: #fff;
  z-index: 99999;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  transition: right .3s ease;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.side-menu.open { right: 0; }

.side-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-light);
}

.side-nav {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-xs);
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s;
}

.side-link:hover { background: var(--primary-light); }
.side-link.active { background: var(--primary-light); font-weight: 700; color: var(--primary-dark); }

.side-footer {
  margin-top: auto;
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-light);
  border-top: 1px solid #E8E0F0;
}

.side-footer a { color: var(--red); font-weight: 700; text-decoration: none; }

.side-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.side-menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ═══════════════════════════════════════════
   EMERGENCY FOOTER
   ═══════════════════════════════════════════ */

.emergency-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  padding: 16px;
  margin-top: 20px;
}

.emergency-footer a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

/* ═══════════════════════════════════════════
   CONFETTI
   ═══════════════════════════════════════════ */

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  z-index: 999999;
  animation: confettiFall 1.8s ease forwards;
  pointer-events: none;
}

@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  z-index: 999999;
  box-shadow: 0 8px 24px rgba(16,185,129,.3);
  animation: toastIn 3s ease forwards;
}

@keyframes toastIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  10% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ═══════════════════════════════════════════
   OLD PAGES (ado.html, encadrant.html) — COMPAT
   Keep the old styles for backward compat
   ═══════════════════════════════════════════ */

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-header {
  text-align: center;
  padding: 32px 20px 24px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.page-header .subtitle {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 400;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
  transition: transform .15s, box-shadow .15s;
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.card-link { text-decoration: none; color: inherit; display: block; }
.card-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.card h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--text-light); line-height: 1.6; }
.card .arrow { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 700; letter-spacing: .02em; }

.card-blue { border-left: 5px solid var(--primary); }
.card-blue .arrow { color: var(--primary); }
.card-coral { border-left: 5px solid var(--coral); }
.card-coral .arrow { color: var(--coral); }
.card-green { border-left: 5px solid var(--green); }
.card-green .arrow { color: var(--green); }

/* Sections */
.section { margin: 28px 0; }
.section-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.section-title .emoji { font-size: 24px; }

/* Expandable */
.expandable { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.expandable-header { padding: 18px 20px; cursor: pointer; display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16px; user-select: none; -webkit-user-select: none; transition: background .15s; }
.expandable-header:hover { background: rgba(0,0,0,.02); }
.expandable-header .chevron { margin-left: auto; transition: transform .2s; font-size: 14px; color: var(--text-light); }
.expandable.open .expandable-header .chevron { transform: rotate(180deg); }
.expandable-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.expandable.open .expandable-body { max-height: 2000px; }
.expandable-content { padding: 0 20px 20px; font-size: 15px; line-height: 1.7; }
.expandable-content p { margin-bottom: 10px; }

.do-box, .dont-box, .when-box { padding: 14px 16px; border-radius: var(--radius-xs); margin: 10px 0; font-size: 14px; line-height: 1.6; }
.do-box { background: var(--green-light); border-left: 4px solid var(--green); }
.dont-box { background: var(--red-light); border-left: 4px solid var(--red); }
.when-box { background: var(--primary-light); border-left: 4px solid var(--primary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 28px; border-radius: var(--radius-sm); font-size: 16px; font-weight: 700; border: none; cursor: pointer; text-decoration: none; transition: all .15s; -webkit-tap-highlight-color: transparent; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: #EA580C; transform: translateY(-1px); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #059669; transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #DC2626; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: var(--radius-xs); }

/* Quiz */
.quiz-q { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 12px; }
.quiz-q p { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.quiz-options { display: flex; gap: 10px; }
.quiz-opt { flex: 1; padding: 12px; border-radius: var(--radius-xs); border: 2px solid #E5E7EB; background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center; transition: all .15s; -webkit-tap-highlight-color: transparent; }
.quiz-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.quiz-opt.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.quiz-opt.selected-no { border-color: var(--coral); background: var(--coral); color: #fff; }

/* Gauge */
.gauge { text-align: center; padding: 32px 20px; }
.gauge-circle { width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; flex-direction: column; font-size: 48px; font-weight: 800; box-shadow: var(--shadow-lg); }
.gauge-circle.good { background: var(--green-light); color: var(--green); }
.gauge-circle.warn { background: #FEF3C7; color: #D97706; }
.gauge-circle.bad { background: var(--red-light); color: var(--red); }
.gauge-label { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.gauge-desc { font-size: 15px; color: var(--text-light); max-width: 360px; margin: 0 auto; }

/* Challenges & Streaks */
.challenge-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 16px; }
.challenge-icon { font-size: 36px; flex-shrink: 0; }
.challenge-info { flex: 1; }
.challenge-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.challenge-info p { font-size: 14px; color: var(--text-light); }
.challenge-check { width: 48px; height: 48px; border-radius: 50%; border: 3px solid #E5E7EB; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 24px; transition: all .2s; flex-shrink: 0; -webkit-tap-highlight-color: transparent; }
.challenge-check.done { border-color: var(--green); background: var(--green); color: #fff; }

.streak-bar { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 20px; text-align: center; font-size: 18px; font-weight: 700; }
.streak-bar .fire { font-size: 24px; }

/* Tree */
.tree-container { text-align: center; padding: 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.tree-visual { font-size: 80px; margin-bottom: 8px; transition: all .3s; }
.tree-label { font-size: 15px; color: var(--text-light); }

/* Neuro cards */
.neuro-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; }
.neuro-card .neuro-icon { font-size: 40px; margin-bottom: 10px; display: block; }
.neuro-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.neuro-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* Emergency buttons */
.emergency-grid { display: grid; gap: 12px; }
.emergency-btn { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: all .15s; border-left: 4px solid var(--red); }
.emergency-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Alternatives */
.alt-category { margin-bottom: 20px; }
.alt-category h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.alt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.alt-pill { padding: 10px 16px; background: var(--card); border-radius: 50px; box-shadow: var(--shadow); font-size: 14px; font-weight: 500; }

/* Safe space */
.safe-space { background: linear-gradient(135deg, #EDE9FE, #DBEAFE); border-radius: var(--radius); padding: 28px 24px; margin-bottom: 16px; }
.safe-space h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.safe-space p { font-size: 15px; line-height: 1.7; margin-bottom: 16px; }

/* Stats */
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 12px; }

/* Multi-select */
.multi-select { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.multi-opt { padding: 10px 16px; border-radius: var(--radius-xs); border: 2px solid #E5E7EB; background: #fff; font-size: 14px; cursor: pointer; transition: all .15s; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.multi-opt:hover { border-color: var(--primary); }
.multi-opt.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

/* Onboarding overlay (ado/encadrant) */
.onboarding-overlay { position: fixed; inset: 0; z-index: 10000; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.onboarding-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px 28px; max-width: 480px; width: 100%; }
.onboarding-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 20px; text-align: center; }
.onboarding-card label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; margin-top: 18px; }
.onboarding-card input[type="text"], .onboarding-card input[type="number"], .onboarding-card select { width: 100%; padding: 14px 16px; border: 2px solid #E5E7EB; border-radius: var(--radius-xs); font-size: 16px; font-family: inherit; background: #fff; transition: border-color .15s; }
.onboarding-card input:focus, .onboarding-card select:focus { border-color: var(--primary); outline: none; }

.slider-container { margin-top: 8px; }
.slider-container input[type="range"] { width: 100%; height: 8px; -webkit-appearance: none; background: #E5E7EB; border-radius: 4px; outline: none; }
.slider-container input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); cursor: pointer; }
.slider-value { text-align: center; font-size: 32px; font-weight: 800; color: var(--primary); margin-top: 8px; }

/* Script cards */
.script-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.script-header { padding: 18px 20px; cursor: pointer; display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; user-select: none; }
.script-header:hover { background: rgba(0,0,0,.02); }
.script-header .chevron { margin-left: auto; transition: transform .2s; font-size: 14px; color: var(--text-light); }
.script-card.open .script-header .chevron { transform: rotate(180deg); }
.script-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.script-card.open .script-body { max-height: 3000px; }
.script-content { padding: 0 20px 20px; }

/* Workshop */
.workshop-step { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 12px; display: flex; gap: 16px; align-items: flex-start; }
.workshop-num { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; flex-shrink: 0; }
.workshop-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.workshop-info p { font-size: 14px; color: var(--text-light); }

/* Legal */
.legal-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 12px; border-left: 4px solid var(--coral); }
.legal-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.legal-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* Bottom nav (ado/encadrant pages) */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 72px; background: #fff; border-top: 1px solid #E5E7EB; display: flex; align-items: center; justify-content: space-around; z-index: 9999; padding-bottom: env(safe-area-inset-bottom, 0); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--text-light); font-size: 11px; font-weight: 600; padding: 8px 4px; -webkit-tap-highlight-color: transparent; transition: color .15s; }
.nav-item .nav-icon { font-size: 22px; }
.nav-item.active { color: var(--primary); }
.nav-item:hover { color: var(--primary); }

/* Urgence bar */
.urgence-bar { background: var(--red-light); border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0; text-align: center; font-size: 14px; line-height: 1.7; }
.urgence-bar a { color: var(--red); font-weight: 700; text-decoration: none; }

/* Footer */
.footer { text-align: center; padding: 24px 20px; font-size: 12px; color: var(--text-light); line-height: 1.6; }

/* Social proof */
.social-proof { text-align: center; padding: 12px; font-size: 14px; color: var(--text-light); }
.social-proof strong { color: var(--primary); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (min-width: 768px) {
  .page-header h1 { font-size: 36px; }
  .onboard-title { font-size: 32px; }
  .badges-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 380px) {
  .mood-grid { gap: 4px; }
  .mood-emoji { font-size: 24px; }
  .mood-text { font-size: 10px; }
  .week-day-circle { width: 36px; height: 36px; font-size: 16px; }
}

/* ═══════════════════════════════════════════
   DARK MODE — NOT used in v2 (warm evenings)
   Kept minimal for ado/encadrant pages
   ═══════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  body:not(.warm-bg) {
    --bg: #111113;
    --card: #1A1A1E;
    --text: #F0F0F0;
    --text-light: #9CA3AF;
    --shadow: 0 4px 24px rgba(0,0,0,.2);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.3);
  }
  body:not(.warm-bg) .expandable-header:hover { background: rgba(255,255,255,.03); }
  body:not(.warm-bg) .quiz-opt { border-color: #374151; background: var(--card); color: var(--text); }
  body:not(.warm-bg) .multi-opt { border-color: #374151; background: var(--card); color: var(--text); }
  body:not(.warm-bg) .bottom-nav { background: #1A1A1E; border-top-color: #2D2D30; }
  body:not(.warm-bg) .onboarding-card input, body:not(.warm-bg) .onboarding-card select { background: #222; border-color: #374151; color: var(--text); }
}
