/* ════════════════════════════════════════════════════════════
   Portfolio Mathis Paulin — « portfolio_os » iridescent
   Implémentation de l'exploration 3a (liquid glass · cartes
   dépliantes · micrographics · glitch)
   ════════════════════════════════════════════════════════════ */

:root {
  --bg: #05040c;
  --ink: #c7cdf4;
  --ink-strong: #e8eaf6;
  --blue: #5b8cff;
  --violet: #8b5cf6;
  --fuchsia: #d946ef;
  --teal: #5eead4;
  --line: rgba(140, 150, 255, .18);
  --topbar-h: 104px;
  --dock-h: 132px;
  /* Facteur d'échelle de l'interface. Vaut 1 jusqu'à 1920px inclus — tout ce
     qui précède reste au pixel près — puis grandit par paliers au-delà. */
  --s: 1;
}

@media (min-width: 1921px) { :root { --s: 1.2; } }
@media (min-width: 2560px) { :root { --s: 1.45; } }
/* 4K non mis à l'échelle par l'OS : sans ce palier l'interface replonge à 26 %
   d'occupation, le défaut même qu'on corrigeait à 1920. */
@media (min-width: 3200px) { :root { --s: 1.9; } }

@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

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

/* La règle [hidden] du navigateur est battue par n'importe quel `display`
   d'une feuille d'auteur : on la repose une bonne fois pour toutes. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 13px/1.75 "Space Mono", ui-monospace, Menlo, monospace;
  overflow: hidden;
}

/* ─────────── keyframes ─────────── */
@keyframes iri      { 0% { background-position: 0% 50% } 50% { background-position: 100% 50% } 100% { background-position: 0% 50% } }
@keyframes blink    { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
@keyframes ringspin { to { --ring: 360deg } }
@keyframes bootfade { 0%, 78% { opacity: 1 } 100% { opacity: 0; visibility: hidden } }
@keyframes bootbar  { from { width: 0 } to { width: 100% } }
@keyframes bootline { from { opacity: 0 } to { opacity: 1 } }
@keyframes winpop   { from { opacity: 0; filter: blur(10px) } to { opacity: 1; filter: blur(0) } }
@keyframes glitch1 {
  0%, 90%, 100% { transform: none; opacity: 0 }
  92% { transform: translate(-3px, 1px); opacity: .8 }
  94% { transform: translate(2px, -1px);  opacity: .8 }
  96% { transform: translate(-1px, 2px);  opacity: .6 }
}

.winpop { animation: winpop .6s cubic-bezier(.2, .8, .3, 1) both; }

/* ─────────── décor de fond ─────────── */
.bg-glow, .bg-grid, .bg-scan { position: fixed; inset: 0; pointer-events: none; }
.bg-glow {
  background:
    radial-gradient(80% 60% at 50% 110%, rgba(139, 92, 246, .25), transparent 60%),
    radial-gradient(60% 50% at 15% -10%, rgba(76, 111, 255, .2), transparent 60%);
}
.bg-grid {
  background-image:
    linear-gradient(rgba(140, 150, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 150, 255, .05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.bg-scan {
  z-index: 10;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}

.iri-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(46px);
  opacity: .5;
  pointer-events: none;
  z-index: 1;
  background: conic-gradient(from var(--ring), var(--blue), var(--violet), var(--fuchsia), var(--teal), var(--blue));
  animation: ringspin 9s linear infinite;
}
.glow-a { top: 130px; left: 8%;  width: 44%; height: 380px; }
.glow-b { top: 140px; right: 8%; width: 26%; height: 360px; animation-delay: -4s; }

/* ─────────── micrographics ─────────── */
.micro {
  position: fixed;
  font-size: 8.5px;
  letter-spacing: .15em;
  color: rgba(199, 205, 244, .35);
  z-index: 4;
  pointer-events: none;
}
.micro-l { top: 40px; left: 14px; writing-mode: vertical-rl; }
.micro-r { bottom: 40px; right: 14px; writing-mode: vertical-rl; }
.micro-stage { top: 88px; left: 64px; color: rgba(94, 234, 212, .4); letter-spacing: 0; }

/* ─────────── boot ─────────── */
.boot {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: bootfade 3s forwards;
  pointer-events: none;
}
.boot-mark {
  font-size: 44px;
  background: linear-gradient(120deg, var(--blue), var(--violet), var(--fuchsia), var(--teal), var(--blue));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: iri 3s linear infinite;
}
.boot-log { font-size: 12px; color: rgba(199, 205, 244, .7); line-height: 1.9; text-align: left; }
.boot-log > div { animation: bootline .1s both; }
.boot-bar { width: 220px; height: 4px; border-radius: 2px; background: rgba(140, 150, 255, .15); overflow: hidden; }
.boot-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--fuchsia));
  animation: bootbar 2.1s .2s both;
}
.ok { color: var(--teal); }

