/* =============================================================
   Ludovic — feuille de style
   Sommaire : base · fond animé · navigation · sections · verre ·
   hero · à propos · compétences · projets · parcours · extras ·
   contact · pied de page · animations · responsive · impression
   ============================================================= */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6c63ff;
  --primary-light: #9a93ff;
  --accent: #00d4ff;
  --bg-dark: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.055);
  --bg-card-hover: rgba(255, 255, 255, 0.10);
  --border-glass: rgba(255, 255, 255, 0.11);
  --border-glass-hover: rgba(255, 255, 255, 0.20);
  --text: #ececf4;
  --text-muted: #a6a6bd;
  --radius: 18px;
  --radius-sm: 12px;
  --glass-blur: 16px;
  --maxw: 1080px;

  /* Échelle typographique. La feuille comptait 26 tailles distinctes, dont
     des voisines indiscernables (0,92 et 0,91 · 0,85 et 0,84 · 0,72 et 0,70).
     Sept crans suffisent ; les tailles d'affichage — compteurs, icônes,
     titres de cartes phares — restent littérales, elles ne relèvent pas
     du texte courant. */
  --fs-3xs: 0.70rem;
  --fs-2xs: 0.75rem;
  --fs-xs:  0.82rem;
  --fs-sm:  0.88rem;
  --fs-md:  0.95rem;
  --fs-lg:  1rem;
  --fs-xl:  1.15rem;
}

/* ===== POLICE AUTO-HÉBERGÉE =====
   Inter en fichier variable : une seule ressource couvre 400 à 800, servie
   depuis la même origine. Plus de connexion à fonts.googleapis.com ni de
   feuille de style tierce bloquant le rendu.
   Grâce à unicode-range, latin-ext n'est téléchargé que si un glyphe l'exige
   — jamais pour le contenu actuel, vérifié : seuls 48 Ko partent sur le fil. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

/* ===== SYSTÈME DE TRANSFORMATIONS =====
   Plusieurs effets veulent agir sur la même propriété transform :
   l'apparition au scroll, le décollement au survol et l'inclinaison
   à la souris. Comme une seule déclaration transform peut exister par
   élément, chaque effet écrit dans sa propre variable et une règle
   unique les compose. @property les rend animables — sans cet
   enregistrement, une custom property saute au lieu de glisser. */
@property --rev-x { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --rev-y { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --rev-s { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --lift  { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --rx    { syntax: '<angle>';  inherits: false; initial-value: 0deg; }
@property --ry    { syntax: '<angle>';  inherits: false; initial-value: 0deg; }

.glass,
.reveal, .reveal-left, .reveal-right, .reveal-scale,
.stagger > *,
.interest-chip {
  /* Version 2D, pour la grande majorité des éléments : une transform 3D
     ferait promouvoir chacun d'eux en calque GPU sans aucun bénéfice. */
  transform:
    translate(var(--rev-x, 0px), calc(var(--rev-y, 0px) + var(--lift, 0px)))
    scale(var(--rev-s, 1));

  /* Toutes les transitions vivent ici : deux règles concurrentes se
     remplaceraient l'une l'autre, la propriété transition n'étant pas
     cumulative. L'inclinaison n'est volontairement pas transitionnée,
     pour qu'elle colle à la souris. */
  transition:
    opacity      0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    --rev-x      0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    --rev-y      0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    --rev-s      0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    --lift       0.3s ease,
    background   0.35s ease,
    border-color 0.35s ease,
    box-shadow   0.35s ease,
    color        0.25s ease;
}

/* Seules ces cartes reçoivent l'inclinaison à la souris : elles seules
   ont donc besoin d'une transform 3D. Cette règle doit rester après la
   précédente — à spécificité égale, c'est la dernière qui l'emporte. */
.project-card, .about-aside, .contact-card, .extras-block {
  transform:
    perspective(900px)
    translate3d(var(--rev-x, 0px), calc(var(--rev-y, 0px) + var(--lift, 0px)), 0)
    rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg))
    scale(var(--rev-s, 1));
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s;
}

a:hover { color: var(--primary-light); }

ul, ol { list-style: none; }

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

/* Cible du lien d'évitement : focalisable par programme, mais sans
   contour puisque le focus y arrive par un saut volontaire. */
#main:focus { outline: none; }

/* Lisible par les lecteurs d'écran, invisible à l'écran. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Lien d'évitement : masqué jusqu'à ce qu'il reçoive le focus clavier. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  padding: 0.7rem 1.4rem;
  background: #5b52e8;      /* 5,50:1 avec du blanc ; --primary n'atteint que 4,32:1 */
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus { top: 0; color: #fff; }

/* ===== FOND ANIMÉ ===== */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.bg-animation .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  animation: float 26s ease-in-out infinite;
  will-change: transform;
}

.bg-animation .orb:nth-child(1) {
  width: 520px; height: 520px;
  background: var(--primary);
  top: -12%; left: -8%;
  animation-duration: 28s;
}

.bg-animation .orb:nth-child(2) {
  width: 420px; height: 420px;
  background: var(--accent);
  top: 45%; right: -10%;
  animation-duration: 24s;
  animation-delay: -8s;
}

.bg-animation .orb:nth-child(3) {
  width: 360px; height: 360px;
  background: #ff6b9d;
  bottom: -8%; left: 28%;
  animation-duration: 32s;
  animation-delay: -14s;
  opacity: 0.16;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(50px, -35px) scale(1.06); }
  66%      { transform: translate(-30px, 40px) scale(0.96); }
}

.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: drift linear infinite;
  /* Pas de will-change : un élément déjà animé est promu automatiquement,
     le déclarer ne ferait qu'immobiliser 18 couches de plus. */
}

