/* ═══════════════════════════════════════════════════════════════
   PORTFOLIO G.QUEAU — DESIGN SYSTEM v3
   Lead UI/UX · Awwwards Standard · Dark Mode Premium
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

/* ══════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════ */
:root {

  /* ── Palette fondamentale ── */
  --bg-900:     #09090b;   /* fond principal */
  --bg-800:     #0f0f12;   /* fond alternatif */
  --bg-700:     #141418;   /* fond cartes sombre */
  --bg-600:     #1a1a20;   /* fond cartes clair */
  --surface:    rgba(255, 255, 255, 0.028);
  --surface-md: rgba(255, 255, 255, 0.05);
  --surface-lg: rgba(255, 255, 255, 0.08);

  /* ── Bordures ── */
  --border:      rgba(255, 255, 255, 0.06);
  --border-md:   rgba(255, 255, 255, 0.10);
  --border-glow: rgba(56, 189, 248, 0.35);

  /* ── Textes ── */
  --text-100: #ededed;   /* titres, importance max */
  --text-200: #a1a1aa;   /* corps, descriptions */
  --text-300: #52525b;   /* placeholders, labels */

  /* ── Accent — Bleu Cyber ── */
  --cyan:       #38bdf8;
  --cyan-dim:   rgba(56, 189, 248, 0.15);
  --cyan-glow:  rgba(56, 189, 248, 0.25);

  /* ── Accent secondaire — Violet ── */
  --violet:     #818cf8;
  --violet-dim: rgba(129, 140, 248, 0.15);

  /* ── Gradient signature ── */
  --grad:       linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  --grad-text:  linear-gradient(90deg,  #38bdf8 0%, #818cf8 100%);
  --grad-warm:  linear-gradient(135deg, #818cf8 0%, #f472b6 100%);

  /* ── Sémantique ── */
  --success: #34d399;
  --warning: #fbbf24;
  --danger:  #f87171;

  /* ── Espacement (base 4px) ── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ── Border radius ── */
  --r-xs:  4px;
  --r-sm:  8px;
  --r:     12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-2xl: 32px;

  /* ── Typographie ── */
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* ── Tailles de fonte ── */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   17px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  32px;
  --text-3xl:  48px;
  --text-4xl:  64px;

  /* ── Layout ── */
  --max-w:      1120px;
  --max-w-sm:   680px;
  --max-w-prose: 800px;

  /* ── Transitions ── */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0.0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back:   cubic-bezier(0.34, 1.56, 0.64, 1);

  --t-fast:   0.15s;
  --t:        0.25s;
  --t-slow:   0.5s;
  --t-slower: 0.8s;

  /* ── Shadows ── */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.6);
  --shadow-xl:  0 24px 64px rgba(0,0,0,0.7);
  --shadow-cyan: 0 0 24px rgba(56, 189, 248, 0.18);
}

/* ══════════════════════════════════════════════════════
   RESET MODERNE
══════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  hanging-punctuation: first last;
}

body {
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-100);
  background-color: var(--bg-900);
  overflow-x: hidden;
  min-height: 100dvh;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════
   SCROLLBAR PERSONNALISÉE
══════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-900);
}

::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.25);
  border-radius: 100px;
  transition: background var(--t) var(--ease);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.25) transparent;
}

/* ══════════════════════════════════════════════════════
   SÉLECTION DE TEXTE
══════════════════════════════════════════════════════ */
::selection {
  background: rgba(56, 189, 248, 0.25);
  color: var(--text-100);
}

/* ══════════════════════════════════════════════════════
   FOCUS VISIBLE (Accessibilité)
══════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ══════════════════════════════════════════════════════
   UTILITAIRES GLOBAUX
══════════════════════════════════════════════════════ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-8);
  position: relative;
  z-index: 1;
}

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

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ══════════════════════════════════════════════════════
   FOND ANIMÉ — GRILLE + RADIAL GLOWS
══════════════════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  z-index: 0;
}

.vignette {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 10% 0%,   rgba(56, 189, 248, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 100%,  rgba(129, 140, 248, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%,   rgba(0,0,0,0.2) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════════════════
   NAVBAR — GLASSMORPHISM
══════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--space-10);
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition:
    background var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}

.navbar.scrolled {
  background: rgba(9, 9, 11, 0.88);
  border-bottom-color: var(--border-md);
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.5);
}

/* Logo */
.nav-logo {
  font-family: var(--mono);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity var(--t) var(--ease);
  flex-shrink: 0;
}
.nav-logo:hover { opacity: 0.7; }

/* Liens */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-200);
  letter-spacing: 0.03em;
  transition: color var(--t) var(--ease);
  position: relative;
  padding: var(--space-1) 0;
}

