@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --orange: #E8621A;
  --orange-dark: #C04D10;
  --orange-light: #FFF3EC;
  --orange-glow: rgba(232,98,26,0.15);
  --black: #0D0D0D;
  --dark: #151515;
  --dark2: #1E1E1E;
  --dark3: #252525;
  --gray: #2E2E2E;
  --gray2: #3A3A3A;
  --muted: #6B6B6B;
  --text: #E8E4DC;
  --text2: #9A9590;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-orange: 0 4px 20px rgba(232,98,26,0.3);
  --nav-h: 64px;
  --sidebar-w: 260px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--black);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--gray2); border-radius: 3px; }

/* ─── TOPNAV ─── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px;
}
.topnav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--orange);
  text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.topnav-logo span { color: var(--text); }
.topnav-logo .moto-icon { font-size: 22px; }
.topnav-links { display: flex; gap: 4px; margin-left: 20px; }
.topnav-links a {
  font-size: 13px; font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
}
.topnav-links a:hover { color: var(--text); background: var(--dark3); }
.topnav-links a.active { color: var(--orange); background: var(--orange-glow); }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.btn-new {
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s;
}
.btn-new:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: var(--shadow-orange); }

/* ─── LAYOUT ─── */
.page-wrap {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HERO / DASHBOARD ─── */
.hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.hero-meta { font-size: 12px; color: var(--muted); font-family: 'DM Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 56px;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.hero h1 span { color: var(--orange); }
.hero-sub { font-size: 15px; color: var(--text2); max-width: 500px; }

/* ─── STATS ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--orange);
  opacity: 0;
  transition: opacity 0.3s;
}
.stat-card:hover::before { opacity: 1; }
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  color: var(--orange);
  line-height: 1;
  letter-spacing: 0.02em;
}
.stat-label { font-size: 12px; color: var(--text2); margin-top: 4px; font-weight: 500; }
.stat-unit { font-size: 16px; color: var(--orange); }

/* ─── TRIP CARDS ─── */
.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}
.trip-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}
.trip-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--orange-glow), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.trip-card:hover { border-color: var(--orange); transform: translateY(-3px); box-shadow: var(--shadow-orange); }
.trip-card:hover::after { opacity: 1; }
.trip-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; position: relative; z-index: 1; }
.trip-card-name { font-size: 17px; font-weight: 600; color: var(--text); }
.trip-card-date { font-size: 11px; color: var(--text2); font-family: 'DM Mono', monospace; margin-top: 3px; }
.badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-planned { background: rgba(59,91,220,0.18); color: #8BA3F5; border: 1px solid rgba(59,91,220,0.3); }
.badge-progress { background: rgba(232,98,26,0.18); color: var(--orange); border: 1px solid rgba(232,98,26,0.3); }
.badge-done { background: rgba(59,180,100,0.18); color: #5DCF82; border: 1px solid rgba(59,180,100,0.3); }

.route-strip {
  height: 3px;
  background: linear-gradient(to right, var(--orange), #F5A623, var(--orange-dark));
  border-radius: 2px;
  margin: 14px 0;
  position: relative; z-index: 1;
}
.waypoints { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; position: relative; z-index: 1; margin-bottom: 14px; }
.wp { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 5px; }
.wp-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); display: inline-block; flex-shrink: 0; }
.wp-arrow { color: var(--gray2); font-size: 12px; }
.trip-footer { display: flex; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.trip-stat { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 5px; }
.trip-stat strong { color: var(--text); font-weight: 500; }
.progress-bar { height: 3px; background: var(--gray); border-radius: 2px; overflow: hidden; margin: 10px 0 6px; position: relative; z-index: 1; }
.progress-fill { height: 100%; background: linear-gradient(to right, var(--orange), #F5A623); border-radius: 2px; }
.progress-label { font-size: 11px; color: var(--text2); font-family: 'DM Mono', monospace; position: relative; z-index: 1; }

/* ─── SECTION TITLES ─── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  font-family: 'DM Mono', monospace;
  display: flex; align-items: center; gap: 10px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── DETAIL PAGE LAYOUT ─── */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding-bottom: 60px; }
.detail-main {}
.detail-aside {}
.detail-hero {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.detail-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 42px;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.detail-title span { color: var(--orange); }
.detail-meta-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 16px; }
.detail-meta-item { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.detail-meta-item strong { color: var(--text); font-weight: 500; }

/* ─── TABS ─── */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.tab-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--text); background: var(--dark3); }
.tab-btn.active { background: var(--orange-glow); color: var(--orange); border-color: rgba(232,98,26,0.4); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── ETAPES ─── */
.etape-list { display: flex; flex-direction: column; gap: 0; }
.etape-item {
  display: flex; gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.etape-item:last-child { border-bottom: none; }
.etape-num-wrap { display: flex; flex-direction: column; align-items: center; gap: 0; }
.etape-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
}
.etape-line { width: 1px; flex: 1; background: var(--border2); margin-top: 6px; min-height: 20px; }
.etape-body { flex: 1; }
.etape-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.etape-detail { font-size: 13px; color: var(--text2); }
.etape-dist {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--orange);
  font-weight: 500;
  white-space: nowrap;
}

/* ─── CARDS GENERIQUES ─── */
.card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; }

/* ─── METEO ─── */
.meteo-list { display: flex; flex-direction: column; gap: 10px; }
.meteo-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--dark3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border: 1px solid var(--border);
}
.meteo-icon { font-size: 26px; flex-shrink: 0; }
.meteo-day-info { flex: 1; }
.meteo-day { font-size: 13px; font-weight: 500; color: var(--text); }
.meteo-desc { font-size: 12px; color: var(--text2); }
.meteo-temp { font-family: 'Bebas Neue', sans-serif; font-size: 28px; color: var(--orange); }
.meteo-alert { background: rgba(232,98,26,0.12); border: 1px solid rgba(232,98,26,0.3); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; color: var(--orange); margin-top: 10px; }