@keyframes drift {
  0%        { transform: translateY(100vh) scale(0); opacity: 0; }
  10%, 90%  { opacity: 0.8; }
  100%      { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(10, 10, 26, 0.72);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid transparent;
  transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  padding: 0.6rem 2rem;
  background: rgba(10, 10, 26, 0.92);
  border-bottom-color: var(--border-glass);
}

.nav-logo {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
  white-space: nowrap;
}

.nav-logo span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 1.9rem;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* min-height/min-width : les deux boutons de la barre sont les seuls
   contrôles en mobile, ils doivent atteindre la cible tactile de 44 px. */
.lang-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 0.4rem 0.75rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.lang-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
  min-width: 44px;
  min-height: 44px;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.2s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== SECTIONS ===== */
section {
  padding: 5.5rem 2rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: var(--fs-lg);
  margin-bottom: 2.75rem;
}

/* ===== CARTE DE VERRE =====
   Transform et transition sont définies plus haut, dans la règle
   partagée : ici on ne s'occupe que de l'apparence. */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
}

/* Le flou d'arrière-plan est coûteux : chaque élément concerné force le
   navigateur à isoler, lire et recomposer la zone derrière lui à chaque
   frame — et le fond est animé en permanence. On le réserve donc aux
   grandes surfaces, où l'effet se voit. Sur les 40 petits tags il était
   invisible et payé plein tarif. */
.hero-badge, .hero-degree,
.about-text, .about-aside,
.project-card, .extras-block, .contact-card {
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.glass:hover {
  --lift: -4px;
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  box-shadow: 0 18px 50px rgba(108, 99, 255, 0.14);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 6rem;
}

.hero-content { max-width: 760px; }

.hero-badge {
  display: inline-block;
  padding: 0.45rem 1.3rem;
  border-radius: 50px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 0.7rem;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent), #ff6b9d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero-role {
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 600;
  color: var(--accent);
  min-height: 1.9em;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 1.6rem;
}

.hero-degree {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin-bottom: 2.2rem;
}

.hero-degree strong { color: var(--text); font-weight: 600; }
.hero-degree em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

.hero-buttons {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease, border-color 0.25s ease;
}

/* Le dégradé s'arrête volontairement avant le cyan clair : du blanc sur
   #00d4ff ne donne que 1,77:1. Ces deux bornes tiennent 5,50:1 et 4,63:1,
   donc le libellé reste lisible sur toute la largeur du bouton. */
