/* =====================================================================
   Portfolio v2 — interface "OS personnel"
   Rétro / terminal : base neutre sombre, violet en minorité, glitch ponctuel.
   ===================================================================== */

/* Polices hébergées sur le site (SIL Open Font License, voir assets/fonts/OFL-*.txt) :
   sous-ensembles latin, latin étendu et symboles, chargés seulement si la page en a besoin. */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-mono-400-italic-symbols2.woff2") format("woff2");
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-mono-400-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-mono-400-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-mono-400-symbols2.woff2") format("woff2");
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-mono-500-symbols2.woff2") format("woff2");
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plex-mono-600-symbols2.woff2") format("woff2");
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plex-mono-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/plex-mono-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vt323-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vt323-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0e0d11;
  --desk: #111015;
  --win: #16151a;
  --win-2: #1c1b21;
  --bar: #211f27;
  --line: #33303b;
  --line-2: #4a4655;
  --text: #e8e4dc;
  --text-2: #bcb7c3;
  --dim: #8a8592;
  --violet: #a571ff;
  --violet-2: #7b44e6;
  --violet-bg: rgb(165 113 255 / 10%);
  --ok: #63c24d;
  --warn: #e6b84a;
  --alert: #e44b3f;
  --mono: "IBM Plex Mono", consolas, "Courier New", monospace;
  --crt: "VT323", "IBM Plex Mono", monospace;
  --tb: 46px;
  --bevel: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --bevel-sm: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

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

[hidden] {
  display: none !important;
}

/* focus clavier visible partout (les composants qui ont leur propre style le remplacent) */
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
}

.js body {
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: var(--violet);
}

::selection {
  background: var(--violet);
  color: var(--bg);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

canvas.px {
  display: block;
  image-rendering: pixelated;
}

/* écran CRT : balayage léger + vignette, non cliquable */
.crt-fx {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgb(0 0 0 / 14%) 0 1px, transparent 1px 3px),
    radial-gradient(130% 100% at 50% 45%, transparent 60%, rgb(0 0 0 / 45%) 100%);
}

/* =====================================================================
   Glitch — uniquement sur des événements (ouverture, fermeture, boot)
   ===================================================================== */
@keyframes glitch-in {
  0% {
    opacity: 0;
    clip-path: inset(48% 0);
    transform: translateX(-6px);
    filter: drop-shadow(4px 0 0 var(--violet));
  }

  20% {
    opacity: 1;
    clip-path: inset(10% 0 62%);
    transform: translateX(5px);
    filter: drop-shadow(-4px 0 0 var(--violet));
  }

  40% {
    clip-path: inset(55% 0 12%);
    transform: translateX(-3px);
    filter: drop-shadow(3px 0 0 var(--violet));
  }

  60% {
    clip-path: inset(0 0 30%);
    transform: translateX(2px);
    filter: drop-shadow(-2px 0 0 var(--violet));
  }

  80% {
    clip-path: inset(0);
    transform: translateX(0);
    filter: drop-shadow(1px 0 0 var(--violet));
  }

  100% {
    clip-path: var(--bevel);
    transform: none;
    filter: none;
  }
}

@keyframes glitch-out {
  0% {
    opacity: 1;
    clip-path: var(--bevel);
  }

  30% {
    clip-path: inset(30% 0 40%);
    transform: translateX(6px);
    filter: drop-shadow(-4px 0 0 var(--violet));
  }

  60% {
    clip-path: inset(46% 0);
    transform: translateX(-8px);
    opacity: 0.7;
  }

  100% {
    clip-path: inset(50% 0);
    opacity: 0;
  }
}