/* Underline animée */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0;
  height: 1px;
  background: var(--grad);
  transition: width var(--t-slow) var(--ease-spring);
  border-radius: 2px;
}
.nav-link:hover {
  color: var(--text-100);
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link.active {
  color: var(--cyan);
}
.nav-link.active::after {
  width: 100%;
  background: var(--cyan);
}

/* ══════════════════════════════════════════════════════
   LAYOUT PRINCIPAL
══════════════════════════════════════════════════════ */
#page-content {
  opacity: 1;
  transition: opacity 0.35s var(--ease);
}

body.is-animating #page-content {
  opacity: 0;
}

/* Section générique */
.section {
  padding: var(--space-32) 0;
  position: relative;
  z-index: 1;
}

.section-dark {
  background: var(--bg-800);
}

/* En-tête de section */
.section-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-3xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-100);
  margin-bottom: var(--space-5);
}

.dot { color: var(--cyan); }

.section-sub {
  font-size: var(--text-base);
  color: var(--text-200);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: var(--space-12);
}

/* Séparateur décoratif entre sections */
.section + .section::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--border-md), transparent);
}

/* ══════════════════════════════════════════════════════
   TRANSITIONS DE PAGE (SPA)
══════════════════════════════════════════════════════ */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-900);
  z-index: 9999;
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.55s cubic-bezier(0.7, 0, 0.3, 1);
}

.page-transition-overlay::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
}

body.is-animating .page-transition-overlay {
  pointer-events: auto;
  transform: scaleY(1);
  transform-origin: bottom;
}

/* ══════════════════════════════════════════════════════
   REVEAL ANIMATIONS (Intersection Observer)
══════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  0.65s var(--ease-spring),
    transform 0.65s var(--ease-spring);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 1;
  padding: var(--space-10) 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.footer p {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-300);
  letter-spacing: 0.08em;
}

.footer-stack {
  font-size: 10px !important;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════════════════════ */
.back-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity    var(--t) var(--ease),
    transform  var(--t) var(--ease),
    background var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
  pointer-events: none;
  z-index: 100;
}
.back-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-top:hover {
  background: var(--cyan-dim);
  box-shadow: var(--shadow-cyan);
  border-color: var(--cyan);
}

/* ══════════════════════════════════════════════════════
   BOUTONS
══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 12px var(--space-6);
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition:
    transform  var(--t) var(--ease-back),
    box-shadow var(--t) var(--ease),
    opacity    var(--t) var(--ease);
  user-select: none;
}

/* Shimmer interne sur hover */
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s var(--ease);
  pointer-events: none;
}
.btn:hover::before { left: 160%; }

/* -- Bouton primaire (gradient) -- */
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 0 0 rgba(56, 189, 248, 0);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.3), 0 4px 12px rgba(0,0,0,0.4);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-primary:disabled::before { display: none; }

/* Flèche animée */
.btn-arrow {
  display: inline-block;
  transition: transform var(--t) var(--ease-spring);
}
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

/* -- Bouton ghost -- */
.btn-ghost {
  background: var(--surface);
  color: var(--text-100);
  border: 1px solid var(--border-md);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: var(--surface-md);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════ */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 64px;
  overflow: hidden;
}

.hero-inner { width: 100%; padding: var(--space-32) 0; }

.hero-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  opacity: 0.8;
}

.hero-title {
  font-size: clamp(56px, 9vw, 112px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: var(--space-8);
  color: var(--text-100);
}

.hero-sub {
  font-size: var(--text-md);
  color: var(--text-200);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: var(--space-10);
  font-weight: 400;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Ligne décorative en bas du hero */
.hero-grid {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-900) 30%, transparent 100%);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════
   ABOUT CARDS — GLASSMORPHISM
══════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-12);
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-8) var(--space-8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition:
    transform   var(--t-slow) var(--ease-spring),
    border-color var(--t) var(--ease),
    box-shadow   var(--t-slow) var(--ease);
  cursor: default;
}

