:root {
  --bg: #0f0a1e;
  --bg2: #160f2c;
  --line: #3b2a6b;
  --v: #7c3aed;
  --v2: #a78bfa;
  --o: #f97316;
  --txt: #e9e4ff;
  --mut: #9d93c2;
  --w: 1240px;   /* largeur max du contenu */
  --gut: 24px;   /* marge latérale */
}
@media (min-width: 1600px) { :root { --w: 1360px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* Halos fixes en fond */
/* tailles relatives à l'écran pour rester visibles du mobile au 4K */
.halo { position: fixed; border-radius: 50%; filter: blur(clamp(70px, 8vw, 160px)); pointer-events: none; z-index: -1; will-change: transform, translate; }
.halo-v {
  width: clamp(360px, 48vw, 1000px); aspect-ratio: 1; background: var(--v); opacity: .6;
  top: clamp(-260px, -14vw, -100px); right: clamp(-220px, -10vw, -80px);
  animation: float 14s ease-in-out infinite;
}
.halo-o {
  width: clamp(300px, 38vw, 800px); aspect-ratio: 1; background: var(--o); opacity: .38;
  bottom: clamp(-240px, -13vw, -90px); left: clamp(-200px, -9vw, -70px);
  animation: float 18s ease-in-out infinite reverse;
}
@keyframes float { 50% { transform: translate(-4vw, 4vh) scale(1.08); } }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  /* barre pleine largeur, contenu aligné sur main */
  padding: 14px max(var(--gut), calc((100% - var(--w)) / 2 + var(--gut)));
  background: #0f0a1ecc; backdrop-filter: blur(12px);
  border-bottom: 1px solid #3b2a6b55;
}
.logo { font-weight: 700; font-size: 22px; padding: 6px 0; }
.logo span, h1 em { color: var(--o); font-style: normal; }
.nav nav { display: flex; gap: 22px; align-items: center; font-size: 15px; color: var(--mut); }
.nav nav a:hover { color: #fff; }
.nav-cta { color: var(--o) !important; }

main { max-width: var(--w); margin: auto; padding: 0 var(--gut); }

/* Hero */
.hero { padding: clamp(40px, 7vh, 110px) 0 60px; }
.tag {
  display: inline-block; font-size: 12px; color: var(--o);
  border: 1px solid #f9731655; background: #f9731612;
  padding: 5px 12px; border-radius: 20px; margin-bottom: 22px;
}
h1 { font-size: clamp(36px, min(5.2vw, 8vh), 84px); line-height: 1.04; max-width: 19ch; color: #fff; letter-spacing: -.02em; }
h1.name {
  text-transform: uppercase; max-width: none; letter-spacing: -.01em;
  font-size: clamp(42px, min(8vw, 12vh), 128px); line-height: .95;
}
h1.name em { display: block; }
.role {
  margin-top: 22px; font-size: clamp(14px, 1.4vw, 20px); color: var(--txt);
  letter-spacing: .04em;
}
.role span { color: var(--o); margin: 0 .4em; }
.lead { margin: 22px 0 32px; max-width: 620px; color: var(--mut); font-size: clamp(16px, 1.25vw, 20px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  background: var(--o); color: #1a0b00; font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 30px; border: 1.5px solid var(--o);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px #f9731644; }
.btn.ghost { background: transparent; color: var(--txt); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--v2); box-shadow: 0 8px 24px #7c3aed33; }

/* Cartes en verre */
.glass {
  background: #ffffff0a; backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  transition: border-color .25s ease, transform .25s ease;
}
.glass:hover { border-color: #7c3aed99; transform: translateY(-3px); }
.glass-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 56px; }
.glass-grid b { display: block; font-size: 30px; color: var(--o); }
.glass-grid small { color: var(--mut); }

/* Sections */
.section { padding: 80px 0 20px; scroll-margin-top: 70px; }
.title { font-size: clamp(26px, 4vw, 36px); margin-bottom: 30px; color: #fff; }
.title span { color: var(--o); font-size: .6em; margin-right: 6px; }
.about { max-width: 720px; color: var(--mut); font-size: 17px; display: grid; gap: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cards h3 { color: #fff; margin-bottom: 12px; font-size: 19px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 13px; padding: 5px 12px; border-radius: 20px;
  background: #7c3aed22; border: 1px solid var(--line); color: var(--v2);
}
.chips.small li { font-size: 12px; padding: 3px 10px; }

.project p { color: var(--mut); margin-bottom: 16px; font-size: 15px; }
.project .kicker { color: var(--o); font-size: 12px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }

/* Timeline */
.timeline { list-style: none; border-left: 2px solid var(--line); padding-left: 26px; display: grid; gap: 28px; max-width: 760px; }
.timeline > li { position: relative; }
.timeline > li::before {
  content: ""; position: absolute; left: -33px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--o); box-shadow: 0 0 0 4px #f9731633;
}
.timeline .date { font-size: 12px; color: var(--o); }
.timeline .now::before { box-shadow: 0 0 0 4px #f9731633, 0 0 16px var(--o); }
.badge-now {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; color: #1a0b00; background: var(--o); vertical-align: middle;
}
.timeline h3 { color: #fff; font-size: 18px; }
.timeline p { color: var(--mut); margin-bottom: 10px; }
.timeline .org { color: var(--v2); font-size: 14px; margin-bottom: 6px; }
.muted { color: var(--mut); font-size: 15px; }
.project { display: flex; flex-direction: column; }
.project .chips { margin-top: auto; }
.project .more { color: var(--o); font-size: 13px; margin-top: 16px; }
.project .more:hover { text-decoration: underline; }
.featured { border-color: #f9731666; }

/* Pages projet */
.project-page .hero { padding-bottom: 20px; }
.project-page h1 { font-size: clamp(32px, 6vw, 56px); }
.features { display: grid; gap: 10px; max-width: 820px; }
.features li { display: flex; gap: 12px; padding: 14px 18px; border-radius: 12px; color: var(--txt); }
.features li span { color: var(--o); }
.project-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--v2); margin-bottom: 30px; }
.project-nav a:hover { color: var(--o); }
.actions.center { justify-content: center; }

/* Images projet */
.cover, .gallery a, .thumb {
  display: block; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg2);
}
.cover { margin-top: 36px; box-shadow: 0 30px 80px #7c3aed33; cursor: zoom-in; }
.cover img, .gallery img, .thumb img { display: block; width: 100%; height: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.gallery a { cursor: zoom-in; transition: border-color .25s ease, transform .25s ease; }
.gallery a:hover { border-color: #f9731688; transform: translateY(-3px); }
.thumb { margin: -6px -6px 18px; aspect-ratio: 16 / 9; }
.thumb img { height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.project:hover .thumb img { transform: scale(1.04); }

.lightbox {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  padding: 24px; background: #0f0a1ee6; backdrop-filter: blur(6px); cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; border: 1px solid var(--line); }

/* Contact */
.contact-box { text-align: center; padding: 48px 24px; }
.contact-box h3 { font-size: clamp(22px, 4vw, 30px); color: #fff; }
.contact-box p { color: var(--mut); margin: 8px 0 24px; }
.contact-box .actions { justify-content: center; }

.footer { text-align: center; color: var(--mut); font-size: 12px; padding: 60px 24px 30px; }

/* Apparition au scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Menu burger (mobile) */
.burger {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: #ffffff0a; cursor: pointer; position: relative;
}
.burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px;
  background: var(--txt); transition: transform .25s ease, top .25s ease;
}
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* Zones cliquables confortables */
.nav nav a { padding: 10px 4px; }
.project .more { display: inline-block; padding: 12px 0; margin-top: 4px; }
.project-nav a { padding: 10px 0; }

/* Grilles qui ne débordent jamais */
.glass-grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.cards.projects { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.glass-grid { margin-top: clamp(36px, 7vh, 72px); }
.section { padding-top: clamp(60px, 10vh, 120px); }
.gallery { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

@media (max-width: 720px) {
  :root { --gut: 16px; }
  .nav { padding-top: 12px; padding-bottom: 12px; }
  .burger { display: block; }
  .nav-full {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0 !important;
    padding: 8px 16px 16px; background: var(--bg); box-shadow: 0 20px 40px #0008;
    border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-full.open { opacity: 1; visibility: visible; transform: none; }
  .nav-full a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid #3b2a6b55; }
  .nav-full a:last-child { border-bottom: 0; }
  .hero { padding: 56px 0 40px; }
  .lead { font-size: 16px; }
  .section { padding-top: 60px; }
  .glass { padding: 18px; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
  .timeline { padding-left: 20px; }
  .timeline > li::before { left: -27px; }
  .project-nav { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .halo { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===================== Effets ===================== */

/* Thème alternatif (code Konami) : cyan contrasté + lime vif */
.theme-alt {
  --bg: #04121a; --bg2: #072030; --line: #155e75;
  --v: #0891b2; --v2: #67e8f9; --o: #a3e635;
  --txt: #e0fbff; --mut: #8cc4cf;
}
.theme-alt .nav { background: #04121acc; }
.theme-alt .tag, .theme-alt .chip.hot { border-color: #a3e63555; background: #a3e63514; }
.theme-alt .chips li { background: #0891b222; }
.theme-alt .btn:not(.ghost) { color: #0b1a00; }
.theme-alt .btn:hover { box-shadow: 0 8px 24px #a3e63544; }
.theme-alt .timeline > li::before { box-shadow: 0 0 0 4px #a3e63533; }
.theme-alt .cover { box-shadow: 0 30px 80px #0891b233; }
body, .nav, .glass, .chips li, .btn { transition: background-color .4s ease, border-color .4s ease, color .4s ease; }

/* Animation de démarrage */
.booting body { overflow: hidden; }
.boot {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  padding: clamp(20px, 6vw, 64px); cursor: pointer; transition: opacity .4s ease;
}
.boot pre { font: inherit; font-size: clamp(12px, 1.4vw, 15px); line-height: 1.7; color: var(--mut); white-space: pre-wrap; }
.boot pre b { color: #4ade80; font-weight: 700; }
.boot-skip { position: absolute; right: 24px; bottom: 20px; font-size: 12px; color: var(--mut); opacity: .7; }
.boot.out { opacity: 0; pointer-events: none; }

/* Nom brouillé */
h1.name [data-scramble] { display: inline-block; }
h1.name em[data-scramble] { display: block; }

/* Git log */
.gitcmd { color: var(--mut); font-size: 14px; margin: -10px 0 26px; }
.gitcmd span { color: var(--o); margin-right: 6px; }
.timeline .commit { font-size: 13px; margin-bottom: 2px; color: var(--mut); }
.timeline .hash { color: #facc15; }
.theme-alt .timeline .hash { color: #fde047; }
.timeline .ref { color: var(--o); }
.timeline .tagref { color: var(--v2); }
.timeline .date { display: inline-block; margin-bottom: 6px; color: var(--mut); }

/* Terminal caché */
.term-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 48px; height: 48px; border-radius: 14px; cursor: pointer;
  background: var(--bg2); color: var(--o); border: 1px solid var(--line);
  font-size: 15px; font-weight: 700; box-shadow: 0 10px 30px #0006;
  transition: transform .2s ease, border-color .2s ease;
}
.term-fab:hover { transform: translateY(-2px); border-color: var(--o); }
.term-overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: #0006; backdrop-filter: blur(3px);
}
.term-overlay[hidden] { display: none; }
.term-win {
  width: min(820px, 100%); height: min(440px, 70vh); display: flex; flex-direction: column;
  background: #0b0716f2; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 80px #000a, 0 0 0 1px #7c3aed22; animation: termIn .25s ease;
}
.theme-alt .term-win { background: #031018f2; }
@keyframes termIn { from { transform: scale(.96); opacity: 0; } }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--mut); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.term-bar i:first-child { background: var(--o); }
.term-bar span { margin-left: 8px; flex: 1; }
.term-close { background: none; border: 0; color: var(--mut); font-size: 16px; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.term-close:hover { color: #fff; background: #ffffff12; }
.term-out { flex: 1; overflow-y: auto; padding: 14px 16px 4px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; color: var(--txt); }
.term-line { display: flex; gap: 8px; align-items: center; padding: 8px 16px 14px; font-size: 13px; }
.term-ps, .t-ps { color: var(--o); white-space: nowrap; }
.term-in { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--txt); font: inherit; font-size: 16px; caret-color: var(--o); }
.t-o { color: var(--o); } .t-v { color: var(--v2); } .t-ok { color: #4ade80; } .t-err { color: #f87171; } .t-mut { color: var(--mut); }

/* Notifications (empilées) */
.toasts {
  position: fixed; left: 50%; bottom: 84px; z-index: 130; translate: -50% 0; /* au-dessus du kernel panic */
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: max-content; max-width: calc(100vw - 32px); pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: 12px; font-size: 13px; text-align: center;
  background: var(--bg2); border: 1px solid var(--o); color: var(--txt);
  box-shadow: 0 12px 30px #0007; opacity: 0; translate: 0 20px;
  transition: opacity .3s ease, translate .3s ease;
}
.toast.show { opacity: 1; translate: 0 0; }

/* Page 404 */
.e404 { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.e404-box { width: min(680px, 100%); }
.e404 h1 { font-size: clamp(64px, 14vw, 140px); line-height: 1; }
.e404 .trace { margin: 24px 0 30px; padding: 18px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; color: var(--mut); min-height: 200px; }
.e404 .trace b { color: #f87171; font-weight: 700; }
.e404 .trace i { color: #4ade80; font-style: normal; }

@media (max-width: 720px) {
  .term-fab { right: 14px; bottom: 14px; }
  .term-overlay { padding: 8px; }
  .term-win { height: min(520px, 80vh); }
  .gitcmd { margin-top: -14px; }
}
@media (prefers-reduced-motion: reduce) {
  .term-win { animation: none; }
}

/* ===================== Baie serveur (compétences) ===================== */
.rack-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.rack {
  background: linear-gradient(180deg, #120c24, #0b0718);
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 16px;
  box-shadow: inset 0 0 0 6px #0f0a1e, inset 0 0 0 7px #2a1d4d, 0 30px 70px #0008;
}
.theme-alt .rack { background: linear-gradient(180deg, #06202c, #03121a); box-shadow: inset 0 0 0 6px #04121a, inset 0 0 0 7px #155e75, 0 30px 70px #0008; }
.rack-top { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--mut); padding: 4px 6px 10px; }
.rack-status { color: #4ade80; }
.rack-units {
  list-style: none; display: grid; gap: 6px; padding: 8px 18px; position: relative;
  /* rails perforés */
  background:
    radial-gradient(circle, #3b2a6b 1.4px, transparent 1.6px) left 6px top 0 / 8px 12px repeat-y,
    radial-gradient(circle, #3b2a6b 1.4px, transparent 1.6px) right 6px top 0 / 8px 12px repeat-y;
}
.rack-foot { height: 10px; margin: 8px 18px 0; border-radius: 4px; background: repeating-linear-gradient(90deg, #ffffff10 0 6px, transparent 6px 10px); }

.unit { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.unit.out { transform: translateX(18px); }
.unit-face {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 0 14px; min-height: 44px; border-radius: 6px; font: inherit; color: var(--txt);
  background: linear-gradient(180deg, #2a2148, #1c1534);
  border: 1px solid #3b2a6b; border-left: 4px solid #4a3a7d;
  box-shadow: inset 0 1px 0 #ffffff14, 0 2px 0 #0006;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.u2 .unit-face { min-height: 70px; }
.unit-face:hover { border-color: #7c3aed99; }
.unit-face:focus-visible { outline: 2px solid var(--o); outline-offset: 2px; }
.unit.out .unit-face { border-color: var(--o); border-left-color: var(--o); box-shadow: inset 0 1px 0 #ffffff14, 0 0 0 1px #f9731633, 0 10px 30px #f9731633; }
.theme-alt .unit-face { background: linear-gradient(180deg, #0b2f3d, #072230); border-color: #155e75; border-left-color: #0e7490; }
.theme-alt .unit.out .unit-face { box-shadow: inset 0 1px 0 #ffffff14, 0 0 0 1px #a3e63533, 0 10px 30px #a3e63533; }

.leds { display: flex; flex-direction: column; gap: 5px; }
.led { width: 6px; height: 6px; border-radius: 50%; display: block; }
.led.ok { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.led.act { background: var(--o); box-shadow: 0 0 6px var(--o); animation: blink 1.1s steps(2, start) infinite; }
.unit:nth-child(2n) .led.act { animation-duration: .7s; }
.unit:nth-child(3n) .led.act { animation-duration: 1.6s; }
@keyframes blink { to { opacity: .15; } }

.unit-lbl { font-size: 11px; color: var(--mut); background: #0006; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.unit-cat { font-weight: 700; font-size: 15px; white-space: nowrap; }
.unit.out .unit-cat { color: var(--o); }

.ports, .bays, .vents { margin-left: auto; display: flex; gap: 3px; flex-shrink: 1; min-width: 0; overflow: hidden; }
.ports i { width: 9px; height: 8px; border-radius: 2px; background: #0b0716; border: 1px solid #4a3a7d; flex-shrink: 0; }
.ports i:nth-child(3n+1) { box-shadow: inset 0 -2px 0 #4ade80; }
.bays { gap: 4px; }
.bays i { width: 18px; height: 40px; border-radius: 3px; background: repeating-linear-gradient(0deg, #0b0716 0 3px, #2a2148 3px 5px); border: 1px solid #4a3a7d; flex-shrink: 0; }
.vents { width: 30%; height: 60%; align-self: center; border-radius: 3px; background: repeating-linear-gradient(90deg, #0b0716 0 3px, transparent 3px 6px); opacity: .8; }
.u1 .vents { height: 14px; }
.theme-alt .ports i, .theme-alt .bays i { border-color: #0e7490; }

.rack-detail { position: sticky; top: 96px; }
.rack-detail h3 { color: #fff; font-size: 24px; margin: 4px 0 16px; }
.rack-hint { margin-top: 18px; font-size: 12px; color: var(--mut); }
.rack-detail.swap > * { animation: detailIn .3s ease both; }
.rack-detail.swap > :nth-child(2) { animation-delay: .04s; }
.rack-detail.swap > :nth-child(3) { animation-delay: .08s; }
@keyframes detailIn { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 860px) {
  .rack-wrap { grid-template-columns: minmax(0, 1fr); }
  .rack-detail { position: static; }
}
@media (max-width: 480px) {
  .rack { padding: 10px 8px 12px; }
  .rack-units { padding: 6px 12px; }
  .unit-face { gap: 9px; padding: 0 10px; }
  .unit.out { transform: translateX(8px); }
  .unit-lbl { display: none; }
  .unit-cat { font-size: 14px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .led.act { animation: none; }
  .unit { transition: none; }
  .rack-detail.swap > * { animation: none; }
}

/* ===================== Bouton de langue FR / EN ===================== */
.nav nav { margin-left: auto; order: 1; }
.lang-toggle { order: 2; }
.burger { order: 3; }
.lang-toggle {
  margin-left: 22px; height: 36px; min-width: 44px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--line); background: #ffffff0a;
  color: var(--txt); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.lang-toggle:hover { border-color: var(--o); color: var(--o); }
.lang-toggle .on-en, .lang-en .lang-toggle .on-fr { display: none; }
.lang-en .lang-toggle .on-en { display: inline; }
@media (max-width: 720px) {
  .lang-toggle { height: 44px; margin-left: auto; margin-right: 10px; }
}
@media (max-width: 480px) {
  .nav nav:not(.nav-full) { gap: 14px; font-size: 14px; }
  .nav nav a { white-space: nowrap; }
  .nav nav:not(.nav-full) ~ .lang-toggle { margin-left: 12px; }
}
@media (max-width: 400px) {
  .nav nav:not(.nav-full) .nav-cta { display: none; }
}

/* Nœud certifications de la baie */
.cert-badge {
  margin-left: auto; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700;
  color: #facc15; background: #facc1514; border: 1px solid #facc1555; white-space: nowrap;
}
.theme-alt .cert-badge { color: #fde047; }

/* Carte de certification (façon LinkedIn) */
.certs { display: grid; gap: 14px; }
.cert { display: flex; gap: 16px; align-items: flex-start; }
.cert-logo {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center;
  background: #0b0b0b; color: #fff; border: 1px solid #ffffff1f;
  font: 800 12px/1 'Space Grotesk', system-ui, sans-serif; letter-spacing: .08em;
}
.cert-body { min-width: 0; }
.cert h4 { color: #fff; font-size: 18px; font-weight: 700; line-height: 1.3; }
.cert-issuer { color: var(--txt); font-size: 15px; margin-top: 2px; }
.cert-meta { color: var(--mut); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.cert-meta .mono { font-size: 13px; }
.cert-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--mut);
  color: var(--txt); font-weight: 700; font-size: 15px;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.cert-btn:hover { border-color: var(--o); color: var(--o); background: #f9731612; }
.theme-alt .cert-btn:hover { background: #a3e63512; }
.cert-btn:focus-visible { outline: 2px solid var(--o); outline-offset: 2px; }
@media (max-width: 480px) {
  .cert-logo { width: 44px; height: 44px; font-size: 10px; }
  .cert h4 { font-size: 16px; }
  .cert-btn { min-height: 44px; padding: 8px 14px; font-size: 14px; white-space: nowrap; }
  .cert { gap: 12px; }
}
.rack-detail [hidden] { display: none !important; }


/* ===================== Kernel panic ===================== */
.panic {
  position: fixed; inset: 0; z-index: 120; background: #0a0204; color: #f87171;
  padding: clamp(20px, 6vw, 64px); transition: opacity .45s ease;
}
.panic pre { font: inherit; font-size: clamp(12px, 1.4vw, 15px); line-height: 1.75; white-space: pre-wrap; }
.panic .ok { color: #4ade80; }
.panic.out { opacity: 0; }
/* on secoue l'écran de crash (pas body : un transform sur body décale tous les éléments fixes) */
.shake .panic pre { animation: shake .42s linear 19; }
@keyframes shake {
  20% { transform: translate(-7px, 3px) rotate(-.3deg); }
  40% { transform: translate(6px, -3px) rotate(.3deg); }
  60% { transform: translate(-5px, -2px); }
  80% { transform: translate(4px, 3px); }
}

/* ===================== Mode faible bande passante ===================== */
.lite .halo { display: none; }
.lite *, .lite *::before, .lite *::after { animation: none !important; transition: none !important; }
.lite .reveal { opacity: 1; transform: none; }
.lite .glass, .lite .nav, .lite .term-overlay { backdrop-filter: none; }
.lite-off {
  display: grid !important; place-items: center; min-height: 140px;
  background: repeating-linear-gradient(45deg, #ffffff07 0 10px, transparent 10px 20px), var(--bg2);
}
.lite-off img { display: none; }
.lite-off::after { content: attr(data-lite-label); font: 12px 'JetBrains Mono', monospace; color: var(--mut); padding: 12px; text-align: center; }

/* ===================== Console KVM (détail des compétences) ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kvm {
  position: sticky; top: 96px; padding: 10px 10px 14px; border-radius: 18px;
  background: linear-gradient(180deg, #1c1534, #110c22);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px #0008, inset 0 1px 0 #ffffff12, inset 0 0 0 6px #0f0a1e, inset 0 0 0 7px #2a1d4d;
}
.theme-alt .kvm { background: linear-gradient(180deg, #082634, #04161f); box-shadow: 0 30px 70px #0008, inset 0 1px 0 #ffffff12, inset 0 0 0 6px #04121a, inset 0 0 0 7px #155e75; }
.kvm-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; font-size: 11px; letter-spacing: .08em; color: var(--mut); }
.kvm-led { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.kvm-host { margin-left: auto; color: var(--o); font-weight: 700; }

.kvm-screen {
  position: relative; overflow: hidden; min-height: 330px;
  margin: 0 4px; padding: 18px 20px 22px; border-radius: 10px;
  background: radial-gradient(130% 100% at 50% 0%, #170f2e 0%, #07040f 65%);
  border: 1px solid #000; box-shadow: inset 0 0 0 1px #ffffff0d, inset 0 0 50px #000d;
  font-size: 14px; line-height: 1.8; color: var(--txt);
}
.theme-alt .kvm-screen { background: radial-gradient(130% 100% at 50% 0%, #0a2a36 0%, #020b10 65%); }
/* lignes de balayage + reflet d'écran, très discrets */
.kvm-screen::before, .kvm-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.kvm-screen::before { background: repeating-linear-gradient(0deg, #ffffff06 0 1px, transparent 1px 3px); }
.kvm-screen::after { background: linear-gradient(160deg, #ffffff0c 0%, transparent 35%); border-radius: inherit; }

.kvm-out p, .kvm-out .k-line { margin: 0; overflow-wrap: anywhere; }
.kvm-out .k-line + .k-line { margin-top: 1px; }
.k-p { color: var(--o); }
.k-h { color: #fff; font-weight: 700; }
.k-m { color: var(--mut); }
.k-ok { color: #4ade80; }
.k-next { margin-top: 10px !important; }
.k-caret { display: inline-block; width: .55em; height: 1.05em; vertical-align: -0.15em; background: var(--o); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.k-in { animation: kIn .22s ease both; }
@keyframes kIn { from { opacity: 0; transform: translateX(-4px); } }

/* carte de certification dans l'écran */
.kvm-out .cert { margin: 12px 0 10px; padding: 14px; border-radius: 12px; background: #ffffff08; border: 1px solid #ffffff14; font-family: 'Space Grotesk', system-ui, sans-serif; line-height: 1.5; }

.kvm .rack-hint { margin: 12px 8px 0; }
@media (max-width: 860px) { .kvm { position: static; } .kvm-screen { min-height: 0; } }
@media (max-width: 480px) { .kvm-screen { padding: 14px 14px 18px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .k-caret, .k-in { animation: none; } }

/* ===================== Expérience : mini barre de durée ===================== */
.dbar { display: block; margin: 2px 0 8px; font-size: 12px; line-height: 1.4; white-space: nowrap; color: var(--mut); }
.dbar-y { font-size: 11px; opacity: .8; }
.dbar-cells { color: var(--v2); letter-spacing: .02em; }
.dbar.live .dbar-cells { color: var(--o); }
.dbar-cells i { font-style: normal; opacity: .45; }
.dbar-cells b { color: var(--o); font-weight: 400; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (max-width: 380px) { .dbar { font-size: 10.5px; } .dbar-y { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { .dbar-cells b { animation: none; } }
