/* =====================================================================
   PORTFOLIO PERSONNEL — style.css
   Palette : nuit numérique (fond sombre) + accents "terminal"
   Typo    : Space Grotesk (titres) / IBM Plex Sans (texte) / IBM Plex Mono (labels)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Couleurs */
  --bg: #14171f;
  --bg-alt: #1c2333;
  --surface: #232b3d;
  --border: #333b52;
  --text: #edeff5;
  --text-muted: #9aa3b5;
  --accent: #f2b134;   /* or/soleil */
  --accent-2: #2ec4b6; /* turquoise */

  /* Typo */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { color: var(--text-muted); }

a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover, a:focus-visible { color: var(--accent); }

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

.container {
  width: min(1000px, 92%);
  margin-inline: auto;
}

/* --- Étiquette style "invite de commande" (signature visuelle) --- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 6px;
  padding: 0.25em 0.6em;
  margin-bottom: 0.9em;
}
.eyebrow::before { content: "$ "; color: var(--accent); }

/* --- En-tête / navigation --- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(20, 23, 31, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em 0;
  flex-wrap: wrap;
  gap: 0.75em;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  font-size: 1.05rem;
}
.logo .dot { color: var(--accent); }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5em;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav.main-nav a {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

nav.main-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* --- Hero (page d'accueil) --- */
.hero {
  padding: 5em 0 4em;
}

.terminal {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 640px;
  margin-top: 1.5em;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 0.6em 0.8em;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.terminal-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border);
}
.terminal-bar span:nth-child(1) { background: #e5534b; }
.terminal-bar span:nth-child(2) { background: #f2b134; }
.terminal-bar span:nth-child(3) { background: #2ec4b6; }

.terminal-body {
  padding: 1.2em 1.4em 1.6em;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  min-height: 5.5em;
}

#typed-line::after {
  content: "▌";
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}
@media (prefers-reduced-motion: reduce) {
  #typed-line::after { animation: none; }
}
@keyframes blink { 50% { opacity: 0; } }

.hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.hero .lead { font-size: 1.1rem; max-width: 46ch; }

.button-row { display: flex; gap: 1em; margin-top: 1.8em; flex-wrap: wrap; }

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.7em 1.3em;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: inline-block;
}
.btn.primary {
  background: var(--accent);
  color: #14171f;
  border-color: var(--accent);
  font-weight: 500;
}
.btn.primary:hover { background: #ffcf70; color: #14171f; }
.btn.ghost { color: var(--text); }
.btn.ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* --- Sections génériques --- */
section { padding: 3.5em 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: none; }

/* --- Compétences --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2em;
  margin-top: 1.5em;
}
.skill-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2em;
}
.skill-card h3 {
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  color: var(--text);
}
.skill-bar {
  height: 6px;
  background: var(--surface);
  border-radius: 4px;
  margin-top: 0.7em;
  overflow: hidden;
}
.skill-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 4px;
}

/* --- Projets --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4em;
  margin-top: 1.5em;
}
.project-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4em;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.project-card:hover, .project-card:focus-within {
  transform: translateY(-6px);
  border-color: var(--accent-2);
}
.project-card .tags { margin-top: 0.9em; display: flex; gap: 0.5em; flex-wrap: wrap; }
.project-card .tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-2);
  border: 1px solid var(--border);
  padding: 0.15em 0.5em;
  border-radius: 4px;
}

/* --- À propos --- */
.about-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2.5em;
  align-items: start;
}
.avatar {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: #14171f;
  font-weight: 700;
}
@media (max-width: 640px) {
  .about-layout { grid-template-columns: 1fr; }
  .avatar { margin: 0 auto; }
}

.info-list { list-style: none; padding: 0; margin: 1.5em 0 0; }
.info-list li {
  display: flex;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.5em 0;
  border-bottom: 1px dashed var(--border);
}
.info-list b { color: var(--text); min-width: 110px; }

/* --- Formulaire de contact --- */
form.contact-form {
  display: grid;
  gap: 1.1em;
  max-width: 520px;
  margin-top: 1.5em;
}
.field { display: grid; gap: 0.4em; }
.field label { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text); }
.field input, .field textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0.7em 0.9em;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent-2);
}
.field .error {
  color: #ff8a80;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  min-height: 1.1em;
}
#form-status {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  min-height: 1.4em;
}
#form-status.success { color: var(--accent-2); }
#form-status.error { color: #ff8a80; }

/* --- Pied de page --- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5em 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
}
