@import url(/assets/fonts/fonts.css);

/* Couleurs : bandeau bleu nuit pour l'en-tête et le schéma, fond alu pour le reste,
   et une couleur par couche de l'infra (réseau, exposition, virtualisation, Kubernetes, stockage, apps). */
:root {
  --bg: #eef0f3;
  --panel: #ffffff;
  --ink: #0f1e38;
  --muted: #56637a;
  --line: #d5dae2;
  --soft: #e3e7ed;
  --band: #0b1426;
  --band-2: #111d35;
  --band-ink: #e6ebf3;
  --band-muted: #93a3bc;
  --band-line: #26375a;
  --app: #2f6fe4;
  --svc: #d29a12;
  --k8s: #23935d;
  --virt: #d4502f;
  --store: #8156cf;
  --net: #0e95a5;
  --ok: #1f8a57;
  --wip: #b7791f;
  --focus: #2f6fe4;
  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1729;
    --panel: #142139;
    --ink: #e3e8f0;
    --muted: #97a5bb;
    --line: #253655;
    --soft: #1b2a46;
    --band: #08101f;
    --band-2: #0e1830;
    --ok: #43bd82;
    --wip: #e8b04a;
    --focus: #8fb4ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1729;
  --panel: #142139;
  --ink: #e3e8f0;
  --muted: #97a5bb;
  --line: #253655;
  --soft: #1b2a46;
  --band: #08101f;
  --band-2: #0e1830;
  --ok: #43bd82;
  --wip: #e8b04a;
  --focus: #8fb4ff;
  color-scheme: dark;
}

.l-app { --c: var(--app); }
.l-svc { --c: var(--svc); }
.l-k8s { --c: var(--k8s); }
.l-virt { --c: var(--virt); }
.l-store { --c: var(--store); }
.l-net { --c: var(--net); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 .9375rem/1.6 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
}
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; }
p, ul, dl, dd { margin: 0; }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--app) 70%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--app); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; padding: .5rem 1rem; background: var(--panel); color: var(--ink); }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* Boutons et pastilles */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0 1rem;
  border-radius: 8px;
  background: var(--app);
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.button:hover { background: color-mix(in srgb, var(--app) 85%, #000); }
.button.ghost { background: transparent; color: inherit; border-color: currentColor; }
.button.ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .1rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge.ok, .badge.wip, .badge.dev { font-weight: 600; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.badge.wip { color: var(--wip); border-color: color-mix(in srgb, var(--wip) 45%, transparent); }
.badge.dev { color: var(--app); border-color: color-mix(in srgb, var(--app) 40%, transparent); }
.badge.ok::before, .badge.wip::before, .badge.dev::before {
  content: "";
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: currentColor;
}

/* En-tête, posé sur le bandeau */
.site-header { background: var(--band); color: var(--band-ink); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; min-height: 3.75rem; }
.brand { font-weight: 700; font-stretch: 112%; text-decoration: none; letter-spacing: -.005em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .875rem; }
.site-header nav a { text-decoration: none; color: var(--band-muted); }
.site-header nav a:hover { color: var(--band-ink); }

/* Bandeau d'accueil : présentation et schéma de l'infra */
.hero {
  background:
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / .07) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--band), var(--band-2));
  color: var(--band-ink);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--band-line);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.role {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .75rem .3rem .6rem;
  border: 1px solid var(--band-line);
  border-radius: 999px;
  background: rgb(255 255 255 / .03);
  color: var(--band-ink);
  font-size: .8125rem;
  font-weight: 500;
}
.role::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--k8s); box-shadow: 0 0 0 3px rgb(35 147 93 / .25); }
.hero h1 {
  margin-top: 1.1rem;
  font-size: clamp(2.25rem, 5.2vw, 3.5rem);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}
.lede { margin-top: 1.1rem; max-width: 33rem; font-size: 1.0625rem; line-height: 1.6; color: var(--band-muted); }
.facts { list-style: none; padding: 0; margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .875rem; color: var(--band-muted); }
.facts li { padding-left: .7rem; border-left: 2px solid var(--c); line-height: 1.3; }
.facts strong { color: var(--band-ink); font-weight: 600; }
.hero-links { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .6rem; }

