/* ============================================
   RESET & BASE
   ============================================ */
@font-face {
  font-family: 'Blacksword';
  src: url('blacksword/Blacksword.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #472500;
  --bg-surface: #55320d;
  --bg-elevated: #633c12;
  --text: #FCDCF8;
  --text-muted: rgba(252, 220, 248, 0.62);
  --text-dim: rgba(252, 220, 248, 0.82);
  --title: #FCF8EB;
  --border: rgba(252, 248, 235, 0.12);
  --border-hover: rgba(252, 248, 235, 0.32);
  --accent: #FCF8EB;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-title-bold: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-hero: 'Blacksword', cursive;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100%;
  background-color: #472500;
  background-image:
    radial-gradient(ellipse 85% 65% at 8% 5%, rgba(54, 29, 2, 0.55) 0%, transparent 52%),
    radial-gradient(ellipse 65% 50% at 92% 12%, rgba(54, 29, 2, 0.4) 0%, transparent 48%),
    radial-gradient(ellipse 55% 45% at 75% 88%, rgba(71, 37, 0, 0.35) 0%, transparent 42%),
    radial-gradient(ellipse 35% 30% at 25% 75%, rgba(54, 29, 2, 0.45) 0%, transparent 38%),
    linear-gradient(155deg, #472500 0%, #472500 42%, #361D02 100%);
  background-attachment: fixed;
}

body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  min-height: 100vh;
}

::selection {
  background: var(--title);
  color: var(--bg);
}

/* Honeypot anti-spam — masqué sans décaler la page (évite le scroll horizontal mobile) */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul {
  list-style: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(71, 37, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-logo {
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}

.nav-logo:hover { opacity: 1; }

.nav-logo-square {
  width: 22px;
  height: 22px;
  background: var(--title);
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--title); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 2rem;
}

.lang-btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.lang-btn:hover,
.lang-btn.active { color: var(--title); }

.lang-sep {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.5;
  user-select: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================
   HERO
   ============================================ */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: calc(var(--nav-height) + 2rem) clamp(1.75rem, 6vw, 3.5rem) 4rem;
  overflow: visible;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
  width: 100%;
  overflow: visible;
}

.hero-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.hero-tagline {
  font-family: var(--font-title-bold);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--title);
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease 1.6s forwards;
}

.hero-name-wrap {
  position: relative;
  cursor: none;
  display: inline-block;
  overflow: visible;
}

.hero-name {
  font-family: var(--font-hero);
  font-size: clamp(3.25rem, 12vw, 10rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--title);
  display: inline-block;
  /* Blacksword : empattements hors boîte — évite la coupe du « t » */
  padding: 0 0.75em 0.05em 0.2em;
  white-space: nowrap;
  max-width: 100%;
  overflow: visible;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease 1.8s forwards;
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s ease 2s forwards;
}

.hero-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.8s ease 2.1s forwards;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.8s ease 2.3s forwards;
}

.hero-link {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--border-hover);
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s;
}

.hero-link:hover {
  color: var(--title);
  border-color: var(--title);
}

.hero-link--cta {
  background: var(--title);
  color: var(--bg);
  border-color: var(--title);
}

.hero-link--cta:hover {
  background: transparent;
  color: var(--title);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1s ease 2.8s forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--text-muted));
  animation: scrollPulse 2s ease-in-out 3s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ============================================
   SECTIONS — COMMON
   ============================================ */
.section {
  padding: clamp(5rem, 10vw, 8rem) clamp(1.5rem, 5vw, 3rem);
  max-width: 100%;
  overflow-x: clip;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 3.5rem;
  color: var(--title);
}

.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--text);
}

/* Titres principaux — Helvetica Bold */
#about-title,
.section-title--split .title-sans {
  font-family: var(--font-title-bold);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.02em;
}

#about-title em {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
}

/* Titres deux mots : sans + Blacksword */
.section-title--split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3em;
}

.section-title--split .title-sans {
  white-space: nowrap;
}

.section-title--split .title-script {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: 0.01em;
  line-height: 0.95;
  white-space: nowrap;
  padding-bottom: 0.04em;
  color: var(--text);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  max-width: 560px;
}

.about-text p strong {
  color: var(--title);
  font-weight: 500;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.about-tags span {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.about-tags span:hover {
  border-color: var(--border-hover);
  color: var(--text-dim);
}

.about-info {
  border-top: 1px solid var(--border);
  margin-bottom: 2rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.info-label { color: var(--text-muted); }
.info-value { color: var(--text-dim); font-weight: 400; }

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.link-card:hover {
  border-color: var(--border-hover);
  color: var(--title);
  background: var(--bg-surface);
}

.link-card-icon {
  font-size: 1rem;
  color: var(--text-dim);
}

/* ============================================
   MOTION LOGO
   ============================================ */
.motion-logo-zone {
  display: flex;
  justify-content: center;
  padding: 3rem clamp(1.5rem, 5vw, 3rem) 2rem;
  pointer-events: none;
}

.motion-logo-wrap {
  position: relative;
  width: min(260px, 52vw);
  line-height: 0;
}

.motion-logo-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.motion-logo-video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 769px) {
  .motion-logo-zone {
    position: relative;
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
    min-height: 0;
  }

  .motion-logo-wrap {
    position: absolute;
    top: 0;
    right: clamp(1.5rem, 5vw, 3rem);
    width: min(260px, 340px);
  }
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--bg);
  width: 100%;
  min-width: 0;
}

.project-card {
  background: var(--bg);
  transition: background 0.3s;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
}

.project-card:hover {
  background: var(--bg-surface);
}

.project-card--featured {
  grid-column: span 2;
  flex-direction: row;
}

.project-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Absolute positioning = height:100% résolu sur Safari iOS */
.project-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card--featured .project-image {
  width: 45%;
  aspect-ratio: auto;
  min-height: 260px;
}

.project-image-placeholder {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  transition: border-color 0.2s;
}

.project-card:hover .project-image-placeholder {
  border-color: var(--border-hover);
}

.project-image-placeholder span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-display);
}