/* Lueur d'accentuation en haut */
.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
}

.about-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 40px rgba(56,189,248,0.05);
}
.about-card:hover::before { opacity: 1; }
.about-card:hover .card-icon { transform: scale(1.15) rotate(-3deg); }

.card-icon {
  font-size: 26px;
  display: block;
  margin-bottom: var(--space-5);
  transition: transform var(--t-slow) var(--ease-back);
  width: fit-content;
}

.about-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-100);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.about-card p {
  font-size: var(--text-sm);
  color: var(--text-200);
  line-height: 1.8;
}

/* ══════════════════════════════════════════════════════
   ANALYZER — FORMULAIRE INPUT
══════════════════════════════════════════════════════ */
.analyzer-wrapper { max-width: var(--max-w-prose); }

.input-row {
  display: flex;
  gap: var(--space-3);
  align-items: stretch;
}

.input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 0 var(--space-5);
  backdrop-filter: blur(8px);
  transition:
    border-color var(--t) var(--ease),
    box-shadow   var(--t) var(--ease),
    background   var(--t) var(--ease);
}
.input-wrap:focus-within {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.08), 0 4px 20px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.04);
}

.input-prefix {
  font-family: var(--mono);
  font-size: var(--text-base);
  color: var(--cyan);
  margin-right: var(--space-3);
  user-select: none;
  flex-shrink: 0;
  opacity: 0.7;
}

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-100);
  font-family: var(--mono);
  font-size: var(--text-sm);
  padding: 15px 0;
  outline: none;
  width: 100%;
}
.url-input::placeholder {
  color: var(--text-300);
  font-weight: 300;
}

/* ══════════════════════════════════════════════════════
   LOADER SKELETON
══════════════════════════════════════════════════════ */
.loader-block { margin-top: var(--space-6); }

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-5);
}

.sk-line, .sk-badge {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04)  0%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 100%
  );
  background-size: 600px 100%;
  animation: shimmer 1.8s infinite linear;
  border-radius: var(--r-xs);
}
.sk-title  { height: 20px; width: 50%;  margin-bottom: var(--space-4); }
.sk-mid    { height: 13px; width: 100%; margin-bottom: var(--space-3); }
.sk-short  { height: 13px; width: 70%;  margin-bottom: var(--space-5); }
.sk-badges { display: flex; gap: var(--space-2); }
.sk-badge  { height: 24px; width: 72px; border-radius: 100px; }

.loader-text {
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--text-200);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:0; } }
.blink { animation: blink 1s infinite; color: var(--cyan); }

@keyframes dots { 0%{ content:''; } 33%{ content:'.'; } 66%{ content:'..'; } 100%{ content:'...'; } }
.ellipsis::after { content: ''; animation: dots 1.5s infinite; }

/* ══════════════════════════════════════════════════════
   BANNER ERREUR
══════════════════════════════════════════════════════ */
.error-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: var(--r-sm);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-4);
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--danger);
  animation: slideIn 0.3s var(--ease-spring);
}
.error-icon { font-size: 15px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════
   PROJECT RESULT CARD — GLASSMORPHISM PREMIUM
══════════════════════════════════════════════════════ */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-section { margin-top: var(--space-6); }

.project-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r-xl);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: slideIn 0.6s var(--ease-spring);
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

/* Barre de gradient en haut */
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0.9;
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-8);
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--border);
}

.card-meta { display: flex; align-items: center; gap: var(--space-4); }

.card-tag {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--cyan);
  letter-spacing: 0.16em;
  opacity: 0.8;
}

.card-repo-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-200);
  transition: color var(--t) var(--ease);
}
.card-repo-link:hover { color: var(--text-100); }

/* Pill "AI Analyzed" */
.card-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--success);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.22);
  padding: 4px var(--space-3);
  border-radius: 100px;
}
.card-status::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: blink 2s infinite;
  flex-shrink: 0;
}

/* Card body */
.card-body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.card-section { display: flex; flex-direction: column; gap: var(--space-3); }

.card-section-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--violet);
  letter-spacing: 0.18em;
  font-weight: 400;
  opacity: 0.8;
}

