/* ── Fonts ── */
:root {
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ── Dark tokens (default) ── */
:root {
  --t1: #ffffff;
  --t2: rgba(255,255,255,0.65);
  --t3: rgba(255,255,255,0.40);
  --t4: rgba(255,255,255,0.24);
  --s1: rgba(25,28,31,0.40);
  --s2: rgba(25,28,31,0.65);
  --bd: rgba(255,255,255,0.08);
  --bd-h: rgba(255,255,255,0.15);
  --tag-bg: rgba(255,255,255,0.06);
  --ag2r: #29b6e8;
}

/* ── Light tokens via OS ── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --t1: #0b0c0e;
    --t2: rgba(0,0,0,0.60);
    --t3: rgba(0,0,0,0.45);
    --t4: rgba(0,0,0,0.30);
    --s1: rgba(255,255,255,0.45);
    --s2: rgba(255,255,255,0.6);
    --bd: rgba(0,0,0,0.10);
    --bd-h: rgba(0,0,0,0.20);
    --tag-bg: rgba(0,0,0,0.05);
  }
}

/* ── Light tokens via manual toggle ── */
:root[data-theme="light"] {
  --t1: #0b0c0e;
  --t2: rgba(0,0,0,0.60);
  --t3: rgba(0,0,0,0.45);
  --t4: rgba(0,0,0,0.30);
  --s1: rgba(255,255,255,0.45);
  --s2: rgba(255,255,255,0.6);
  --bd: rgba(0,0,0,0.10);
  --bd-h: rgba(0,0,0,0.20);
  --tag-bg: rgba(0,0,0,0.05);
}

/* ── Nav frosted in light mode ── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #nav,
  :root:not([data-theme="dark"]) #mobile-menu {
    --s2: rgba(200,202,210,0.55);
    --bd: rgba(0,0,0,0.12);
  }
}
/* Overlay du menu : défilement interne si le contenu déborde (petit écran en
   paysage), sans chaînage vers la page gelée derrière. */
#mobile-menu {
  overflow-y: auto;
  overscroll-behavior: contain;
}

:root[data-theme="light"] #nav,
:root[data-theme="light"] #mobile-menu {
  --s2: rgba(200,202,210,0.55);
  --bd: rgba(0,0,0,0.12);
}

/* ── Smooth theme transition ── */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition:
    background-color 300ms ease,
    color 300ms ease,
    border-color 300ms ease,
    fill 300ms ease,
    stroke 300ms ease !important;
  transition-delay: 0s !important;
}

/* ── Page intro overlay ── */
#page-intro {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #0b0c0e;
}

/* ── Scrollbar (matches DA) ── */
html { scrollbar-width: thin; scrollbar-color: var(--t4) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--t4);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--t3); background-clip: padding-box; }
*::-webkit-scrollbar-corner { background: transparent; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
}

body {
  background: #0b0c0e;
  color: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) body { background: #f4f4f2; color: #0b0c0e; }
}
html[data-theme="light"] body { background: #f4f4f2; color: #0b0c0e; }
html[data-theme="dark"]  body { background: #0b0c0e; color: #fff; }

/* ── Backgrounds ── */
.bg-light { display: none; }
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .bg-dark  { display: none; }
  html:not([data-theme="dark"]) .bg-light { display: block; }
}
html[data-theme="light"] .bg-dark  { display: none; }
html[data-theme="light"] .bg-light { display: block; }
html[data-theme="dark"]  .bg-light { display: none; }
html[data-theme="dark"]  .bg-dark  { display: block; }

/* ── Focus rings ── */
a:focus-visible,
button:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid #494fdf;
  outline-offset: 3px;
  border-radius: 6px;
}

a, button, [role="button"] { cursor: pointer; }

/* ── Skip link ── */
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 9999;
  background: #494fdf;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* ── Selection ── */
::selection { background: rgba(73,79,223,0.30); color: #fff; }

/* ── Nav ── */
.nav-link:hover  { color: var(--t1) !important; }
.nav-link--active { color: var(--t1) !important; }
#theme-toggle:hover, #theme-toggle-mobile:hover { color: var(--t1) !important; }
#theme-toggle, #theme-toggle-mobile { background: transparent; border: none; }

/* ── Nav lamp ── */
#nav-lamp {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: calc(100% + 8px);
  left: 0;
  width: 80px;
  border-radius: 9999px;
  background: transparent;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}
.nav-lamp-bar {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 2px;
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 0 8px 2px rgba(255,255,255,0.8), 0 0 20px 4px rgba(255,255,255,0.3);
}
.nav-lamp-glow-1, .nav-lamp-glow-2 { display: none; }

.bar {
  display: block; width: 22px; height: 2px;
  background: var(--t1); border-radius: 2px;
  transition: all .25s ease;
}

