/* =========================================================================
   Design tokens
   Palette inspirée des tableaux de bord d'infrastructure : graphite profond,
   un accent ambre (statut "actif"), un accent bleu froid (liens/structure)
   et un vert de statut réservé aux indicateurs "opérationnel".
   ========================================================================= */
:root {
  --bg: #0E1316;
  --bg-alt: #12181B;
  --surface: #161D21;
  --surface-raised: #1B2327;
  --border: #262F33;
  --border-soft: #1E2629;
  --text: #E8ECEE;
  --text-muted: #8B979C;
  --text-faint: #5C666A;
  --amber: #E8A33D;
  --amber-dim: #7A5A28;
  --blue: #4FA8D8;
  --green: #4FBE84;

  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --max-width: 1120px;
  --radius: 3px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--amber);
  color: #14100a;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* =========================================================================
   Header / nav
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 19, 22, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}
.brand__mark { color: var(--amber); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
}
.site-nav a { color: var(--text-muted); transition: color 0.15s ease; }
.site-nav a:hover { color: var(--text); }
.site-nav__cta {
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius);
  color: var(--text) !important;
}
.site-nav__cta:hover { border-color: var(--amber); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 1px; margin: 0 8px; background: var(--text-muted); }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border-soft);
  padding: 8px 28px 16px;
}
.mobile-nav a { padding: 12px 0; color: var(--text-muted); border-bottom: 1px solid var(--border-soft); }
.mobile-nav.is-open { display: flex; }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
}

/* =========================================================================
   Panel corner-bracket device — motif récurrent inspiré des baies serveur /
   fenêtres de monitoring. Réservé aux blocs clés (hero, stats).
   ========================================================================= */
.panel-corners {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
}
.panel-corners::before,
.panel-corners::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--amber);
  opacity: 0.7;
}
.panel-corners::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.panel-corners::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(560px 280px at 85% -10%, rgba(79, 168, 216, 0.08), transparent 70%),
    var(--bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.hero__avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  margin-bottom: 20px;
  display: block;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  margin-bottom: 18px;
}

.hero__name {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.08;
  margin-bottom: 10px;
}

.hero__headline {
  font-size: 1.2rem;
  color: var(--blue);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero__summary {
  color: var(--text-muted);
  max-width: 62ch;
  margin-bottom: 32px;
}

.hero__actions { display: flex; gap: 14px; margin-bottom: 44px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn--primary { background: var(--amber); color: #14100a; }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--blue); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}
.stat-row__item { padding: 16px 18px; }
.stat-row__item dt {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-row__item dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--text);
}

.hero__console { padding: 0; overflow: hidden; }
.console__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}
.console__bar span:not(.console__bar-title) {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
}
.console__bar-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.console__body {
  margin: 0;
  padding: 18px 16px 20px;
  font-family: var(--font-mono);
  font-size: 12.6px;
  line-height: 1.65;
  color: var(--text-muted);
  overflow-x: auto;
}
.console__body .c-muted { color: var(--text-faint); }
.console__body .c-ok { color: var(--green); }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
}

/* =========================================================================
   Section shell
   ========================================================================= */
.section { padding: 80px 0; border-bottom: 1px solid var(--border-soft); }
.section--alt { background: var(--bg-alt); }

.section__heading { max-width: 640px; margin-bottom: 44px; }
.section__heading h2 { font-size: 1.9rem; margin-bottom: 10px; }
.section__lede { color: var(--text-muted); font-size: 1.02rem; }

.section__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}
.section__body p { color: var(--text-muted); max-width: 62ch; margin-bottom: 24px; }

.about-facts { display: flex; flex-direction: column; gap: 14px; max-width: 46ch; }
.about-facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.about-facts li span { color: var(--text-muted); }

@media (max-width: 860px) {
  .section__grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Compétences
   ========================================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px 44px;
}
.skill-group h3 {
  font-size: 0.95rem;
  color: var(--blue);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.skill-list { display: flex; flex-direction: column; gap: 14px; }
.skill-item__row { display: flex; justify-content: space-between; font-size: 14px; }

/* =========================================================================
   Expérience — timeline
   ========================================================================= */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}
