/* --- 1. CONFIGURATION & VARIABLES --- */
:root {
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #e94560;
  --highlight-color: #0f3460;
  --text-primary: #ffffff;
  --text-secondary: #a7a9be;
  --text-accent: #e94560;
  --background-main: #16213e;
  --background-surface: #1a1a2e;
  --font-size-xl: clamp(1.5rem, 5vw, 2rem); /* Taille fluide en 2026 */
}

/* Reset Moderne */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
h1 {
  margin-bottom: 1rem;
  color: var(--accent-color);
  text-align: center;
  text-shadow: 0 0 20px color-mix(in srgb, var(--accent-color), transparent 80%);
}

body {
  background-color: var(--background-main);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- 2. STRUCTURE MOBILE (Défaut) --- */

main {
  flex: 1; /* Pousse le footer vers le bas si la page est vide */
  padding: 1.5rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

header {
  background-color: var(--primary-color);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column; /* Empilé sur mobile */
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

header nav ul {
  display: flex;
  flex-wrap: wrap; /* Évite les débordements sur petits écrans */
  justify-content: center;
  list-style: none;
  gap: 1rem;
}

footer {
  background-color: var(--primary-color);
  color: var(--text-primary);
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--highlight-color);
}

/* --- 3. ADAPTATION DESKTOP (Breakpoint @ 768px) --- */

@media (min-width: 48em) {
  header {
    flex-direction: row; /* Aligné sur desktop */
    justify-content: space-between;
    padding: 1rem 2rem;
  }

  header nav ul {
    gap: 2rem;
  }

  main {
    padding: 2rem;
  }
}

/* --- 4. ÉLÉMENTS TYPOGRAPHIQUES & LIENS --- */

h1,
h2,
h3 {
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: filter 0.3s ease;
}

a:hover {
  filter: brightness(1.2);
}

/* Style spécifique aux liens de navigation */
header nav ul li a {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

header nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

header nav ul li a:hover {
  color: var(--accent-color);
}

header nav ul li a:hover::after {
  width: 100%;
}
