/* ============================================================
   NY JOURNAL — Styles (voyage, night-city, typo soignée)
   ============================================================ */
:root {
  --bg: #0b0f17;
  --bg-soft: #121927;
  --card: #182032;
  --card-2: #212c44;
  --border: #2b3a58;
  --text: #eef2f9;
  --text-dim: #93a3c0;
  --gold: #f5c76a;
  --gold-2: #d9a441;
  --blue: #7fb2ff;
  --teal: #5eead4;
  --pink: #f472b6;
  --green: #4ade80;
  --red: #f87171;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  background-image:
    radial-gradient(1000px 500px at 90% -5%, rgba(127, 178, 255, 0.10), transparent),
    radial-gradient(800px 500px at -10% 20%, rgba(245, 199, 106, 0.06), transparent);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  min-height: 100vh;
}
body { padding-bottom: 30px; }

/* ---------- Header ---------- */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 10px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-emoji { font-size: 30px; }
.app-header h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.tagline { font-size: 12px; color: var(--text-dim); margin-top: 2px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* ---------- Tabs ---------- */
.tabs {
  position: sticky; top: 0; z-index: 50;
  display: flex; gap: 6px; padding: 8px 14px;
  background: rgba(11, 15, 23, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1;
  background: var(--card); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tab.active { background: linear-gradient(135deg, rgba(245,199,106,0.18), rgba(245,199,106,0.05)); color: var(--gold); border-color: rgba(245,199,106,0.5); }

main { padding: 12px 14px; display: flex; flex-direction: column; gap: 14px; max-width: 680px; margin: 0 auto; }
.hidden { display: none !important; }

/* ---------- Trip progress ---------- */
.trip-progress {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.tp-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--text-dim); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.tp-bar { margin-top: 8px; height: 8px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.tp-bar > i { display: block; height: 100%; width: 0%; border-radius: 6px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .4s; }
.tp-label { margin-top: 6px; font-size: 12px; color: var(--text-dim); font-style: italic; }

/* ---------- Timeline ---------- */
.timeline {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.timeline::-webkit-scrollbar { display: none; }
.tl-day {
  flex: 0 0 auto; width: 52px; text-align: center;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 7px 3px 5px; cursor: pointer;
  scroll-snap-align: center; transition: transform .12s, border-color .12s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tl-day:active { transform: scale(0.93); }
.tl-day .d { font-size: 9px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; }
.tl-day .n { font-size: 15px; font-weight: 800; margin: 1px 0; }
.tl-day .m { font-size: 12px; }
.tl-day .k { font-size: 8.5px; color: var(--text-dim); font-weight: 700; margin-top: 2px; }
.tl-day .k.done { color: var(--green); }
.tl-day.today { border-color: var(--gold); background: rgba(245,199,106,0.08); }
.tl-day.today .n { color: var(--gold); }
.tl-day.selected { border-color: var(--blue); background: rgba(127,178,255,0.12); box-shadow: 0 0 0 3px rgba(127,178,255,0.15); }
.tl-day.future { opacity: 0.45; }

/* ---------- Projection score ---------- */
.projection-score { border-color: rgba(94, 234, 212, 0.4); }
.ps-label { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.ps-value { font-size: 30px; font-weight: 800; margin: 4px 0; color: var(--teal); }
.ps-bar { height: 8px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.ps-bar > i { display: block; height: 100%; width: 0%; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width .4s; }
.ps-sub { font-size: 12px; color: var(--text-dim); margin-top: 6px; font-style: italic; }

/* ---------- Cards / editor ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.card h2 { font-size: 15px; font-weight: 800; margin-bottom: 12px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.field { display: block; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--text-dim); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.field textarea, .field input[type="text"] {
  width: 100%; margin-top: 6px;
  background: var(--bg-soft); border: 1.5px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 11px 13px; font-size: 15px; line-height: 1.55;
  font-family: Georgia, "Times New Roman", serif; outline: none; resize: vertical;
}
.field textarea:focus, .field input[type="text"]:focus { border-color: var(--gold-2); }

.mood-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mood-label { font-size: 12px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; margin-right: 4px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.mood {
  background: var(--bg-soft); border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 22px; padding: 6px 10px; cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s;
}
.mood:active { transform: scale(0.9); }
.mood.active { border-color: var(--gold); background: rgba(245,199,106,0.15); transform: scale(1.08); }

.slider-field { margin-top: 16px; }
.sf-top { display: flex; justify-content: space-between; align-items: baseline; }
.sf-top label { font-size: 13px; font-weight: 700; color: var(--text-dim); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.sf-value { font-size: 15px; font-weight: 800; color: var(--gold); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.slider-field input[type="range"] { width: 100%; margin-top: 8px; accent-color: var(--gold-2); }
.sf-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-dim); margin-top: 3px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.qod { font-size: 14px; font-style: italic; color: var(--gold); margin-top: 8px; line-height: 1.5; }

.editor-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), #b8860b);
  color: #1a1204; font-weight: 800; border: none; border-radius: 12px;
  padding: 12px 22px; font-size: 14px; cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.btn-primary:active { transform: scale(0.96); }
.save-state { font-size: 12px; color: var(--green); font-style: italic; }

/* ---------- Projection ---------- */
.hero p { font-size: 14px; line-height: 1.7; color: var(--text-dim); margin-top: 4px; }
.age-scale { margin-top: 14px; }
.as-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-dim); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.as-row span:nth-child(2) { color: var(--gold); font-style: italic; }
.as-bar { margin-top: 6px; height: 8px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; }
.as-bar > i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--blue), var(--gold)); border-radius: 6px; transition: width .4s; }

.decades { display: flex; flex-direction: column; gap: 10px; }
.decade {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.decade .d-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.decade .d-title { font-size: 15px; font-weight: 800; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.decade .d-age { font-size: 12px; color: var(--text-dim); font-weight: 700; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.decade .d-q { font-size: 12px; font-style: italic; color: var(--text-dim); margin: 2px 0 8px; }
.decade textarea {
  width: 100%; background: var(--bg-soft); border: 1.5px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.55;
  font-family: Georgia, "Times New Roman", serif; outline: none; resize: vertical;
}
.decade textarea:focus { border-color: var(--gold-2); }

.big-q { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-dim); margin-bottom: 4px; }
.big-q strong { color: var(--text); }

.bilan-content { font-size: 13.5px; line-height: 1.7; color: var(--text-dim); white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; }
.bilan-content .b-empty { font-style: italic; }

.btn-ghost {
  background: var(--card-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.btn-ghost:active { transform: scale(0.96); }

.app-footer { text-align: center; color: var(--text-dim); font-size: 11.5px; padding: 20px 14px 4px; opacity: .75; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