.btn-primary {
  background: linear-gradient(135deg, #5b52e8, #0a7ea4);
  color: #fff;
  box-shadow: 0 4px 22px rgba(108, 99, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.45);
  color: #fff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--text);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3.2rem;
}

.stat-number {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 0.1rem;
}

/* ===== À PROPOS =====
   `stretch` (et non `start`) : la colonne droite épouse la hauteur du texte
   au lieu de laisser un vide en bas. Le panneau répartit ses trois blocs
   sur toute la hauteur disponible. */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.6rem;
  align-items: stretch;
}

.about-text { padding: 2rem; }

.about-text p {
  color: var(--text-muted);
  font-size: var(--fs-lg);
}

.about-text p + p { margin-top: 1.1rem; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-aside {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.aside-block h3 {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.aside-list li {
  font-size: var(--fs-md);
  color: var(--text-muted);
  padding: 0.42rem 0 0.42rem 1.1rem;
  position: relative;
}

.aside-list li + li { border-top: 1px solid rgba(255, 255, 255, 0.055); }

.aside-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 1.05em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.aside-note {
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--text-muted);
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-glass);
  opacity: 0.85;
}

/* ===== COMPÉTENCES ===== */
.tech-category { margin-bottom: 2.2rem; }

.tech-category h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-bottom: 0.9rem;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-tag {
  padding: 0.5rem 1.05rem;
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: default;
}

.tech-tag:hover {
  --lift: -2px;
  color: var(--accent);
  box-shadow: none;
}

/* ===== PROJETS ===== */
.project-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
}

.project-card .project-icon {
  font-size: 1.9rem;
  line-height: 1;
  margin-bottom: 0.9rem;
}

.project-card h3 {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.project-card > p {
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  flex: 1;
}

/* Cartes phares : pleine largeur, en tête de section. */
.project-card.featured {
  margin-bottom: 1.4rem;
  padding: 2rem 2.2rem;
  border-color: rgba(108, 99, 255, 0.28);
}

.featured-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1rem;
}

.featured-head .project-icon { margin-bottom: 0; }
.featured-head h3 { font-size: 1.45rem; margin-bottom: 0; }

.project-kicker {
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
  margin-top: 2.2rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.project-tags li {
  padding: 0.25rem 0.7rem;
  background: rgba(108, 99, 255, 0.14);
  border-radius: 7px;
  font-size: var(--fs-2xs);
  color: var(--primary-light);
  font-weight: 500;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: auto;
}

.project-link {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.45rem 0;      /* remonte la cible tactile de ~24 px à ~38 px */
  transition: color 0.25s;
}

.project-link:hover { color: var(--accent); }

.project-link.primary { color: var(--accent); }
.project-link.primary:hover { color: var(--primary-light); }

/* Projets secondaires : liste compacte. */
.more-projects { margin-top: 3rem; }

.more-projects h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.more-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.more-item { border-radius: var(--radius-sm); }

.more-item a {
  display: block;
  padding: 1.1rem 1.3rem;
  color: inherit;
}

.more-item strong {
  display: block;
  font-size: var(--fs-md);
  color: var(--text);
  margin-bottom: 0.25rem;
}

.more-item span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.more-item em {
  display: inline-block;
  margin-top: 0.55rem;
  font-style: normal;
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary-light);
}

.more-item:hover strong { color: var(--accent); }

/* ===== PARCOURS ===== */
.timeline {
  position: relative;
  padding-left: 1.6rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6rem; bottom: 2rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 2.2rem 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.6rem; top: 0.55rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-dark);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.18);
  transform: translateX(-4.5px);
}

.timeline-item .date {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: var(--fs-xs);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 0.35rem;
}