.card-text {
  font-size: var(--text-sm);
  color: var(--text-200);
  line-height: 1.85;
}

.card-divider {
  height: 1px;
  background: var(--border);
}

/* ── HR PITCH BOX ── */
.card-hr-pitch {
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.07) 0%,
    rgba(129, 140, 248, 0.07) 100%
  );
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-left: 3px solid var(--cyan);
  border-radius: var(--r-lg);
  padding: var(--space-6) var(--space-6);
  position: relative;
  overflow: hidden;
}

/* Lueur diffuse derrière */
.card-hr-pitch::before {
  content: '';
  position: absolute;
  top: -30px; left: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(56,189,248,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hr-pitch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.hr-pitch-tag {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--cyan);
  letter-spacing: 0.14em;
  font-weight: 500;
}

.hr-pitch-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0a0a0f;
  background: var(--grad);
  padding: 3px var(--space-3);
  border-radius: 100px;
}

.hr-pitch-text {
  font-size: var(--text-base);
  color: var(--text-100);
  line-height: 1.8;
  font-weight: 400;
}

/* ── DETAILED LIST ── */
.detailed-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 0;
  margin: 0;
}

.detailed-item {
  font-size: var(--text-sm);
  color: var(--text-200);
  line-height: 1.8;
  padding-left: var(--space-5);
  position: relative;
}
.detailed-item::before {
  content: '▪';
  position: absolute;
  left: 2px; top: 1px;
  color: var(--cyan);
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.7;
}

/* ══════════════════════════════════════════════════════
   BADGES TECH STACK
══════════════════════════════════════════════════════ */
.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tech-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px var(--space-3);
  border-radius: 100px;
  border: 1px solid;
  letter-spacing: 0.05em;
  cursor: default;
  transition:
    transform    var(--t) var(--ease-back),
    box-shadow   var(--t) var(--ease),
    background   var(--t) var(--ease);
}
.tech-badge:hover { transform: translateY(-2px) scale(1.04); }

/* Rotation de palettes */
.tech-badge:nth-child(5n+1) { background: rgba(56,189,248,0.08);  border-color: rgba(56,189,248,0.3);  color: var(--cyan);   }
.tech-badge:nth-child(5n+2) { background: rgba(129,140,248,0.08); border-color: rgba(129,140,248,0.3); color: var(--violet); }
.tech-badge:nth-child(5n+3) { background: rgba(52,211,153,0.08);  border-color: rgba(52,211,153,0.28); color: var(--success);}
.tech-badge:nth-child(5n+4) { background: rgba(251,191,36,0.08);  border-color: rgba(251,191,36,0.28); color: var(--warning);}
.tech-badge:nth-child(5n+5) { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.28);color: var(--danger); }

.tech-badge:nth-child(5n+1):hover { box-shadow: 0 4px 16px rgba(56,189,248,0.2); }
.tech-badge:nth-child(5n+2):hover { box-shadow: 0 4px 16px rgba(129,140,248,0.2); }
.tech-badge:nth-child(5n+3):hover { box-shadow: 0 4px 16px rgba(52,211,153,0.2); }
.tech-badge:nth-child(5n+4):hover { box-shadow: 0 4px 16px rgba(251,191,36,0.2); }
.tech-badge:nth-child(5n+5):hover { box-shadow: 0 4px 16px rgba(248,113,113,0.2); }

/* ══════════════════════════════════════════════════════
   GALLERY CARDS — GLASSMORPHISM
══════════════════════════════════════════════════════ */
.projects-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-10);
}

.gallery-project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition:
    transform    0.4s var(--ease-spring),
    border-color 0.3s var(--ease),
    box-shadow   0.4s var(--ease);
}

/* Gradient top line — invisible par défaut */
.gallery-project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

/* Glow diffus interne */
.gallery-project-card::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(56,189,248,0.06) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
  opacity: 0;
}

.gallery-project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow:
    0 28px 60px rgba(0,0,0,0.5),
    0 0 50px rgba(56,189,248,0.06);
}
.gallery-project-card:hover::before { opacity: 1; }
.gallery-project-card:hover::after  { opacity: 1; }

