/* =========
   Base theme
   ========= */

:root {
  color-scheme: dark; /* Indique au navigateur que le site est sombre */
  --bg: #0f1115;
  --bg-elevated: #171a20;
  --text: #eaeaea;
  --muted: #9a9a9a;
  --accent: #ffb300; /* ambre */
}

/* Reset léger */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* =========
   Layout global
   ========= */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #181b22 0, var(--bg) 60%);
  color: var(--text);
  line-height: 1.6;
}

/* Conteneur centré pour le contenu */

body > header,
body > main,
body > footer {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* =========
   Header & navigation
   ========= */

header {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

/* Titre principal de la page */

header h1 {
  margin: 0 0 0.25rem 0;
  font-size: clamp(1.8rem, 2.4vw + 1.4rem, 2.4rem);
  font-weight: 550;
  letter-spacing: 0.03em;
}

/* Sous-titre ou tagline */

header > p {
  margin: 0 0 1.5rem 0;
  color: var(--muted);
  max-width: 40rem;
}

/* Navigation horizontale simple */

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

nav a {
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.2rem 0; /* espace vertical cliquable */
}

/* Soulignement d’accent au survol */

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.18s ease-out;
}

nav a:hover::after,
nav a:focus-visible::after {
  width: 100%;
}

nav a.current {
  color: var(--accent);
}

nav a.current::after {
  width: 100%;
  background: var(--accent);
}

/* =========
   Liens généraux
   ========= */

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  text-decoration: none; /* évite double soulignement */
}

/* Empêcher le soulignement texte sur les liens de navigation
   (on garde uniquement la barre ::after) */

nav a,
nav a:hover,
nav a:focus-visible {
  text-decoration: none;
}

/* =========
   Main & sections
   ========= */

main {
  padding-bottom: 3rem;
}

section {
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Titre de section */

section h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
  font-weight: 520;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.4rem;
}

/* Paragraphe */

p {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

/* Texte secondaire / discret (si utilisé) */

.muted {
  color: var(--muted);
}

/* =========
   Listes
   ========= */

ul {
  margin: 0.3rem 0 0.4rem 0;
  padding-left: 1.1rem;
}

li {
  margin-bottom: 0.35rem;
}

/* =========
   Contact
   ========= */

.contact {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
}

/* =========
   Footer
   ========= */

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.2rem;
  padding-bottom: 2.5rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

/* =========
   Responsive
   ========= */

@media (max-width: 600px) {
  body > header,
  body > main,
  body > footer {
    padding-inline: 1rem;
  }

  header {
    padding-top: 1.8rem;
    padding-bottom: 1.2rem;
  }

  section {
    padding: 1.05rem 1.05rem;
  }

  nav {
    gap: 0.6rem;
  }
}