.tag-type {
  padding: 0.1rem 0.55rem;
  border-radius: 5px;
  font-size: var(--fs-3xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
}

.timeline-item h3 {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 0.2rem;
}

.timeline-item .place {
  font-size: var(--fs-sm);
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

.timeline-item .place strong { color: var(--accent); font-weight: 600; }

.timeline-item > p:last-child {
  font-size: var(--fs-md);
  color: var(--text-muted);
}

/* ===== LANGUES & CENTRES D'INTÉRÊT ===== */
.extras-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 2rem;
}

.extras-block { padding: 1.8rem; }

.extras-block h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.lang-list li + li {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
}

.lang-name {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.lang-level {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.interest-chip {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-glass);
  cursor: default;
  transition: color 0.25s, border-color 0.25s;
}

.interest-chip:hover { color: var(--text); border-color: var(--border-glass-hover); }

/* ===== CONTACT ===== */
.contact-links {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.contact-card {
  padding: 1.3rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 250px;
  color: var(--text);
}

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

.contact-icon {
  display: flex;
  color: var(--primary-light);
  transition: color 0.25s;
}

.contact-card:hover .contact-icon { color: var(--accent); }

.contact-body strong {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 600;
}

.contact-body span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ===== PIED DE PAGE ===== */
.footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* ===== ANIMATIONS D'APPARITION =====
   Chaque état ne touche qu'à des variables : la règle partagée du haut
   se charge de les composer en une seule transform. C'est ce qui permet
   à une carte d'être simultanément .glass et .reveal sans que l'un des
   deux effets n'annule l'autre. */
.reveal        { opacity: 0; --rev-y: 32px; }
.reveal-left   { opacity: 0; --rev-x: -32px; }
.reveal-right  { opacity: 0; --rev-x: 32px; }
.reveal-scale  { opacity: 0; --rev-s: 0.94; }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1;
  --rev-x: 0px;
  --rev-y: 0px;
  --rev-s: 1;
}

.stagger > * { opacity: 0; --rev-y: 16px; }

/* --stagger-i est posé en JS au moment de la révélation : le décalage
   s'applique donc quel que soit le nombre d'éléments, là où une liste de
   nth-child s'arrêtait net au dixième. */
.stagger.visible > * {
  opacity: 1;
  --rev-y: 0px;
  transition-delay: calc(var(--stagger-i, 0) * 0.05s);
}

.typed-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s steps(2, start) infinite;
}

.typed-cursor.static { animation: none; opacity: 0.6; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-grid  { grid-template-columns: 1fr; }
  .extras-grid { grid-template-columns: 1fr; }

  /* Une fois empilé, le panneau passe en deux colonnes : sur toute la largeur,
     deux listes l'une sous l'autre étireraient la section pour rien. */
  .about-aside { flex-direction: row; flex-wrap: wrap; gap: 1.2rem 2rem; }
  .aside-block { flex: 1 1 240px; }
  .aside-note  { flex: 1 1 100%; }
}

@media (max-width: 768px) {
  html { scroll-padding-top: 70px; }

  .navbar { padding: 0.8rem 1.2rem; }
  .navbar.scrolled { padding: 0.6rem 1.2rem; }

  .nav-logo { font-size: var(--fs-md); }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 10, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 1rem 1rem;
    border-bottom: 1px solid var(--border-glass);
  }

  .nav-links.open { display: flex; }

  .nav-links a { display: block; padding: 0.85rem 0.5rem; }
  .nav-links a::after { display: none; }

  .nav-toggle { display: flex; }

  section { padding: 4rem 1.2rem; }

  .hero { padding-top: 5rem; }
  .hero-stats { gap: 1.8rem; }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: var(--fs-3xs); letter-spacing: 0.8px; }

  .project-card.featured { padding: 1.6rem 1.4rem; }
  .featured-head { gap: 0.9rem; }
  .featured-head h3 { font-size: 1.2rem; }

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

@media (max-width: 480px) {
  .hero-stats { gap: 1.2rem; }
  .about-aside { flex-direction: column; gap: 1.4rem; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .contact-card { min-width: 100%; }
  .featured-head { flex-direction: column; align-items: flex-start; }
}

/* ===== MOUVEMENT RÉDUIT =====
   Respecte le réglage système. Rien ne bouge, rien ne clignote,
   et surtout rien ne reste invisible. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;   /* sinon la cascade s'étale encore sur 0,5 s */
  }

  .bg-animation, .particles { display: none; }

  .reveal, .reveal-left, .reveal-right, .reveal-scale, .stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .glass { transform: none !important; }
  .typed-cursor { animation: none; opacity: 0.6; }
}

/* ===== IMPRESSION / EXPORT PDF =====
   Ctrl+P produit un CV lisible en noir sur blanc. Sans ces règles,
   les éléments en attente de révélation resteraient invisibles et
   les titres en dégradé sortiraient blancs sur blanc. */