/* Skeleton gallery */
.project-skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  overflow: hidden;
  position: relative;
}
.project-skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.03) 50%,
    transparent 100%
  );
  animation: skeletonSlide 2s infinite;
}
@keyframes skeletonSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.sk-box {
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-sm);
  width: 100%;
}

/* ══════════════════════════════════════════════════════
   KEYFRAMES — BIBLIOTHÈQUE GLOBALE
══════════════════════════════════════════════════════ */

/* Fade simple */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Slide up avec fade */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slide depuis la gauche */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Scale up avec fade */
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Rotation infinie (spinner) */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pulse glow (badge IA active) */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
}

/* Float vertical doux */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* Grain de texture animé */
@keyframes grainShift {
  0%, 100% { background-position: 0% 0%; }
  25%       { background-position: 50% 50%; }
  50%       { background-position: 100% 100%; }
  75%       { background-position: 25% 75%; }
}

/* Underline reveal (width 0 → 100%) */
@keyframes underlineReveal {
  from { width: 0; }
  to   { width: 100%; }
}

/* Clignotement curseur terminal */
@keyframes cursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ══════════════════════════════════════════════════════
   CLASSES UTILITAIRES — ANIMATIONS D'ENTRÉE
══════════════════════════════════════════════════════ */

/* Fade in générique */
.anim-fade {
  animation: fadeIn var(--t-slow) var(--ease-out) both;
}

/* Slide up — délais en cascade */
.anim-slide-up   { animation: slideUp 0.6s var(--ease-spring) both; }
.anim-slide-up-1 { animation: slideUp 0.6s var(--ease-spring) 0.08s both; }
.anim-slide-up-2 { animation: slideUp 0.6s var(--ease-spring) 0.16s both; }
.anim-slide-up-3 { animation: slideUp 0.6s var(--ease-spring) 0.24s both; }
.anim-slide-up-4 { animation: slideUp 0.6s var(--ease-spring) 0.32s both; }

/* Scale up */
.anim-scale { animation: scaleUp 0.5s var(--ease-spring) both; }

/* Slide depuis gauche */
.anim-left   { animation: slideInLeft 0.5s var(--ease-spring) both; }
.anim-left-1 { animation: slideInLeft 0.5s var(--ease-spring) 0.1s both; }
.anim-left-2 { animation: slideInLeft 0.5s var(--ease-spring) 0.2s both; }

/* Float permanent (icônes déco) */
.anim-float { animation: float 4s var(--ease) infinite; }

/* Spinner de chargement */
.anim-spin { animation: spin 0.8s linear infinite; }

/* ══════════════════════════════════════════════════════
   MICRO-INTERACTIONS — HOVER MAGNÉTIQUE
   (Le JS injecte --mx, --my depuis mousemove)
══════════════════════════════════════════════════════ */

/* Cartes magnétiques : le JS applique transform via style inline */
.magnetic {
  transition: transform 0.4s var(--ease-spring);
  will-change: transform;
}

/* Effet reflet/spotlight sur les cartes au hover
   Le JS injecte les variables --x, --y depuis mousemove */
.card-spotlight {
  position: relative;
  overflow: hidden;
}
.card-spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 50%),
    rgba(56, 189, 248, 0.06) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  border-radius: inherit;
}
.card-spotlight:hover::after { opacity: 1; }

/* ── Hover lift premium sur éléments interactifs ── */
.hover-lift {
  transition:
    transform  var(--t-slow) var(--ease-spring),
    box-shadow var(--t-slow) var(--ease);
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ── Glow pulse sur un élément actif ── */
.pulse-glow { animation: pulseGlow 2s infinite; }

/* ── Underline reveal au hover ── */
.hover-underline { position: relative; }
.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  border-radius: 2px;
  transition: width var(--t-slow) var(--ease-spring);
}
.hover-underline:hover::after { width: 100%; }