@media (max-width: 640px) {
  #nav          { display: none !important; }
  #hamburger    { display: flex !important; }
  section { padding-left: 20px !important; padding-right: 20px !important; }
  footer  { flex-direction: column !important; gap: 12px !important; text-align: center !important; }
  /* ── Projets ── */
  .proj-grid { gap: 16px !important; }
  .proj-grid--bento { grid-template-columns: 1fr !important; grid-auto-rows: auto !important; }
  .proj-grid--bento .proj-card--xl,
  .proj-grid--bento .proj-card--wide { grid-column: auto !important; grid-row: auto !important; }
  .proj-img { flex: none !important; aspect-ratio: 640 / 260 !important; }

  /* Gouttière resserrée : badge et « Voir le détail » suivent la variable. */
  .proj-card { --card-pad: 18px; }
  .proj-card--xl .proj-card__surface { gap: 13px; }
  .proj-title { font-size: 17px; }
  .proj-title--xl { font-size: 21px; letter-spacing: -0.4px; }
  .proj-card--xl .proj-desc { font-size: 13.5px; }

  /* Le titre ne partage plus sa ligne : sous 640px, titre + logos + statut
     se compressent au point de couper le titre sur deux lettres. */
  .proj-head,
  .proj-xl-head { flex-wrap: wrap; row-gap: 8px; }
  .proj-head .proj-title,
  .proj-xl-head .proj-title { flex: 1 1 100%; }
  .proj-head .proj-status,
  .proj-xl-head .proj-status { margin-left: 0 !important; }
  .proj-head .proj-logos { order: 2; margin-left: auto; }

  /* Schéma d'architecture : le SVG s'échelonne sur sa largeur, donc en
     dessous de ~480px les libellés mono tombent sous 9px. On lui garde sa
     largeur utile et on laisse la carte défiler horizontalement. */
  .proj-img--arch { overflow-x: auto; overscroll-behavior-x: contain; padding: 12px; }
  .proj-img--arch .arch-svg { min-width: 460px; }

  .proj-modal-panel { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .proj-modal-scroll { max-height: 92vh; }

  /* Filtres : 4 pills de statut ne tiennent pas sur une ligne de 320px. */
  .proj-filters { gap: 8px !important; margin-bottom: 10px; }
  .proj-pill { font-size: 12px; padding: 8px 14px; }
  .cert-grid { grid-template-columns: 1fr; }
  .parcours-grid { gap: 44px; }
  .contact-card { padding: 44px 24px; }
  #hero-desc { font-size: 10.5px !important; }
  #hero-title, #hero-sub { font-size: clamp(40px, 15vw, 72px) !important; }
  #hero-title { margin-top: 24px !important; }
  #hero-sub { margin-bottom: 22px !important; }
  #hero-desc { margin-bottom: 26px !important; }
  #hero-passion { margin-bottom: 28px !important; }
  #hero-ctas .btn-accent { padding: 13px 22px !important; }
  .about-bio-desc { white-space: normal !important; font-size: 15px !important; }
}

@media (max-width: 380px) {
  #hero-title, #hero-sub { font-size: clamp(34px, 16vw, 60px) !important; }
}

/* ── Tahoe glass text ── */
@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position:   0% center; }
}
.tahoe-glass-text {
  display: inline-block;
  user-select: none;
  color: transparent !important;
  background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.4) 25%, rgba(255,255,255,0.1) 45%, rgba(255,255,255,0.9) 55%, rgba(255,255,255,0.2) 75%, rgba(255,255,255,1) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.28);
  filter: drop-shadow(0 15px 35px rgba(0,0,0,0.4)) drop-shadow(0 5px 10px rgba(0,0,0,0.2));
  animation: shimmer 8s linear infinite;
}
.hero-name-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.hero-name-group:hover { transform: scale(1.05); }
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .tahoe-glass-text {
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.5) 25%, rgba(255,255,255,0.15) 45%, rgba(255,255,255,0.85) 55%, rgba(255,255,255,0.3) 75%, rgba(255,255,255,1) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 1.5px rgba(0,0,0,0.12);
    filter: drop-shadow(0 0 10px rgba(0,0,0,.75)) drop-shadow(0 0 24px rgba(0,0,0,.6)) drop-shadow(0 0 46px rgba(0,0,0,.4));
  }
}
html[data-theme="light"] .tahoe-glass-text {
  background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.5) 25%, rgba(255,255,255,0.15) 45%, rgba(255,255,255,0.85) 55%, rgba(255,255,255,0.3) 75%, rgba(255,255,255,1) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.5px rgba(0,0,0,0.12);
  filter: drop-shadow(0 0 10px rgba(0,0,0,.75)) drop-shadow(0 0 24px rgba(0,0,0,.6)) drop-shadow(0 0 46px rgba(0,0,0,.4));
}

/* ── Hero buttons ── */
.btn-accent:hover {
  background: #e8e8e8 !important;
  border-color: #e8e8e8 !important;
  box-shadow: 0 0 32px rgba(255,255,255,.25) !important;
  transform: translateY(-1px);
}

.btn-accent-arrow {
  display: inline-flex;
  align-items: center;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.35s ease, opacity 0.25s ease, transform 0.3s ease;
}
.btn-accent-arrow--left  { transform: translateX(10px); }
.btn-accent-arrow--right { transform: translateX(-10px); }
.btn-accent:hover .btn-accent-arrow {
  max-width: 22px;
  opacity: 1;
}
.btn-accent:hover .btn-accent-arrow--left  { transform: translateX(0); }
.btn-accent:hover .btn-accent-arrow--right { transform: translateX(0); }

.btn-liquid {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  border-radius: 12px;
  padding: 14px 32px;
  text-decoration: none;
  color: var(--t1);
  background: transparent;
  cursor: pointer;
  transition: transform 300ms ease;
}
.btn-liquid:hover { transform: scale(1.05); }

@property --shiny-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 100%;
}
@keyframes shiny-sweep {
  0%   { --shiny-x: 100%; opacity: 0; }
  4%   { opacity: 1; }
  56%  { opacity: 1; }
  62%  { --shiny-x: -100%; opacity: 0; }
  100% { --shiny-x: -100%; opacity: 0; }
}
.btn-liquid::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    -75deg,
    transparent                  calc(var(--shiny-x) +  0%),
    rgba(255,255,255,0.35)       calc(var(--shiny-x) + 10%),
    rgba(255,255,255,0.55)       calc(var(--shiny-x) + 13%),
    rgba(255,255,255,0.35)       calc(var(--shiny-x) + 18%),
    transparent                  calc(var(--shiny-x) + 26%)
  );
}
.btn-liquid:hover::after {
  animation: shiny-sweep 2s ease infinite;
}