/* ─────────── anneau iridescent ─────────── */
.iri-ring { position: relative; border-radius: 12px; }
.iri-ring::before, .iri-ring::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: conic-gradient(from var(--ring), var(--blue), var(--violet), var(--fuchsia), var(--teal), var(--blue));
  animation: ringspin 5s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.iri-ring::after { filter: blur(12px); opacity: .6; }

/* ─────────── bouton liquid glass ─────────── */
.lg-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 14px;
  /* Fond réel sous le dégradé de verre. `backdrop-filter` est volontairement
     absent ici : dans un conteneur défilant il n'est pas recomposé au scroll
     et le bouton disparaît. Il est réservé à la barre haute et au dock
     (fixes), les seuls endroits où le flou d'arrière-plan se voit vraiment —
     dans les fenêtres le fond est déjà quasi opaque. */
  background: rgba(14, 12, 32, .45) linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 45%, rgba(140, 150, 255, .1));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 24px rgba(0, 0, 0, .4);
  transition: transform .25s cubic-bezier(.3, 1.6, .4, 1), box-shadow .25s;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
}
.lg-btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  padding: 1px;
  background: conic-gradient(from var(--ring), rgba(91, 140, 255, .7), rgba(217, 70, 239, .7), rgba(94, 234, 212, .7), rgba(91, 140, 255, .7));
  animation: ringspin 6s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.topbar .lg-btn, .dock .lg-btn { backdrop-filter: blur(14px); }
.lg-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 28px rgba(139, 92, 246, .28); }
.lg-btn:hover::after, .lg-btn:focus-visible::after { opacity: 1; }
.lg-btn:focus-visible { outline: none; transform: translateY(-2px) scale(1.02); }

/* ─────────── barre haute ─────────── */
.topbar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  /* `width` explicite : un élément fixed à left:50% ne dispose sinon que de la
     moitié du viewport pour se dimensionner, et la barre se casse trop tôt. */
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(10, 8, 24, .45);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: 11px;
  z-index: 6;
}
.topbar-brand { color: var(--teal); padding: 0 8px; }
.topbar-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.nav-btn { padding: 6px 14px; font-size: 11px; border-radius: 10px; white-space: nowrap; }
.nav-btn .dot {
  position: absolute;
  bottom: 2px;
  left: 50%;
  margin-left: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0;
  transition: opacity .2s;
}
.nav-btn.is-active .dot { opacity: 1; }
.topbar-sep { width: 1px; align-self: stretch; background: rgba(140, 150, 255, .25); margin: 2px 4px; }
.lang-btn { padding: 6px 12px; font-size: 10.5px; color: #8ff0dd; border-radius: 10px; white-space: nowrap; }
.topbar-clock { color: rgba(199, 205, 244, .5); padding: 0 8px; font-variant-numeric: tabular-nums; }

/* ─────────── scène ─────────── */
.stage {
  position: fixed;
  inset: var(--topbar-h) 0 var(--dock-h);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 40px;
  overflow: hidden;
  z-index: 3;
}
.view {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-height: 100%;
}
.view[hidden] { display: none; }

/* ─────────── fenêtres ─────────── */
.win {
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(8, 7, 20, .95);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  max-height: 100%;
  z-index: 3;
}
.win-projets { flex: 1 1 460px; max-width: 600px; height: 452px; }
.win-id      { flex: 0 1 300px; height: 452px; border-radius: 12px; background: none; box-shadow: none; }
.win-about   { flex: 0 1 620px; max-width: 620px; }
.win-cv      { flex: 0 1 660px; max-width: 660px; }
.win-contact { flex: 0 1 460px; max-width: 460px; border-radius: 12px; background: none; box-shadow: none; }

/* Côte à côte (au-dessus de 900px, avant l'empilement) : les deux fenêtres se
   partagent la place à parts égales. `flex: 1 1 0` garantit la même largeur à
   n'importe quelle taille d'écran, sans valeur en dur à maintenir. */
@media (min-width: 901px) {
  .win-projets, .win-id { flex: 1 1 0; max-width: none; }
}

.id-lift { transition: transform .4s cubic-bezier(.3, .9, .3, 1), box-shadow .4s; }
.id-lift:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(139, 92, 246, .22); }

