/* /assets/css/base.css */

/* 1. Définition des variables de Design (Tokens)
   -------------------------------------------------- */
:root {
  /* Couleurs de base (Thème Clair) */
  --color-brand: #ff6233;
  --color-brand-hover: #e65329;
  --color-brand-light: #fff7f4;
  --color-brand-border: #ffe0d4;

  --color-text: #222;
  --color-text-muted: #555;
  --color-text-subtle: #888;
  --color-text-inverted: #ffffff;
  --color-link: var(--color-brand);

  --color-bg: #f5f5f7;
  --color-bg-card: #ffffff;
  --color-bg-alt: #f8f8fb;

  --color-border: #e2e2e7;
  --color-border-alt: #e3e4ef;
  
  --color-shadow: rgba(15, 23, 42, 0.08);

  /* Typographie */
  --font-sans: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-base: 16px;
  --font-size-lg: 17px;
  --line-height-base: 1.7;

  /* Layout */
  --container-width: 1200px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
}

/* 2. Thème Sombre
   -------------------------------------------------- */
[data-theme="dark"] {
  --color-text: #f1f1f4;
  --color-text-muted: #bbb;
  --color-text-subtle: #999;
  
  --color-bg: #121212;
  --color-bg-card: #1e1e1e;
  --color-bg-alt: #252525;

  --color-border: #333;
  --color-border-alt: #3a3a3a;
  
  --color-shadow: rgba(0, 0, 0, 0.2);
}

/* 3. RESET / BASE
   -------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Comportement de défilement doux */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background var(--transition-fast), color var(--transition-fast);
}

/* 4. LIENS / TEXTE
   -------------------------------------------------- */
a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

p {
  margin-bottom: 0.9rem;
}

h1, h2, h3, h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h2 {
  color: var(--color-brand);
}

/* 5. IMAGES
   -------------------------------------------------- */
img, figure {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 6. LAYOUT GLOBAL
   -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-main {
  padding: 2.4rem 0 3.2rem;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.4rem 0 2rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* 7. BADGES / TAGS
   -------------------------------------------------- */
.tag,
.tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-alt);
  font-size: 0.75rem;
  margin: 0 0.35rem 0.35rem 0;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-alt);
}

/* 8. UTILITAIRES
   -------------------------------------------------- */
.text-muted {
  color: var(--color-text-muted);
}
.text-center {
  text-align: center;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

/* 9. RESPONSIVE
   -------------------------------------------------- */
@media (min-width: 768px) {
  body {
    font-size: var(--font-size-lg);
  }
  .site-main {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }
}