.btn-liquid-shadow {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  z-index: 0;
  transition: box-shadow 250ms ease;
  box-shadow:
    0 0 8px rgba(0,0,0,.03),
    0 2px 6px rgba(0,0,0,.08),
    inset 3px 3px .5px -3.5px rgba(255,255,255,.09),
    inset -3px -3px .5px -3.5px rgba(255,255,255,.85),
    inset 1px 1px 1px -.5px rgba(255,255,255,.6),
    inset -1px -1px 1px -.5px rgba(255,255,255,.6),
    inset 0 0 6px 6px rgba(255,255,255,.12),
    inset 0 0 2px 2px rgba(255,255,255,.06),
    0 0 12px rgba(0,0,0,.15);
}
html[data-theme="light"] .btn-liquid-shadow {
  box-shadow:
    0 0 6px rgba(0,0,0,.03),
    0 2px 6px rgba(0,0,0,.08),
    inset 3px 3px .5px -3px rgba(0,0,0,.9),
    inset -3px -3px .5px -3px rgba(0,0,0,.85),
    inset 1px 1px 1px -.5px rgba(0,0,0,.6),
    inset -1px -1px 1px -.5px rgba(0,0,0,.6),
    inset 0 0 6px 6px rgba(0,0,0,.12),
    inset 0 0 2px 2px rgba(0,0,0,.06),
    0 0 12px rgba(255,255,255,.15);
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .btn-liquid-shadow {
    box-shadow:
      0 0 6px rgba(0,0,0,.03),
      0 2px 6px rgba(0,0,0,.08),
      inset 3px 3px .5px -3px rgba(0,0,0,.9),
      inset -3px -3px .5px -3px rgba(0,0,0,.85),
      inset 1px 1px 1px -.5px rgba(0,0,0,.6),
      inset -1px -1px 1px -.5px rgba(0,0,0,.6),
      inset 0 0 6px 6px rgba(0,0,0,.12),
      inset 0 0 2px 2px rgba(0,0,0,.06),
      0 0 12px rgba(255,255,255,.15);
  }
}
.btn-liquid-glass {
  position: absolute;
  inset: 0;
  isolation: isolate;
  z-index: -1;
  overflow: hidden;
  border-radius: 12px;
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: url('#hero-glass-filter');
  backdrop-filter: url('#hero-glass-filter');
}
.btn-liquid-content {
  position: relative;
  z-index: 10;
  pointer-events: none;
}

/* ── Book Cards ── */
/* ── Project filters ── */
.proj-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.proj-filters--status { margin-bottom: 0; }

