/* ==========================================================================
   base.css — commun à toutes les pages
   Variables globales, reset minimal, header.
   ========================================================================== */

:root {
  /* Couleurs du site (hors DA spécifique aux projets) */
  --color-bg: #1c1d20;
  --color-surface: #26272b;
  --color-border: #34363b;
  --color-text: #f2f2f2;
  --color-text-muted: #a7a9ae;

  /* Typo par défaut — chaque projet pourra la surcharger dans themes.css */
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Header : sa hauteur sert aussi au calcul de la hauteur des bannières */
  --header-h: 64px;

  /* Marges latérales du contenu */
  --gutter: clamp(16px, 3vw, 48px);
}

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

html,
body {
  margin: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

/* L'attribut hidden doit toujours masquer, même un élément à qui une règle
   donne un display (comme les images ci-dessus) */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-inline: var(--gutter);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header__brand {
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-header__nav {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 2.25rem);
  overflow-x: auto;
}

.site-header__nav a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-header__nav a:hover,
.site-header__nav a:focus-visible,
.site-header__nav a[aria-current="page"] {
  color: var(--color-text);
}

@media (max-width: 480px) {
  .site-header__nav a {
    font-size: 0.85rem;
  }
}