@keyframes glitch-text {
  0%,
  100% {
    text-shadow: none;
    transform: none;
  }

  15% {
    text-shadow: -3px 0 var(--violet), 3px 0 rgb(232 228 220 / 40%);
    transform: translateX(2px);
  }

  30% {
    text-shadow: 4px 0 var(--violet);
    transform: translateX(-3px) skewX(-6deg);
  }

  45% {
    text-shadow: -2px 0 var(--violet);
    transform: none;
  }

  60% {
    text-shadow: 2px 0 var(--violet), -4px 0 var(--violet-2);
    transform: translateX(1px);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.cursor {
  animation: blink 1s steps(1) infinite;
}

/* =====================================================================
   Boot
   ===================================================================== */
.boot {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: none;
  place-items: center;
  background: #09080b;
  color: #d9d4c8;
  font-family: var(--crt);
  font-size: 22px;
  line-height: 1.35;
}

.is-booting .boot {
  display: grid;
}

.boot__inner {
  width: min(680px, 90vw);
}

.boot__log {
  min-height: 220px;
  overflow: hidden;
  white-space: pre;
}

.boot__ok {
  color: var(--ok);
}

.boot__open {
  color: var(--violet);
}

.boot__bar {
  height: 14px;
  margin-top: 10px;
  padding: 2px;
  border: 2px solid #d9d4c8;
}

.boot__bar i {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, #d9d4c8 0 10px, transparent 10px 13px);
  transition: width 0.12s steps(4);
}

.boot__name {
  margin-top: 26px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1;
  letter-spacing: 0.06em;
  opacity: 0;
}

.boot__name.is-on {
  opacity: 1;
  animation: glitch-text 0.5s steps(1) 1;
}

.boot__name small {
  display: block;
  margin-top: 6px;
  color: var(--dim);
  font-size: 22px;
  letter-spacing: 0.2em;
}

.boot__skip {
  position: fixed;
  right: 22px;
  bottom: 22px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  background: none;
  color: var(--text-2);
  font: 13px var(--mono);
  letter-spacing: 0.1em;
  cursor: pointer;
}

.boot__skip:hover,
.boot__skip:focus-visible {
  border-color: var(--violet);
  color: var(--violet);
  outline: none;
}

.boot.is-out {
  animation: glitch-out 0.35s steps(1) forwards;
}

/* =====================================================================
   Bureau
   ===================================================================== */
.desk {
  position: relative;
  min-height: 100vh;
  padding: 26px;
  background-color: var(--desk);
}

.js .desk {
  position: fixed;
  inset: 0 0 var(--tb);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

/* fond d'écran ASCII (calculé une fois, dessiné sur canvas, statique) */
.wallpaper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* repères "plan technique" aux coins du bureau */
.desk::before,
.desk::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-2);
  pointer-events: none;
}

.desk::before {
  top: 12px;
  left: 12px;
  border-right: 0;
  border-bottom: 0;
}

.desk::after {
  right: 12px;
  bottom: 12px;
  border-top: 0;
  border-left: 0;
}

/* icônes */
.icons {
  display: flex;
  gap: 22px;
  margin-bottom: 24px;
}

.js .icons {
  position: absolute;
  top: 26px;
  left: 26px;
  margin: 0;
}

.group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.group__title {
  margin-bottom: 4px;
  padding: 0 0 6px 4px;
  border-bottom: 1px dashed var(--line);
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ico {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  width: 104px;
  padding: 8px 4px 6px;
  border: 1px solid transparent;
  background: none;
  text-align: center;
  cursor: pointer;
}

.ico canvas {
  width: 40px;
  height: 40px;
}

.ico span {
  color: var(--text-2);
  font-size: 10.5px;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.ico:hover,
.ico:focus-visible {
  border-color: var(--line-2);
  background: rgb(255 255 255 / 3%);
  outline: none;
}

.ico:hover span {
  color: var(--text);
}

.ico:focus-visible span {
  background: var(--violet);
  color: var(--bg);
}

.ico:hover canvas {
  animation: glitch-text 0.3s steps(1) 1;
}

/* encadré Profil : l'essentiel pour un recruteur en 5 secondes */
.widget {
  position: relative;
  width: 330px;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line-2);
  background: var(--win);
  clip-path: var(--bevel);
}

.js .widget {
  position: absolute;
  top: 26px;
  right: 26px;
  margin: 0;
}

.widget::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 3px;
  background: var(--violet);
}

.widget__label {
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.widget__name {
  margin: 8px 0 4px;
  font-family: var(--crt);
  font-size: 44px;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.03em;
}

.widget__role {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 13px;
}

.widget__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0 0 16px;
  font-size: 12.5px;
}

.kv dt {
  padding-top: 1px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kv dd {
  margin: 0;
  color: var(--text);
}

.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
}

/* boutons */
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: var(--bevel-sm);
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
  outline: none;
}

