/* ==========================================================================
   Surge UP — page de pré-lancement
   ========================================================================== */

:root {
  --bg: #07080b;
  --bg-elev: #0d0f14;
  --surface: rgb(255 255 255 / 0.028);
  --surface-2: rgb(255 255 255 / 0.055);
  --border: rgb(255 255 255 / 0.08);
  --border-strong: rgb(255 255 255 / 0.15);
  --text: #eceef3;
  --muted: #9097a6;
  --faint: #5d6372;
  --accent: #c8ff4d;
  --accent-rgb: 200 255 77;
  --cyan: #4de1ff;
  --cyan-rgb: 77 225 255;
  --on-accent: #0b0e05;

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --topbar: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar) + 16px);
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgb(var(--accent-rgb) / 0.85);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

[v-cloak] {
  display: none !important;
}

.mono {
  font-family: var(--mono);
}

.ico {
  display: inline-flex;
  flex: none;
}

.ico svg {
  width: 1em;
  height: 1em;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   Fond : champ de points, aurore, grain
   -------------------------------------------------------------------------- */

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(130% 95% at 50% 0%, #000 35%, rgb(0 0 0 / 0.35) 75%, rgb(0 0 0 / 0.2) 100%);
  mask-image: radial-gradient(130% 95% at 50% 0%, #000 35%, rgb(0 0 0 / 0.35) 75%, rgb(0 0 0 / 0.2) 100%);
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 22% -8%, rgb(var(--accent-rgb) / 0.1), transparent 70%),
    radial-gradient(45% 40% at 92% 6%, rgb(var(--cyan-rgb) / 0.08), transparent 70%),
    radial-gradient(70% 50% at 50% 115%, rgb(120 80 255 / 0.06), transparent 70%);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Écran de chargement
   -------------------------------------------------------------------------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.boot.hide {
  opacity: 0;
  visibility: hidden;
}

.boot-inner {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  font: 13px/1.6 var(--mono);
  color: var(--muted);
  text-align: center;
}

.boot-inner p {
  margin: 0;
}

.boot-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.06em;
}

.boot-bar {
  width: 180px;
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface-2);
}

.boot-bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  animation: boot-load 1.1s var(--ease) infinite;
}

@keyframes boot-load {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}

.boot-error {
  display: none;
}

.boot.is-error .boot-error {
  display: block;
}

.boot.is-error .boot-line,
.boot.is-error .boot-bar {
  display: none;
}

.boot-error a {
  color: var(--accent);
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 24px;
  background: var(--bg);
  text-align: center;
}

.noscript a {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Éléments communs
   -------------------------------------------------------------------------- */

.pulse {
  position: relative;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.8);
}

.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--accent);
  animation: pulse 2s var(--ease) infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(3.2); opacity: 0; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: 500 15px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.25s;
}

.btn .ico {
  font-size: 17px;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.4), 0 10px 32px -10px rgb(var(--accent-rgb) / 0.6);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.7), 0 14px 44px -10px rgb(var(--accent-rgb) / 0.8);
}

.btn-ghost {
  background: rgb(255 255 255 / 0.035);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgb(255 255 255 / 0.25);
}

.btn-sm {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgb(255 255 255 / 0.04);
  color: var(--text);
  font: 500 11px/1 var(--mono);
}

/* Halo qui suit le pointeur (fond + bordure). */
.spot {
  position: relative;
  isolation: isolate;
}

.spot::before,
.spot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.spot::before {
  z-index: -1;
  background: radial-gradient(520px circle at var(--mx, -999px) var(--my, -999px), rgb(var(--accent-rgb) / 0.065), transparent 42%);
  opacity: 0;
  transition: opacity 0.35s;
}

.spot:hover::before {
  opacity: 1;
}