.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: rgba(199, 205, 244, .6);
}
.win-dots { display: flex; gap: 8px; font-style: normal; }
.win-dots i:nth-child(1) { color: var(--blue); font-style: normal; }
.win-dots i:nth-child(2) { color: var(--violet); font-style: normal; }
.win-dots i:nth-child(3) { color: var(--fuchsia); font-style: normal; }

.win-body { padding: 18px 22px; height: calc(100% - 38px); max-height: calc(100% - 38px); min-height: 0; }
.win-about .win-body, .win-cv .win-body { padding: 20px 22px; height: auto; }

.proj-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 150, 255, .35) transparent;
}
.proj-scroll::-webkit-scrollbar { width: 7px; }
.proj-scroll::-webkit-scrollbar-thumb { background: rgba(140, 150, 255, .35); border-radius: 4px; }

/* ─────────── identité / titre ─────────── */
.glitch { position: relative; display: inline-block; margin: 0 0 4px; cursor: default; font-size: 24px; font-weight: 700; letter-spacing: .02em; color: var(--ink-strong); }
.g-r, .g-c { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.g-r { color: var(--fuchsia); }
.g-c { color: var(--teal); }
.glitch:hover .g-r { animation: glitch1 1.4s steps(1) infinite; }
.glitch:hover .g-c { animation: glitch1 1.4s steps(1) .07s infinite; }

.role {
  margin: 0 0 14px;
  font-size: 12px;
  background: linear-gradient(120deg, var(--blue), var(--violet), var(--fuchsia));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prompt { margin: 0; }
.caret { color: var(--teal); }
.hint { font-size: 10px; color: rgba(199, 205, 244, .35); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--teal); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }

/* ─────────── cartes projet dépliantes ─────────── */
.xp-card {
  margin: 10px 0 14px;
  padding: 16px 18px;
  font-size: 14px;
  border-radius: 0 8px 8px 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color .3s, background .3s;
}
.xp-1 { border-left: 3px solid var(--violet); background: rgba(139, 92, 246, .07); }
.xp-2 { margin: 0 0 12px; border-left: 3px solid rgba(91, 140, 255, .5); background: rgba(91, 140, 255, .05); }
.xp-card:hover, .xp-card:focus-visible, .xp-card.is-open { border-color: rgba(140, 150, 255, .45); background: rgba(139, 92, 246, .1); outline: none; }

.xp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.xp-title { color: var(--ink-strong); }
.xp-title.dim { color: rgba(232, 234, 246, .7); }
.xp-more { flex: none; font-size: 11px; color: rgba(199, 205, 244, .4); }
.tag-on { color: var(--teal); }
.tag-soon { color: rgba(199, 205, 244, .4); }
.xp-desc { margin: 3px 0 0; font-size: 13px; color: rgba(199, 205, 244, .6); }
.xp-desc.dim { color: rgba(199, 205, 244, .5); }

.xp-detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height .45s cubic-bezier(.4, 0, .2, 1), opacity .35s .05s, margin .45s;
}
.xp-card:hover .xp-detail,
.xp-card:focus-visible .xp-detail,
.xp-card.is-open .xp-detail { max-height: 150px; opacity: 1; margin-top: 12px; }
.xp-detail-in { display: flex; gap: 12px; }

.shot {
  flex: none;
  width: 128px;
  height: 82px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  text-align: center;
  color: rgba(199, 205, 244, .4);
  background: repeating-linear-gradient(45deg, rgba(140, 150, 255, .12) 0 7px, transparent 7px 14px);
}
.shot-on {
  color: rgba(199, 205, 244, .5);
  background: repeating-linear-gradient(45deg, rgba(140, 150, 255, .18) 0 7px, rgba(140, 150, 255, .05) 7px 14px);
}

.meta { margin: 0; font-size: 12px; line-height: 1.95; color: rgba(199, 205, 244, .75); }
.meta.dim { color: rgba(199, 205, 244, .55); }
.meta > div { display: flex; gap: 6px; }
.meta dt { flex: none; min-width: 38px; }
.meta dt::after { content: " →"; color: inherit; }
.meta dd { margin: 0; }

.k-blue    { color: var(--blue); }
.k-violet  { color: var(--violet); }
.k-fuchsia { color: var(--fuchsia); }
.k-teal    { color: var(--teal); }