.btn--violet {
  border-color: var(--violet);
  color: var(--violet);
}

.btn--violet:hover,
.btn--violet:focus-visible {
  border-color: var(--violet);
  background: var(--violet);
  color: var(--bg);
}

/* =====================================================================
   Barre des tâches + menu
   ===================================================================== */
.taskbar {
  display: none;
}

.js .taskbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 600;
  display: flex;
  align-items: stretch;
  height: var(--tb);
  border-top: 1px solid var(--line-2);
  background: #18171d;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.taskbar__start {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: none;
  font-family: var(--crt);
  font-size: 22px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.taskbar__start i {
  width: 10px;
  height: 10px;
  background: var(--violet);
  transform: rotate(45deg);
}

.taskbar__start:hover,
.taskbar__start:focus-visible,
.taskbar__start[aria-expanded="true"] {
  background: var(--violet);
  color: var(--bg);
  outline: none;
}

.taskbar__start:hover i,
.taskbar__start:focus-visible i,
.taskbar__start[aria-expanded="true"] i {
  background: var(--bg);
}

.taskbar__tasks {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.task {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  max-width: 200px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: none;
  color: var(--text-2);
  font-size: 11.5px;
  text-transform: uppercase;
  cursor: pointer;
}

.task canvas {
  flex: none;
  width: 16px;
  height: 16px;
}

.task span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task:hover {
  background: rgb(255 255 255 / 4%);
  color: var(--text);
}

.task.is-active {
  background: rgb(165 113 255 / 6%);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--violet);
}

.task.is-min {
  opacity: 0.55;
}

.taskbar__tray {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 0 16px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.taskbar__cv {
  padding: 5px 10px;
  border: 1px solid var(--violet);
  color: var(--violet);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.taskbar__cv:hover,
.taskbar__cv:focus-visible {
  background: var(--violet);
  color: var(--bg);
  outline: none;
}

.taskbar__status {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 11.5px;
  text-transform: uppercase;
  cursor: pointer;
}

.taskbar__status:hover {
  color: var(--text);
}

.taskbar__clock {
  color: var(--text);
  font-family: var(--crt);
  font-size: 22px;
}

.start {
  position: fixed;
  bottom: var(--tb);
  left: 0;
  z-index: 650;
  width: 300px;
  max-height: calc(100vh - var(--tb) - 10px);
  padding: 12px 0 8px;
  overflow: auto;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  background: var(--win);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.start__title {
  margin: 0;
  padding: 4px 16px 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--crt);
  font-size: 26px;
  font-weight: 400;
}

.start__title small {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.start__section {
  padding: 10px 16px 4px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.start button,
.start a {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 6px 16px;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.start canvas {
  width: 16px;
  height: 16px;
}

.start button:hover,
.start button:focus-visible,
.start a:hover,
.start a:focus-visible {
  background: var(--violet);
  color: var(--bg);
  outline: none;
}

/* notification */
.toast {
  position: fixed;
  right: 16px;
  bottom: calc(var(--tb) + 14px);
  z-index: 700;
  width: 320px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--violet);
  background: var(--win);
  font-size: 12.5px;
  animation: glitch-in 0.35s steps(1);
}

.toast b {
  display: block;
  margin-bottom: 4px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toast p {
  margin: 0;
  color: var(--text-2);
}

/* =====================================================================
   Fenêtres
   ===================================================================== */
.win {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  max-width: 760px;
  margin: 0 0 24px;
  border: 1px solid var(--line-2);
  background: var(--win);
  clip-path: var(--bevel);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 80%);
}

.js .win {
  position: absolute;
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - var(--tb) - 40px);
  margin: 0;
}

.js .win:not(.is-open),
.win.is-min {
  display: none;
}

.win--narrow {
  max-width: 520px;
}

.js .win--narrow {
  width: min(520px, calc(100vw - 40px));
}

.win.is-glitch-in {
  animation: glitch-in 0.3s steps(1);
}

.win.is-glitch-out {
  animation: glitch-out 0.22s steps(1) forwards;
}

/* crochets d'angle */
.win::before,
.win::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-2);
  pointer-events: none;
}

.win::before {
  top: 42px;
  left: 6px;
  border-right: 0;
  border-bottom: 0;
}

.win::after {
  right: 6px;
  bottom: 30px;
  border-top: 0;
  border-left: 0;
}

.win.is-active::before,
.win.is-active::after {
  border-color: var(--violet);
}

.win__bar {
  display: flex;
  flex: none;
  gap: 10px;
  align-items: center;
  height: 36px;
  padding: 0 6px 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bar);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
}