.proj-filter-details { margin-bottom: 24px; }
.proj-filter-panel { margin-top: 16px; }
.filter-toggle-ico { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.proj-filter-details[open] .filter-toggle-ico { transform: rotate(45deg); }
.proj-pill {
  font-size: 13px;
  padding: 10px 22px;
  color: var(--t2);
}
.proj-pill .btn-liquid-content {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pill-ico { flex-shrink: 0; }
.proj-pill--active {
  color: var(--t1);
  background: var(--tag-bg);
  border: 1px solid var(--bd-h);
  font-weight: 600;
}
.proj-pill--active .btn-liquid-shadow {
  box-shadow:
    0 0 8px rgba(255,255,255,.15),
    0 2px 6px rgba(0,0,0,.12),
    inset 3px 3px .5px -3.5px rgba(255,255,255,.09),
    inset -3px -3px .5px -3.5px rgba(255,255,255,.85),
    inset 1px 1px 1px -.5px rgba(255,255,255,.6),
    inset -1px -1px 1px -.5px rgba(255,255,255,.6),
    inset 0 0 6px 6px rgba(255,255,255,.14),
    inset 0 0 2px 2px rgba(255,255,255,.08),
    0 0 16px rgba(255,255,255,.10);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--t3);
  transition: background .2s ease, box-shadow .2s ease;
}
.proj-pill--status-wip .pill-dot { background: #f59e0b; }
.proj-pill--status-done .pill-dot { background: #00c99a; }
.proj-pill--status-wip.proj-pill--active { color: #f59e0b; background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.35); }
.proj-pill--status-wip.proj-pill--active .pill-dot { box-shadow: 0 0 8px rgba(245,158,11,.7); animation: pulse-dot 1.8s ease-in-out infinite; }
.proj-pill--status-soon.proj-pill--active { color: var(--t1); }
.proj-pill--status-done.proj-pill--active { color: #00c99a; background: rgba(0,168,126,.10); border-color: rgba(0,168,126,.35); }
.proj-pill--status-done.proj-pill--active .pill-dot { box-shadow: 0 0 8px rgba(0,201,154,.7); }

.proj-progress {
  height: 4px;
  border-radius: 9999px;
  background: var(--tag-bg);
  overflow: hidden;
  margin: -8px 0;
  flex-shrink: 0;
}
.proj-progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: #f59e0b;
  transition: width .6s cubic-bezier(.16,1,.3,1);
}

/* ── Project grid ── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Bento layout */
.proj-grid--bento {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  grid-auto-flow: dense;
}
.proj-card--xl   { grid-column: span 2; grid-row: span 2; }
.proj-card--wide { grid-column: span 2; }
.proj-card--clickable { cursor: pointer; }
.proj-card--clickable:focus-visible {
  outline: 2px solid var(--t1);
  outline-offset: 3px;
}

.proj-title--xl { font-size: 26px; letter-spacing: -0.6px; }
.proj-card--xl .proj-card__surface { gap: 16px; }
.proj-card--xl .proj-desc { font-size: 14.5px; max-width: 46ch; flex: none; }

.proj-img {
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(123,128,238,.25), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  border: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}
/* Architecture diagram (homelab) */
.proj-img--arch {
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
}
.arch-svg { width: 100%; height: 100%; display: block; }

.arch-cell {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 11px;
  border: 1.5px solid rgba(var(--c), .55);
  background: rgba(var(--c), .12);
  transition: border-color .3s ease, background .3s ease;
}
.arch-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: rgb(var(--c));
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
.arch-lbl {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
}
.arch-cell--leaf { background: rgba(var(--c), .07); }
.arch-cell--accent { box-shadow: 0 0 0 3px rgba(var(--c), .12); }
.arch-tag {
  position: absolute;
  top: 4px;
  right: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #fff;
  background: rgb(var(--c));
  padding: 1px 5px;
  border-radius: 5px;
}
.proj-card--clickable:hover .arch-cell { border-color: rgb(var(--c)); }

.arch-links path {
  stroke: var(--bd-h);
  stroke-width: 1.5;
}
.arch-links path {
  stroke-dasharray: 5 9;
  animation: arch-flow 1.4s linear infinite;
}
.proj-img--arch.is-offscreen .arch-links path { animation-play-state: paused; }
@keyframes arch-flow { to { stroke-dashoffset: -14; } }

@media (prefers-reduced-motion: reduce) {
  .arch-links path { animation: none; stroke-dasharray: none; }
}
.proj-card--xl .proj-img + * { margin-top: 2px; }

.proj-xl-head,
.proj-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.proj-head .proj-status { flex-shrink: 0; margin-left: auto; }
.proj-head .proj-logos { flex-shrink: 0; }

.proj-logos {
  display: flex;
  align-items: center;
  gap: 9px;
}
.proj-logos img,
.proj-logos .fin-icon {
  height: 22px;
  width: auto;
  aspect-ratio: 1 / 1;
  display: block;
  transition: transform .35s ease;
}
.proj-logos-sep {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 300;
  color: var(--t4);
  line-height: 0;
}
.proj-card--clickable:hover .proj-logos img,
.proj-card--clickable:hover .proj-logos .fin-icon { transform: scale(1.08); }
.proj-logos .fin-icon { height: 30px; }

.fin-curve {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.proj-card--clickable:hover .fin-curve {
  animation: fin-curve-draw .7s ease;
}
@keyframes fin-curve-draw {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fin-curve { animation: none !important; }
}
.proj-xl-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.proj-open {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  transition: color .25s ease, transform .25s ease;
}
.proj-card--clickable:hover .proj-open { color: var(--t1); }
/* Décalage de survol réservé au .proj-open resté en flux (.tl-card) : sur la
   variante couche, transform est piloté par .proj-card__layer. */
.proj-card--clickable:hover .proj-open:not(.proj-card__layer) { transform: translateX(3px); }

/* ── Carte projet : conteneur de perspective ──
   .proj-card ne doit JAMAIS être transformée : elle porte la perspective et
   sert de référence 3D. Toute transformation ici aplatirait ses couches
   filles (transform-style: flat forcé sur les descendants). */
.proj-card {
  position: relative;
  display: block;
  border-radius: 14px;
  perspective: 800px;
  transform-style: preserve-3d;
  /* Gouttière de la carte. Le badge et « Voir le détail » sont en absolu :
     ils s'alignent dessus, un seul réglage suffit à les suivre. */
  --card-pad: 24px;
}
/* Surface : la boîte visible (fond, bordure, ombre, contenu). Reçoit
   rotateX/rotateY + scale.
   Le backdrop-filter la maintient en transform-style: flat — imposé par la
   spec, et non contournable : sortir le verre sur une couche 3D dédiée fait
   échantillonner à Chrome un backdrop désaligné, et des pans entiers de la
   carte s'effacent au survol. Les éléments qui doivent flotter en vraie
   profondeur sont donc des couches sœurs (.proj-card__layer). */
.proj-card__surface {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  border-radius: inherit;
  background: var(--s1);
  border: 1px solid var(--bd);
  /* padding-bottom élargi : « Voir le détail » est sorti du flux (couche 3D),
     cette bande lui est réservée. */
  padding: var(--card-pad) var(--card-pad) calc(var(--card-pad) + 28px);
  box-shadow: 1px 1px 16px rgba(0,0,0,0.25);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  transition: transform .45s ease, box-shadow .3s ease, border-color .3s ease;
  transform: rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg));
}
.proj-card:hover .proj-card__surface {
  transform: scale(1.02) rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg));
  border-color: var(--bd-h);
  box-shadow: 0 14px 40px rgba(0,0,0,0.38);
}

/* Couches flottantes : FRÈRES de .proj-card__surface, enfants directs du
   porteur de perspective — sinon translateZ serait aplati.
   Dérive ∝ profondeur : base × (--zk), --zk = Z_couche / Z_référence (46px). */
.proj-card__layer {
  position: absolute;
  transform:
    translateZ(var(--z, 0px))
    translate3d(calc(var(--tilt-dx, 0px) * var(--zk, 1)), calc(var(--tilt-dy, 0px) * var(--zk, 1)), 0)
    rotateX(var(--tilt-rx, 0deg))
    rotateY(var(--tilt-ry, 0deg))
    scale(var(--lscale, 1));
  transition: transform .45s ease, filter .45s ease, opacity .3s ease;
}
.proj-card__layer--glare {
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  --z: 20px;
  --zk: .43;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.16), transparent 62%);
}
.proj-card:hover .proj-card__layer--glare { opacity: 1; }
:root[data-theme="light"] .proj-card__layer--glare {
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.55), transparent 62%);
}
/* Pendant le suivi du curseur : transitions coupées, sinon les couches
   traînent derrière la souris. Rétablies à la sortie (retour amorti). */
.proj-card.is-tilting .proj-card__surface,
.proj-card.is-tilting .proj-card__layer { transition: none; }
/* z-index relâché seulement après la fin du retour (classe retirée en JS),
   sinon la carte passe sous ses voisines en rétrécissant. */
.proj-card.is-lifted { z-index: 3; }
/* Bordure lumineuse suivant le curseur. Portée par .proj-card__surface :
   sur .proj-card (preserve-3d) l'empilement se fait par Z et non par z-index,
   le pseudo-élément repasserait au-dessus du contenu en trait blanc. */
.proj-card__surface::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.9), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.proj-card:hover .proj-card__surface::after { opacity: 1; }
#about-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.9), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
#about-card:hover::after { opacity: 1; }
.contact-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.9), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.contact-card:hover::after { opacity: 1; }
/* Tactile : aucun survol possible — pas de tilt, et les couches restent
   à leur position de repos, visibles en permanence. */