.topo {
  margin: 0 calc(var(--gutter) * -.5);
  padding: clamp(.4rem, 2vw, 1.25rem);
  border: 1px solid var(--band-line);
  border-radius: 14px;
  background: rgb(8 16 31 / .55);
}
.topo svg { display: block; width: 100%; height: auto; font-family: "Archivo", system-ui, sans-serif; }
.topo figcaption { margin-top: .6rem; padding: 0 .25rem; font-size: .8125rem; color: var(--band-muted); }
.node rect { fill: #13213b; stroke: var(--band-line); stroke-width: 1; }
.node .bar { fill: var(--c); stroke: none; }
.node.internet rect { fill: transparent; stroke: var(--band-muted); stroke-dasharray: 3 4; }
.node-title { fill: var(--band-ink); font-size: 15px; font-weight: 700; font-stretch: 112%; }
.node-sub { fill: var(--band-muted); font-size: 12.5px; }
.edge-label { fill: var(--band-muted); font-size: 12px; font-stretch: 87%; }
.link { fill: none; stroke: var(--c); stroke-width: 2; stroke-opacity: .55; }
.link.dim { stroke-dasharray: 2 4; stroke-opacity: .5; }
.flow { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 60; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .flow { opacity: 1; animation: flow 2.4s linear infinite; }
}
@keyframes flow { to { stroke-dashoffset: -66; } }

/* Sections */
.section { padding: clamp(2.5rem, 5vw, 3.75rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 2rem; margin-bottom: 1.5rem; }
.section-head h2 { font-size: 1.5rem; font-stretch: 118%; letter-spacing: -.01em; }
.section-head p { color: var(--muted); max-width: 34rem; }
.tech { font-size: .8125rem; color: var(--muted); font-stretch: 92%; }

/* Apps : une carte par app, icône à gauche */
.apps { list-style: none; padding: 0; display: grid; gap: 1rem; }
.app {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  padding: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.app img { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.app h3 { font-size: 1.0625rem; font-stretch: 112%; }
.app h3 a { text-decoration: none; }
.app h3 a:hover { text-decoration: underline; }
.app-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 .6rem; }
.app-body > p:not(.app-badges):not(.tech) { font-size: .875rem; }
.app .tech { margin-top: .6rem; }
@media (min-width: 40rem) { .apps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .apps { grid-template-columns: repeat(3, 1fr); } }

/* Outils d'infra */
.tools { display: grid; gap: 1rem; }
.tool {
  padding: 1.25rem 1.25rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
  border-radius: 14px;
}
.tool-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .5rem; }
.tool h3 { font-size: 1.125rem; font-stretch: 112%; }
.tool > p:not(.tech) { font-size: .9rem; }
.ticks { list-style: none; padding: 0; margin: .8rem 0 .9rem; display: grid; gap: .35rem; font-size: .875rem; }
.ticks li { position: relative; padding-left: 1.2rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .45rem;
  width: .45rem;
  height: .25rem;
  border-left: 2px solid var(--c);
  border-bottom: 2px solid var(--c);
  transform: rotate(-45deg);
}
@media (min-width: 52rem) { .tools { grid-template-columns: 1.25fr 1fr; } }

/* Mon infra */
.infra { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.infra article { position: relative; padding: 1.1rem 1.25rem 1.2rem; background: var(--panel); }
.infra article::before { content: ""; position: absolute; left: 1.25rem; top: 0; width: 2rem; height: 3px; background: var(--c); }
.infra h3 { font-size: 1rem; font-stretch: 112%; margin: .35rem 0 .4rem; }
.infra p { font-size: .875rem; color: var(--muted); }
.infra p a { color: var(--ink); }
@media (min-width: 40rem) { .infra { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .infra { grid-template-columns: repeat(3, 1fr); } }

/* Technos */
.skills div { display: grid; gap: .5rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.skills div:last-child { border-bottom: 1px solid var(--line); }
.skills dt { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-stretch: 112%; font-size: .9rem; }
.skills dt::before { content: ""; width: .65rem; height: .65rem; border-radius: 3px; background: var(--c); }
.skills dd { display: flex; flex-wrap: wrap; gap: .4rem; }
.skills dd span { padding: .15rem .55rem; border-radius: 6px; background: var(--soft); font-size: .8125rem; }
@media (min-width: 48rem) {
  .skills div { grid-template-columns: 11rem 1fr; align-items: center; }
}

/* Contact */
.contact { background: var(--panel); }
.contact-grid { display: grid; gap: 1.25rem; align-items: center; }
.contact h2 { font-size: 1.5rem; font-stretch: 118%; margin-bottom: .3rem; }
.contact p { color: var(--muted); }
.contact-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.contact .button.ghost { color: var(--ink); }
@media (min-width: 48rem) {
  .contact-grid { grid-template-columns: 1fr auto; }
}

/* Pages simples */
.page { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 4.5rem); max-width: 42rem; }
.page h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-stretch: 118%; margin-bottom: 1.25rem; }
.page h2 { font-size: 1.05rem; font-stretch: 112%; margin: 1.75rem 0 .4rem; }
.page p + p { margin-top: .6rem; }

/* Pied */
.site-footer { border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.25rem; padding-bottom: 1.75rem; color: var(--muted); font-size: .8125rem; }

@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr 1.1fr; gap: 3.5rem; }
  .topo { margin: 0; }
}

/* Formulaire de contact, dans la fenêtre de l'accueil comme sur /contact/ */
.contact-form { display: grid; gap: 1rem; }
.field { display: grid; gap: .3rem; }
.field label { font-weight: 600; font-size: .875rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--virt); }
.hint { font-size: .8125rem; color: var(--muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { padding: .6rem .8rem; border-radius: 8px; font-size: .875rem; font-weight: 500; }
.form-status[data-kind="ok"] { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.form-status[data-kind="error"] { color: var(--virt); background: color-mix(in srgb, var(--virt) 12%, transparent); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.form-actions .hint { flex: 1 1 14rem; }
.button:disabled { opacity: .6; cursor: progress; }
button.button { cursor: pointer; font-family: inherit; }
.page-lede { color: var(--muted); margin-bottom: 1.75rem; }

.contact-dialog {
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.25rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 60px rgb(5 12 26 / .35);
}
.contact-dialog::backdrop { background: rgb(8 16 31 / .6); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-head h2 { font-size: 1.25rem; font-stretch: 115%; }
.dialog-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .contact-dialog[open] { animation: rise .18s ease-out; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