.win__bar:active {
  cursor: grabbing;
}

.win__bar canvas {
  flex: none;
  width: 16px;
  height: 16px;
}

.win__title {
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win.is-active .win__title {
  color: var(--text);
}

.win__path {
  margin-left: 4px;
  overflow: hidden;
  color: var(--dim);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win__btns {
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding-right: 10px;
}

.win__btns button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border: 1px solid var(--line-2);
  background: none;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}

.win__btns button:hover,
.win__btns button:focus-visible {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
  outline: none;
}

.win__btns [data-act="close"]:hover,
.win__btns [data-act="close"]:focus-visible {
  border-color: var(--alert);
  background: var(--alert);
  color: #fff;
}

.win__back {
  display: none;
}

.win__body {
  padding: 0 0 18px;
  overflow: auto;
  scrollbar-color: var(--line-2) transparent;
}

.win__status {
  display: flex;
  flex: none;
  gap: 18px;
  align-items: center;
  height: 26px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  background: #131217;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.win__run {
  margin-left: auto;
  color: var(--ok);
}

.win__run::before {
  content: "■ ";
}

/* bannière pixel art */
.scene {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: #0b0a0e;
}

.scene canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(0 0 0 / 18%) 0 2px, transparent 2px 4px);
}

.scene__tag {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 1;
  padding: 2px 6px;
  background: rgb(11 10 14 / 75%);
  color: var(--text-2);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.win__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 22px 4px;
}

.code {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 58px;
  padding: 0 6px;
  border: 2px solid var(--line-2);
  color: var(--violet);
  font-family: var(--crt);
  font-size: 24px;
  clip-path: var(--bevel-sm);
}

.win__head h2 {
  margin: 0;
  font-family: var(--crt);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.03em;
}

/* technologie après le nom du projet : UNDERCORE // UNITY */
.win__tech {
  color: var(--violet);
  font-size: 0.62em;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.win__head p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 14px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 22px 0;
}

.pill {
  display: inline-flex;
  border: 1px solid var(--line-2);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill span {
  padding: 6px 8px;
}

.pill span:first-child {
  background: var(--win-2);
  color: var(--dim);
}

.pill span:last-child {
  color: var(--text);
}

.pill--ok span:last-child {
  color: var(--ok);
}

.pill--violet span:last-child {
  color: var(--violet);
}

.cols {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 26px;
  padding: 6px 22px 0;
}

.cols--even {
  grid-template-columns: 1fr 1fr;
}

.txt h3 {
  margin: 18px 0 8px;
  color: var(--violet);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.txt h3::before {
  content: "// ";
  color: var(--dim);
}

.txt p {
  margin: 0 0 10px;
  color: var(--text-2);
}

.txt strong {
  color: var(--text);
  font-weight: 600;
}

.txt ul {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.txt li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 18px;
  color: var(--text-2);
}

.txt li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--violet);
}

.txt--pad {
  padding: 20px 22px 0;
}

.txt__title {
  margin: 0 0 10px;
  font-family: var(--crt);
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
}

.txt__hint {
  color: var(--dim);
  font-size: 12.5px;
}

/* résumé en anglais (LISEZ-MOI), replié par défaut */
.en {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
}

.en summary {
  width: fit-content;
  color: var(--violet);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.en[open] summary {
  margin-bottom: 8px;
}

.meta {
  align-self: start;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 12.5px;
}

.meta dt {
  margin-top: 10px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.meta dt:first-child {
  margin-top: 0;
}

.meta dd {
  margin: 2px 0 0;
  color: var(--text);
}

.meta .btn {
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.chip {
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 10.5px;
}

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  padding: 16px 22px 0;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--line);
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.8);
}