@media (hover: none) {
  .proj-card:hover .proj-card__surface {
    transform: none;
    box-shadow: 1px 1px 16px rgba(0,0,0,0.25);
  }
  .proj-card__layer { transform: none; }
  .proj-card__surface .proj-title { transform: none; }
  .proj-card__layer--glare { display: none; }
  .proj-card--clickable:hover .proj-badge--icon { filter: none; }
  .proj-badge--icon { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .proj-card__surface, .proj-card__layer,
  .proj-card__surface .proj-title { transition: none; }
  .proj-card__layer { transform: none; }
  .proj-card__surface .proj-title { transform: none; }
  .proj-card:hover .proj-card__surface { transform: none; }
  .proj-card__layer--glare { display: none; }
}

.proj-badge {
  display: inline-flex;
  width: fit-content;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid;
}
.proj-badge--icon {
  right: var(--card-pad);
  bottom: calc(var(--card-pad) - 2px);
  padding: 0 !important;
  border: none !important;
  background: none !important;
  color: var(--t1) !important;
  line-height: 0;
  z-index: 1;
  opacity: .9;
  pointer-events: none;
  /* Z de référence des couches (--zk = 1) : plan le plus haut. */
  --z: 0px;
  --zk: 1;
}
.proj-badge--icon svg { display: block; }

/* « Voir le détail » : même mécanique 3D que le badge, sur un plan plus bas
   (--z 26px au lieu de 46px, --zk .55) — sur du texte, la profondeur du badge
   est trop appuyée. En bas à gauche au lieu d'en bas à droite. La place est
   réservée par le padding-bottom de .proj-card__surface. */
.proj-card__layer--open {
  left: var(--card-pad);
  bottom: calc(var(--card-pad) - 2px);
  transform-origin: left center;
  pointer-events: none;
  --z: 0px;
  --zk: .55;
  /* .proj-card__layer écrase la transition de .proj-open (même spécificité,
     déclarée plus bas) : la couleur est réintroduite ici. */
  transition: transform .45s ease, filter .45s ease, color .25s ease;
}
.proj-card--clickable:hover .proj-card__layer--open {
  --z: 26px;
  --lscale: 1.06;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.28));
}
/* translateZ seul n'agrandit qu'à peine : l'ombre portée qui s'allonge avec
   la hauteur est ce qui rend le décollement lisible. */
.proj-card--clickable:hover .proj-badge--icon {
  --z: 46px;
  --lscale: 1.22;
  opacity: 1;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.35));
}
.proj-badge--perso    { background: rgba(73,79,223,.12); border-color: rgba(73,79,223,.25); color: #7b80ee; }
.proj-badge--scolaire { background: rgba(0,168,126,.12); border-color: rgba(0,168,126,.25); color: #00c99a; }

.proj-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid;
  white-space: nowrap;
}
.proj-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.proj-status--done  { background: rgba(0,168,126,.10); border-color: rgba(0,168,126,.22); color: #00c99a; }
.proj-status--done::before  { background: #00c99a; }
.cert-card .proj-status--done { position: relative; }
.cert-card .proj-status--done::before {
  transition: opacity .2s ease, transform .2s ease;
}
.cert-card:hover .proj-status--done::before {
  opacity: 0;
  transform: scale(0);
}
.cert-card .proj-status--done::after {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  background: #00c99a;
  clip-path: polygon(39% 60%, 22% 44%, 13% 53%, 39% 78%, 87% 30%, 78% 21%);
  transform: scale(0);
  transform-origin: center;
  opacity: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
  pointer-events: none;
}
.cert-card:hover .proj-status--done::after {
  transform: scale(1);
  opacity: 1;
}
.proj-status--wip   { background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.25); color: #f59e0b; }
.proj-status--wip::before   { background: #f59e0b; animation: pulse-dot 1.8s ease-in-out infinite; }
.cert-card .proj-status--wip::before,
.proj-card .proj-status--wip::before { animation-play-state: paused; }
.cert-card:hover .proj-status--wip::before,
.proj-card:hover .proj-status--wip::before { animation-play-state: running; }
.proj-status--soon  { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: var(--t3); }
.proj-status--soon::before  { background: var(--t3); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.7); }
}

.proj-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--t1);
  line-height: 1.2;
}
.proj-title-ico { vertical-align: -3px; margin-right: 8px; flex-shrink: 0; }

/* Titre : parallax 2D. Il vit dans le flux de .proj-card__surface, aplatie
   par son backdrop-filter — un translateZ y serait sans effet. La dérive
   suit les mêmes --tilt-dx/dy que les couches 3D, à 38 % du plan de
   référence, et un léger scale remplace le grossissement qu'aurait donné la
   perspective. Indiscernable d'une vraie profondeur sur du texte. */
.proj-card__surface .proj-title {
  transform-origin: left center;
  transform:
    translate(calc(var(--tilt-dx, 0px) * .38), calc(var(--tilt-dy, 0px) * .38))
    scale(var(--title-scale, 1));
  transition: transform .45s ease;
}
.proj-card--clickable:hover .proj-title { --title-scale: 1.04; }
.proj-card.is-tilting .proj-title { transition: none; }

.proj-desc {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--t2);
  flex: 1;
}
.proj-desc-logo {
  height: 20px;
  width: auto;
  aspect-ratio: 1 / 1;
  vertical-align: -4px;
  margin-left: 4px;
  filter: grayscale(1);
  opacity: .5;
}

/* ── Project detail modal ── */
.proj-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  overscroll-behavior: contain;
  transition: opacity .3s ease, visibility .3s ease;
}
.proj-modal.is-open { opacity: 1; visibility: visible; }
.proj-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  opacity: 0;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity .4s ease;
}
.proj-modal.is-open .proj-modal-overlay {
  opacity: 1;
}
.proj-modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: 72vh;
  overflow: hidden;
  border-radius: 20px;
  background: var(--s1);
  border: 1px solid var(--bd-h);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  transform: translateY(28px) scale(.94);
  opacity: 0;
  transition: transform .46s cubic-bezier(.16,1,.3,1), opacity .34s ease;
}
.proj-modal.is-open .proj-modal-panel { transform: translateY(0) scale(1); opacity: 1; }
/* FLIP shared-element: GSAP owns the transform, kill CSS transition + rounding scale-distortion */
.proj-modal.is-flip .proj-modal-panel { transition: none !important; overflow: hidden; }
.proj-modal-scroll {
  max-height: 72vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.proj-modal-x {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--bd);
  background: var(--tag-bg);
  color: var(--t1);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, border-color .2s ease;
}
.x-ico {
  display: block;
  pointer-events: none;
  color: var(--t1);
  transition: transform .25s ease;
}
.proj-modal-x:hover { background: var(--bd-h); border-color: var(--bd-h); }
.proj-modal-x:hover .x-ico { transform: rotate(90deg) scale(1.12); }
.proj-modal-content { padding: 8px 40px 44px; }

