/* ============================================================================
   CHEWCAST — Design System principal
   Source de vérité : 10-11_UI_ROADMAP.md
   ============================================================================ */

/* --- Reset minimal --- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* --- Variables CSS (palette 10-11_UI_ROADMAP.md) --- */
:root {
  --bg:        #080d18;
  --surface:   #0f1826;
  --card:      #141f30;
  --border:    #1e2f45;
  --accent:    #d4870a;
  --accent2:   #1ec8b0;
  --accent3:   #e05555;
  --text:      #dde4f0;
  --muted:     #5e7490;

  --font-titre: 'Bebas Neue', sans-serif;
  --font-mono:  'IBM Plex Mono', monospace;
  --font-corps: 'DM Sans', sans-serif;

  --radius:    8px;
  --radius-sm: 4px;
  --pad-card:  14px;
  --gutter:    12px;
  --pad-section-h: 20px;
  --pad-section-v: 16px;
  --tap-min:   48px;
}

/* --- Base --- */
html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-corps);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  min-height: 100vh;
  padding-bottom: 72px; /* place pour la nav fixe */
}

/* --- Typographie --- */
.titre-page {
  font-family: var(--font-titre);
  font-size: clamp(28px, 6vw, 42px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.1;
}
.titre-section {
  font-family: var(--font-titre);
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 12px;
}
.titre-carte {
  font-family: var(--font-corps);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}
.label-data {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.valeur-data {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}
.texte-muted {
  color: var(--muted);
  font-size: 13px;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--pad-section-h);
}
.page {
  padding-top: var(--pad-section-v);
  padding-bottom: var(--pad-section-v);
}
.section {
  margin-bottom: 24px;
}

/* --- Flex utilitaires --- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

/* --- Espacements --- */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* --- Accessibilité --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Navigation principale (bas de page, mobile-first) --- */
.nav-principale {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.nav-principale a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  justify-content: center;
  color: var(--muted);
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}
.nav-principale a:hover,
.nav-principale a.router-link-active {
  color: var(--accent);
}
.nav-principale a.router-link-active::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  margin-top: 1px;
}
.nav-principale svg {
  width: 20px;
  height: 20px;
}

/* --- Toast / message global --- */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-mono);
  animation: toastIn 0.3s ease;
}
.toast-erreur {
  background: var(--accent3);
  color: #fff;
}
.toast-succes {
  background: var(--accent2);
  color: #080d18;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