.timeline__item { position: relative; padding-bottom: 44px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
  position: absolute;
  left: -28px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--amber);
}
.timeline__meta {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.timeline__content h3 { font-size: 1.15rem; margin-bottom: 3px; }
.timeline__org { color: var(--blue); font-size: 0.95rem; margin-bottom: 14px; }
.timeline__highlights { display: flex; flex-direction: column; gap: 8px; max-width: 68ch; }
.timeline__highlights li {
  position: relative;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 14.5px;
}
.timeline__highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 1px;
  background: var(--text-faint);
}

/* =========================================================================
   Projets
   ========================================================================= */
.projects-list { display: flex; flex-direction: column; gap: 1px; background: var(--border-soft); }
.project {
  background: var(--bg-alt);
  padding: 28px;
}
.project--featured { background: var(--surface); }
.project__header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.project__header h3 { font-size: 1.25rem; }
.project__badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 3px 8px;
  border-radius: var(--radius);
}
.project__summary { color: var(--text); margin-bottom: 8px; max-width: 72ch; }
.project__description { color: var(--text-muted); font-size: 14.5px; margin-bottom: 16px; max-width: 76ch; }
.project__stack { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 16px; }
.project__stack li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: var(--radius);
}
.project__links { display: flex; gap: 18px; }
.project__links a { color: var(--blue); font-size: 14px; border-bottom: 1px solid transparent; }
.project__links a:hover { border-bottom-color: var(--blue); }

/* =========================================================================
   Certifications
   ========================================================================= */
.cert-list { display: flex; flex-direction: column; }
.cert-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cert-item__status {
  flex: 0 0 auto;
  width: 90px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.cert-item__status--obtained { color: var(--green); border-color: rgba(79, 190, 132, 0.35); }
.cert-item__status--in_progress { color: var(--amber); border-color: var(--amber-dim); }
.cert-item__name { font-size: 15px; margin-bottom: 3px; }
.cert-item__meta { font-size: 13px; color: var(--text-muted); }

@media (max-width: 560px) {
  .cert-item { align-items: flex-start; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { padding: 72px 0 32px; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-soft);
}
.site-footer__title { font-size: 1.6rem; margin-bottom: 10px; max-width: 22ch; }
.site-footer__text { color: var(--text-muted); max-width: 46ch; }
.site-footer__contacts { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.site-footer__contacts a { color: var(--blue); font-size: 14.5px; }
.site-footer__contacts a:hover { text-decoration: underline; }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

@media (max-width: 700px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; gap: 6px; }
}


/* --- Logo, contexte, cartographie d'infrastructure --- */
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.project__block { margin: .9rem 0 0; }
.project__block h4 { margin: 0 0 .25rem; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.project__block p { margin: 0; }
.project__infra { margin: 1rem 0 0; border: 1px solid rgba(127, 127, 127, .35); border-radius: 10px; padding: .6rem .9rem; }
.project__infra summary { cursor: pointer; font-weight: 600; }
.infra-diagram { margin-top: .8rem; background: #f8fafc; color: #0f172a; border-radius: 8px; padding: 1rem; overflow-x: auto; }
.infra-diagram pre { margin: 0; background: transparent; color: inherit; white-space: pre; }
.infra-layers { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .4rem; }
.infra-layers li { display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
.infra-layers strong { min-width: 9rem; }


/* --- Schémas d'infrastructure par projet --- */
.project__figure { margin: 1.1rem 0 0; }
.project__figure img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(127, 127, 127, .35); }
.project__figure figcaption { margin-top: .45rem; font-size: .8rem; opacity: .7; }

/* Frise : marqueurs avec pictogrammes */
.timeline { padding-left: 52px; }
.timeline::before { left: 20px; }
.timeline__marker {
  left: -48px;
  top: -2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--amber);
  border: 1.5px solid var(--amber);
}
.timeline__marker svg { width: 16px; height: 16px; }