/* ─── BUDGET ─── */
.budget-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.budget-row:last-child { border-bottom: none; font-weight: 600; font-size: 15px; }
.budget-row label { color: var(--text2); }
.budget-row span { color: var(--text); font-family: 'DM Mono', monospace; }
.budget-total span { color: var(--orange) !important; }
.budget-bar-wrap { margin-top: 18px; }
.budget-item { margin-bottom: 10px; }
.budget-item-header { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.b-bar { height: 6px; background: var(--gray); border-radius: 3px; overflow: hidden; }
.b-fill { height: 100%; border-radius: 3px; background: linear-gradient(to right, var(--orange), #F5A623); }

/* ─── CHECKLIST ─── */
.check-group-title { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); font-family: 'DM Mono', monospace; padding: 16px 0 8px; }
.check-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.2s;
}
.check-item:hover { opacity: 0.8; }
.check-item input[type=checkbox] { accent-color: var(--orange); width: 17px; height: 17px; cursor: pointer; flex-shrink: 0; }
.check-item .check-label { font-size: 14px; color: var(--text); flex: 1; }
.check-item.checked .check-label { text-decoration: line-through; color: var(--muted); }
.check-item .check-cat { font-size: 10px; color: var(--muted); font-family: 'DM Mono', monospace; }
.checklist-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.check-count { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--text2); }

/* ─── NOTES ─── */
.note-item {
  background: var(--dark3);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}
.note-item strong { color: var(--text); display: block; margin-bottom: 3px; font-size: 13px; }

/* ─── ASIDE / SIDEBAR ─── */
.aside-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.aside-card h3 { font-size: 13px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; font-family: 'DM Mono', monospace; font-size: 11px; }
.aside-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.aside-stat:last-child { border-bottom: none; }
.aside-stat label { color: var(--text2); }
.aside-stat span { color: var(--text); font-weight: 500; font-family: 'DM Mono', monospace; }

/* ─── FORMS ─── */
.form-section {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 700px;
}
.form-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 0.03em;
  margin-bottom: 24px;
}
.form-title span { color: var(--orange); }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text2); margin-bottom: 8px; font-family: 'DM Mono', monospace; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--dark3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--orange); }
.form-select { cursor: pointer; }
.form-select option { background: var(--dark2); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit {
  background: var(--orange);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.03em;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.form-submit:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: var(--shadow-orange); }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ─── IA PAGE ─── */
.ia-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ia-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column; gap: 10px;
}
.ia-card:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: var(--shadow-orange); }
.ia-card-icon { font-size: 28px; }
.ia-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ia-card-desc { font-size: 13px; color: var(--text2); line-height: 1.6; }
.ia-badge { background: var(--orange-glow); color: var(--orange); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(232,98,26,0.3); align-self: flex-start; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}
.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--dark3); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost { background: none; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--dark3); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--dark2);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 13px; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-orange);
  transform: translateY(80px); opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast-icon { font-size: 18px; }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text2);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text2); margin-bottom: 24px; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }
.anim-fade-up { animation: fadeUp 0.4s ease forwards; }
.anim-delay-1 { animation-delay: 0.05s; opacity: 0; }
.anim-delay-2 { animation-delay: 0.1s; opacity: 0; }
.anim-delay-3 { animation-delay: 0.15s; opacity: 0; }
.anim-delay-4 { animation-delay: 0.2s; opacity: 0; }

/* ─── BACK LINK ─── */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text2);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--orange); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .trips-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topnav-links { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .tabs { flex-wrap: wrap; }
}