/* ─────────── carte d'identité ─────────── */
.id-in {
  border-radius: 11px;
  background: rgba(8, 7, 20, .94);
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.id-kicker { font-size: 10px; letter-spacing: .2em; color: rgba(199, 205, 244, .5); }
.id-kicker.sm { display: block; margin-bottom: 4px; font-size: 10px; letter-spacing: .14em; color: rgba(199, 205, 244, .4); }
.avatar {
  width: 64px;
  height: 64px;
  flex: none;
  margin: 12px 0;
  border-radius: 50%;
  /* photo.jpg est déjà carré et cadré (voir README) : `cover` l'affiche donc
     en entier, sans rognage. Le cadrage se règle en régénérant l'image, pas
     ici — c'est pour ça qu'il n'y a plus d'`object-position`. */
  object-fit: cover;
  /* Léger anneau : détache la photo du fond sombre de la carte. Le fond rayé
     reste visible tant que l'image n'est pas chargée. */
  box-shadow: 0 0 0 1px rgba(140, 150, 255, .3);
  background: repeating-linear-gradient(45deg, rgba(140, 150, 255, .2) 0 6px, rgba(140, 150, 255, .06) 6px 12px);
}
.id-name { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink-strong); }
.id-job  { margin: 2px 0 14px; font-size: 12px; color: #9db4ff; }

.links { margin: 0; padding: 0; list-style: none; font-size: 11.5px; line-height: 2; color: rgba(199, 205, 244, .7); }
.links a { text-decoration: none; }
.a-teal    { color: #8ff0dd; border-bottom: 1px solid rgba(143, 240, 221, .35); }
.a-violet  { color: #c4b5fd; border-bottom: 1px solid rgba(196, 181, 253, .35); }
.a-fuchsia { color: #f0abfc; border-bottom: 1px solid rgba(240, 171, 252, .35); }

.id-facts {
  margin: 14px 0 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(140, 150, 255, .25);
  font-size: 11px;
  line-height: 1.9;
  color: rgba(199, 205, 244, .75);
}
.id-facts > div { display: flex; gap: 6px; }
.id-facts dt { flex: none; min-width: 52px; }
.id-facts dt::after { content: " →"; }
.id-facts dd { margin: 0; }

.id-cta { margin-top: auto; padding: 10px; font-size: 12px; color: var(--ink-strong); border-radius: 10px; }

/* ─────────── à propos ─────────── */
.win-about .win-body { font-size: 13px; line-height: 1.85; }
.out-strong { margin: 2px 0 12px; color: var(--ink-strong); }
.out { margin: 2px 0 12px; color: rgba(199, 205, 244, .75); }
.out p { margin: 0; }
.out p.sp { margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 12px; padding: 0; list-style: none; }
.chips li { padding: 3px 10px; border-radius: 6px; font-size: 11.5px; }
.c-blue   { border: 1px solid rgba(91, 140, 255, .4);  color: #9db4ff; }
.c-violet { border: 1px solid rgba(139, 92, 246, .4);  color: #c4b5fd; }
.c-teal   { border: 1px solid rgba(94, 234, 212, .4);  color: #8ff0dd; }

/* Langues parlées — même grammaire que les lignes de la carte d'identité.
   Pas de font-size ici : on hérite du corps du terminal, ce qui suit
   automatiquement les paliers d'agrandissement des grands écrans. */
.langs { margin: 8px 0 12px; color: rgba(199, 205, 244, .75); }
.langs > div { display: flex; gap: 6px; }
/* `ch` = largeur d'un caractère : la colonne suit la taille de police à tous
   les paliers, là où une valeur en px désalignait « français » (10 car. avec
   la flèche) et « anglais » (9 car.). */
.langs dt { flex: none; min-width: 10.5ch; }
.langs dt::after { content: " →"; }
.langs dd { margin: 0; }

/* ─────────── cv ─────────── */
.cv-grid { display: grid; gap: 12px; align-content: start; font-size: 12.5px; }
.cv-item { padding: 12px 14px; }
.cv-blue    { border-left: 2px solid var(--blue);    background: rgba(91, 140, 255, .06); }
.cv-violet  { border-left: 2px solid var(--violet);  background: rgba(139, 92, 246, .06); }
.cv-fuchsia { border-left: 2px solid var(--fuchsia); background: rgba(217, 70, 239, .05); }
.cv-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; color: var(--ink-strong); font-weight: 700; }
.cv-item.dim .cv-head { color: rgba(232, 234, 246, .7); }
.cv-head time { flex: none; font-size: 11px; font-weight: 400; color: rgba(199, 205, 244, .45); }
.cv-item p { margin: 4px 0 0; font-size: 11.5px; font-weight: 400; color: rgba(199, 205, 244, .6); }
.cv-item.dim p { color: rgba(199, 205, 244, .5); }

/* ─────────── contact ─────────── */
.contact-in { border-radius: 11px; background: rgba(8, 7, 20, .94); padding: 24px; max-height: 100%; min-height: 0; }
.contact-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.contact-endpoint { font-size: 10px; color: rgba(199, 205, 244, .35); }

#contact-form { display: grid; gap: 10px; }
#contact-form label { display: grid; gap: 5px; }
.f-label { font-size: 10.5px; letter-spacing: .12em; }
#contact-form input, #contact-form textarea {
  font: 400 12.5px/1.6 "Space Mono", ui-monospace, monospace;
  color: var(--ink-strong);
  background: rgba(140, 150, 255, .07);
  border: 1px solid rgba(140, 150, 255, .25);
  border-radius: 8px;
  padding: 9px 11px;
  outline: none;
  transition: border-color .2s, background .2s;
}
#contact-form textarea { resize: vertical; min-height: 92px; }
#contact-form input:focus, #contact-form textarea:focus { border-color: var(--violet); background: rgba(139, 92, 246, .12); }
#contact-form ::placeholder { color: rgba(199, 205, 244, .35); }
.honeypot { position: absolute; left: -9999px; opacity: 0; }
.f-err { margin: 0; font-size: 11px; color: #fca5a5; }
.send-btn { padding: 11px; font-size: 12.5px; color: var(--ink-strong); border-radius: 10px; }

/* Envoi en cours : l'aller-retour vers Netlify prend parfois une à deux
   secondes. Sans repère animé, l'attente passe pour un plantage. `::before`
   est libre sur .lg-btn (seul ::after est utilisé, pour l'anneau conique). */
.send-btn.is-sending { cursor: progress; color: #8ff0dd; }
.send-btn.is-sending::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 2px;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--fuchsia), var(--teal), var(--blue));
  background-size: 200% 100%;
  animation: iri 1.1s linear infinite;
}
/* Un bouton désactivé est normalement grisé par le navigateur : on garde
   l'aspect verre pour que l'état lise « en cours » et non « indisponible ». */
.send-btn:disabled { opacity: 1; }
.send-btn:disabled:hover { transform: none; }

.sent { display: grid; gap: 10px; padding: 22px 4px; text-align: center; }
.sent[hidden] { display: none; }
.sent-title { margin: 0; font-size: 15px; font-weight: 700; color: #8ff0dd; }
.sent-body { margin: 0; font-size: 12.5px; color: rgba(199, 205, 244, .75); }
.link-btn {
  justify-self: center;
  margin-top: 6px;
  padding: 0;
  font: inherit;
  font-size: 11px;
  color: #c4b5fd;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(196, 181, 253, .35);
  cursor: pointer;
}

.contact-alt { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(140, 150, 255, .22); }
.reply-note { margin: 12px 0 0; text-align: center; font-size: 10px; color: rgba(199, 205, 244, .4); }

/* ─────────── dock ─────────── */
.dock {
  position: fixed;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 10px 14px;
  border-radius: 20px;
  background: rgba(10, 8, 24, .45);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .12);
  z-index: 5;
}
.dock-btn { width: 62px; height: 62px; }
.dock-btn svg { width: 26px; height: 26px; }
.dock-mark { font-size: 25px; color: #9db4ff; }
.dock-mail { font-size: 22px; color: #8ff0dd; }
.dock-sep { width: 1px; background: rgba(140, 150, 255, .25); margin: 6px 2px; }

/* Indicateur de vue active — indispensable sous 860px, où le dock est la
   seule navigation visible. Réutilise la pastille de la barre haute. */
.dock-btn .dot {
  position: absolute;
  bottom: 5px;
  left: 50%;
  margin-left: -2.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0;
  transition: opacity .2s;
}
.dock-btn.is-active .dot { opacity: 1; }

/* Bascule de langue repliée dans le dock : cachée tant que la barre haute
   est là, elle porte le même libellé (FR → EN). */
.dock-lang, .dock-sep-lang { display: none; }
.dock-lang { width: auto; padding: 0 14px; font-size: 12px; color: #8ff0dd; white-space: nowrap; }

/* ─────────── barre de statut ─────────── */
.statusbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  background: rgba(5, 4, 12, .8);
  font-size: 10.5px;
  z-index: 5;
}
.st-left { display: flex; gap: 16px; }
.dim { color: rgba(199, 205, 244, .5); }
.st-mid { color: rgba(199, 205, 244, .4); }
.st-iri {
  width: 60px;
  height: 6px;
  flex: none;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--fuchsia));
  background-size: 200% 100%;
  animation: iri 3s linear infinite;
}

/* ════════════════════════════════════════════════════════════
   Adaptatif — la maquette 3a est cadrée en 1080×720 ; en
   dessous on laisse la scène défiler plutôt que de rogner.
   ════════════════════════════════════════════════════════════ */

/* Grands écrans : dans la maquette (canevas 1080×720) les fenêtres occupaient
   déjà ~92 % de la scène. On rétablit cette proportion au lieu de laisser le
   bloc flotter au milieu d'un 1920×1080. La largeur reste plafonnée : au-delà
   d'environ 860px les lignes de monospace deviennent trop longues à lire. */
@media (min-width: 1400px) {
  .view { max-width: 1400px; margin-inline: auto; }
  /* Les deux fenêtres partagent la même hauteur — règle unique pour qu'elles
     ne puissent pas diverger. 620 et non « toute la hauteur » : le contenu de
     la fenêtre projets ne fait que ~400px, au-delà c'est le terminal qui sonne
     creux au lieu de la page. */
  .win-projets, .win-id {
    height: min(calc(100dvh - var(--topbar-h) - var(--dock-h)), 620px);
  }

  /* La typo monte d'un cran : à 1920 le 13px d'origine est petit, et le
     contenu occupe mieux les fenêtres élargies. */
  .win-projets .win-body { font-size: 14px; }
  .xp-card { font-size: 15px; padding: 18px 20px; }
  .xp-desc { font-size: 14px; }
  .role { font-size: 13px; }
  .meta { font-size: 13px; }
  .shot { width: 150px; height: 96px; }
  .xp-card:hover .xp-detail,
  .xp-card:focus-visible .xp-detail,
  .xp-card.is-open .xp-detail { max-height: 170px; }
  .win-about .win-body, .win-cv .win-body { font-size: 13.5px; }
  /* Carte d'identité : typo d'un cran au-dessus du reste, elle sert de fiche
     de contact et doit rester lisible à distance. */
  .win-id .id-kicker { font-size: 11px; }
  .win-id .id-name   { font-size: 19px; }
  .win-id .id-job    { font-size: 14px; margin-bottom: 16px; }
  .win-id .links     { font-size: 13px; }
  .win-id .id-facts  { font-size: 12.5px; margin-top: 16px; padding-top: 12px; }
  .win-id .id-facts dt { min-width: 60px; }
  .win-id .id-cta    { font-size: 13.5px; padding: 12px; }
  .win-id .id-in     { padding: 24px; }
  .win-about   { max-width: 760px; }
  .win-cv      { max-width: 820px; }
  .win-contact { max-width: 520px; }

  /* La carte d'identité gagne en hauteur : on rééquilibre son contenu. */
  .avatar { width: 104px; height: 104px; font-size: 10px; }
  .glitch { font-size: 28px; }
}

/* ════════════════════════════════════════════════════════════
   Au-delà de 1920px — tout grandit d'un même facteur (--s).
   Les valeurs ci-dessous reprennent exactement celles du palier
   1400px multipliées par --s : à 1920 et en dessous --s vaut 1,
   donc ce bloc ne change rien ; il ne s'active qu'à partir de
   1921px. Un seul nombre à régler par palier au lieu d'un jeu
   de valeurs dupliqué.
   ════════════════════════════════════════════════════════════ */
@media (min-width: 1921px) {
  /* ── les cases ── */
  .view { max-width: calc(1400px * var(--s)); }
  .win-projets, .win-id {
    height: min(calc(100dvh - var(--topbar-h) - var(--dock-h)), calc(620px * var(--s)));
  }
  .win-about   { max-width: calc(760px * var(--s)); }
  .win-cv      { max-width: calc(820px * var(--s)); }
  .win-contact { max-width: calc(520px * var(--s)); }
  .view { gap: calc(24px * var(--s)); }

  /* ── chrome des fenêtres ── */
  .win-bar { font-size: calc(11px * var(--s)); padding: calc(9px * var(--s)) calc(14px * var(--s)); }
  .win-body { padding: calc(18px * var(--s)) calc(22px * var(--s)); }
  .win-about .win-body, .win-cv .win-body { padding: calc(20px * var(--s)) calc(22px * var(--s)); }

  /* ── polices : vue projets ── */
  .glitch { font-size: calc(28px * var(--s)); }
  .role { font-size: calc(13px * var(--s)); }
  .win-projets .win-body { font-size: calc(14px * var(--s)); }
  .hint { font-size: calc(10px * var(--s)); }
  .cursor { width: calc(8px * var(--s)); height: calc(15px * var(--s)); }
  .xp-card { font-size: calc(15px * var(--s)); padding: calc(18px * var(--s)) calc(20px * var(--s)); }
  .xp-desc { font-size: calc(14px * var(--s)); }
  .xp-more { font-size: calc(11px * var(--s)); }
  .meta { font-size: calc(13px * var(--s)); }
  .meta dt { min-width: calc(38px * var(--s)); }
  .shot { width: calc(150px * var(--s)); height: calc(96px * var(--s)); font-size: calc(8.5px * var(--s)); }
  .xp-card:hover .xp-detail,
  .xp-card:focus-visible .xp-detail,
  .xp-card.is-open .xp-detail { max-height: calc(170px * var(--s)); }

  /* ── polices : carte d'identité ── */
  .win-id .id-in     { padding: calc(24px * var(--s)); }
  .win-id .id-kicker { font-size: calc(11px * var(--s)); }
  .win-id .id-name   { font-size: calc(19px * var(--s)); }
  .win-id .id-job    { font-size: calc(14px * var(--s)); margin-bottom: calc(16px * var(--s)); }
  .win-id .links     { font-size: calc(13px * var(--s)); }
  .win-id .id-facts  { font-size: calc(12.5px * var(--s)); margin-top: calc(16px * var(--s)); padding-top: calc(12px * var(--s)); }
  .win-id .id-facts dt { min-width: calc(60px * var(--s)); }
  .win-id .id-cta    { font-size: calc(13.5px * var(--s)); padding: calc(12px * var(--s)); }
  .avatar { width: calc(104px * var(--s)); height: calc(104px * var(--s)); font-size: calc(10px * var(--s)); }

  /* ── polices : à-propos, cv, contact ── */
  .win-about .win-body, .win-cv .win-body { font-size: calc(13.5px * var(--s)); }
  .chips li { font-size: calc(11.5px * var(--s)); padding: calc(3px * var(--s)) calc(10px * var(--s)); }
  .cv-item { padding: calc(12px * var(--s)) calc(14px * var(--s)); }
  .cv-head time { font-size: calc(11px * var(--s)); }
  .cv-item p { font-size: calc(11.5px * var(--s)); }
  .contact-in { padding: calc(24px * var(--s)); }
  .f-label { font-size: calc(10.5px * var(--s)); }
  #contact-form input, #contact-form textarea {
    font-size: calc(12.5px * var(--s));
    padding: calc(9px * var(--s)) calc(11px * var(--s));
  }
  .send-btn { font-size: calc(12.5px * var(--s)); padding: calc(11px * var(--s)); }

  /* ── la barre en haut ── */
  .topbar { font-size: calc(11px * var(--s)); gap: calc(8px * var(--s)); padding: calc(6px * var(--s)) calc(10px * var(--s)); border-radius: calc(16px * var(--s)); }
  .topbar-brand, .topbar-clock { padding: 0 calc(8px * var(--s)); }
  .topbar-nav { gap: calc(8px * var(--s)); }
  .nav-btn { font-size: calc(11px * var(--s)); padding: calc(6px * var(--s)) calc(14px * var(--s)); border-radius: calc(10px * var(--s)); }
  .lang-btn { font-size: calc(10.5px * var(--s)); padding: calc(6px * var(--s)) calc(12px * var(--s)); border-radius: calc(10px * var(--s)); }

  /* ── le dock ── */
  .dock { gap: calc(12px * var(--s)); padding: calc(10px * var(--s)) calc(14px * var(--s)); border-radius: calc(20px * var(--s)); bottom: calc(44px * var(--s)); }
  .dock-btn { width: calc(62px * var(--s)); height: calc(62px * var(--s)); border-radius: calc(14px * var(--s)); }
  .dock-btn svg { width: calc(26px * var(--s)); height: calc(26px * var(--s)); }
  .dock-mark { font-size: calc(25px * var(--s)); }
  .dock-mail { font-size: calc(22px * var(--s)); }

  /* ── barre de statut ── */
  .statusbar { height: calc(28px * var(--s)); font-size: calc(10.5px * var(--s)); padding: 0 calc(18px * var(--s)); }
  .micro { font-size: calc(8.5px * var(--s)); }
}

@media (max-width: 1100px) {
  .micro-l, .micro-r, .micro-stage { display: none; }
}

/* Ces valeurs sont des replis : app.js mesure ensuite la hauteur réelle de la
   barre et du dock. Elles sont volontairement généreuses pour que rien ne se
   chevauche même si le JS ne s'exécute pas. */
@media (max-width: 900px), (max-height: 700px) {
  :root { --topbar-h: 152px; --dock-h: 124px; }
  /* Centrage vertical : les vues à-propos / cv / contact sont plus courtes que
     la scène et restaient collées en haut. `safe center` centre quand il y a
     la place et retombe sur un alignement en haut quand le contenu dépasse —
     sans lui, un contenu trop grand serait rogné par le haut, hors d'atteinte
     du défilement. La 1re déclaration sert de repli aux moteurs anciens. */
  .stage {
    padding: 0 20px;
    overflow-y: auto;
    align-items: flex-start;
    align-items: safe center;
  }
  /* Respiration symétrique : en `padding-bottom` seul, elle décalait le
     centrage vertical de 8px. */
  .view { max-height: none; padding-block: 8px; }
  .win, .win-projets, .win-id { height: auto; max-height: none; }
  .win-projets { min-height: 380px; }
  .win-body { height: auto; max-height: none; }
  .proj-scroll { overflow-y: visible; }
  body { overflow: auto; }
}

/* Largeur seule (pas les écrans larges et bas, où les deux fenêtres tiennent
   côte à côte) : une fois empilées, les deux prennent toute la largeur.
   Il faut lever le plafond sur LES DEUX — `.win-projets` garde sinon son
   `max-width: 600px` d'origine et reste plus étroite que la carte. */
@media (max-width: 900px) {
  .win-projets, .win-id { flex: 1 1 100%; max-width: none; }
}

@media (max-width: 560px) {
  :root { --topbar-h: 200px; --dock-h: 112px; }
  .topbar { top: 8px; font-size: 10.5px; gap: 6px; }
  .topbar-brand, .topbar-clock { flex-basis: 100%; text-align: center; }
  .topbar-sep { display: none; }
  .nav-btn { padding: 5px 10px; font-size: 10.5px; }
  .stage { padding: 0 12px; }
  .glitch { font-size: 20px; }
  .win-body, .contact-in { padding: 16px; }
  .xp-detail-in { flex-direction: column; }
  .shot { width: 100%; }
  .dock { gap: 8px; padding: 8px 10px; }
  .dock-btn { width: 54px; height: 54px; }
  .dock-btn svg { width: 23px; height: 23px; }
  .dock-mark { font-size: 22px; }
  .dock-mail { font-size: 19px; }
  .dock-lang { font-size: 11px; padding: 0 10px; }
  .st-mid { display: none; }
}

/* ════════════════════════════════════════════════════════════
   Sous 860px — seuil mesuré où la barre haute cesse de tenir sur
   une ligne, puis s'empile (75px à 760, 115px à 560, 156px à
   375). Le seuil est calé sur l'ANGLAIS, qui casse vers 820px
   (« projects », « resume » sont plus longs que « projets »,
   « cv ») alors que le français tient encore. On la supprime
   simplement : le dock, qui reste en bas, devient la navigation
   unique et récupère le sélecteur de langue.
   Ce bloc est volontairement le dernier — il doit gagner sur les
   règles de positionnement des media queries précédentes.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  /* Replis si le JS ne tourne pas ; app.js mesure ensuite le vrai.
     Plus rien en haut : une simple marge suffit. */
  :root { --topbar-h: 20px; --dock-h: 136px; }

  .topbar { display: none; }

  /* Le dock garde sa place en bas ; `wrap` par sécurité si le sélecteur de
     langue ne rentre pas sur une ligne dans une langue plus verbeuse. */
  .dock { flex-wrap: wrap; justify-content: center; }

  .dock-lang { display: flex; }
  .dock-sep-lang { display: block; }
}

/* ─────────── accessibilité ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .boot { display: none; }
  .xp-detail { max-height: 150px; opacity: 1; margin-top: 12px; }
}

/* Repli si @property n'est pas supporté : anneau fixe plutôt qu'immobile et terne. */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .iri-ring::before, .iri-ring::after, .lg-btn::after, .iri-glow {
    background: linear-gradient(120deg, var(--blue), var(--violet), var(--fuchsia));
  }
}