.project-content {
  padding: 2rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.project-title,
.project-desc,
.project-link {
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.project-tags span {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--title);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
  flex: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.5rem;
  transition: color 0.2s, gap 0.2s;
}

.project-link:hover {
  color: var(--title);
  gap: 0.7rem;
}

.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.badge {
  font-family: var(--font-display);
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--bg);
}

.skill-block {
  background: var(--bg);
  padding: 2.5rem 2rem;
}

.skill-block h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--title);
  margin-bottom: 1.5rem;
}

.skill-block ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-block li {
  font-size: 0.88rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
}

.skill-block li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border-hover);
  font-size: 0.75rem;
}

.skill-block li strong {
  color: var(--text);
}

.skill-block--cursor {
  background: var(--bg);
  border-left: 1px solid var(--border-hover);
}

.cursor-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-hover);
}

.skill-block--cursor p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.skill-block--cursor p strong {
  color: var(--text-dim);
}

/* ============================================
   EXPERIENCE / TIMELINE
   ============================================ */
.timeline {
  border-left: 1px solid var(--border);
  padding-left: 2.5rem;
  margin-bottom: 4rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.5rem;
  width: 7px;
  height: 7px;
  background: var(--title);
  border-radius: 50%;
  margin-left: -3px;
}

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

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.1rem;
}

.timeline-date {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.timeline-tag {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  width: fit-content;
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  color: var(--title);
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.timeline-content ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-content li {
  font-size: 0.88rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
}

.timeline-content li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border-hover);
  font-size: 0.75rem;
}

.timeline-content li strong { color: var(--text); }

/* Text spotlight — desktop hover on gray copy (skills + experience) */
@media (hover: hover) and (pointer: fine) {
  .text-spotlight.is-lit {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .text-spotlight.is-lit strong,
  .text-spotlight.is-lit em {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.formations { margin-top: 2rem; }

.formations-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--title);
  margin-bottom: 1.5rem;
}

.formations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--bg);
}

.formation-item {
  background: var(--bg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.formation-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-display);
}

.formation-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--title);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.formation-item p {
  font-size: 0.82rem;
  color: var(--text);
}

/* ============================================
   CONTACT
   ============================================ */
#contact {
  border-top: 1px solid var(--border);
}

.contact-title { margin-bottom: 4rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-links {
  border-top: 1px solid var(--border);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

a.contact-item:hover .contact-item-value { color: var(--title); }

.contact-item-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-item-value {
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  max-width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 300;
  transition: border-color 0.2s;
  resize: vertical;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-hover);
}

.btn-submit {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  background: var(--title);
  color: var(--bg);
  border: 1px solid var(--title);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: fit-content;
}

.btn-submit:hover {
  background: transparent;
  color: var(--title);
}

.form-feedback {
  font-size: 0.82rem;
  padding: 0.4rem 0;
  min-height: 1.2rem;
}
.form-feedback.error { color: #e05252; }

/* Success overlay — remplace le formulaire */
.contact-form-success {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 2.5rem 0;
  animation: successFadeUp 0.5s ease forwards;
}
.contact-form-success.visible { display: flex; }

.contact-form-success .success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3d8f5a;
  font-size: 1.2rem;
}
.contact-form-success h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--title);
}
.contact-form-success p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}
.contact-form-success .btn-reset {
  margin-top: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.contact-form-success .btn-reset:hover { border-color: var(--title); color: var(--title); }

@keyframes successFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SIGNATURE
   ============================================ */
#signature-section {
  padding: 5rem 0 4.5rem;
  border-top: 1px solid var(--border);
  overflow: visible;
}

.sig-wrap {
  position: relative;
  width: 100%;
  cursor: none;
  padding: 0 clamp(0.75rem, 3vw, 2rem);
  overflow: visible;
}

.sig-text {
  display: block;
  width: 100%;
  margin: 0;
  font-family: var(--font-hero);
  font-size: clamp(2.75rem, 13.2vw, 11rem);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  color: var(--title);
  padding: 0.05em 0.55em 0.12em 0.2em;
  box-sizing: border-box;
  user-select: none;
}

.blend-cursor {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  top: 0;
  left: 0;
  z-index: 2;
}

.sig-wrap:hover .blend-cursor,
.hero-name-wrap:hover .blend-cursor {
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.5rem, 5vw, 3rem);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--title); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-card--featured {
    grid-column: span 2;
    flex-direction: column;
  }
  .project-card--featured .project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: unset;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    margin-left: 0;
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .lang-switch { margin-left: auto; margin-right: 1rem; }
  .nav-toggle { display: flex; }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 0;
    background: transparent;
  }
  .project-card--featured {
    grid-column: span 1;
    flex-direction: column;
  }
  .project-card--featured .project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: unset;
  }

  .project-card:not(:last-child)::after {
    content: '';
    display: block;
    width: 50vw;
    height: 1px;
    background: var(--border-hover);
    margin: 2.5rem auto 3.5rem;
  }

  .project-content {
    padding: 1.5rem 1.25rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .formations-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .hero-links { gap: 0.75rem; }
}

@media (max-width: 480px) {
  .section { padding: 4rem 1.25rem; }
  .section-title { margin-bottom: 2.5rem; }

  .hero-name {
    font-size: clamp(2.5rem, 14vw, 4.25rem);
    padding-right: 0.85em;
  }

  .sig-text {
    font-size: clamp(2.2rem, 12.5vw, 3.5rem);
    padding-right: 0.65em;
  }
}