.pm-head { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--bd); }
.pm-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}
.pm-title-row h2 { margin: 0 !important; display: inline-flex; align-items: center; gap: 12px; }
.pm-cat-ico { display: inline-flex; flex-shrink: 0; color: var(--t1); }
.pm-title-logo { height: 28px; width: auto; object-fit: contain; vertical-align: middle; }
.pm-title-row h2.pm-title-multiline { display: block; position: relative; padding-left: 34px; }
.pm-title-multiline .pm-cat-ico { position: absolute; left: 0; top: 50%; transform: translateY(-50%); margin-right: 0; }
.pm-title-multiline .pm-title-logo { margin-left: 12px; height: 36px; }
/* Ollama + Hermes logos are white → invert to black in light theme */
html[data-theme="light"] img[src$="ollama-seeklogo.svg"],
html[data-theme="light"] img[src$="hermes.webp"],
html[data-theme="light"] img[src$="radar-icon.svg"] { filter: invert(1); }
html[data-theme="light"] .gooey-span { color: #fff; }
html[data-theme="light"] .gooey-wrap { filter: drop-shadow(0 0 6px rgba(0,0,0,.8)) drop-shadow(0 0 14px rgba(0,0,0,.7)) drop-shadow(0 0 30px rgba(0,0,0,.5)); }
html[data-theme="light"] .section-head { color: #fff !important; text-shadow: 0 0 10px rgba(0,0,0,.7), 0 0 24px rgba(0,0,0,.55), 0 0 46px rgba(0,0,0,.35); }
html[data-theme="light"] .proj-pill { color: #fff; text-shadow: 0 0 8px rgba(0,0,0,.6), 0 0 18px rgba(0,0,0,.4); }
html[data-theme="light"] .proj-pill--active { color: #fff; text-shadow: 0 0 8px rgba(0,0,0,.7), 0 0 20px rgba(0,0,0,.45); border-color: rgba(255,255,255,.5); }
html[data-theme="light"] .nav-link,
html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link--active { color: #fff !important; text-shadow: 0 0 8px rgba(0,0,0,.65), 0 0 18px rgba(0,0,0,.4); }
html[data-theme="light"] .contact-btn { color: #fff !important; text-shadow: 0 0 8px rgba(0,0,0,.65), 0 0 18px rgba(0,0,0,.4); }
html[data-theme="light"] .nav-logo { color: #fff !important; text-shadow: 0 0 8px rgba(0,0,0,.65), 0 0 18px rgba(0,0,0,.4); }
html[data-theme="light"] .lang-toggle-opt { color: #fff !important; text-shadow: 0 0 8px rgba(0,0,0,.65), 0 0 18px rgba(0,0,0,.4); }
html[data-theme="light"] .sub-head { color: #fff !important; text-shadow: 0 0 2px rgba(0,0,0,.9), 0 0 5px rgba(0,0,0,.7), 0 0 10px rgba(0,0,0,.5); }
html[data-theme="light"] .sub-head--dark { color: var(--t1) !important; text-shadow: none !important; }
html[data-theme="light"] #hero-desc { color: #fff !important; text-shadow: 0 0 4px rgba(0,0,0,.85), 0 0 10px rgba(0,0,0,.7), 0 0 20px rgba(0,0,0,.5); }
html[data-theme="light"] .footer-name,
html[data-theme="light"] .footer-copy {
  color: #000 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 6px rgba(255,255,255,.9), 0 0 12px rgba(255,255,255,.6);
}
html[data-theme="light"] .qual-label { color: #fff !important; text-shadow: 0 0 2px rgba(0,0,0,.9), 0 0 5px rgba(0,0,0,.7), 0 0 10px rgba(0,0,0,.5); }
html[data-theme="light"] #theme-toggle,
html[data-theme="light"] #theme-toggle:hover,
html[data-theme="light"] #theme-toggle-mobile,
html[data-theme="light"] #theme-toggle-mobile:hover {
  color: #fff !important;
  filter: drop-shadow(0 0 6px rgba(0,0,0,.6)) drop-shadow(0 0 14px rgba(0,0,0,.4));
}
html[data-theme="light"] .contact-btn .btn-liquid-shadow {
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,.9),
    0 0 10px rgba(0,0,0,.45),
    0 0 22px rgba(0,0,0,.25);
}
html[data-theme="light"] .proj-pill .btn-liquid-shadow {
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,.9),
    0 0 10px rgba(0,0,0,.45),
    0 0 22px rgba(0,0,0,.25);
}
.pm-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--t1);
  line-height: 1.2;
  margin: 10px 0 16px;
}
.pm-tagline { font-family: var(--font-body); font-size: 16px; color: var(--t2); line-height: 1.5; }

.pm-section { margin-top: 28px; }
.pm-section > h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--t3);
  margin-bottom: 12px;
}
.pm-section p { font-family: var(--font-body); font-size: 14px; line-height: 1.7; color: var(--t2); }
.pm-section-logo { height: 16px; width: auto; vertical-align: -3px; margin-right: 8px; }
.pm-list { display: flex; flex-direction: column; gap: 10px; }
.pm-list li {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--t2);
  padding-left: 18px;
  position: relative;
  list-style: none;
}
.pm-list li::before { content: '▹'; position: absolute; left: 0; color: #fff; }
.pm-list li b { color: var(--t1); font-weight: 600; }

.pm-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pm-tags--logos { margin-bottom: 10px; }
.pm-tags-divider { width: 1px; height: 28px; background: var(--bd-h); flex-shrink: 0; }
.pm-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--tag-bg);
  border: 1px solid var(--bd);
  color: var(--t2);
}
.pm-tags--text .pm-tag {
  cursor: default;
  transition: transform .18s ease, color .18s ease, border-color .18s ease;
}
.pm-tags--text .pm-tag:hover {
  transform: scale(1.12);
  color: var(--t1);
  border-color: var(--t2);
}
.pm-tag--logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: default;
  transition: box-shadow .2s ease, transform .2s ease;
}
.pm-tag--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pm-tag--logo img[src$="servicenow_logo_icon_168837.svg"] { transform: scale(1.7); }
.pm-tag--logo:hover, .pm-tag--logo:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(var(--glow), .5), 0 4px 18px rgba(var(--glow), .55);
  outline: none;
}
.pm-tag-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--s2);
  border: 1px solid var(--bd);
  backdrop-filter: blur(10px);
  color: var(--t1);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 2;
}
.pm-tag--logo:hover .pm-tag-tip, .pm-tag--logo:focus-visible .pm-tag-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.pm-defi {
  border-left: 2px solid rgba(255,255,255,.5);
  padding: 4px 0 4px 16px;
  margin-bottom: 14px;
}
.pm-defi b { display: block; color: var(--t1); font-family: var(--font-body); font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.pm-defi span { font-family: var(--font-body); font-size: 13.5px; line-height: 1.6; color: var(--t2); }

.pm-diagram { display: flex; flex-wrap: wrap; gap: 20px; }
.pm-dg-col { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 220px; }
.pm-dg-box {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  color: var(--t2);
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 10px 14px;
}
.pm-dg-box code { font-family: var(--font-mono); font-size: 12px; color: var(--t1); }
.pm-dg-box--accent { border-color: rgba(123,128,238,.4); background: rgba(123,128,238,.08); color: var(--t1); }
.pm-dg-box--ghost { font-size: 12px; color: var(--t3); }
.pm-dg-arrow { text-align: center; color: var(--t4); font-size: 13px; line-height: 1; }

.pm-projlink {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--s1);
  border: 1px solid var(--bd);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pm-projlink:hover, .pm-projlink:focus-visible {
  border-color: #7b80ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(123,128,238,.28);
  outline: none;
}
.pm-projlink img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.pm-projlink-icos { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pm-projlink-icos img { width: 26px; height: 26px; }
.pm-projlink-txt { display: flex; flex-direction: column; gap: 2px; }
.pm-projlink-txt b { color: var(--t1); font-family: var(--font-body); font-size: 14px; font-weight: 600; }
.pm-projlink-txt span { color: var(--t2); font-family: var(--font-body); font-size: 13px; }
.pm-projlink-arrow { margin-left: auto; color: #7b80ee; font-size: 18px; transition: transform .2s ease; }
.pm-projlink:hover .pm-projlink-arrow, .pm-projlink:focus-visible .pm-projlink-arrow { transform: translateX(4px); }

.pm-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.pm-gallery-item {
  margin: 0;
  border: 1px solid var(--bd);
  border-radius: 10px;
  overflow: hidden;
  background: var(--s1);
}
.pm-gallery-item img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.pm-gallery-item figcaption {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  padding: 8px 12px;
}
.pm-gallery-desc {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--t2);
  margin-top: 4px;
}

.proj-modal-content code {
  font-family: var(--font-mono);
  font-size: .88em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--tag-bg);
  border: 1px solid var(--bd);
  color: var(--t1);
}

body.modal-open { overflow: hidden; }

/* ── Gooey text ── */
.gooey-wrap { display: flex; align-items: center; }

.gooey-inner {
  display: grid;
  align-items: center;
}

.gooey-span {
  grid-area: 1/1;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 600;
  color: var(--t1);
  user-select: none;
  letter-spacing: -0.01em;
  text-align: center;
}

/* ── Parcours ── */
.parcours-grid { display: flex; flex-direction: column; gap: 56px; }
.sub-head {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t4);
  margin: 0 0 20px;
}
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-left: 6px;
  padding-left: 28px;
  border-left: 2px solid var(--bd);
}
.tl-item { position: relative; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -35px;
  top: 22px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ag2r);
  box-shadow: 0 0 0 4px var(--s1), 0 0 12px rgba(41,182,232,.7);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .tl-item::before { animation: none; }
}
.tl-card {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 18px 22px;
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.tl-card:hover {
  transform: translateX(3px);
  border-color: var(--bd-h);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.tl-card .proj-open { display: block; margin-top: 12px; }
.tl-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 16px;
  margin-bottom: 8px;
}
.tl-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ag2r);
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}
.tl-duration { color: var(--ag2r); opacity: .8; }
.tl-role {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--t1);
  margin: 0;
}
.tl-place-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.tl-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.tl-place {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--t2);
}
.tl-desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--t3);
  margin: 0;
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cert-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 20px;
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.cert-card:hover {
  transform: translateY(-3px);
  border-color: var(--bd-h);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.cert-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cert-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--t1);
  margin: 0;
}
.cert-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}
.cert-field {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--t3);
}
.cert-place {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cert-place-ico { flex-shrink: 0; color: var(--t4); }
.cert-year {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--t4);
}
.qual-group { margin-top: 28px; }
.qual-group:first-of-type { margin-top: 0; }
.qual-details summary { list-style: none; cursor: pointer; }
.qual-details summary::-webkit-details-marker { display: none; }
.qual-details .cert-grid { margin-top: 14px; }
.qual-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t2);
  margin: 0;
  user-select: none;
}
.qual-label::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid var(--t3);
  border-bottom: 1.5px solid var(--t3);
  transform: rotate(-45deg);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.qual-details[open] .qual-label::after { transform: rotate(45deg); }