/* ── Texte gradient qui se révèle au hover ── */
.hover-gradient {
  transition: background var(--t) var(--ease);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.hover-gradient:hover {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════════
   LOADER SKELETON — PREMIUM
══════════════════════════════════════════════════════ */

/* Ligne skeleton avec gradient animé */
@keyframes skeletonWave {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.sk-wave {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03)  0%,
    rgba(255,255,255,0.07) 40%,
    rgba(56,189,248,0.05)  50%,
    rgba(255,255,255,0.07) 60%,
    rgba(255,255,255,0.03) 100%
  );
  background-size: 400px 100%;
  animation: skeletonWave 1.6s ease-in-out infinite;
}

/* Conteneur skeleton galerie - lignes de hauteurs variées */
.sk-line-lg  { height: 18px; border-radius: var(--r-xs); }
.sk-line-sm  { height: 12px; border-radius: var(--r-xs); }
.sk-line-xs  { height: 10px; border-radius: var(--r-xs); }
.sk-circle   { border-radius: 50%; }
.sk-pill     { border-radius: 100px; }

/* Dot loader (3 points animés) */
.dot-loader {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
}
.dot-loader span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  animation: dotPulse 1.2s ease-in-out infinite;
}
.dot-loader span:nth-child(2) { animation-delay: 0.2s; }
.dot-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}

/* Curseur terminal clignotant */
.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--cyan);
  border-radius: 1px;
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}

/* ══════════════════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════════════════ */
.contact-inner { max-width: var(--max-w-sm); }

.contact-links {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-10);
  border-top: 1px solid var(--border);
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-100);
  position: relative;
  transition:
    padding-left var(--t) var(--ease),
    border-color var(--t) var(--ease);
  overflow: hidden;
}

/* Ligne d'accentuation gauche */
.contact-item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 60%;
  background: var(--cyan);
  border-radius: 2px;
  transition: transform var(--t) var(--ease-spring);
}

.contact-item:hover {
  padding-left: var(--space-4);
  border-color: rgba(56, 189, 248, 0.2);
}
.contact-item:hover::before { transform: translateY(-50%) scaleY(1); }
.contact-item:hover .contact-value { color: var(--cyan); }
.contact-item:hover .contact-arrow { transform: translateX(4px); }

.contact-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-300);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
  width: 80px;
}

.contact-value {
  flex: 1;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-100);
  transition: color var(--t) var(--ease);
}

.contact-arrow {
  font-size: var(--text-lg);
  color: var(--text-300);
  transition: transform var(--t) var(--ease-spring), color var(--t) var(--ease);
  flex-shrink: 0;
}
.contact-item:hover .contact-arrow { color: var(--cyan); }

/* ══════════════════════════════════════════════════════
   RESPONSIVE — TABLETTE (≤ 900px)
══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .container { padding: 0 var(--space-6); }

  .section { padding: var(--space-20) 0; }

  .hero-title {
    font-size: clamp(44px, 11vw, 80px);
  }

  .projects-gallery-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 640px)
══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --space-32: 80px;
    --space-20: 60px;
  }

  .navbar {
    padding: 0 var(--space-5);
    height: 56px;
  }

  .nav-links { gap: var(--space-5); }

  .container { padding: 0 var(--space-5); }

  .section { padding: var(--space-16) 0; }

  .section-title {
    font-size: clamp(28px, 8vw, 40px);
  }

  .hero { padding-top: 56px; }
  .hero-inner { padding: var(--space-16) 0; }
  .hero-title {
    font-size: clamp(40px, 13vw, 68px);
    line-height: 0.95;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta .btn { width: 100%; }

  .input-row { flex-direction: column; }
  .btn-primary { width: 100%; }

  .card-header { flex-direction: column; align-items: flex-start; }

  .card-body { padding: var(--space-5); }

  .card-hr-pitch { padding: var(--space-5); }

  .contact-label { width: 64px; }

  .back-top {
    bottom: var(--space-5);
    right: var(--space-5);
  }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — TRÈS PETIT (≤ 400px)
══════════════════════════════════════════════════════ */
@media (max-width: 400px) {
  .nav-links { display: none; }

  .hero-title { font-size: 36px; }

  .badge-grid { gap: var(--space-1); }
  .tech-badge { font-size: 10px; padding: 3px var(--space-2); }
}

/* ══════════════════════════════════════════════════════
   PRÉFÉRENCES UTILISATEUR — REDUCED MOTION
══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════
   UTILITAIRES FINAUX
══════════════════════════════════════════════════════ */

/* Text clamp (tronquer avec ellipsis) */
.text-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.text-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Opacity states */
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }

/* Pointer */
.cursor-default { cursor: default; }

/* Will-change pour les éléments animés fréquemment */
.gpu { will-change: transform; }