.spot::after {
  z-index: 2;
  padding: 1px;
  background: radial-gradient(380px circle at var(--mx, -999px) var(--my, -999px), rgb(var(--accent-rgb) / 0.6), rgb(var(--cyan-rgb) / 0.15) 30%, transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Apparition au défilement (v-reveal). */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Barre du haut
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.topbar.scrolled {
  background: rgb(7 8 11 / 0.72);
  border-color: var(--border);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topbar);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
}

.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.kbd-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.03);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.kbd-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.kbd-btn .ico {
  font-size: 15px;
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .kbd-btn {
    margin-left: auto;
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .kbd-label,
  .kbd-btn kbd {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  min-height: calc(100svh - var(--topbar));
  padding-block: clamp(32px, 6vh, 64px) clamp(56px, 9vh, 96px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 8px 13px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.03);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill .sep {
  color: var(--faint);
}

.title {
  margin: 0 0 22px;
  font-size: clamp(3.25rem, 9vw, 8rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.title .word {
  display: inline-block;
  white-space: nowrap;
}

.title .word + .word {
  margin-left: 0.2em;
}

.title .ch {
  display: inline-block;
  animation: rise 1s var(--ease) both;
  animation-delay: calc(var(--i) * 55ms + 120ms);
}

.title .accent {
  color: var(--accent);
  text-shadow: 0 0 48px rgb(var(--accent-rgb) / 0.35);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.55em);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

.headline {
  margin: 0 0 14px;
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
  background: linear-gradient(92deg, #fff 10%, #a3a9b7 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade-up 0.9s var(--ease) 0.55s both;
}

.lead {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  animation: fade-up 0.9s var(--ease) 0.65s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  animation: fade-up 0.9s var(--ease) 0.85s both;
}

/* Compte à rebours */
.countdown {
  max-width: 540px;
  margin-top: 34px;
  animation: fade-up 0.9s var(--ease) 0.75s both;
}

.cd-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cd-tick {
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cd-cell {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 16px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.cd-cell::before {
  /* reflet supérieur */
  content: '';
  position: absolute;
  inset: 0 16% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.22), transparent);
}

.cd-cell + .cd-cell::after {
  content: ':';
  position: absolute;
  left: -7px;
  top: 38%;
  transform: translate(-50%, -50%);
  color: var(--faint);
  font: 500 20px/1 var(--mono);
}

.cd-digits {
  display: flex;
  justify-content: center;
  height: 1.1em;
  overflow: hidden;
  font: 500 clamp(1.75rem, 4.6vw, 2.75rem)/1.1 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.cd-d {
  display: inline-block;
  width: 0.62em;
  text-align: center;
  animation: digit-in 0.5s var(--ease);
}

.cd-cell:last-child .cd-d {
  color: var(--accent);
}

@keyframes digit-in {
  from {
    opacity: 0;
    transform: translateY(75%);
    filter: blur(4px);
  }
}

.cd-unit {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cd-date {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.cd-date::first-letter {
  text-transform: uppercase;
}

/* Terminal */
.terminal {
  align-self: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgb(11 13 18 / 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 40px 100px -30px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(0 0 0 / 0.4), 0 0 80px -40px rgb(var(--accent-rgb) / 0.35);
  animation: fade-up 1s var(--ease) 0.5s both;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}

.term-dots {
  display: inline-flex;
  gap: 7px;
}

.term-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
}

.term-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.term-live .pulse {
  width: 6px;
  height: 6px;
}

.term-body {
  min-height: 300px;
  padding: 18px 20px 22px;
  font-size: 13px;
  line-height: 1.85;
}

.is-cmd {
  color: var(--text);
}

.is-cmd:not(:first-child) {
  margin-top: 10px;
}

.t-prompt {
  color: var(--accent);
}

.t-path {
  color: var(--cyan);
}

.t-kv {
  display: grid;
  grid-template-columns: minmax(10ch, max-content) minmax(0, 1fr);
  gap: 16px;
  padding-left: 2ch;
}

.t-k {
  color: var(--muted);
  white-space: nowrap;
}

.t-v {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.t-v.ok {
  color: var(--accent);
}

.t-v.proj {
  color: var(--muted);
}

.t-kv:has(.proj) .t-k {
  color: var(--text);
}

.t-note {
  display: block;
  padding-left: 2ch;
  color: var(--faint);
}

.t-note::before {
  content: '# ';
}

.caret {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--accent);
}

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

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

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: clamp(40px, 8vh, 72px);
  }

  .terminal {
    max-width: 620px;
  }
}

@media (max-width: 480px) {
  .cd-grid {
    gap: 10px;
  }

  .cd-cell {
    padding: 14px 4px 10px;
    border-radius: 12px;
  }

  .cd-cell + .cd-cell::after {
    left: -5px;
    font-size: 16px;
  }

  .cd-unit {
    font-size: 9.5px;
    letter-spacing: 0.04em;
  }

  .cta .btn {
    flex: 1 1 100%;
  }

  .term-body {
    min-height: 0;
    padding: 16px 14px 18px;
    font-size: 12px;
  }

  .t-kv {
    grid-template-columns: minmax(9ch, max-content) minmax(0, 1fr);
    gap: 10px;
    padding-left: 1ch;
  }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(64px, 10vw, 128px);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.empty {
  color: var(--muted);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Projets
   -------------------------------------------------------------------------- */

/* Grille des projets : la dernière ligne est toujours complète.
   2 colonnes : un projet seul en fin de liste passe en pleine largeur.
   3 colonnes (grille de 6) : seul → pleine largeur, deux → moitié / moitié. */
.projects {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (min-width: 720px) and (max-width: 1099.98px) {
  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects > .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1100px) {
  .projects {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .projects > .card {
    grid-column: span 2;
  }

  .projects > .card:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
  }

  .projects > .card:last-child:nth-child(3n + 2),
  .projects > .card:nth-last-child(2):nth-child(3n + 1) {
    grid-column: span 3;
  }
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.012));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.45s var(--ease), border-color 0.3s, opacity 0.8s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.card.reveal:not(.in) {
  transform: translateY(26px);
}

.cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.card:hover .cover img {
  transform: scale(1.035);
}

/* Couverture générée quand le projet n'a pas d'image. */
.cover-gen {
  --h: 80;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 12% 0%, hsl(var(--h) 100% 62% / 0.26), transparent 62%),
    radial-gradient(70% 80% at 100% 100%, hsl(calc(var(--h) + 110) 95% 60% / 0.22), transparent 62%),
    #0b0d12;
}

.cover-gen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
}

.cover-path {
  position: absolute;
  top: 16px;
  left: 18px;
  color: hsl(var(--h) 40% 85% / 0.65);
  font-size: 12px;
}

.cover-mono {
  position: relative;
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
  color: hsl(var(--h) 100% 78%);
  text-shadow: 0 0 60px hsl(var(--h) 100% 60% / 0.55);
}

.cover-ring {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed hsl(var(--h) 100% 72% / 0.28);
  animation: spin 60s linear infinite;
}

.cover-ring.r1 {
  width: min(58%, 260px);
}

.cover-ring.r2 {
  width: min(84%, 380px);
  border-style: solid;
  border-color: hsl(var(--h) 100% 72% / 0.1);
  border-top-color: hsl(var(--h) 100% 72% / 0.55);
  animation-duration: 9s;
}

.cover-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, hsl(var(--h) 100% 70% / 0.08) 50%, transparent 100%);
  background-size: 100% 40%;
  background-repeat: no-repeat;
  animation: scan 5s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes scan {
  from { background-position: 0 -150%; }
  to { background-position: 0 250%; }
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 24px 26px;
}

.badge {
  padding: 6px 10px;
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.08);
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.card h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.card-body > p {
  margin: 0;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 10px 0 0;
  list-style: none;
}

.chip {
  --brand: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.025);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

.chip .ico {
  color: var(--muted);
  font-size: 16px;
  transition: color 0.2s;
}

.chip .ext {
  font-size: 13px;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}

.chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.chip:hover .ico {
  color: var(--brand);
}

.chip:hover .ext {
  opacity: 1;
  transform: translate(1px, -1px);
}

/* Carte en pleine largeur : présentation horizontale mise en avant. */
@media (min-width: 720px) and (max-width: 1099.98px) {
  .projects > .card:last-child:nth-child(odd) {
    flex-direction: row;
  }

  .projects > .card:last-child:nth-child(odd) .cover {
    flex: 0 0 44%;
    aspect-ratio: auto;
    min-height: 320px;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .projects > .card:last-child:nth-child(odd) .card-body {
    justify-content: center;
    padding: 30px 32px;
  }

  .projects > .card:last-child:nth-child(odd) h3 {
    font-size: 1.85rem;
  }
}

@media (min-width: 1100px) {
  .projects > .card:last-child:nth-child(3n + 1) {
    flex-direction: row;
  }

  .projects > .card:last-child:nth-child(3n + 1) .cover {
    flex: 0 0 46%;
    aspect-ratio: auto;
    min-height: 360px;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .projects > .card:last-child:nth-child(3n + 1) .card-body {
    justify-content: center;
    gap: 14px;
    padding: 40px 44px;
  }

  .projects > .card:last-child:nth-child(3n + 1) h3 {
    font-size: 2.25rem;
  }

  .projects > .card:last-child:nth-child(3n + 1) .card-body > p {
    font-size: 1.05rem;
  }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 820px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  }

  .contact-main {
    grid-row: span var(--rows, 1);
  }
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-height: 170px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.012));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-decoration: none;
  transition: border-color 0.3s, transform 0.45s var(--ease);
}

a.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.contact-main {
  justify-content: space-between;
  min-height: 240px;
}

.cc-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cc-label .ico {
  font-size: 16px;
  color: var(--brand, var(--accent));
}

.cc-value {
  font-size: clamp(1.45rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

a.cc-value:hover {
  color: var(--accent);
}

.cc-small {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
}

.cc-hint {
  margin-top: -6px;
  color: var(--muted);
  font-size: 14px;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-go {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--muted);
  font-size: 20px;
  transition: color 0.2s, transform 0.3s var(--ease);
}

.cc-go svg {
  width: 1em;
  height: 1em;
}

a.contact-card:hover .cc-go {
  color: var(--brand, var(--accent));
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   Barre de statut
   -------------------------------------------------------------------------- */

.statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 24px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.sb-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.sb-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.sb-item + .sb-item::before {
  content: '';
  width: 3px;
  height: 3px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--faint);
}

.sb-item .pulse {
  width: 6px;
  height: 6px;
}

/* --------------------------------------------------------------------------
   Palette de commandes
   -------------------------------------------------------------------------- */

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14vh 16px 16px;
  background: rgb(3 4 6 / 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade 0.18s ease-out;
}

.palette {
  width: min(640px, 100%);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgb(13 15 20 / 0.96);
  box-shadow: 0 40px 120px -20px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(0 0 0 / 0.5), 0 0 120px -50px rgb(var(--accent-rgb) / 0.4);
  animation: pop 0.22s var(--ease);
}

@keyframes fade {
  from { opacity: 0; }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

.palette-search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.palette-search > .ico {
  color: var(--muted);
  font-size: 18px;
}

.palette-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 400 16px var(--font);
}

.palette-search input::placeholder {
  color: var(--faint);
}

.palette-list {
  max-height: min(52vh, 420px);
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
}

.palette-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
}

.palette-list li .ico {
  font-size: 16px;
}

.palette-list li.active {
  background: var(--surface-2);
  color: var(--text);
}

.palette-list li.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.palette-list li.active .ico {
  color: var(--accent);
}

.p-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
}

.p-group {
  flex: none;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.palette-list li.active .p-group {
  color: var(--muted);
}

.palette-empty {
  margin: 0;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.palette-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 11px;
}

.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 480px) {
  .p-group {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  border-radius: 12px;
  background: rgb(13 15 20 / 0.95);
  box-shadow: 0 20px 60px -20px rgb(0 0 0 / 0.9);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}

.toast .ico {
  color: var(--accent);
  font-size: 16px;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   Mouvement réduit
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