.gallery figcaption {
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: repeating-linear-gradient(135deg, transparent 0 8px, rgb(138 133 146 / 7%) 8px 16px);
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

/* fenêtres système */
.profile {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  padding: 22px 22px 0;
}

.profile img {
  width: 150px;
  aspect-ratio: 1;
  border: 2px solid var(--line-2);
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  clip-path: var(--bevel-sm);
}

.log {
  padding: 14px 22px 0;
}

.log__row {
  display: grid;
  grid-template-columns: 96px 18px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.log__row time {
  color: var(--dim);
  font-size: 12px;
}

.log__mark {
  color: var(--line-2);
}

.log__row--key .log__mark {
  color: var(--violet);
}

.log__row--next .log__mark {
  color: var(--ok);
}

.log__row b {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log__desc {
  display: block;
  color: var(--text-2);
  font-size: 13px;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--violet);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.form {
  display: grid;
  gap: 12px;
  padding: 14px 22px 0;
}

.form label {
  display: grid;
  gap: 4px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.form input,
.form textarea {
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  background: #0f0e12;
  color: var(--text);
  font: 14px var(--mono);
}

.form input:focus,
.form textarea:focus {
  border-color: var(--violet);
  outline: none;
  box-shadow: 0 0 0 3px var(--violet-bg);
}

.form textarea {
  min-height: 110px;
  resize: vertical;
}

.coords {
  display: grid;
  gap: 4px;
  padding: 16px 22px 0;
  font-size: 13px;
}

.coords a,
.coords div {
  display: grid;
  grid-template-columns: 54px 1fr;
  padding: 7px 8px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.coords a:hover {
  border-color: var(--violet);
  color: var(--violet);
}

.coords span {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.pad {
  padding: 16px 22px 0;
}

.term {
  min-height: 300px;
  padding: 14px 18px;
  background: #09080b;
  color: #d9d4c8;
  font-family: var(--crt);
  font-size: 20px;
  line-height: 1.25;
  cursor: text;
}

.term__out {
  white-space: pre-wrap;
}

.term__in {
  display: flex;
  gap: 8px;
}

.term__in span {
  color: var(--violet);
}

.term__in input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: inherit;
}

/* fenêtre large (Parcours) */
.win--wide {
  max-width: 1100px;
}

.js .win--wide {
  width: min(1100px, calc(100vw - 40px));
}

/* aparté (Profil) */
.note {
  margin: 22px 22px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  background: var(--violet-bg);
  font-size: 13px;
}

.note__title {
  margin: 0 0 6px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.note p {
  margin: 0 0 8px;
  color: var(--text-2);
}

.note p:last-child {
  margin-bottom: 0;
}

.note strong {
  color: var(--text);
  font-weight: 600;
}

/* =====================================================================
   Parcours : ligne de vie + frise (encadrés imbriqués, nœuds, futur)
   ===================================================================== */
.timeline-head,
.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  padding: 10px 16px;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-head b {
  color: var(--violet);
  font-weight: 600;
}

.timeline-legend {
  justify-content: flex-start;
}

.timeline-legend i {
  display: inline-block;
  width: 14px;
  height: 10px;
  margin-right: 7px;
  vertical-align: -1px;
}

.timeline-legend__main {
  border-top: 3px solid #e6dcc4;
  height: 3px;
  vertical-align: 3px;
}

.timeline-legend__box {
  border: 1px solid var(--line-2);
  background: rgb(165 113 255 / 8%);
}

.timeline-legend__node {
  width: 9px;
  height: 9px;
  background: var(--violet);
  transform: rotate(45deg);
}

.timeline-legend__future {
  border-top: 2px dashed var(--ok);
  height: 2px;
  vertical-align: 3px;
}

.timeline {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-color: #131217;
  background-image:
    linear-gradient(rgb(138 133 146 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(138 133 146 / 6%) 1px, transparent 1px);
  background-size: 40px 40px;
  cursor: grab;
}

.timeline.is-dragging {
  cursor: grabbing;
  user-select: none;
}

/* taille réelle (échelle de temps constante) : la frise défile horizontalement */
.tl {
  display: block;
  max-width: none;
  font-family: var(--mono);
}

.tl__tick {
  stroke: var(--line);
  stroke-width: 1;
}

.tl__year {
  fill: var(--dim);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.tl__month {
  fill: var(--line-2);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* halo sombre derrière les textes : les traits qui passent dessous s'effacent */
.tl text {
  paint-order: stroke;
  stroke: #131217;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.tl .is-link {
  cursor: pointer;
}

.tl .is-flash rect {
  animation: tl-flash 0.4s steps(1) 4;
}

@keyframes tl-flash {
  50% {
    stroke: var(--ok);
    stroke-width: 3;
  }
}

.frise .is-flash {
  animation: frise-flash 0.4s steps(1) 4;
}

@keyframes frise-flash {
  50% {
    border-color: var(--ok);
    box-shadow: 0 0 0 2px var(--ok);
  }
}

.tl__bound {
  stroke: var(--alert);
  stroke-width: 1.2;
  opacity: 0.5;
}

.tl__main {
  fill: none;
  stroke: #e6dcc4;
  stroke-width: 3;
  filter: drop-shadow(0 0 4px rgb(255 230 190 / 40%));
}

/* ligne prévue, piste parallèle */
.tl__main--planned {
  stroke-dasharray: 7 6;
  opacity: 0.6;
  filter: none;
}

.tl__track {
  fill: none;
  stroke: #e6dcc4;
  stroke-width: 1.6;
  opacity: 0.75;
}

.tl__track--planned {
  stroke-dasharray: 5 5;
  opacity: 0.5;
}

/* éléments prévus (après aujourd'hui) : en pointillés, plus discrets */
.tl__box.is-planned rect {
  fill: rgb(165 113 255 / 3%);
  stroke-dasharray: 5 4;
}

.tl .is-planned {
  opacity: 0.8;
}

.frise__box--planned {
  border-style: dashed;
}

/* encadrés : plus profonds = plus marqués */
.tl__box rect {
  fill: rgb(165 113 255 / 5%);
  stroke: var(--line-2);
  stroke-width: 1;
}

.tl__box--d1 rect {
  fill: rgb(165 113 255 / 9%);
  stroke: #5e5670;
}

.tl__box--d2 rect,
.tl__box--d3 rect {
  fill: rgb(165 113 255 / 22%);
  stroke: var(--violet);
}

.tl__box-title {
  fill: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.tl__box-sub {
  fill: var(--text-2);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
}

.tl__box.is-link {
  cursor: pointer;
}

.tl__box.is-link:hover rect,
.tl__box.is-link:focus-visible rect {
  stroke: var(--text);
}

.tl__code {
  fill: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.tl__sub {
  fill: var(--text-2);
  font-size: 11.5px;
}

.tl__lead {
  stroke: var(--line-2);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

/* nœuds : projets (violet clair) et étapes clés (violet plein) */
.tl__node rect {
  fill: var(--bg);
  stroke: var(--violet);
  stroke-width: 2;
}

.tl__node .tl__code {
  fill: var(--violet);
}

.tl__node--key rect {
  fill: #e6dcc4;
  stroke: #e6dcc4;
}

.tl__node--key .tl__code {
  fill: var(--text);
}

.tl__node.is-link {
  cursor: pointer;
}

.tl__node.is-link:hover rect,
.tl__node.is-link:focus-visible rect {
  fill: var(--violet);
}

.tl [tabindex]:focus {
  outline: none;
}

.tl__now {
  stroke: var(--violet);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.tl__now-label {
  fill: var(--violet);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

/* futur : branches possibles en pointillés dégradés */
.tl__future path {
  fill: none;
  stroke-width: 2.5;
  stroke-dasharray: 6 5;
}

.tl__future rect {
  fill: none;
  stroke: var(--ok);
  stroke-width: 1.5;
  stroke-dasharray: 3 2;
}

.tl__future .tl__code {
  fill: var(--ok);
}

.tl__future .tl__sub {
  fill: var(--text-2);
}

/* version texte : encadrés imbriqués */
.frise {
  padding: 4px 22px 0;
}

.frise__box {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  background: rgb(165 113 255 / 4%);
}

.frise__box .frise__box {
  background: rgb(165 113 255 / 7%);
}

.frise__box--future {
  border-style: dashed;
  border-color: var(--ok);
  background: none;
}

.frise__head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
}

.frise__head time,
.frise__item time {
  min-width: 150px;
  color: var(--dim);
  font-size: 12px;
}

.frise__head b {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.frise__box--future b {
  color: var(--ok);
}

.frise__sub {
  color: var(--dim);
  font-size: 12px;
}

.frise__desc {
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.frise__inner {
  margin-top: 4px;
}

.frise__item {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  padding: 7px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.frise__mark {
  color: var(--violet);
}

.frise__item--key .frise__mark {
  color: #e6dcc4;
}

.frise__item--key span:last-child {
  color: var(--text);
  font-weight: 600;
}

/* =====================================================================
   CV : aperçu de la première page + téléchargement
   ===================================================================== */
.cv {
  padding: 18px 22px 0;
}

.cv__page {
  position: relative;
  display: block;
  min-height: 220px;
  border: 1px solid var(--line-2);
  background: #1a191f;
}

.cv__page img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.cv__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.cv__page:hover,
.cv__page:focus-visible {
  border-color: var(--violet);
  outline: none;
}

.cv__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* =====================================================================
   Formulaire de contact
   ===================================================================== */
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form__error {
  min-height: 1em;
  color: var(--alert);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.form [aria-invalid="true"] {
  border-color: var(--alert);
}

.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.form__status {
  color: var(--text-2);
  font-size: 12.5px;
}

.form__status[data-kind="ok"] {
  color: var(--ok);
}

.form__status[data-kind="error"] {
  color: var(--alert);
}

.form button:disabled {
  cursor: wait;
  opacity: 0.6;
}

/* =====================================================================
   Mobile : écran d'accueil + fenêtres plein écran
   ===================================================================== */
@media (max-width: 760px) {
  :root {
    --tb: 38px;
  }

  .js body {
    overflow: auto;
  }

  .js .taskbar {
    top: 0;
    bottom: auto;
    border-top: 0;
    border-bottom: 1px solid var(--line-2);
  }

  .taskbar__tasks,
  .taskbar__start span,
  .taskbar__status span:last-child {
    display: none;
  }

  .taskbar__start {
    padding: 0 12px;
  }

  .taskbar__tray {
    gap: 10px;
    margin-left: auto;
    border-left: 0;
  }

  .taskbar__clock {
    font-size: 20px;
  }

  .js .desk {
    position: relative;
    inset: auto;
    min-height: 100vh;
    padding: calc(var(--tb) + 16px) 14px 30px;
    overflow: visible;
  }

  .desk::before,
  .desk::after {
    display: none;
  }

  .js .widget {
    position: relative;
    inset: auto;
    width: auto;
    margin-bottom: 18px;
  }

  .widget__name {
    font-size: 40px;
  }

  .js .icons,
  .icons {
    position: relative;
    inset: auto;
    flex-direction: column;
    gap: 16px;
  }

  .group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .group__title {
    grid-column: 1 / -1;
  }

  .ico {
    width: auto;
  }

  .js .win {
    position: fixed;
    inset: var(--tb) 0 0;
    width: auto;
    max-height: none;
    border: 0;
    clip-path: none;
  }

  .js .win--narrow {
    width: auto;
  }

  .js .win--wide {
    width: auto;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .win.is-glitch-in {
    animation: none;
  }

  .win__bar {
    cursor: default;
  }

  .win__back {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--line-2);
    background: none;
    font-size: 11px;
    cursor: pointer;
  }

  .win__path,
  .win__btns [data-act="min"] {
    display: none;
  }

  .win__head {
    grid-template-columns: 44px 1fr;
    padding: 14px 16px 2px;
  }

  .win__head .code {
    min-width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .win__head h2 {
    font-size: 28px;
  }

  .pills,
  .cols,
  .gallery {
    padding-right: 16px;
    padding-left: 16px;
  }

  .cols,
  .cols--even,
  .profile,
  .gallery {
    grid-template-columns: 1fr;
  }

  .start {
    top: var(--tb);
    right: 0;
    bottom: auto;
    width: auto;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