.qual-label::before {
  content: '';
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--t1);
  flex-shrink: 0;
}

/* ── About section ── */
.about-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t2);
  margin: 0 0 12px;
}
.about-label::before {
  content: '';
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--t1);
  flex-shrink: 0;
}
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.about-tags .pm-tag { display: inline-flex; align-items: center; gap: 6px; cursor: default; transition: transform .18s ease, color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.about-tags .pm-tag:hover {
  transform: scale(1.08);
  color: rgb(var(--tag-c));
  border-color: rgba(var(--tag-c),.4);
  background: rgba(var(--tag-c),.10);
  box-shadow: 0 0 12px rgba(var(--tag-c),.25);
}
.about-tags .pm-tag:hover .pm-tag-ico { color: inherit; transition: color .18s ease; }

/* ── Étiquettes: pas de sélection texte ── */
.pm-tag, .proj-pill, .proj-status, .proj-badge, .arch-tag,
.about-list-tag, .cert-year { user-select: none; }
.pm-tag-ico { flex-shrink: 0; color: var(--t3); }
.about-list { display: flex; flex-direction: column; gap: 8px; }
.about-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--t2);
}
.about-list-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--t4);
  letter-spacing: .02em;
}
.about-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--t2);
}
.about-info-row svg { color: var(--t3); flex-shrink: 0; }