@media print {
  @page { margin: 14mm 12mm; }

  html { font-size: 10.5pt; }

  body {
    background: #fff !important;
    color: #111 !important;
    line-height: 1.45;
  }

  /* Purement décoratif ou non imprimable. */
  .bg-animation, .particles, .navbar, .skip-link,
  .hero-buttons, .typed-cursor, .project-icon { display: none !important; }

  /* Sans ceci, tout ce qui n'a pas encore été révélé s'imprime vide. */
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Le texte en dégradé est transparent : on le repasse en noir. */
  .section-title, .stat-number, .hero h1 .gradient-text, .nav-logo span {
    background: none !important;
    -webkit-text-fill-color: #111 !important;
    color: #111 !important;
  }

  .glass {
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    transform: none !important;
  }

  /* Pas de break-inside ici : la section Projets fait plusieurs pages à elle
     seule, la contrainte serait soit ignorée soit source d'une page blanche.
     L'anti-coupure est appliqué plus bas, au niveau des cartes. */
  section {
    padding: 0 0 1.1rem !important;
    max-width: none;
  }

  .hero {
    min-height: 0 !important;
    padding: 0 0 1rem !important;
    text-align: left;
    display: block;
  }

  .hero-content { max-width: none; }
  .hero h1 { font-size: 20pt; margin-bottom: 0.2rem; }
  .hero-role { color: #444 !important; font-size: 11pt; min-height: 0; margin-bottom: 0.3rem; }
  .hero-subtitle { margin: 0 0 0.5rem; max-width: none; }
  .hero-badge, .hero-degree { padding: 0.2rem 0; border: none !important; display: block; }

  .hero-stats { justify-content: flex-start; gap: 2rem; margin-top: 0.8rem; }
  .stat-number { font-size: 13pt; }

  .section-title { font-size: 14pt; margin-top: 0.6rem; }
  .section-subtitle { margin-bottom: 0.7rem; font-size: 9pt; }

  h1, h2, h3 { break-after: avoid-page; }

  p, li, .stat-label, .lang-level, .more-item span,
  .about-text p, .project-card > p, .timeline-item > p:last-child,
  .section-subtitle, .aside-list li, .aside-note, .contact-body span {
    color: #333 !important;
  }

  .about-grid, .extras-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .projects-grid, .more-list { grid-template-columns: 1fr 1fr; gap: 0.7rem; }

  .about-aside { gap: 0.6rem; }
  .aside-block h3 { color: #111 !important; margin-bottom: 0.3rem; }
  .aside-list li { padding: 0.1rem 0 0.1rem 0.7rem; }
  .aside-list li + li { border-top: none; }

  .about-text, .project-card, .extras-block, .about-aside { padding: 0.7rem 0.9rem; }
  .project-card.featured { padding: 0.7rem 0.9rem; margin-bottom: 0.7rem; }

  .project-card, .timeline-item, .more-item, .extras-block {
    break-inside: avoid-page;
  }

  .project-tags li, .tech-tag, .interest-chip, .tag-type {
    background: none !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    padding: 0.05rem 0.4rem;
    font-size: 8pt;
  }

  .timeline::before, .timeline-item::before { display: none; }
  .timeline { padding-left: 0; }
  .timeline-item { padding: 0 0 0.7rem 0; }
  .timeline-item .date, .timeline-item .place { color: #111 !important; }
  .project-kicker { color: #555 !important; }

  /* Les liens ne sont pas cliquables sur papier : on imprime l'adresse. */
  .project-links a[href^="http"]::after,
  .more-item a[href^="http"]::after,
  .contact-card[href^="http"]::after {
    content: " — " attr(href);
    font-size: 8pt;
    color: #666;
    word-break: break-all;
  }

  .project-links { gap: 0.4rem; flex-direction: column; }
  .project-link { color: #111 !important; font-weight: 500; }
  .contact-links { justify-content: flex-start; }
  .contact-card { min-width: 0; padding: 0.5rem 0.8rem; }
  .contact-icon { display: none; }

  .footer { border-top: 1px solid #ddd; padding: 0.7rem 0 0; color: #666 !important; }
}
