:root {
  --bg: #12122b;
  --surface: #1b1b3d;
  --surface-2: #23234d;
  --ink: #eceeff;
  --muted: #a6a9d4;
  --line: #34346a;

  --violet: #8b7bff;
  --cyan: #2fd8f0;
  --mint: #45e3a0;
  --yellow: #ffd166;
  --coral: #ff7a8a;

  --head: "Sora", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
}
a { color: var(--cyan); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.wrap { width: min(100% - 2.5rem, 60rem); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 44rem); margin-inline: auto; }
code { font-family: var(--mono); font-size: 0.92em; color: var(--yellow); }

/* ---------- En-tête ---------- */
header.site { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logo { font-family: var(--mono); font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.logo span { color: var(--mint); }
nav { display: flex; gap: 0.25rem; }
nav a {
  font-family: var(--head);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}
nav a:hover { color: var(--ink); background: var(--surface); }
nav a[aria-current="page"] { color: var(--bg); background: var(--violet); }

/* ---------- Héros ---------- */
.hero { padding: 4.5rem 0 3.5rem; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.hero h1 {
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.hero p { color: var(--muted); margin: 0 0 1.5rem; max-width: 30rem; }

.code-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.75;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.code-card .bar { display: flex; gap: 0.45rem; padding: 0.75rem 1rem; background: var(--surface-2); }
.code-card .bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.code-card .bar i:nth-child(1) { background: var(--coral); }
.code-card .bar i:nth-child(2) { background: var(--yellow); }
.code-card .bar i:nth-child(3) { background: var(--mint); }
.code-card pre { margin: 0; padding: 1.25rem 1.25rem 1.4rem; overflow-x: auto; }
.k { color: var(--violet); }
.p { color: var(--cyan); }
.s { color: var(--mint); }
.n { color: var(--yellow); }
.c { color: #7a7db0; }

/* ---------- Étiquettes de catégories ---------- */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.tag.linux { color: var(--yellow); }
.tag.web { color: var(--cyan); }
.tag.python { color: var(--mint); }
.tag.secu { color: var(--coral); }
.tag.git { color: var(--violet); }

/* ---------- Articles ---------- */
.section-title { font-family: var(--head); font-size: 1.6rem; margin: 0 0 1.5rem; }
.posts { padding-bottom: 4.5rem; }
.posts .wrap { display: grid; gap: 1.25rem; }
article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
}
article.linux { border-left-color: var(--yellow); }
article.web { border-left-color: var(--cyan); }
article.python { border-left-color: var(--mint); }
article.secu { border-left-color: var(--coral); }
article.git { border-left-color: var(--violet); }
article .meta { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
article h2 { font-family: var(--head); font-size: 1.4rem; line-height: 1.25; margin: 0.6rem 0 0.5rem; }
article p { margin: 0 0 0.9rem; max-width: 42rem; }
article pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}
details summary { cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 0.95rem; color: var(--cyan); width: fit-content; }
details[open] summary { margin-bottom: 0.9rem; }

/* ---------- Boutons ---------- */
.btn, button {
  display: inline-block;
  font-family: var(--head);
  font-weight: 700;
  font-size: 1rem;
  background: var(--mint);
  color: #0b1f17;
  border: 0;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover, button:hover { filter: brightness(1.08); }
.btn.alt { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.alt:hover { border-color: var(--violet); }
button:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Contact ---------- */
.contact { background: var(--surface); border-top: 1px solid var(--line); padding: 4rem 0 5rem; }
.contact h2 { font-family: var(--head); font-size: 1.9rem; margin: 0 0 0.5rem; }
.contact .lead { color: var(--muted); margin: 0 0 2rem; }
form { display: grid; gap: 1.25rem; }
label { display: grid; gap: 0.4rem; font-family: var(--head); font-weight: 500; font-size: 0.95rem; }
input, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  width: 100%;
}
input:focus, textarea:focus { border-color: var(--violet); }
textarea { min-height: 9rem; resize: vertical; }
button { width: fit-content; }
.honeypot { position: absolute; left: -9999px; }
#statut { margin: 0; min-height: 1.5rem; font-family: var(--head); font-weight: 500; }
#statut.ok { color: var(--mint); }
#statut.erreur { color: var(--coral); }

/* ---------- Page À propos ---------- */
.about-hero { padding: 4rem 0 2rem; }
.about-hero .wrap { display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: center; }
.avatar {
  width: 168px; height: 168px;
  border-radius: 50%;
  object-fit: cover;
  display: grid; place-items: center;
  font-family: var(--head); font-weight: 800; font-size: 3.2rem;
  color: var(--bg);
  background: conic-gradient(from 200deg, var(--violet), var(--cyan), var(--mint), var(--yellow), var(--coral), var(--violet));
  border: 4px solid var(--surface-2);
}
.about-hero h1 { font-family: var(--head); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 0.4rem; }
.about-hero .role { font-family: var(--mono); color: var(--mint); margin: 0 0 1rem; }
.about-hero p { margin: 0; color: var(--muted); max-width: 34rem; }

.block { padding: 2.5rem 0; }
.block h2 { font-family: var(--head); font-size: 1.5rem; margin: 0 0 1.25rem; }
.block p { margin: 0 0 1rem; }

.skills { display: grid; gap: 1.1rem; }
.skills dt { font-family: var(--head); font-weight: 600; margin-bottom: 0.45rem; }
.skills dd { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--line); display: grid; gap: 1.75rem; }
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute; left: calc(-1.5rem - 7px); top: 0.55rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--violet);
  border: 2px solid var(--bg);
}
.timeline li:nth-child(2)::before { background: var(--cyan); }
.timeline li:nth-child(3)::before { background: var(--mint); }
.timeline li:nth-child(4)::before { background: var(--yellow); }
.timeline .when { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.timeline h3 { font-family: var(--head); font-size: 1.1rem; margin: 0.1rem 0 0.25rem; }
.timeline p { margin: 0; color: var(--muted); }

.links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cta { padding: 1rem 0 5rem; }

/* ---------- Pied de page ---------- */
footer { padding: 2rem 0; color: var(--muted); font-size: 0.9rem; text-align: center; border-top: 1px solid var(--line); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .about-hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .avatar { width: 120px; height: 120px; font-size: 2.4rem; }
}

/* ---------- Mentions légales / confidentialité ---------- */
.rgpd { margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.legal h1 { font-family: var(--head); font-weight: 800; font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.15; margin: 0 0 0.5rem; }
.legal h2 { font-family: var(--head); font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }
.legal ul { padding-left: 1.2rem; }
.legal .maj { color: var(--muted); font-size: 0.9rem; }
.todo { background: var(--yellow); color: #12122b; padding: 0.05em 0.4em; border-radius: 4px; font-weight: 600; }