.email-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
  transition: opacity .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.email-icon-copy,
.email-icon-check { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(.5); }
.email-copy-btn:hover .email-icon-mail,
.email-copy-btn.is-copied .email-icon-mail { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(.5); }
.email-copy-btn:hover .email-icon-copy { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
.email-copy-btn.is-copied .email-icon-copy { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(.5); }
.email-copy-btn.is-copied .email-icon-check { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }
.email-copy-btn.is-copied { color: #00c99a; border-color: #00c99a; }
.email-copy-btn:active { transform: scale(.9); }
.email-copy-btn.is-copied { animation: email-pulse .4s ease; }

@keyframes email-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.email-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(.85);
  background: var(--s2);
  border: 1px solid var(--bd);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1), background .25s ease, color .25s ease, border-color .25s ease;
  z-index: 5;
}
.email-tooltip-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  overflow: hidden;
  transition: width .3s cubic-bezier(.4,0,.2,1);
}
.email-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  background: var(--s2);
  border-right: 1px solid var(--bd);
  border-bottom: 1px solid var(--bd);
  transform: translateX(-50%) rotate(45deg);
  transition: background .25s ease, border-color .25s ease;
}
.email-tooltip-text {
  grid-area: 1 / 1;
  transition: opacity .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1), filter .25s ease;
}
.email-tooltip-copied {
  opacity: 0;
  transform: translateY(6px) scale(.7);
  filter: blur(2px);
}
.email-tooltip-default {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.email-tooltip.is-copied .email-tooltip-default {
  opacity: 0;
  transform: translateY(-6px) scale(.7);
  filter: blur(2px);
}
.email-tooltip.is-copied .email-tooltip-copied {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.email-btn-wrap:hover .email-tooltip,
.email-tooltip.is-shown { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.email-tooltip.is-copied { background: #00c99a; border-color: #00c99a; color: #04140f; animation: email-tooltip-bounce .35s cubic-bezier(.34,1.56,.64,1); }
.email-tooltip.is-copied::after { background: #00c99a; border-color: #00c99a; }

@keyframes email-tooltip-bounce {
  0% { transform: translateX(-50%) translateY(0) scale(.9); }
  50% { transform: translateX(-50%) translateY(-3px) scale(1.08); }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .email-icon, .email-copy-btn, .email-tooltip { transition: none !important; animation: none !important; }
}

.cv-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
  transition: opacity .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.cv-icon-download { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(.5); }
.cv-info-btn:hover .cv-icon-doc { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(.5); }
.cv-info-btn:hover .cv-icon-download { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); animation: cv-download-bounce .5s cubic-bezier(.34,1.56,.64,1); }
.cv-info-btn:active { transform: scale(.94); }

@keyframes cv-download-bounce {
  0% { transform: translate(-50%, -70%) scale(.7); opacity: 0; }
  60% { transform: translate(-50%, -35%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.cv-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(.85);
  background: var(--s2);
  border: 1px solid var(--bd);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
  z-index: 5;
}
.cv-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  background: var(--s2);
  border-right: 1px solid var(--bd);
  border-bottom: 1px solid var(--bd);
  transform: translateX(-50%) rotate(45deg);
}
.cv-tooltip.is-shown { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); animation: email-tooltip-bounce .35s cubic-bezier(.34,1.56,.64,1); }

@media (prefers-reduced-motion: reduce) {
  .cv-icon, .cv-info-btn, .cv-tooltip { transition: none !important; animation: none !important; }
}

.li-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
  transition: opacity .35s ease-in-out, transform .35s ease-in-out;
}
.li-icon-arrow { opacity: 0; color: #0A66C2; transform: translate(-50%, -50%) rotate(-35deg) scale(.5); }
.li-morph-btn:hover .li-icon-logo { opacity: 0; transform: translate(-50%, -50%) rotate(35deg) scale(.5); }
.li-morph-btn:hover .li-icon-arrow { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }

@media (prefers-reduced-motion: reduce) {
  .li-icon { transition: opacity .15s ease !important; }
  .li-morph-btn:hover .li-icon-logo,
  .li-morph-btn:hover .li-icon-arrow { transform: translate(-50%, -50%) rotate(0deg) scale(1) !important; }
}

@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr !important; }
  .about-split { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* ── Contact ── */
.contact-card {
  position: relative;
  text-align: center;
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 24px;
  padding: 64px 40px;
  max-width: 720px;
  margin: 0 auto;
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.contact-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: var(--bd-h);
  box-shadow: 0 14px 40px rgba(0,0,0,0.38);
}
.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.contact-cta .cta-arrow {
  display: inline-flex;
  align-items: center;
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-4px);
  transition: max-width .25s ease, opacity .25s ease, transform .25s ease, margin-left .25s ease;
}
@media (hover: hover) {
  .contact-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,255,255,.18); }
  .contact-cta:hover .cta-arrow { max-width: 20px; margin-left: 4px; opacity: 1; transform: translateX(0); }
  .contact-link { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
  .contact-link:hover {
    transform: translateY(-2px);
    border-color: rgba(10,102,194,.6);
    box-shadow: 0 0 0 1px rgba(10,102,194,.5), 0 6px 22px rgba(10,102,194,.55);
  }
}

/* ── About ── */
.btn-ghost:hover  { border-color: var(--bd-h) !important; color: var(--t1) !important; }

/* ── Touch: disable hover effects ── */
@media (hover: none) {
  .btn-accent:hover, .btn-ghost:hover,
  .nav-link:hover, .btn-liquid:hover { all: revert; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  #hero-title, #hero-sub, #hero-desc, #hero-ctas, #hero-scroll { opacity: 1 !important; transform: none !important; }
  .section-head, #about-card, .parcours-item, .contact-card { opacity: 1 !important; transform: none !important; }
}
